Expand description
Shared wire format for pasted coven codes: prefix + base64url(json).
Restore, device-pairing, and membership-operation codes are JSON payloads wrapped the same way — a recognizable prefix, then the payload base64url-encoded — so they share one implementation of those mechanics.
Enums§
- Envelope
Error - An envelope-level decode failure. Each caller maps this to its own user-facing error type.
- Fixed
HexError
Constants§
- PREFIX
- Prefix on a pasted coven code, so a string from an unrelated format is rejected immediately with a clear “missing prefix” error rather than failing confusingly at base64 or JSON decode.
Functions§
- decode_
code - Decode
{prefix}{base64url(json)}back intoT. Trims surrounding whitespace first, so a pasted code with stray leading/trailing newlines still decodes. - decode_
fixed_ hex - Decode fixed-length hex material carried inside a pasted code.
- encode_
code - Encode
codeas{prefix}{base64url(json)}.