Skip to content

refactor(cli): rename compress/decompress to wrap/unwrap and update commands#2300

Draft
tilo-14 wants to merge 7 commits intomainfrom
bump-cli-v2
Draft

refactor(cli): rename compress/decompress to wrap/unwrap and update commands#2300
tilo-14 wants to merge 7 commits intomainfrom
bump-cli-v2

Conversation

@tilo-14
Copy link
Member

@tilo-14 tilo-14 commented Feb 19, 2026

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-splwrap-spl (you're wrapping SPL tokens into Light Tokens)
  • decompress-splunwrap-spl (you're unwrapping Light Tokens back to SPL)
  • Commands, tests, file paths all renamed

2. Remove ZK Compression SOL commands (e29b806)

  • Deleted compress-sol and decompress-sol entirely
  • Deleted balance (compressed SOL balance)
  • Deleted merge-token-accounts
  • Deleted approve-and-mint-to
  • These were compression-layer primitives, not Light Token operations

3. Fix transfer to pass wallet key not ATA (243683c)

  • transferInterface expected the wallet pubkey, not the derived ATA address

4. Remove redundant decompressMint (4b73af8)

  • Cleaned up a leftover V1 function, updated init command description

5. Replace V1 mintTo in test helpers (5f0ad94)

  • Test setup was using V1 mintTo from @lightprotocol/compressed-token to mint compressed tokens directly
  • This is the old V1 compress path — it bypasses wrap entirely
  • Now: setup mints plain SPL tokens into an ATA, tests call wrap-spl/unwrap-spl
  • Tests exercise the actual user flow instead of a V1 backdoor

Net 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 from cli-tests-v2 to cli-tests.


Open with Devin

…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
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 19, 2026

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (35)
  • .github/workflows/cli-v1.yml is excluded by none and included by none
  • .github/workflows/cli-v2.yml is excluded by none and included by none
  • cli/README.md is excluded by none and included by none
  • cli/justfile is excluded by none and included by none
  • cli/package.json is excluded by none and included by none
  • cli/src/commands/approve-and-mint-to/index.ts is excluded by none and included by none
  • cli/src/commands/balance/index.ts is excluded by none and included by none
  • cli/src/commands/compress-sol/index.ts is excluded by none and included by none
  • cli/src/commands/create-interface-pda/index.ts is excluded by none and included by none
  • cli/src/commands/create-mint/index.ts is excluded by none and included by none
  • cli/src/commands/create-token-account/index.ts is excluded by none and included by none
  • cli/src/commands/decompress-sol/index.ts is excluded by none and included by none
  • cli/src/commands/init/index.ts is excluded by none and included by none
  • cli/src/commands/merge-token-accounts/index.ts is excluded by none and included by none
  • cli/src/commands/mint-to/index.ts is excluded by none and included by none
  • cli/src/commands/token-balance/index.ts is excluded by none and included by none
  • cli/src/commands/transfer/index.ts is excluded by none and included by none
  • cli/src/commands/unwrap-spl/index.ts is excluded by none and included by none
  • cli/src/commands/wrap-spl/index.ts is excluded by none and included by none
  • cli/test/commands/approve-and-mint-to/index.test.ts is excluded by none and included by none
  • cli/test/commands/balance/index.test.ts is excluded by none and included by none
  • cli/test/commands/compress-sol/index.test.ts is excluded by none and included by none
  • cli/test/commands/create-interface-pda/index.test.ts is excluded by none and included by none
  • cli/test/commands/create-mint/index.test.ts is excluded by none and included by none
  • cli/test/commands/create-token-account/index.test.ts is excluded by none and included by none
  • cli/test/commands/decompress-sol/index.test.ts is excluded by none and included by none
  • cli/test/commands/merge-token-accounts/index.test.ts is excluded by none and included by none
  • cli/test/commands/mint-to/index.test.ts is excluded by none and included by none
  • cli/test/commands/token-balance/index.test.ts is excluded by none and included by none
  • cli/test/commands/transfer/index.test.ts is excluded by none and included by none
  • cli/test/commands/unwrap-spl/index.test.ts is excluded by none and included by none
  • cli/test/commands/wrap-spl/index.test.ts is excluded by none and included by none
  • cli/test/helpers/helpers.ts is excluded by none and included by none
  • external/photon is excluded by none and included by none
  • js/compressed-token/src/index.ts is excluded by none and included by none

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bump-cli-v2

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

tilo-14 and others added 6 commits February 19, 2026 01:00
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
Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 5 additional findings.

Open in Devin Review

@tilo-14 tilo-14 marked this pull request as draft March 3, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants