refactor(cli): rename compress/decompress to wrap/unwrap and update commands#2300
refactor(cli): rename compress/decompress to wrap/unwrap and update commands#2300
Conversation
…ommands - Rename compress-sol/compress-spl to wrap-sol/wrap-spl - Rename decompress-sol/decompress-spl to unwrap-sol/unwrap-spl - Remove deprecated commands: approve-and-mint-to, create-token-pool, merge-token-accounts - Add new commands: create-interface-pda, create-token-account - Export unwrap and decompressMint from compressed-token SDK - Update tests and README to match new command names
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (35)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Remove wrap-sol, unwrap-sol, and balance commands that use raw ZK Compression (stateless.js compress/decompress). CLI now exclusively uses Light Token APIs from @lightprotocol/compressed-token.
transferInterface expects a wallet public key (on-curve) as destination and derives the ATA internally. The CLI was passing a derived ATA which caused an off-curve validation error, silently failing the transfer. Also removes redundant createAtaInterfaceIdempotent call since transferInterface handles recipient ATA creation via ensureRecipientAta.
createMintInterface already embeds decompressMint as an action in the create-mint instruction data. The separate decompressMint call after mint creation was a wasted transaction. Also updates init command description to "Light Token".
Setup now mints SPL tokens to the payer's ATA instead of compressed tokens via the V1 path. Wrap test wraps directly, unwrap test wraps first then unwraps.
- Narrow decompressMint catch to only swallow AlreadyInUse/0x0 errors - Remove duplicate command files from test/commands/ - Update create-interface-pda test to V2 APIs (createRpc) - Add wrap-spl success assertion in unwrap-spl test - Fix justfile to use pnpm build:v2 matching CI workflow - Fix package.json indentation
The rebrand: "ZK Compression" → "Light Token"
The CLI was built around the "ZK Compression" branding — compress SOL, compress SPL, decompress, compressed token balance, etc. The product is being repositioned as Light Token — a token standard on Solana, not a compression utility. The CLI language needs to reflect what users actually do, not the underlying mechanism.
What changed
1. Rename compress/decompress → wrap/unwrap (
6e31743)compress-spl→wrap-spl(you're wrapping SPL tokens into Light Tokens)decompress-spl→unwrap-spl(you're unwrapping Light Tokens back to SPL)2. Remove ZK Compression SOL commands (
e29b806)compress-solanddecompress-solentirelybalance(compressed SOL balance)merge-token-accountsapprove-and-mint-to3. Fix transfer to pass wallet key not ATA (
243683c)transferInterfaceexpected the wallet pubkey, not the derived ATA address4. Remove redundant decompressMint (
4b73af8)5. Replace V1 mintTo in test helpers (
5f0ad94)mintTofrom@lightprotocol/compressed-tokento mint compressed tokens directlywrap-spl/unwrap-splNet result
The CLI went from ~16 commands exposing compression internals to a focused set of Light Token operations:
create-mint,mint-to,transfer,wrap-spl,unwrap-spl,token-balance,create-token-account. The V1 compressed token path is gone from the test helpers. The CI workflow was renamed fromcli-tests-v2tocli-tests.