Skip to main content

Module token

Module token 

Source
Expand description

JWT signing and verification for the BitRouter protocol.

Supports two web3 wallet signing schemes:

  • SOL_EDDSA — Solana-style Ed25519 over raw message bytes.
  • EIP191K — EVM-style EIP-191 prefixed secp256k1 ECDSA.

Token format: base64url(header).base64url(claims).base64url(signature)

Functions§

check_expiration
Check whether a token’s exp claim has passed.
decode_unverified
Decode a JWT without verifying the signature.
sign
Sign a set of claims into a JWT string using the master keypair.
verify
Verify a JWT string and extract the claims.