Skip to main content
  1. The Light-token API matches the SPL-token API almost entirely, and extends their functionality to include the light token program in addition to the SPL-token and Token-2022 programs.
  2. Your users hold and receive tokens of the same mints, 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()
Wrap from SPLN/Awrap()
Unwrap to SPLN/Aunwrap()
Find full code examples here.

Setup

Receive Payments

Find a full code example here.

Send Payments

Find a full code example here.

Show Balance

Find a full code example here.

Transaction History

Find a full code example here.
Use getSignaturesForAddressInterface(address) if you want address-specific rather than owner-wide history.

Wrap from SPL

Wrap tokens from SPL/Token-2022 accounts to light-token ATA.
Find a full code example here.

Unwrap to SPL

You can compose with applications that do not yet support the light-token standard by unwrapping your tokens. Unwrap moves the token balance from a light-token account to a SPL-token account.
Find a full code example here.