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

    Type Alias EnvelopeCase

    EnvelopeCase:
        | {
            type: "node";
            subject: Envelope;
            assertions: readonly Envelope[];
            digest: Digest;
        }
        | { type: "leaf"; cbor: Cbor; digest: Digest }
        | { type: "wrapped"; envelope: Envelope; digest: Digest }
        | { type: "assertion"; assertion: Assertion }
        | { type: "elided"; digest: Digest }
        | { type: "knownValue"; value: KnownValue; digest: Digest }
        | { type: "encrypted"; message: EncryptedMessage }
        | { type: "compressed"; value: Compressed }

    The core structural variants of a Gordian Envelope.

    Each variant represents a different structural form that an envelope can take, as defined in the Gordian Envelope IETF Internet Draft. The different cases provide different capabilities and serve different purposes in the envelope ecosystem.

    The EnvelopeCase is the internal representation of an envelope's structure. While each case has unique properties, they all maintain a digest that ensures the integrity of the envelope.

    It is advised to use the other Envelope APIs for most uses. Please see the queries module for more information on how to interact with envelopes.

    Type Declaration

    • {
          type: "node";
          subject: Envelope;
          assertions: readonly Envelope[];
          digest: Digest;
      }
      • type: "node"

        Discriminant.

      • subject: Envelope

        The subject of the node

      • assertions: readonly Envelope[]

        The assertions attached to the subject (frozen; sorted by digest)

      • digest: Digest

        The digest of the node

    • { type: "leaf"; cbor: Cbor; digest: Digest }
      • type: "leaf"

        Discriminant.

      • cbor: Cbor

        The CBOR value contained in the leaf

      • digest: Digest

        The digest of the leaf

    • { type: "wrapped"; envelope: Envelope; digest: Digest }
      • type: "wrapped"

        Discriminant.

      • envelope: Envelope

        The envelope being wrapped

      • digest: Digest

        The digest of the wrapped envelope

    • { type: "assertion"; assertion: Assertion }
      • type: "assertion"

        Discriminant.

      • assertion: Assertion

        The assertion

    • { type: "elided"; digest: Digest }
      • type: "elided"

        Discriminant.

      • digest: Digest

        The digest of the elided content

    • { type: "knownValue"; value: KnownValue; digest: Digest }
      • type: "knownValue"

        Discriminant.

      • value: KnownValue

        The known value instance

      • digest: Digest

        The digest of the known value

    • { type: "encrypted"; message: EncryptedMessage }
      • type: "encrypted"

        Discriminant.

      • message: EncryptedMessage

        The encrypted message

    • { type: "compressed"; value: Compressed }
      • type: "compressed"

        Discriminant.

      • value: Compressed

        The compressed data