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

    Class Continuation

    State bound to an optional request id and deadline; sealed to the party that reopens it.

    Implements

    • ToEnvelope
    Index
    • get id(): ARID | undefined

      The bound request id, when any.

      Returns ARID | undefined

    • get validUntil(): Date | undefined

      The deadline as a JS Date (millisecond view); cborValidUntil is the exact value.

      Returns Date | undefined

    • get cborValidUntil(): CborDate | undefined

      The deadline exactly, when any.

      Returns CborDate | undefined

    • A continuation for state, bound to validId and to validUntil (or to now plus validDuration milliseconds) when given. An id that is not an ARID, a date without a time or a duration that is not a finite non-negative number is a TypeError.

      Parameters

      Returns Continuation

    • Not expired at now (strictly before the deadline); always valid without a deadline or without a clock.

      Parameters

      Returns boolean

    • Bound to id; always valid without a bound id or without an id to check.

      Parameters

      • Optionalid: ARID

      Returns boolean

    • The state wrapped, with 'id' and 'validUntil' assertions when set; encrypted to recipient (the party that will reopen it) when given.

      Parameters

      • Optionalrecipient: Encrypter

      Returns Envelope

    • Decrypts (with recipient), reads the state, id and deadline (the 'id' and 'validUntil' objects' subjects, as the reference's extract_optional_object_for_predicate: a wrapped object is Envelope[InvalidFormat], one of the wrong type Envelope[Cbor], two of them Envelope[AmbiguousPredicate]), and checks them: ContinuationExpired when now is past the deadline, ContinuationIdInvalid when expectedId does not match the bound id.

      Parameters

      Returns Continuation

    • Continuation(state: …, id: …, validUntil: …); a JavaScript addition (the reference derives Debug only).

      Returns string