Skip to content

validateUCANChain

validateUCANChain(ucan, rootPublicKey, resolvePublicKey, maxDepth?, visited?): Promise<{ error?: string; valid: boolean; }>

Defined in: packages/core/src/ucan.ts:130

Validate a UCAN delegation chain. Checks that each UCAN in the chain:

  1. Has a valid signature
  2. The audience of each proof matches the issuer of the next
  3. Capabilities are properly attenuated (only narrowed, never broadened)
  4. The token is not expired
  5. The chain does not exceed maxDepth or contain circular delegations

UCAN

CryptoKey

(base64Key) => Promise<CryptoKey>

number = 10

Set<string> = ...

Promise<{ error?: string; valid: boolean; }>