PostQ
$POSTQ
AppDashboardCanary$POSTQDocs

How it works

#From 24 words to a vault address

  1. Your browser draws 256 bits of randomness and writes them as 24 BIP-39 words.
  2. The words become a 64-byte seed (standard BIP-39, no passphrase).
  3. For each key epoch of each vault, HKDF-SHA256 turns that seed into a 32-byte secret and a 16-byte key identifier. The derivation is bound to the network, the program and the vault, so one set of words can back several vaults without any two sharing a key.
  4. The secret makes 1,024 Winternitz one-time keys (the leaves). Each leaf is 67 hash chains of 15 steps. The leaves fold into a Merkle tree; its 32-byte top plus the identifier is the 48-byte root.
  5. The vault's identity is SHA-256("HASHVAULT/vault-id/v1" ‖ root ‖ options). The program derives two addresses from it: a state account that stores the root and the leaf counter, and the vault address that holds your assets.

#Deposits

A deposit is an ordinary transfer to the vault address. Tokens go into the vault address's own token accounts, which the app creates when needed. Deposits never touch your quantum key.

#Withdrawals

  1. The app rebuilds your key from the words, checks that its root equals the root stored on chain, and picks the next unused leaf.
  2. It encodes what you want to move (up to eight actions) into exact bytes, prefixed with the network, the program, the vault, the epoch and the leaf. It writes those bytes out as one sentence for you to read.
  3. It records the leaf as spent, then signs. The signature is 2,508 bytes.
  4. Your wallet sends three transactions: two write the signature into a buffer account, the third asks the program to act.
  5. The program rebuilds the same bytes from the instruction, verifies the signature against the stored root with SHA-256, burns the leaf, then signs for the vault address and moves exactly what was signed. Any mismatch fails the whole transaction.

#Rotation and closing

When leaves run low, a signature from the current key installs the next key's root and resets the counter. Closing an empty vault turns its state into a permanent tombstone so the same key can never reopen it.