Docs · Reference
URL payload format.
Everything a claim link carries, byte for byte.
URL shape
A CLAIMA claim link looks like this:
https://claima.fun/c#<base64url(JSON_payload)>The part after # is the URL fragment. By spec, browsers do not transmit the fragment to the server in the request line — so the encrypted blob stays on the receiver's device.
JSON layout
Before base64url encoding, the payload is JSON with these fields:
{
"v": 2,
"pk": "8xJA…q9Rk", // temp vault pubkey (base58)
"lamports": 50_000_000, // amount funded into the vault
"network": "mainnet-beta", // or "devnet"
"salt": "<base64url>", // 16 bytes, PBKDF2 salt
"iv": "<base64url>", // 12 bytes, AES-GCM IV
"ct": "<base64url>" // ciphertext + 16-byte auth tag
}The ct field encrypts a nested JSON envelope. After decryption you get:
{
"sk": "<hex>", // 64-byte ed25519 secret key, hex-encoded
"note": "happy birthday" // optional, omitted if absent
}Encoding rules
- base64url means standard base64 with
+→-,/→_, and no=padding. URL-safe by definition. - Strings are UTF-8 byte sequences. The JSON is serialized with
JSON.stringify(no pretty-print). - All sizes are fixed except
noteandlamports. A typical link is ~260–320 characters of base64url after the#.
Decoding a link
To inspect a link manually in a JS console:
const frag = location.hash.slice(1);
const b64u = (s) => s.replace(/-/g, "+").replace(/_/g, "/")
+ "=".repeat((4 - s.length % 4) % 4);
const json = atob(b64u(frag));
console.log(JSON.parse(json));
// { v: 2, pk: "8xJA…", lamports: 50000000, network: "devnet", salt: "…", iv: "…", ct: "…" }You can read all of these fields without the password. The ciphertext is opaque until you derive the AES key from the password and decrypt — see how it works for the full recipe.
Versioning
The v field at the top of the payload is a version number. v1 (deprecated) used a plaintext note field — links of that vintage are rejected with a friendly error and the sender is asked to regenerate. v2 is the current format and encrypts the note inside ct.
Future versions will continue to be additive — readers should check v first and fall through to the newest known schema.