Skip to main content
  1. light-token follows the same API patterns like ATA
  2. Your users hold and receive the same tokens, just stored more efficiently.

What you will implement

SPLLight
Get/Create ATAgetOrCreateAssociatedTokenAccount()getOrCreateAtaInterface()
Derive ATAgetAssociatedTokenAddress()getAssociatedTokenAddressInterface()
TransfertransferChecked()transferInterface()
Get BalancegetAccount()getAtaInterface()
Tx HistorygetSignaturesForAddress()rpc.getSignaturesForOwnerInterface()
Entry from SPLN/Awrap()
Exit to SPLN/Aunwrap()
Find full code examples here.

Setup

Receive Payments

Send Payments

To ensure your recipient’s ATA exists you can prepend an idempotent creation instruction in the same atomic transaction:
With idempotent ATA creation:

Show Balance

Transaction History

Token accounts are compressed when inactive
Use getSignaturesForAddressInterface(address) if you want address-specific rather than owner-wide history.

Wrap from SPL

When users deposit from a CEX or legacy integration:

Unwrap to SPL

When users need SPL tokens (CEX withdrawal, legacy integration):