Skip to main content
Find all examples on Github: examples-light-token

Examples

Description
cp-swap-referenceFork of Raydium AMM that creates markets without paying rent-exemption
create-and-transferCreate account via macro and transfer via CPI

Macros

Description
counterCreate PDA with sponsored rent-exemption
create-associated-token-accountCreate associated light-token account
create-mintCreate light-token mint
create-token-accountCreate light-token account

Instructions

The instructions use pure CPI calls which you can combine with existing and / or light macros. For existing programs, you can replace spl_token with light_token instructions as you need. The API is a superset of SPL-token so switching is straightforward.
Description
approveApprove delegate via CPI
burnBurn tokens via CPI
closeClose token account via CPI
create-associated-token-accountCreate associated light-token account via CPI
create-mintCreate light-token mint via CPI
create-token-accountCreate light-token account via CPI
freezeFreeze token account via CPI
mint-toMint tokens via CPI
revokeRevoke delegate via CPI
thawThaw token account via CPI
transfer-checkedTransfer with mint validation via CPI
transfer-interfaceTransfer between light-token, T22, and SPL accounts via CPI