MoQ is under active development. APIs and protocols may change between releases.

Skip to content

@moq/token

npm

The TypeScript twin of moq-token. Generate keys (HMAC, RSA, ECDSA, EdDSA, individually or as a JWK set), sign and verify tokens, and authorize a connection path against the claims exactly as moq-relay does. Tokens are interchangeable with the Rust side.

bash
bun add @moq/token
bun run @moq/token generate --key root.jwk
bun run @moq/token sign --key root.jwk --root "rooms/123" --publish alice

Mint tokens on a server, never in the browser, and prefer asymmetric keys so the relay holds only the public half. Example: sign-and-verify.ts.

Licensed under MIT or Apache-2.0