An interface for representing a materialized IPLD DAG View, which provides a generic traversal API. It is useful for encoding (potentially partial) IPLD DAGs into content archives (e.g. CARs).

Type Parameters

  • T = unknown

Hierarchy

Properties

invocationLinks: [] | Transport.Tuple<Link<UCAN.UCAN<[Capability<Ability, `${string}:${string}`, unknown>]>, number, number, 1>>
invocations: Invocation<Capability<Ability, `${string}:${string}`, unknown>>[]
receipts: Map<ToString<UCANLink<Capabilities, MulticodecCode<number, string>, SigAlg>>, Receipt<{}, {}, Invocation<Capability<Ability, `${string}:${string}`, unknown>>, SigAlg>>
root: Transport.Block<{} & {
    ucanto/message@7.0.0: AgentMessageData<T>;
}, 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.

Methods

  • 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>>

Generated using TypeDoc