Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
fa5a2ba
rm decompressinterface
SwenSchaeferjohann Feb 18, 2026
cb1c228
unwrap consistent
SwenSchaeferjohann Feb 23, 2026
8dc1230
remove createLoadAccountsParams
SwenSchaeferjohann Feb 23, 2026
f46dc62
add uni err
SwenSchaeferjohann Feb 23, 2026
fd1a9ff
fix
SwenSchaeferjohann Feb 23, 2026
40058c4
remove layout serde, add load-ata instruction
SwenSchaeferjohann Feb 25, 2026
087136a
apply review fixes, simplify delegate and frozen reasoning
SwenSchaeferjohann Feb 25, 2026
3b1c4e8
update freeze thaw
SwenSchaeferjohann Feb 25, 2026
989be72
test upd
SwenSchaeferjohann Feb 26, 2026
524ac3c
fix cold load delegate
SwenSchaeferjohann Feb 26, 2026
c490db6
fmt
SwenSchaeferjohann Feb 26, 2026
a1cbb48
fix ci
SwenSchaeferjohann Feb 26, 2026
93ed386
add test cov: tx size
SwenSchaeferjohann Feb 26, 2026
e8c1ae2
rename ctoken full v3
SwenSchaeferjohann Feb 27, 2026
8409716
renames
SwenSchaeferjohann Feb 27, 2026
f4d384f
wip
SwenSchaeferjohann Mar 6, 2026
75d6069
checked for all interface, pass decimals
SwenSchaeferjohann Mar 9, 2026
4f9173c
use destination directly in transferinterface
SwenSchaeferjohann Mar 9, 2026
244bb67
format
SwenSchaeferjohann Mar 9, 2026
a034f18
fix lint
SwenSchaeferjohann Mar 9, 2026
02ba47f
fix lint
SwenSchaeferjohann Mar 9, 2026
e818947
fix transfer-interface.test.ts
SwenSchaeferjohann Mar 9, 2026
d2da224
address last remaining comment
SwenSchaeferjohann Mar 9, 2026
38372cc
add changelog: br change decimals
SwenSchaeferjohann Mar 10, 2026
ae62a07
fix mds
SwenSchaeferjohann Mar 10, 2026
4e923ef
apply review comments
SwenSchaeferjohann Mar 11, 2026
d0b7f48
format
SwenSchaeferjohann Mar 11, 2026
056eeb9
lint
SwenSchaeferjohann Mar 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/js-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ jobs:
done
echo "Tests passed on attempt $attempt"

- name: Run compressed-token ctoken tests with V2
- name: Run compressed-token lighttoken tests with V2
run: |
echo "Running compressed-token ctoken tests with retry logic (max 2 attempts)..."
echo "Running compressed-token lighttoken tests with retry logic (max 2 attempts)..."
attempt=1
max_attempts=2
cd js/compressed-token
until LIGHT_PROTOCOL_VERSION=V2 pnpm test:e2e:ctoken:all; do
until LIGHT_PROTOCOL_VERSION=V2 pnpm test:e2e:lighttoken:all; do
attempt=$((attempt + 1))
if [ $attempt -gt $max_attempts ]; then
echo "Tests failed after $max_attempts attempts"
Expand Down
29 changes: 29 additions & 0 deletions js/compressed-token/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
## [Unreleased]

### Breaking Changes

- **`transferInterface` and `createTransferInterfaceInstructions`**: `destination` is now the token account address (SPL-style), not the recipient wallet. `ensureRecipientAta` removed; caller must create the destination ATA before transfer via `getOrCreateAtaInterface` or `createAssociatedTokenAccountInterfaceIdempotentInstruction`.
- **Action:** `transferInterface(rpc, payer, source, mint, destination, owner, amount, ...)` — `destination` is the token account (e.g. `getAssociatedTokenAddressInterface(mint, recipient.publicKey)`).
- **Instruction builder:** `createTransferInterfaceInstructions(rpc, payer, mint, amount, sender, destination, decimals, options?)` — same `destination` semantics.
- **`decimals` is now required** on `createTransferInterfaceInstructions` (instruction-level API). Fetch with `getMintInterface(rpc, mint).mint.decimals` if you were not already threading mint decimals.

- **Root export removed:** `createLoadAtaInstructionsFromInterface` is no longer exported from the package root. Use `createLoadAtaInstructions` (public API) and pass ATA/owner/mint directly.

## [0.23.0-beta.10]

### Breaking Changes

- **`decompressInterface` removed.** Use `loadAta` (action) or `createLoadAtaInstructions` (instruction builder) instead. `decompressInterface` did not support >8 compressed inputs and has been fully removed.
- **Action (send transaction):** Replace `decompressInterface(rpc, payer, owner, mint, amount?, destinationAta?, destinationOwner?, splInterfaceInfo?, confirmOptions?)` with `loadAta(rpc, ata, owner, mint, payer?, confirmOptions?, interfaceOptions?, wrap?)`. Derive the target ATA with `getAssociatedTokenAddressInterface(mint, owner)` for light-token, or pass the SPL/T22 ATA to decompress to that program. `loadAta` loads all cold balance into the given ATA (no partial amount); it supports >8 inputs via batched transactions and creates the ATA if needed.
- **Instruction-level:** Use `createLoadAtaInstructions(rpc, ata, owner, mint, payer?, interfaceOptions?, wrap?)` to get `TransactionInstruction[][]` and send batches yourself. The single-instruction primitive is no longer exported; use the batched API only.

- **CToken → LightToken renames.** Instruction and type names updated for consistency: `createAssociatedCTokenAccountInstruction` → `createAssociatedLightTokenAccountInstruction`, `CTokenConfig` → `LightTokenConfig`, `parseCTokenHot` → `parseLightTokenHot`, `parseCTokenCold` → `parseLightTokenCold`, `mintToCToken` → `mintToLightToken` (and related), `CTOKEN_PROGRAM_ID` → `LIGHT_TOKEN_PROGRAM_ID`. Use the new LightToken names in all call sites.

- **Removed exports.** `createLoadAccountsParams`, `calculateCompressibleLoadComputeUnits`, and associated types are no longer exported. Use the batched `createLoadAtaInstructions` API and `calculateLoadBatchComputeUnits` where applicable.

- **New freeze/thaw instructions.** `createLightTokenFreezeAccountInstruction` and `createLightTokenThawAccountInstruction` are available for native freeze/thaw of decompressed light-token accounts (discriminators 10 and 11).

- **Synthetic delegate selection semantics updated.** In `getAtaInterface` / `getAccountInterface` synthetic account views:
- If a hot source has a delegate, that hot delegate is always canonical. Cold delegates only contribute to `delegatedAmount` when they match the hot delegate.
- If there is no hot delegate, canonical delegate is chosen from the most recent delegated cold source (source-order first), and `delegatedAmount` is the sum of all cold inputs for that delegate.

## [0.23.0-beta.9]

### Fixed
Expand Down
Loading