Blockchain Commons GSTP TypeScript Library - v1.0.0-alpha.16
    Preparing search index...

    Interface SealedEventBehavior<T>

    Interface that defines the behavior of a sealed event.

    Extends EventBehavior with additional methods for managing sender information and state continuations.

    interface SealedEventBehavior<T extends EnvelopeEncodableValue> {
        withState(state: EnvelopeEncodableValue): SealedEvent<T>;
        withOptionalState(state: EnvelopeEncodableValue): SealedEvent<T>;
        withPeerContinuation(peerContinuation: Envelope$1): SealedEvent<T>;
        withOptionalPeerContinuation(
            peerContinuation: Envelope$1 | undefined,
        ): SealedEvent<T>;
        event(): Event<T>;
        sender(): XIDDocument;
        state(): Envelope$1 | undefined;
        peerContinuation(): Envelope$1 | undefined;
    }

    Type Parameters

    • T extends EnvelopeEncodableValue

    Implemented by

    Index

    Methods

    • Adds state to the event that the receiver must return in the response.

      Parameters

      • state: EnvelopeEncodableValue

      Returns SealedEvent<T>

    • Adds a continuation previously received from the recipient.

      Parameters

      • peerContinuation: Envelope$1

      Returns SealedEvent<T>

    • Adds an optional continuation previously received from the recipient.

      Parameters

      • peerContinuation: Envelope$1 | undefined

      Returns SealedEvent<T>

    • Returns the sender of the event.

      Returns XIDDocument

    • Returns the state to be sent to the recipient.

      Returns Envelope$1 | undefined

    • Returns the continuation received from the recipient.

      Returns Envelope$1 | undefined