Skip to main content

Interface: Delegation<C>

types.Delegation

A materialized view of a UCAN delegation, which can be encoded into a UCAN token and used as proof for an invocation or further delegations.

Type parameters

NameType
Cextends Capabilities = Capabilities

Properties

asCID

asCID: Link<C, MulticodecCode<number, string>, SigAlg>

Defined in

node_modules/@ucanto/interface/dist/src/lib.d.ts:81


audience

audience: Principal<`did:${string}:${string}`>

Defined in

node_modules/@ucanto/interface/dist/src/lib.d.ts:84


blocks

Readonly blocks: Map<string, Block<unknown, number, number, 1>>

Map of all the IPLD blocks that were included with this delegation DAG. Usually this would be blocks corresponding to proofs, however it may also contain other blocks e.g. things that capabilities or facts may link. It is not guaranteed to include all the blocks of this DAG, as it represents a partial DAG of the delegation desired for transporting.

Also note that map may contain blocks that are not part of this delegation DAG. That is because Delegation is usually constructed as view / selection over the CAR which may contain bunch of other blocks.

Defined in

node_modules/@ucanto/interface/dist/src/lib.d.ts:77


bytes

Readonly bytes: ByteView<UCAN<C>>

Defined in

node_modules/@ucanto/interface/dist/src/lib.d.ts:79


capabilities

capabilities: C

Defined in

node_modules/@ucanto/interface/dist/src/lib.d.ts:85


cid

Readonly cid: Link<C, MulticodecCode<number, string>, SigAlg>

Defined in

node_modules/@ucanto/interface/dist/src/lib.d.ts:78


data

Readonly data: View<C>

Defined in

node_modules/@ucanto/interface/dist/src/lib.d.ts:80


expiration

Optional expiration: number

Defined in

node_modules/@ucanto/interface/dist/src/lib.d.ts:86


facts

facts: Fact[]

Defined in

node_modules/@ucanto/interface/dist/src/lib.d.ts:89


issuer

issuer: Principal<`did:${string}:${string}`>

Defined in

node_modules/@ucanto/interface/dist/src/lib.d.ts:83


nonce

Optional nonce: string

Defined in

node_modules/@ucanto/interface/dist/src/lib.d.ts:88


notBefore

Optional notBefore: number

Defined in

node_modules/@ucanto/interface/dist/src/lib.d.ts:87


proofs

proofs: Proof<Capabilities>[]

Defined in

node_modules/@ucanto/interface/dist/src/lib.d.ts:90


root

Readonly root: UCANBlock<C, MulticodecCode<number, string>, SigAlg>

Defined in

node_modules/@ucanto/interface/dist/src/lib.d.ts:64

Methods

export

export(): IterableIterator<Block<unknown, number, number, 1>>

Returns

IterableIterator<Block<unknown, number, number, 1>>

Defined in

node_modules/@ucanto/interface/dist/src/lib.d.ts:82


iterate

iterate(): IterableIterator<Delegation<Capabilities>>

Returns

IterableIterator<Delegation<Capabilities>>

Defined in

node_modules/@ucanto/interface/dist/src/lib.d.ts:91