@blockchaincommons/envelope - v1.0.0-beta.4
    Preparing search index...

    Function lockSubject

    • Encrypts the subject with a fresh content key and adds a hasSecret assertion holding that key locked by secret via method (the reference's lock_subject).

      KeyDerivationMethod.SSHAgent needs an agent, which this synchronous function does not take: it throws Components with components' message, where the reference connects to SSH_AUTH_SOCK itself. Use lockSubjectWith.

      Parameters

      • envelope: Envelope
      • method: KeyDerivationMethod
      • secret: Uint8Array
      • options: RngOptions = {}

      Returns Envelope

      EnvelopeError InvalidParameter for a value outside KeyDerivationMethod; Components (components error: <message>, cause the ComponentsError) when components cannot lock the key