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:
- Has a valid signature
- The audience of each proof matches the issuer of the next
- Capabilities are properly attenuated (only narrowed, never broadened)
- The token is not expired
- The chain does not exceed maxDepth or contain circular delegations
Parameters
Section titled “Parameters”rootPublicKey
Section titled “rootPublicKey”CryptoKey
resolvePublicKey
Section titled “resolvePublicKey”(base64Key) => Promise<CryptoKey>
maxDepth?
Section titled “maxDepth?”number = 10
visited?
Section titled “visited?”Set<string> = ...
Returns
Section titled “Returns”Promise<{ error?: string; valid: boolean; }>