openDelivery
openDelivery(
privateKey,bytes,options?):Promise<{chain:ClaimChain;claim:VerifiedClaim;expired:boolean;grant:Grant;key:Uint8Array; }>
Defined in: claims.ts:649
Open a delivery as its final bearer: verify the chain, unwrap the key, and check it against the commitment in its claim, which the owner (or the delegate above) signed. The group key commitment comes back too, for a bearer that writes the group key’s first datasets.
An expired delivery still opens: a key cannot expire, so decrypting with it
keeps working. expired says the claim is spent, and signRequest and
delegateClaim refuse it; get a new grant before fetching from a gating
provider or sharing onward.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
privateKey |
`0x${string}` |
bytes |
Uint8Array |
options? |
{ now?: number; piece?: PieceLabels; } |
options.now? |
number |
options.piece? |
PieceLabels |
Returns
Section titled “Returns”Promise<{ chain: ClaimChain; claim: VerifiedClaim; expired: boolean; grant: Grant; key: Uint8Array; }>
Throws
Section titled “Throws”With the reason the delivery is refused.