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

    A container for vendor-specific metadata attachments.

    Attachments provides a flexible mechanism for attaching arbitrary metadata to envelopes without modifying their core structure.

    Index
    • Adds a new attachment with the specified payload and metadata.

      Parameters

      • payload: EnvelopeInput

        The data to attach

      • vendor: string

        A string identifying the entity that defined the attachment format

      • OptionalconformsTo: string

        Optional URI identifying the structure the payload conforms to

      Returns void

    • Retrieves an attachment by its digest.

      Parameters

      • digest: Digest

        The unique digest of the attachment to retrieve

      Returns Envelope | undefined

      The envelope if found, or undefined

    • Removes an attachment by its digest.

      Parameters

      • digest: Digest

        The unique digest of the attachment to remove

      Returns Envelope | undefined

      The removed envelope if found, or undefined

    • Adds all attachments from this container to an envelope, each stored 'attachment' assertion as it is (they are assertion envelopes already).

      Parameters

      • envelope: Envelope

        The envelope to add attachments to

      Returns Envelope

      A new envelope with all attachments added as assertions