StaticdecodeParses a token and validates its structure WITHOUT checking the
signature or any timestamps. Use verifySignature for the
signature; expiration is checked by Session.verifyAttested.
MALFORMED/FORMAT on any structural
problem: wrong shape, invalid Base64URL, size over
ATTESTATION_MAX_PAYLOAD, non-JSON payload, wrong typ,
missing/ill-typed fields, or a non-positive/NaN maxSessionTtl.
StaticverifyVerifies the token signature against a public key.
false for a bad signature or a wrong key. Returns
false for any invalid signature, including malformed lengths.
It still throws AttestationError MALFORMED/FORMAT for
structurally invalid tokens (see decode).
StaticmatchStaticissueCreates and signs a new attestation.
The subject name is canonicalized (NFKC → lowercase → trim) before
signing; the subject public key must be exactly 32 bytes. Serialization is
deterministic: fields are emitted in a fixed order and
undefined grant fields are omitted from the JSON entirely
(distinguishable from []).
32-byte Ed25519 private key of the parent.
32-byte Ed25519 public key being attested.
Child name; canonicalized before signing.
Constraints enforced by verifiers (Mode 2).
Optionalopts: { Lifetime control: ttlSeconds (default one year),
expiresAt (overrides ttlSeconds), jti (default random UUID),
now (fixed clock for deterministic tests).
OptionalttlOptionalexpiresOptionaljti?: stringOptionalnow?: numberThe attestation with payload, token and jti accessors.
A parent-signed statement binding a derived child key to a name and a grant. Chains of attestations (
Identity → Handle → SubHandle) allow any third party to verify sessions offline using only the root public key, with grant constraints enforced at verification time.Tokens have the form
base64url(payload).base64url(signature)and are deterministic: the same inputs (includingjtiandnow) always produce byte-identical tokens.Example