Skip to main content
Find all examples on Github: examples-light-token
Install the agent skill:
npx skills add https://zkcompression.com
See the AI tools guide for dedicated skills.

Examples

Description
cp-swap-referenceFork of Raydium AMM that creates markets without paying rent-exemptionExample | Docs
create-and-transferCreate account via macro and transfer via CPIExample
escrowPeer-to-peer light-token swap with offer/accept flowExample
fundraiserToken fundraiser with target, deadline, and refundsExample
light-token-minterCreate light-mints with metadata, mint tokensExample
pinocchio-swapLight Token swap reference implementationExample | Docs
token-swapAMM with liquidity pools and swapsExample

Macros

Description
counterCreate PDA with sponsored rent-exemptionExample | Docs
create-associated-token-accountCreate associated light-token accountExample | Docs
create-mintCreate light-token mintExample | Docs
create-token-accountCreate light-token accountExample | Docs

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 CPIExample | Docs
burnBurn tokens via CPIExample | Docs
closeClose token account via CPIExample | Docs
create-associated-token-accountCreate associated light-token account via CPIExample | Docs
create-mintCreate light-token mint via CPIExample | Docs
create-token-accountCreate light-token account via CPIExample | Docs
freezeFreeze token account via CPIExample | Docs
mint-toMint tokens via CPIExample | Docs
revokeRevoke delegate via CPIExample | Docs
thawThaw token account via CPIExample | Docs
transfer-checkedTransfer with mint validation via CPIExample | Docs
transfer-interfaceTransfer between light-token, T22, and SPL accounts via CPIExample | Docs