Skip to content

authorizationHeader

authorizationHeader(signer, chain, input): Promise<string>

Defined in: claims.ts:403

The Authorization header for one gated request: a request for pieceCid signed by the chain’s final bearer, presented with its chain. Make a fresh one per fetch; it expires expiresIn seconds after now (default 240).

Parameter Type
signer ClaimSigner
chain ClaimChain
input { expiresIn?: number; now?: number; pieceCid: Uint8Array; }
input.expiresIn? number
input.now? number
input.pieceCid Uint8Array

Promise<string>

As signRequest does: an expired chain, or an expiry the gate would refuse.