StaticnewCreates a new successful sealed response.
The request ID this response is for
The sender's XID document
StaticnewCreates a new failure sealed response.
The request ID this response is for
The sender's XID document
StaticnewCreates a new early failure sealed response.
An early failure takes place before the message has been decrypted, and therefore the ID and sender public key are not known.
The sender's XID document
Adds state to the response that the peer may return at some future time.
Adds a continuation previously received from the recipient.
Returns the sender of the response.
Returns the state to be sent to the peer.
Returns the continuation received from the peer.
Sets the result value for a successful response.
Sets an optional result value for a successful response. If the result is undefined, the value of the response will be the null envelope.
Sets the error value for a failure response.
Sets an optional error value for a failure response. If the error is undefined, the value of the response will be the unknown value.
Returns true if this is a successful response.
Returns true if this is a failure response.
Returns the ID of the request this response is for, if known.
Creates an envelope that can be decrypted by zero or one recipient.
OptionalvalidUntil: DateOptional expiration date for the continuation
Optionalsigner: SignerOptional signer for the envelope
Optionalrecipient: XIDDocumentOptional recipient XID document for encryption
The sealed response as an envelope
Creates an envelope that can be decrypted by zero or more recipients.
OptionalvalidUntil: DateOptional expiration date for the continuation
Optionalsigner: SignerOptional signer for the envelope
Optionalrecipients: XIDDocument[]Array of recipient XID documents for encryption
The sealed response as an envelope
StatictryParses a sealed response from an encrypted envelope.
The encrypted envelope to parse
Optional expected request ID for validation
Optional current time for continuation validation
The recipient's private keys for decryption
The parsed sealed response
Returns a string representation of the sealed response.
A sealed response that combines a Response with sender information and state continuations for secure communication.
Example