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":       3,
  "chainId": 4663,                 // mainnet, or 46630 (testnet)
  "asset":   "ETH",                // or "USDG"
  "amount":  "50000000000000000",  // base units, decimal string (wei for ETH, 1e6 units for USDG)
  "pk":      "0x…",                // temp vault address (20-byte hex)
  "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":   "0x<hex>",        // 32-byte ECDSA private key, 0x-prefixed hex
  "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 note and amount. 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: 3, chainId: 46630, asset: "ETH", amount: "50000000000000000", pk: "0x…", 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 and v2 (deprecated) were the Solana-era formats — v1 used a plaintext note field, v2 encrypted it. Links of those vintages are rejected with a friendly error and the sender is asked to regenerate. v3 is the current format: it targets Robinhood Chain, carries chainId and asset, 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.

© 2026 CLAIMA