@blockchaincommons/gstp - v1.0.0-beta.2
    Preparing search index...

    Class GstpError

    The error every operation of this package throws.

    try {
    SealedRequest.open(envelope, { recipient, now });
    } catch (e) {
    if (GstpError.isGstpError(e) && e.is("Envelope")) console.log(e.details.inner);
    }

    Hierarchy

    • Error
      • GstpError
    Index
    name: "GstpError"

    Always "GstpError".

    Which condition was raised.

    Structured information, discriminated by code; frozen.

    • true for an error this package threw: an instance, not a look-alike.

      Parameters

      • value: unknown

      Returns value is GstpError

    • SenderMissingEncryptionKey: the sender's document holds no encryption key.

      Returns GstpErrorTyped<"SenderMissingEncryptionKey">

    • RecipientMissingEncryptionKey: a recipient's document holds no encryption key.

      Returns GstpErrorTyped<"RecipientMissingEncryptionKey">

    • SenderMissingVerificationKey: the sender's document holds no verification key.

      Returns GstpErrorTyped<"SenderMissingVerificationKey">

    • ContinuationIdInvalid: the continuation is bound to another request id.

      Returns GstpErrorTyped<"ContinuationIdInvalid">

    • PeerContinuationNotEncrypted: the peer's continuation arrived in the clear.

      Returns GstpErrorTyped<"PeerContinuationNotEncrypted">

    • MissingPeerContinuation: a request arrived without the peer's continuation.

      Returns GstpErrorTyped<"MissingPeerContinuation">

    • StateOnFailedResponse: state was set on a response that is not a success (the reference panics).

      Returns GstpErrorTyped<"StateOnFailedResponse">

    • Envelope: an envelope that would not decrypt, verify, unwrap or parse; cause is the envelope error.

      Parameters

      • cause: unknown

      Returns GstpErrorTyped<"Envelope">