The basics
A token transaction moves tokens from inputs to outputs. Three parties involved:- You (the wallet): construct and sign the transaction
- Spark Operators: validate, co-sign, and commit
- Watchtowers: watch for cheaters trying to double-spend on L1
The flow
Transaction types
Mint: Issuer creates new tokens. No inputs spent. Just issuer signature authorizing creation. Transfer: Move tokens between owners. Inputs must equal outputs. Create: Register a new token type. Define name, ticker, decimals, max supply.Revocation: how double-spend protection works
This is the clever part. When you receive tokens, each output has a “revocation commitment”. This is a public key where the private key is split among operators. Nobody knows the full key. When you spend those tokens, operators release their key shares to you. Now you can reconstruct the full “revocation key” for the outputs you just spent. Why does this matter? If you try to cheat by broadcasting old outputs to L1:- Watchtowers see it
- They have the revocation key (you gave it to them when you spent)
- They sweep your funds immediately
- You lose everything
Validity window
Transactions expire. You have up to 300 seconds (5 minutes) from when you create a transaction to when operators commit it. After that, it’s rejected and you have to start over. This prevents stale transactions from clogging the system.What can go wrong
| Problem | What happened |
|---|---|
| Insufficient balance | You don’t have enough tokens |
| Output already spent | Someone else spent it first |
| Invalid signature | Wrong key |
| Frozen | Issuer froze your address |
| Transaction expired | Took too long, try again |