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

    Function unlockSubject

    • Decrypts the subject with the content key that secret unlocks (the reference's unlock_subject): every unobscured hasSecret object must decode as an EncryptedKey; the first one secret opens decrypts the subject; a key it does not open is skipped, whatever the reason (an SSH-agent key, which needs unlockSubjectWith, is skipped too).

      Parameters

      Returns Envelope

      EnvelopeError UnknownSecret when no key opens; Cbor when a hasSecret object is not an EncryptedKey; the errors of decryptSubject