Skip to content

rootClaim

rootClaim(owner, input): Promise<{ chain: ClaimChain; nodeKey: Uint8Array; }>

Defined in: claims.ts:256

The root of a chain, signed by the owner’s wallet: one EIP-712 prompt. Derives the bearer’s node key from the group key, so the root cannot commit to a wrong one, and hands it back to wrap for the bearer. When the bearer is a session key, set expires to the session key’s expiry.

Parameter Type
owner ClaimSigner
input { bearer: `0x${string}`; chainId: bigint; expires: number; groupKey: Uint8Array; groupKeyId: `0x${string}`; maxDepth: number; node: string; now?: number; owner: `0x${string}`; piece?: PieceLabels; pieceCid?: Uint8Array<ArrayBufferLike>; }
input.bearer `0x${string}`
input.chainId bigint
input.expires number
input.groupKey Uint8Array
input.groupKeyId `0x${string}`
input.maxDepth number
input.node string
input.now? number
input.owner `0x${string}`
input.piece? PieceLabels
input.pieceCid? Uint8Array<ArrayBufferLike>

Promise<{ chain: ClaimChain; nodeKey: Uint8Array; }>

If signer is not the owner.