Recipes and errors
Recipes that fit in 24 hours
Charge, prove, grant ownership, execute rules: the minimum for each, and whether you need your own program.
| You want to | The minimum | Own program? |
|---|---|---|
| Charge in digital dollars | A USDC transfer signed from the app. The backend confirms the transaction (official mint, destination, amount) and marks the signature as used before delivering — a signature is not a payment, and a payment cannot count twice | No |
| Charge without the user holding SOL | The same, with Privy fee sponsorship or Kora | No |
| Prove a document existed at a point in time (not that it is true) | Store in an account (or a memo) the document's hash — with a secret nonce if the content is guessable; the file stays on your server | Minimal, or none (Memo) |
| Grant transferable ownership of something | An NFT (Metaplex Core) as the title, or a compressed NFT if there are thousands — but reading those needs a DAS-capable RPC (Helius, Triton): confirm your plan has it before choosing Bubblegum | No |
| Let an agent pay per API call | x402: your endpoint answers 402 with the price; the client pays in USDC and retries. x402-template |
No |
| A link that executes an action | Actions + Blinks | No |
| Rules that execute themselves (parametric insurance, escrow, payment splits) | A small Anchor program: one state account, one instruction that checks the condition (Pyth/Switchboard oracle) and transfers. A program does not wake up on its own: somebody sends the transaction — a keeper of yours or any user — and the program verifies | Yes, small |
| A verifiable credential (certificate, membership) | Attestations (SAS) | No |