An interface for representing a materializable IPLD DAG View. It is a useful abstraction that can be used to defer actual IPLD encoding.

Note that represented DAG could be partial implying that some of the blocks may not be included. This by design allowing a user to include whatever blocks they want to include.

Type Parameters

Hierarchy

Properties

audience: Principal<`did:${string}:${string}`>
capabilities: [C]
issuer: Principal<`did:${string}:${string}`>
proofs: Proof<Capabilities>[]

Methods

  • Attach a block to the invocation DAG so it would be included in the block iterator. ⚠️ You should only attach blocks that are referenced from the capabilities or facts, if that is not the case you probably should reconsider. ⚠️ Once a delegation is de-serialized the attached blocks will not be re-attached.

    Parameters

    • block: Block<unknown, number, number, 1>

    Returns void

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

    Parameters

    Returns Await<Invocation<C>>

  • Returns Await<Delegation<[C]>>

Generated using TypeDoc