Interface Receipt<Ok, Error, Ran, Alg>

Represents a view of the invocation receipt. Unlike the ReceiptModel, this interface provides a more ergonomic API and allows you to reference linked IPLD objects of they are included in the source DAG.

Type Parameters

Hierarchy

Properties

issuer?: Principal<`did:${string}:${string}`>
meta: Meta
out: Schema.Result<Ok, Error>
proofs: Proof<Capabilities>[]
ran: Ran | ReturnType<Ran["link"]>
root: Transport.Block<ReceiptModel<Ok, Error, Ran>, number, number, 1>

The root block of the IPLD DAG this is the view of. This is the the block from which all other blocks are linked directly or transitively.

signature: SignatureView<OutcomeModel<Ok, Error, Ran>, Alg>

Methods

  • Encodes all the blocks and creates a new IPLDView instance over them. Can be passed a multihasher to specify a preferred hashing algorithm. Note that there is no guarantee that preferred hasher will be used, it is only a hint of preference and not a requirement.

    Returns Receipt<Ok, Error, Ran, Alg>

  • Returns an iterable of all the IPLD blocks that are included in this view. It is RECOMMENDED that implementations return blocks in bottom up order (i.e. leaf blocks first, root block last).

    Iterator MUST include the root block otherwise it will lead to encoders into omitting it when encoding the view into a CAR archive.

    Note that we would like to rename this method to blocks but that would be a breaking change on the Delegate API so we defer it for now.

    Returns IterableIterator<Transport.Block<unknown, number, number, 1>>

  • Returns Link<ReceiptModel<Ok, Error, Ran>, number, number, 1>

Generated using TypeDoc