Creates a new empty attachments container.
Adds a new attachment with the specified payload and metadata.
The data to attach
A string identifying the entity that defined the attachment format
OptionalconformsTo: stringOptional URI identifying the structure the payload conforms to
Adds a pre-constructed attachment envelope directly.
The attachment envelope to add
Retrieves an attachment by its digest.
The unique digest of the attachment to retrieve
The envelope if found, or undefined
Removes an attachment by its digest.
The unique digest of the attachment to remove
The removed envelope if found, or undefined
Removes all attachments from the container.
Returns whether the container has any attachments.
Returns the number of attachments in the container.
Returns an iterator over all attachment envelopes.
Adds all attachments from this container to an envelope.
The envelope to add attachments to
A new envelope with all attachments added as assertions
StaticfromCreates an Attachments container from an envelope's attachment assertions.
The envelope to extract attachments from
A new Attachments container with the envelope's attachments
A container for vendor-specific metadata attachments.
Attachments provides a flexible mechanism for attaching arbitrary metadata to envelopes without modifying their core structure.