Skip to content

BearerToken

A Bedrock bearer token, the region it was minted for, and when it stops working.

A class rather than an object because it carries a secret: JSON.stringify gives {} and only expose() returns the text.

get expiresAt(): number;

Effective Unix expiry, capped at the known signing credential expiry. With missing credential expiry metadata this is only an upper bound.

number


get region(): Region;

The region the token was minted for.

Region

expose(): string;

The token text, for a caller writing it into an environment themselves.

string


toString(): string;

The length of the token, never the token.

string

This page is generated from bindings/microvms-js/index.d.ts by TypeDoc 0.28.20 and typedoc-plugin-markdown 4.13.1, run from site/scripts/gen-reference.mjs on every pnpm run sync, so an edit made here is overwritten by the next run.

To change the page, change the doc comment in the binding’s Rust source, then regenerate the declarations with mise run dts. mise run dts:check fails when the committed file no longer matches the source.