- light-token follows the same API patterns like ATA
- Your users hold and receive the same tokens, just stored more efficiently.
| Creation Cost | SPL | light-token |
|---|---|---|
| Token Account | ~2,000,000 lamports | ~11,000 lamports |
What you will implement
| SPL | Light | |
|---|---|---|
| Get/Create ATA | getOrCreateAssociatedTokenAccount() | getOrCreateAtaInterface() |
| Derive ATA | getAssociatedTokenAddress() | getAssociatedTokenAddressInterface() |
| Transfer | transferChecked() | transferInterface() |
| Get Balance | getAccount() | getAtaInterface() |
| Tx History | getSignaturesForAddress() | rpc.getSignaturesForOwnerInterface() |
| Entry from SPL | N/A | wrap() |
| Exit to SPL | N/A | unwrap() |
Find full code examples
here.
Setup
Receive Payments
- Action
- Instruction
Compare to SPL
Compare to SPL
Send Payments
- Action
- Instruction
Compare to SPL
Compare to SPL
Show Balance
Compare to SPL
Compare to SPL
Transaction History
Token accounts are compressed when inactivegetSignaturesForAddressInterface(address) if you want address-specific rather than owner-wide history.
Compare to SPL
Compare to SPL
Wrap from SPL
When users deposit from a CEX or legacy integration:- Action
- Instruction
Unwrap to SPL
When users need SPL tokens (CEX withdrawal, legacy integration):- Action
- Instruction