Skip to content

mintStreamToken

mintStreamToken(key, options): Promise<string>

Defined in: packages/server/src/circuits/stream-token.ts:132

Mint one token for a whole batch of grants.

Batched by design, not as an optimisation: a subject in K scopes holds K subscriptions, and re-minting per subscription would put K requests on every TTL boundary for every subject. One token covering all K collapses that to one request per subject per window.

CryptoKey

MintStreamTokenOptions

Promise<string>