@lightprotocol/compressed-token 0.22.1-alpha.8 → 0.23.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  /// <reference types="node" />
2
2
  import * as _solana_web3_js from '@solana/web3.js';
3
3
  import { PublicKey, AccountInfo, Commitment, TransactionInstruction, Signer, AccountMeta, Keypair, ConfirmOptions, TransactionSignature, Connection } from '@solana/web3.js';
4
- import { MerkleContext, CompressedAccountWithMerkleContext, Rpc, ValidityProofWithContext, AddressTreeInfo, TreeInfo, ParsedTokenAccount, ValidityProof, PackedMerkleContextLegacy, CompressedCpiContext, InputTokenDataWithContext as InputTokenDataWithContext$1, CompressedProof } from '@lightprotocol/stateless.js';
4
+ import { MerkleContext, CompressedAccountWithMerkleContext, Rpc, ValidityProofWithContext, AddressTreeInfo, TreeInfo, ParsedTokenAccount, ValidityProof, TreeType, PackedMerkleContextLegacy, CompressedCpiContext, InputTokenDataWithContext as InputTokenDataWithContext$1, CompressedProof } from '@lightprotocol/stateless.js';
5
5
  export { ParsedTokenAccount } from '@lightprotocol/stateless.js';
6
6
  import { Account, Mint } from '@solana/spl-token';
7
7
  export { AccountState } from '@solana/spl-token';
@@ -1054,6 +1054,10 @@ interface MintContext {
1054
1054
  cmintDecompressed: boolean;
1055
1055
  /** PDA of the associated SPL mint */
1056
1056
  splMint: PublicKey;
1057
+ /** Signer pubkey used to derive the mint PDA */
1058
+ mintSigner: Uint8Array;
1059
+ /** Bump seed for the mint PDA */
1060
+ bump: number;
1057
1061
  }
1058
1062
  /**
1059
1063
  * Raw extension data as stored on-chain
@@ -1089,8 +1093,54 @@ interface TokenMetadata {
1089
1093
  interface CompressedMint {
1090
1094
  base: BaseMint;
1091
1095
  mintContext: MintContext;
1096
+ /** Reserved bytes for T22 layout compatibility */
1097
+ reserved: Uint8Array;
1098
+ /** Account type discriminator (1 = Mint) */
1099
+ accountType: number;
1100
+ /** Compression info embedded in mint */
1101
+ compression: CompressionInfo;
1092
1102
  extensions: MintExtension[] | null;
1093
1103
  }
1104
+ /**
1105
+ * Rent configuration for compressible accounts
1106
+ */
1107
+ interface RentConfig {
1108
+ /** Base rent constant per epoch */
1109
+ baseRent: number;
1110
+ /** Compression cost in lamports */
1111
+ compressionCost: number;
1112
+ /** Lamports per byte per epoch */
1113
+ lamportsPerBytePerEpoch: number;
1114
+ /** Maximum epochs that can be pre-funded */
1115
+ maxFundedEpochs: number;
1116
+ /** Maximum lamports for top-up operation */
1117
+ maxTopUp: number;
1118
+ }
1119
+ /**
1120
+ * Compression info embedded in CompressedMint
1121
+ */
1122
+ interface CompressionInfo {
1123
+ /** Config account version (0 = uninitialized) */
1124
+ configAccountVersion: number;
1125
+ /** Whether to compress to pubkey instead of owner */
1126
+ compressToPubkey: number;
1127
+ /** Account version for hashing scheme */
1128
+ accountVersion: number;
1129
+ /** Lamports to top up per write */
1130
+ lamportsPerWrite: number;
1131
+ /** Authority that can compress the account */
1132
+ compressionAuthority: PublicKey;
1133
+ /** Recipient for rent on closure */
1134
+ rentSponsor: PublicKey;
1135
+ /** Last slot rent was claimed */
1136
+ lastClaimedSlot: bigint;
1137
+ /** Rent exemption lamports paid at account creation */
1138
+ rentExemptionPaid: number;
1139
+ /** Reserved for future use */
1140
+ reserved: number;
1141
+ /** Rent configuration */
1142
+ rentConfig: RentConfig;
1143
+ }
1094
1144
  /**
1095
1145
  * Deserialize a compressed mint from buffer
1096
1146
  * Uses SPL's MintLayout for BaseMint and buffer-layout struct for context
@@ -1152,6 +1202,10 @@ interface MintInstructionData {
1152
1202
  splMint: PublicKey;
1153
1203
  cmintDecompressed: boolean;
1154
1204
  version: number;
1205
+ /** Signer pubkey used to derive the mint PDA */
1206
+ mintSigner: Uint8Array;
1207
+ /** Bump seed for the mint PDA */
1208
+ bump: number;
1155
1209
  metadata?: MintMetadataField;
1156
1210
  }
1157
1211
 
@@ -1162,6 +1216,8 @@ interface MintInterface {
1162
1216
  mintContext?: MintContext;
1163
1217
  tokenMetadata?: TokenMetadata;
1164
1218
  extensions?: MintExtension[];
1219
+ /** Compression info for c-token mints */
1220
+ compression?: CompressionInfo;
1165
1221
  }
1166
1222
  /**
1167
1223
  * Get unified mint info for SPL/T22/c-token mints.
@@ -1632,7 +1688,7 @@ declare function selectTokenPoolInfosForDecompression(infos: TokenPoolInfo[], de
1632
1688
  *
1633
1689
  * Supports decompressing to both c-token accounts and SPL token accounts:
1634
1690
  * - For c-token destinations: No splInterfaceInfo needed
1635
- * - For SPL destinations: Provide splInterfaceInfo (token pool info)
1691
+ * - For SPL destinations: Provide splInterfaceInfo (token pool info) and decimals
1636
1692
  *
1637
1693
  * @param payer Fee payer public key
1638
1694
  * @param inputCompressedTokenAccounts Input compressed token accounts
@@ -1640,9 +1696,10 @@ declare function selectTokenPoolInfosForDecompression(infos: TokenPoolInfo[], de
1640
1696
  * @param amount Amount to decompress
1641
1697
  * @param validityProof Validity proof (contains compressedProof and rootIndices)
1642
1698
  * @param splInterfaceInfo Optional: SPL interface info for SPL destinations
1699
+ * @param decimals Mint decimals (required for SPL destinations)
1643
1700
  * @returns TransactionInstruction
1644
1701
  */
1645
- declare function createDecompressInterfaceInstruction(payer: PublicKey, inputCompressedTokenAccounts: ParsedTokenAccount[], toAddress: PublicKey, amount: bigint, validityProof: ValidityProofWithContext, splInterfaceInfo?: SplInterfaceInfo): TransactionInstruction;
1702
+ declare function createDecompressInterfaceInstruction(payer: PublicKey, inputCompressedTokenAccounts: ParsedTokenAccount[], toAddress: PublicKey, amount: bigint, validityProof: ValidityProofWithContext, splInterfaceInfo: SplInterfaceInfo | undefined, decimals: number): TransactionInstruction;
1646
1703
 
1647
1704
  /**
1648
1705
  * Options for interface operations (load, transfer)
@@ -1787,10 +1844,11 @@ declare function calculateCompressibleLoadComputeUnits(compressedAccountCount: n
1787
1844
  * @param mint Mint address
1788
1845
  * @param amount Amount to wrap,
1789
1846
  * @param splInterfaceInfo SPL interface info for the compression
1847
+ * @param decimals Mint decimals (required for transfer_checked)
1790
1848
  * @param payer Fee payer (defaults to owner)
1791
1849
  * @returns Instruction to wrap tokens
1792
1850
  */
1793
- declare function createWrapInstruction(source: PublicKey, destination: PublicKey, owner: PublicKey, mint: PublicKey, amount: bigint, splInterfaceInfo: SplInterfaceInfo, payer?: PublicKey): TransactionInstruction;
1851
+ declare function createWrapInstruction(source: PublicKey, destination: PublicKey, owner: PublicKey, mint: PublicKey, amount: bigint, splInterfaceInfo: SplInterfaceInfo, decimals: number, payer?: PublicKey): TransactionInstruction;
1794
1852
 
1795
1853
  /**
1796
1854
  * Create an unwrap instruction that moves tokens from a c-token account to an
@@ -1802,10 +1860,11 @@ declare function createWrapInstruction(source: PublicKey, destination: PublicKey
1802
1860
  * @param mint Mint address
1803
1861
  * @param amount Amount to unwrap,
1804
1862
  * @param splInterfaceInfo SPL interface info for the decompression
1863
+ * @param decimals Mint decimals (required for transfer_checked)
1805
1864
  * @param payer Fee payer (defaults to owner if not provided)
1806
1865
  * @returns TransactionInstruction to unwrap tokens
1807
1866
  */
1808
- declare function createUnwrapInstruction(source: PublicKey, destination: PublicKey, owner: PublicKey, mint: PublicKey, amount: bigint, splInterfaceInfo: SplInterfaceInfo, payer?: PublicKey): TransactionInstruction;
1867
+ declare function createUnwrapInstruction(source: PublicKey, destination: PublicKey, owner: PublicKey, mint: PublicKey, amount: bigint, splInterfaceInfo: SplInterfaceInfo, decimals: number, payer?: PublicKey): TransactionInstruction;
1809
1868
 
1810
1869
  /**
1811
1870
  * Create and initialize a new mint for SPL/T22/c-token.
@@ -2302,9 +2361,13 @@ declare function decompress(rpc: Rpc, payer: Signer, mint: PublicKey, amount: nu
2302
2361
 
2303
2362
  /**
2304
2363
  * Merge multiple compressed token accounts for a given mint into fewer
2305
- * accounts. Each call merges up to 4 accounts (V1) or 8 accounts (V2) at a
2306
- * time. Call repeatedly until only 1 account remains if full consolidation
2307
- * is needed.
2364
+ * accounts. Each call merges up to 4 accounts at a time.
2365
+ *
2366
+ * Supports automatic V1 -> V2 migration: when running in V2 mode,
2367
+ * merging V1 token accounts will produce a V2 output.
2368
+ *
2369
+ * IMPORTANT: Only accounts from the same tree type can be merged in one
2370
+ * transaction. If you have mixed V1+V2 accounts, merge them separately.
2308
2371
  *
2309
2372
  * @param rpc RPC connection to use
2310
2373
  * @param payer Fee payer
@@ -2344,6 +2407,7 @@ declare function mintTo(rpc: Rpc, payer: Signer, mint: PublicKey, toPubkey: Publ
2344
2407
  * @param rpc Rpc connection to use
2345
2408
  * @param payer Fee payer
2346
2409
  * @param accounts Delegated compressed token accounts to revoke
2410
+ * (must all be from the same tree type)
2347
2411
  * @param owner Owner of the compressed tokens
2348
2412
  * @param confirmOptions Options for confirming the transaction
2349
2413
  *
@@ -2352,7 +2416,10 @@ declare function mintTo(rpc: Rpc, payer: Signer, mint: PublicKey, toPubkey: Publ
2352
2416
  declare function revoke(rpc: Rpc, payer: Signer, accounts: ParsedTokenAccount[], owner: Signer, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2353
2417
 
2354
2418
  /**
2355
- * Transfer compressed tokens from one owner to another
2419
+ * Transfer compressed tokens from one owner to another.
2420
+ *
2421
+ * Supports automatic V1 -> V2 migration: when running in V2 mode,
2422
+ * V1 token inputs will produce V2 token outputs.
2356
2423
  *
2357
2424
  * @param rpc Rpc connection to use
2358
2425
  * @param payer Fee payer
@@ -2400,12 +2467,54 @@ declare function transferDelegated(rpc: Rpc, payer: Signer, mint: PublicKey, amo
2400
2467
  declare function decompressDelegated(rpc: Rpc, payer: Signer, mint: PublicKey, amount: number | BN, owner: Signer, toAddress: PublicKey, splInterfaceInfos?: SplInterfaceInfo[], confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2401
2468
 
2402
2469
  declare const ERROR_NO_ACCOUNTS_FOUND = "Could not find accounts to select for transfer.";
2470
+ declare const ERROR_MIXED_TREE_TYPES = "Cannot select accounts from different tree types (V1/V2) in the same batch. Filter accounts by tree type first.";
2471
+ /**
2472
+ * Options for input account selection
2473
+ */
2474
+ interface SelectInputAccountsOptions {
2475
+ /**
2476
+ * Filter accounts by tree type. If provided, only accounts in trees of
2477
+ * this type will be selected. This prevents mixed V1/V2 batches which
2478
+ * fail at proof generation.
2479
+ */
2480
+ treeType?: TreeType;
2481
+ }
2482
+ /**
2483
+ * Groups accounts by tree type for separate processing
2484
+ */
2485
+ declare function groupAccountsByTreeType(accounts: ParsedTokenAccount[]): Map<TreeType, ParsedTokenAccount[]>;
2486
+ /**
2487
+ * Result of selectAccountsByPreferredTreeType
2488
+ */
2489
+ interface SelectedAccountsResult {
2490
+ /** The selected accounts (all from the same tree type) */
2491
+ accounts: ParsedTokenAccount[];
2492
+ /** The tree type of the selected accounts */
2493
+ treeType: TreeType;
2494
+ /** Total balance of selected accounts */
2495
+ totalBalance: BN;
2496
+ }
2497
+ /**
2498
+ * Selects accounts by preferred tree type with automatic fallback.
2499
+ *
2500
+ * In V2 mode, prefers StateV2 accounts. Falls back to StateV1 if V2
2501
+ * has insufficient balance.
2502
+ *
2503
+ * This ensures all returned accounts are from the same tree type,
2504
+ * preventing mixed V1/V2 batch proof failures.
2505
+ *
2506
+ * @param accounts All available accounts (can be mixed V1/V2)
2507
+ * @param requiredAmount Minimum amount needed (optional - if not provided, returns all from preferred type)
2508
+ * @returns Selected accounts from a single tree type
2509
+ */
2510
+ declare function selectAccountsByPreferredTreeType(accounts: ParsedTokenAccount[], requiredAmount?: BN): SelectedAccountsResult;
2403
2511
  /**
2404
2512
  * Selects token accounts for approval, first trying to find an exact match, then falling back to minimum selection.
2405
2513
  *
2406
2514
  * @param {ParsedTokenAccount[]} accounts - Token accounts to choose from.
2407
2515
  * @param {BN} approveAmount - Amount to approve.
2408
2516
  * @param {number} [maxInputs=4] - Max accounts to select when falling back to minimum selection.
2517
+ * @param {SelectInputAccountsOptions} [options] - Optional selection options.
2409
2518
  * @returns {[
2410
2519
  * selectedAccounts: ParsedTokenAccount[],
2411
2520
  * total: BN,
@@ -2417,7 +2526,7 @@ declare const ERROR_NO_ACCOUNTS_FOUND = "Could not find accounts to select for t
2417
2526
  * - totalLamports: Total lamports from selected accounts.
2418
2527
  * - maxPossibleAmount: Max approvable amount given maxInputs.
2419
2528
  */
2420
- declare function selectTokenAccountsForApprove(accounts: ParsedTokenAccount[], approveAmount: BN, maxInputs?: number): [
2529
+ declare function selectTokenAccountsForApprove(accounts: ParsedTokenAccount[], approveAmount: BN, maxInputs?: number, options?: SelectInputAccountsOptions): [
2421
2530
  selectedAccounts: ParsedTokenAccount[],
2422
2531
  total: BN,
2423
2532
  totalLamports: BN | null,
@@ -2431,10 +2540,11 @@ declare function selectTokenAccountsForApprove(accounts: ParsedTokenAccount[], a
2431
2540
  * @param {BN} amount Amount to decompress.
2432
2541
  * @param {number} [maxInputs=4] Max accounts to select. Default
2433
2542
  * is 4.
2543
+ * @param {SelectInputAccountsOptions} [options] - Optional selection options.
2434
2544
  *
2435
2545
  * @returns Returns selected accounts and their totals.
2436
2546
  */
2437
- declare function selectMinCompressedTokenAccountsForDecompression(accounts: ParsedTokenAccount[], amount: BN, maxInputs?: number): {
2547
+ declare function selectMinCompressedTokenAccountsForDecompression(accounts: ParsedTokenAccount[], amount: BN, maxInputs?: number, options?: SelectInputAccountsOptions): {
2438
2548
  selectedAccounts: ParsedTokenAccount[];
2439
2549
  total: BN;
2440
2550
  totalLamports: BN | null;
@@ -2448,6 +2558,8 @@ declare function selectMinCompressedTokenAccountsForDecompression(accounts: Pars
2448
2558
  * @param {BN} transferAmount Amount to transfer or decompress.
2449
2559
  * @param {number} [maxInputs=4] Max accounts to select. Default
2450
2560
  * is 4.
2561
+ * @param {SelectInputAccountsOptions} [options] - Optional selection options.
2562
+ * Use treeType to filter by V1/V2.
2451
2563
  *
2452
2564
  * @returns Returns selected accounts and their totals. [
2453
2565
  * selectedAccounts: ParsedTokenAccount[],
@@ -2456,7 +2568,7 @@ declare function selectMinCompressedTokenAccountsForDecompression(accounts: Pars
2456
2568
  * maxPossibleAmount: BN
2457
2569
  * ]
2458
2570
  */
2459
- declare function selectMinCompressedTokenAccountsForTransfer(accounts: ParsedTokenAccount[], transferAmount: BN, maxInputs?: number): [
2571
+ declare function selectMinCompressedTokenAccountsForTransfer(accounts: ParsedTokenAccount[], transferAmount: BN, maxInputs?: number, options?: SelectInputAccountsOptions): [
2460
2572
  selectedAccounts: ParsedTokenAccount[],
2461
2573
  total: BN,
2462
2574
  totalLamports: BN | null,
@@ -2484,6 +2596,8 @@ declare function selectMinCompressedTokenAccountsForTransferOrPartial(accounts:
2484
2596
  * @param {ParsedTokenAccount[]} accounts - The list of token accounts to select from.
2485
2597
  * @param {BN} transferAmount - The token amount to be transferred.
2486
2598
  * @param {number} [maxInputs=4] - The maximum number of accounts to select. Default: 4.
2599
+ * @param {SelectInputAccountsOptions} [options] - Optional selection options.
2600
+ * Use treeType to filter by V1/V2.
2487
2601
  * @returns {[
2488
2602
  * selectedAccounts: ParsedTokenAccount[],
2489
2603
  * total: BN,
@@ -2512,7 +2626,7 @@ declare function selectMinCompressedTokenAccountsForTransferOrPartial(accounts:
2512
2626
  * console.log(totalLamports!.toString()); // '15'
2513
2627
  * console.log(maxPossibleAmount.toString()); // '150'
2514
2628
  */
2515
- declare function selectSmartCompressedTokenAccountsForTransfer(accounts: ParsedTokenAccount[], transferAmount: BN, maxInputs?: number): [
2629
+ declare function selectSmartCompressedTokenAccountsForTransfer(accounts: ParsedTokenAccount[], transferAmount: BN, maxInputs?: number, options?: SelectInputAccountsOptions): [
2516
2630
  selectedAccounts: ParsedTokenAccount[],
2517
2631
  total: BN,
2518
2632
  totalLamports: BN | null,
@@ -2694,9 +2808,9 @@ type PackCompressedTokenAccountsParams = {
2694
2808
  /** Input state to be consumed */
2695
2809
  inputCompressedTokenAccounts: ParsedTokenAccount[];
2696
2810
  /**
2697
- * State trees that the output should be inserted into. Defaults to the 0th
2698
- * state tree of the input state. Gets padded to the length of
2699
- * outputCompressedAccounts.
2811
+ * Output state tree. Required for mint/compress (no inputs).
2812
+ * For transfer/merge with V1 inputs: pass a V2 tree for migration.
2813
+ * If not provided with inputs, uses input tree.
2700
2814
  */
2701
2815
  outputStateTreeInfo?: TreeInfo;
2702
2816
  /** Optional remaining accounts to append to */
@@ -5166,7 +5280,9 @@ declare class CompressedTokenProgram {
5166
5280
  */
5167
5281
  static approveAndMintTo({ feePayer, mint, authority, authorityTokenAccount, toPubkey, amount, outputStateTreeInfo, tokenPoolInfo, }: ApproveAndMintToParams): Promise<TransactionInstruction[]>;
5168
5282
  /**
5169
- * Construct transfer instruction for compressed tokens
5283
+ * Construct transfer instruction for compressed tokens.
5284
+ *
5285
+ * V1 inputs automatically migrate to V2 outputs when in V2 mode.
5170
5286
  *
5171
5287
  * @param payer Fee payer.
5172
5288
  * @param inputCompressedTokenAccounts Source compressed token accounts.
@@ -5225,7 +5341,7 @@ declare class CompressedTokenProgram {
5225
5341
  */
5226
5342
  static decompress({ payer, inputCompressedTokenAccounts, toAddress, amount, recentValidityProof, recentInputStateRootIndices, tokenPoolInfos, }: DecompressParams): Promise<TransactionInstruction>;
5227
5343
  /**
5228
- * Create `mergeTokenAccounts` instruction
5344
+ * Create `mergeTokenAccounts` instruction.
5229
5345
  *
5230
5346
  * @param payer Fee payer.
5231
5347
  * @param owner Owner of the compressed token
@@ -5234,7 +5350,6 @@ declare class CompressedTokenProgram {
5234
5350
  * @param mint SPL Token mint address.
5235
5351
  * @param recentValidityProof Recent validity proof.
5236
5352
  * @param recentInputStateRootIndices Recent state root indices.
5237
- *
5238
5353
  * @returns instruction
5239
5354
  */
5240
5355
  static mergeTokenAccounts({ payer, owner, inputCompressedTokenAccounts, mint, recentValidityProof, recentInputStateRootIndices, }: MergeTokenAccountsParams): Promise<TransactionInstruction[]>;
@@ -5390,4 +5505,4 @@ declare function transferInterface(rpc: Rpc, payer: Signer, source: PublicKey, m
5390
5505
  */
5391
5506
  declare function getOrCreateAtaInterface(rpc: Rpc, payer: Signer, mint: PublicKey, owner: PublicKey | Signer, allowOwnerOffCurve?: boolean, commitment?: Commitment, confirmOptions?: ConfirmOptions): Promise<AccountInterface>;
5392
5507
 
5393
- export { ADD_TOKEN_POOL_DISCRIMINATOR, APPROVE_DISCRIMINATOR, type AccountInterface, Action, type AddSplInterfaceParams, type AddTokenPoolParams, type ApproveAndMintToParams, type ApproveParams, BATCH_COMPRESS_DISCRIMINATOR, type BaseMint, type BatchCompressInstructionData, COMPRESSED_MINT_SEED, COMPRESS_SPL_TOKEN_ACCOUNT_DISCRIMINATOR, CPI_AUTHORITY_SEED, CREATE_TOKEN_POOL_DISCRIMINATOR, type CTokenConfig, type CompressParams, type CompressSplTokenAccountInstructionData, type CompressSplTokenAccountParams, type CompressedMint, type CompressedTokenInstructionDataApprove, CompressedTokenInstructionDataApproveLayout, type CompressedTokenInstructionDataRevoke, CompressedTokenInstructionDataRevokeLayout, type CompressedTokenInstructionDataTransfer, CompressedTokenInstructionDataTransferLayout, CompressedTokenProgram, type CompressibleAccountInput, type CompressibleConfig, type CompressibleLoadParams, CpiContextLayout, type CreateAssociatedCTokenAccountParams, type CreateMintParams, type CreateSplInterfaceParams, type CreateTokenPoolParams, type CreateTokenProgramLookupTableParams, DECOMPRESS_ACCOUNTS_IDEMPOTENT_DISCRIMINATOR, type DecompressParams, type DelegatedTransfer, DelegatedTransferLayout, ERROR_NO_ACCOUNTS_FOUND, ExtensionType, IDL, type InputTokenDataWithContext, type InterfaceOptions, type LightCompressedToken, type LoadResult, MINT_TO_DISCRIMINATOR, type MergeTokenAccountsParams, type MintContext, type MintExtension, type MintInterface, type MintToInstructionData, type MintToParams, type OffChainTokenMetadata, type OffChainTokenMetadataJson, POOL_SEED, type PackCompressedTokenAccountsParams, type PackedCompressedAccount, type PackedTokenTransferOutputData, type ParsedAccountInfoInterface, REVOKE_DISCRIMINATOR, type RevokeParams, SPL_TOKEN_MINT_RENT_EXEMPT_BALANCE, type SplInterfaceActivity, type SplInterfaceInfo, TRANSFER_DISCRIMINATOR, type TokenAccountSource, type TokenData, TokenDataVersion, type TokenMetadata, type TokenMetadataInstructionData, type TokenPoolActivity, type TokenPoolInfo, type TokenTransferOutputData, type TransferParams, addSplInterfaces, addTokenPoolAccountsLayout, type addTokenPoolAccountsLayoutParams, addTokenPools, approve, approveAccountsLayout, type approveAccountsLayoutParams, approveAndMintTo, batchCompressLayout, calculateCompressibleLoadComputeUnits, checkMint, checkSplInterfaceInfo, checkTokenPoolInfo, compress, compressSplTokenAccount, compressSplTokenAccountInstructionDataLayout, convertTokenDataToAccount, createAssociatedCTokenAccountIdempotentInstruction, createAssociatedCTokenAccountInstruction, createAssociatedTokenAccountInterfaceIdempotentInstruction, createAssociatedTokenAccountInterfaceInstruction, createAtaInterface, createAtaInterfaceIdempotent, createAtaInterfaceIdempotentInstruction, createCTokenTransferInstruction, createDecompressInterfaceInstruction, createDecompressOutputState, createLoadAccountsParams, createLoadAtaInstructions, createLoadAtaInstructionsFromInterface, createMint, createMintInstruction, createMintInterface, createMintToCompressedInstruction, createMintToInstruction, createMintToInterfaceInstruction, createRemoveMetadataKeyInstruction, createSplInterface, createTokenMetadata, createTokenPool, createTokenPoolAccountsLayout, type createTokenPoolAccountsLayoutParams, createTokenProgramLookupTable, createTransferInterfaceInstruction, createTransferOutputState, createUnwrapInstruction, createUpdateFreezeAuthorityInstruction, createUpdateMetadataAuthorityInstruction, createUpdateMetadataFieldInstruction, createUpdateMintAuthorityInstruction, createWrapInstruction, decodeApproveInstructionData, decodeBatchCompressInstructionData, decodeCompressSplTokenAccountInstructionData, decodeMintToInstructionData, decodeRevokeInstructionData, decodeTokenMetadata, decodeTransferInstructionData, decompress, decompressDelegated, decompressInterface, deriveCMintAddress, deriveSplInterfaceInfo, deriveTokenPoolInfo, deserializeMint, encodeApproveInstructionData, encodeBatchCompressInstructionData, encodeCompressSplTokenAccountInstructionData, encodeMintToInstructionData, encodeRevokeInstructionData, encodeTokenMetadata, encodeTransferInstructionData, extractTokenMetadata, findMintAddress, freezeAccountsLayout, type freezeAccountsLayoutParams, getAccountInterface, getAssociatedCTokenAddress, getAssociatedCTokenAddressAndBump, getAssociatedTokenAddressInterface, getAtaInterface, getMintInterface, getOrCreateAtaInterface, getSplInterfaceInfos, getTokenPoolInfos, isSingleSplInterfaceInfo, isSingleTokenPoolInfo, loadAta, mergeTokenAccounts, mintTo, mintToAccountsLayout, type mintToAccountsLayoutParams, mintTo$1 as mintToCToken, mintToCompressed, mintToInterface, mintToLayout, packCompressedTokenAccounts, parseCTokenCold, parseCTokenHot, parseMaybeDelegatedTransfer, parseTokenData, removeMetadataKey, revoke, revokeAccountsLayout, type revokeAccountsLayoutParams, selectMinCompressedTokenAccountsForDecompression, selectMinCompressedTokenAccountsForTransfer, selectMinCompressedTokenAccountsForTransferOrPartial, selectSmartCompressedTokenAccountsForTransfer, selectSmartCompressedTokenAccountsForTransferOrPartial, selectSplInterfaceInfo, selectSplInterfaceInfosForDecompression, selectTokenAccountsForApprove, selectTokenPoolInfo, selectTokenPoolInfosForDecompression, serializeMint, sumUpTokenAmount, thawAccountsLayout, type thawAccountsLayoutParams, toAccountInfo, toOffChainMetadataJson, toTokenPoolInfo, transfer, transferAccountsLayout, type transferAccountsLayoutParams, transferDelegated, transferInterface, unpackMintData, unpackMintInterface, unwrap, updateFreezeAuthority, updateMetadataAuthority, updateMetadataField, updateMintAuthority, validateSameTokenOwner, wrap };
5508
+ export { ADD_TOKEN_POOL_DISCRIMINATOR, APPROVE_DISCRIMINATOR, type AccountInterface, Action, type AddSplInterfaceParams, type AddTokenPoolParams, type ApproveAndMintToParams, type ApproveParams, BATCH_COMPRESS_DISCRIMINATOR, type BaseMint, type BatchCompressInstructionData, COMPRESSED_MINT_SEED, COMPRESS_SPL_TOKEN_ACCOUNT_DISCRIMINATOR, CPI_AUTHORITY_SEED, CREATE_TOKEN_POOL_DISCRIMINATOR, type CTokenConfig, type CompressParams, type CompressSplTokenAccountInstructionData, type CompressSplTokenAccountParams, type CompressedMint, type CompressedTokenInstructionDataApprove, CompressedTokenInstructionDataApproveLayout, type CompressedTokenInstructionDataRevoke, CompressedTokenInstructionDataRevokeLayout, type CompressedTokenInstructionDataTransfer, CompressedTokenInstructionDataTransferLayout, CompressedTokenProgram, type CompressibleAccountInput, type CompressibleConfig, type CompressibleLoadParams, CpiContextLayout, type CreateAssociatedCTokenAccountParams, type CreateMintParams, type CreateSplInterfaceParams, type CreateTokenPoolParams, type CreateTokenProgramLookupTableParams, DECOMPRESS_ACCOUNTS_IDEMPOTENT_DISCRIMINATOR, type DecompressParams, type DelegatedTransfer, DelegatedTransferLayout, ERROR_MIXED_TREE_TYPES, ERROR_NO_ACCOUNTS_FOUND, ExtensionType, IDL, type InputTokenDataWithContext, type InterfaceOptions, type LightCompressedToken, type LoadResult, MINT_TO_DISCRIMINATOR, type MergeTokenAccountsParams, type MintContext, type MintExtension, type MintInterface, type MintToInstructionData, type MintToParams, type OffChainTokenMetadata, type OffChainTokenMetadataJson, POOL_SEED, type PackCompressedTokenAccountsParams, type PackedCompressedAccount, type PackedTokenTransferOutputData, type ParsedAccountInfoInterface, REVOKE_DISCRIMINATOR, type RevokeParams, SPL_TOKEN_MINT_RENT_EXEMPT_BALANCE, type SelectInputAccountsOptions, type SelectedAccountsResult, type SplInterfaceActivity, type SplInterfaceInfo, TRANSFER_DISCRIMINATOR, type TokenAccountSource, type TokenData, TokenDataVersion, type TokenMetadata, type TokenMetadataInstructionData, type TokenPoolActivity, type TokenPoolInfo, type TokenTransferOutputData, type TransferParams, addSplInterfaces, addTokenPoolAccountsLayout, type addTokenPoolAccountsLayoutParams, addTokenPools, approve, approveAccountsLayout, type approveAccountsLayoutParams, approveAndMintTo, batchCompressLayout, calculateCompressibleLoadComputeUnits, checkMint, checkSplInterfaceInfo, checkTokenPoolInfo, compress, compressSplTokenAccount, compressSplTokenAccountInstructionDataLayout, convertTokenDataToAccount, createAssociatedCTokenAccountIdempotentInstruction, createAssociatedCTokenAccountInstruction, createAssociatedTokenAccountInterfaceIdempotentInstruction, createAssociatedTokenAccountInterfaceInstruction, createAtaInterface, createAtaInterfaceIdempotent, createAtaInterfaceIdempotentInstruction, createCTokenTransferInstruction, createDecompressInterfaceInstruction, createDecompressOutputState, createLoadAccountsParams, createLoadAtaInstructions, createLoadAtaInstructionsFromInterface, createMint, createMintInstruction, createMintInterface, createMintToCompressedInstruction, createMintToInstruction, createMintToInterfaceInstruction, createRemoveMetadataKeyInstruction, createSplInterface, createTokenMetadata, createTokenPool, createTokenPoolAccountsLayout, type createTokenPoolAccountsLayoutParams, createTokenProgramLookupTable, createTransferInterfaceInstruction, createTransferOutputState, createUnwrapInstruction, createUpdateFreezeAuthorityInstruction, createUpdateMetadataAuthorityInstruction, createUpdateMetadataFieldInstruction, createUpdateMintAuthorityInstruction, createWrapInstruction, decodeApproveInstructionData, decodeBatchCompressInstructionData, decodeCompressSplTokenAccountInstructionData, decodeMintToInstructionData, decodeRevokeInstructionData, decodeTokenMetadata, decodeTransferInstructionData, decompress, decompressDelegated, decompressInterface, deriveCMintAddress, deriveSplInterfaceInfo, deriveTokenPoolInfo, deserializeMint, encodeApproveInstructionData, encodeBatchCompressInstructionData, encodeCompressSplTokenAccountInstructionData, encodeMintToInstructionData, encodeRevokeInstructionData, encodeTokenMetadata, encodeTransferInstructionData, extractTokenMetadata, findMintAddress, freezeAccountsLayout, type freezeAccountsLayoutParams, getAccountInterface, getAssociatedCTokenAddress, getAssociatedCTokenAddressAndBump, getAssociatedTokenAddressInterface, getAtaInterface, getMintInterface, getOrCreateAtaInterface, getSplInterfaceInfos, getTokenPoolInfos, groupAccountsByTreeType, isSingleSplInterfaceInfo, isSingleTokenPoolInfo, loadAta, mergeTokenAccounts, mintTo, mintToAccountsLayout, type mintToAccountsLayoutParams, mintTo$1 as mintToCToken, mintToCompressed, mintToInterface, mintToLayout, packCompressedTokenAccounts, parseCTokenCold, parseCTokenHot, parseMaybeDelegatedTransfer, parseTokenData, removeMetadataKey, revoke, revokeAccountsLayout, type revokeAccountsLayoutParams, selectAccountsByPreferredTreeType, selectMinCompressedTokenAccountsForDecompression, selectMinCompressedTokenAccountsForTransfer, selectMinCompressedTokenAccountsForTransferOrPartial, selectSmartCompressedTokenAccountsForTransfer, selectSmartCompressedTokenAccountsForTransferOrPartial, selectSplInterfaceInfo, selectSplInterfaceInfosForDecompression, selectTokenAccountsForApprove, selectTokenPoolInfo, selectTokenPoolInfosForDecompression, serializeMint, sumUpTokenAmount, thawAccountsLayout, type thawAccountsLayoutParams, toAccountInfo, toOffChainMetadataJson, toTokenPoolInfo, transfer, transferAccountsLayout, type transferAccountsLayoutParams, transferDelegated, transferInterface, unpackMintData, unpackMintInterface, unwrap, updateFreezeAuthority, updateMetadataAuthority, updateMetadataField, updateMintAuthority, validateSameTokenOwner, wrap };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightprotocol/compressed-token",
3
- "version": "0.22.1-alpha.8",
3
+ "version": "0.23.0-beta.1",
4
4
  "description": "JS client to interact with the compressed-token program",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/node/index.cjs",
@@ -42,7 +42,7 @@
42
42
  "@coral-xyz/borsh": "^0.29.0",
43
43
  "@solana/spl-token": ">=0.3.9",
44
44
  "@solana/web3.js": ">=1.73.5",
45
- "@lightprotocol/stateless.js": "0.22.1-alpha.7"
45
+ "@lightprotocol/stateless.js": "0.23.0-beta.1"
46
46
  },
47
47
  "dependencies": {
48
48
  "@solana/buffer-layout": "^4.0.1",
@@ -95,33 +95,12 @@
95
95
  "stateless",
96
96
  "solana"
97
97
  ],
98
- "nx": {
99
- "targets": {
100
- "build": {
101
- "inputs": [
102
- "{workspaceRoot}/cli",
103
- "{workspaceRoot}/target/idl",
104
- "{workspaceRoot}/target/types"
105
- ]
106
- },
107
- "build-ci": {
108
- "dependsOn": [
109
- "@lightprotocol/stateless.js:build-ci"
110
- ]
111
- },
112
- "test-ci": {
113
- "dependsOn": [
114
- "@lightprotocol/stateless.js:test-ci"
115
- ]
116
- }
117
- }
118
- },
119
98
  "scripts": {
120
99
  "test": "vitest run tests/unit && if [ \"$LIGHT_PROTOCOL_VERSION\" = \"V1\" ]; then pnpm test:e2e:legacy:all; else pnpm test:e2e:ctoken:all; fi",
121
100
  "test-ci": "pnpm test:v1 && pnpm test:v2",
122
101
  "test:v1": "pnpm build:v1 && LIGHT_PROTOCOL_VERSION=V1 vitest run tests/unit && LIGHT_PROTOCOL_VERSION=V1 pnpm test:e2e:legacy:all",
123
- "test:v2": "pnpm build:v2 && LIGHT_PROTOCOL_VERSION=V2 vitest run tests/unit && LIGHT_PROTOCOL_VERSION=V2 pnpm test:e2e:ctoken:all",
124
- "test:v2:ctoken": "pnpm build:v2 && LIGHT_PROTOCOL_VERSION=V2 pnpm test:e2e:ctoken:all",
102
+ "test:v2": "pnpm build:v2 && LIGHT_PROTOCOL_VERSION=V2 vitest run tests/unit && LIGHT_PROTOCOL_VERSION=V2 LIGHT_PROTOCOL_BETA=true pnpm test:e2e:ctoken:all",
103
+ "test:v2:ctoken": "pnpm build:v2 && LIGHT_PROTOCOL_VERSION=V2 LIGHT_PROTOCOL_BETA=true pnpm test:e2e:ctoken:all",
125
104
  "test-all": "vitest run",
126
105
  "test:unit:all": "EXCLUDE_E2E=true vitest run",
127
106
  "test:unit:all:v1": "LIGHT_PROTOCOL_VERSION=V1 vitest run tests/unit --reporter=verbose",
@@ -134,7 +113,7 @@
134
113
  "test:e2e:create-associated-ctoken": "pnpm test-validator && vitest run tests/e2e/create-associated-ctoken.test.ts --reporter=verbose",
135
114
  "test:e2e:mint-to-ctoken": "pnpm test-validator && vitest run tests/e2e/mint-to-ctoken.test.ts --reporter=verbose",
136
115
  "test:e2e:mint-to-compressed": "pnpm test-validator && vitest run tests/e2e/mint-to-compressed.test.ts --reporter=verbose",
137
- "test:e2e:mint-to-interface": "pnpm test-validator && vitest run tests/e2e/mint-to-interface.test.ts --reporter=verbose",
116
+ "test:e2e:mint-to-interface": "pnpm test-validator && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/mint-to-interface.test.ts --reporter=verbose",
138
117
  "test:e2e:mint-workflow": "pnpm test-validator && vitest run tests/e2e/mint-workflow.test.ts --reporter=verbose",
139
118
  "test:e2e:update-mint": "pnpm test-validator && vitest run tests/e2e/update-mint.test.ts --reporter=verbose",
140
119
  "test:e2e:update-metadata": "pnpm test-validator && vitest run tests/e2e/update-metadata.test.ts --reporter=verbose",
@@ -152,20 +131,21 @@
152
131
  "test:e2e:decompress": "pnpm test-validator && vitest run tests/e2e/decompress.test.ts --reporter=verbose",
153
132
  "test:e2e:decompress-delegated": "pnpm test-validator && vitest run tests/e2e/decompress-delegated.test.ts --reporter=verbose",
154
133
  "test:e2e:decompress2": "pnpm test-validator && vitest run tests/e2e/decompress2.test.ts --reporter=verbose",
134
+ "test:e2e:v1-v2-migration": "pnpm test-validator && LIGHT_PROTOCOL_VERSION=V2 vitest run tests/e2e/v1-v2-migration.test.ts --reporter=verbose --bail=1",
155
135
  "test:e2e:rpc-token-interop": "pnpm test-validator && vitest run tests/e2e/rpc-token-interop.test.ts --reporter=verbose",
156
136
  "test:e2e:rpc-multi-trees": "pnpm test-validator && vitest run tests/e2e/rpc-multi-trees.test.ts --reporter=verbose",
157
137
  "test:e2e:multi-pool": "pnpm test-validator && vitest run tests/e2e/multi-pool.test.ts --reporter=verbose",
158
138
  "test:e2e:legacy:all": "pnpm test-validator && vitest run tests/e2e/create-mint.test.ts && vitest run tests/e2e/mint-to.test.ts && vitest run tests/e2e/transfer.test.ts && vitest run tests/e2e/delegate.test.ts && vitest run tests/e2e/transfer-delegated.test.ts && vitest run tests/e2e/multi-pool.test.ts && vitest run tests/e2e/decompress-delegated.test.ts && vitest run tests/e2e/merge-token-accounts.test.ts && pnpm test-validator-skip-prover && vitest run tests/e2e/compress.test.ts && vitest run tests/e2e/compress-spl-token-account.test.ts && vitest run tests/e2e/decompress.test.ts && vitest run tests/e2e/create-token-pool.test.ts && vitest run tests/e2e/approve-and-mint-to.test.ts && vitest run tests/e2e/rpc-token-interop.test.ts && vitest run tests/e2e/rpc-multi-trees.test.ts && vitest run tests/e2e/layout.test.ts && vitest run tests/e2e/select-accounts.test.ts",
159
- "test:e2e:wrap": "pnpm test-validator && vitest run tests/e2e/wrap.test.ts --reporter=verbose",
160
- "test:e2e:get-mint-interface": "pnpm test-validator && vitest run tests/e2e/get-mint-interface.test.ts --reporter=verbose",
161
- "test:e2e:get-or-create-ata-interface": "pnpm test-validator && vitest run tests/e2e/get-or-create-ata-interface.test.ts --reporter=verbose",
162
- "test:e2e:get-account-interface": "pnpm test-validator && vitest run tests/e2e/get-account-interface.test.ts --reporter=verbose",
163
- "test:e2e:load-ata-standard": "pnpm test-validator && vitest run tests/e2e/load-ata-standard.test.ts --reporter=verbose",
164
- "test:e2e:load-ata-unified": "pnpm test-validator && vitest run tests/e2e/load-ata-unified.test.ts --reporter=verbose",
165
- "test:e2e:load-ata-combined": "pnpm test-validator && vitest run tests/e2e/load-ata-combined.test.ts --reporter=verbose",
166
- "test:e2e:load-ata-spl-t22": "pnpm test-validator && vitest run tests/e2e/load-ata-spl-t22.test.ts --reporter=verbose",
167
- "test:e2e:load-ata:all": "pnpm test-validator && vitest run tests/e2e/load-ata-standard.test.ts --bail=1 && pnpm test-validator && vitest run tests/e2e/load-ata-unified.test.ts --bail=1 && pnpm test-validator && vitest run tests/e2e/load-ata-combined.test.ts --bail=1 && pnpm test-validator && vitest run tests/e2e/load-ata-spl-t22.test.ts --bail=1",
168
- "test:e2e:ctoken:all": "pnpm test-validator && vitest run tests/e2e/create-compressed-mint.test.ts --bail=1 && vitest run tests/e2e/create-associated-ctoken.test.ts --bail=1 && vitest run tests/e2e/mint-to-ctoken.test.ts --bail=1 && pnpm test-validator && vitest run tests/e2e/mint-to-compressed.test.ts --bail=1 && vitest run tests/e2e/mint-to-interface.test.ts --bail=1 && vitest run tests/e2e/mint-workflow.test.ts --bail=1 && vitest run tests/e2e/update-mint.test.ts --bail=1 && vitest run tests/e2e/update-metadata.test.ts --bail=1 && vitest run tests/e2e/compressible-load.test.ts --bail=1 && vitest run tests/e2e/wrap.test.ts --bail=1 && vitest run tests/e2e/get-mint-interface.test.ts --bail=1 && vitest run tests/e2e/get-account-interface.test.ts --bail=1 && vitest run tests/e2e/create-mint-interface.test.ts --bail=1 && vitest run tests/e2e/create-ata-interface.test.ts --bail=1 && vitest run tests/e2e/get-or-create-ata-interface.test.ts --bail=1 && vitest run tests/e2e/transfer-interface.test.ts --bail=1 && vitest run tests/e2e/unwrap.test.ts --bail=1 && vitest run tests/e2e/decompress2.test.ts --bail=1 && vitest run tests/e2e/payment-flows.test.ts --bail=1 && pnpm test-validator && vitest run tests/e2e/load-ata-standard.test.ts --bail=1 && pnpm test-validator && vitest run tests/e2e/load-ata-unified.test.ts --bail=1 && pnpm test-validator && vitest run tests/e2e/load-ata-combined.test.ts --bail=1 && pnpm test-validator && vitest run tests/e2e/load-ata-spl-t22.test.ts --bail=1",
139
+ "test:e2e:wrap": "pnpm test-validator && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/wrap.test.ts --reporter=verbose",
140
+ "test:e2e:get-mint-interface": "pnpm test-validator && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/get-mint-interface.test.ts --reporter=verbose",
141
+ "test:e2e:get-or-create-ata-interface": "pnpm test-validator && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/get-or-create-ata-interface.test.ts --reporter=verbose",
142
+ "test:e2e:get-account-interface": "pnpm test-validator && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/get-account-interface.test.ts --reporter=verbose",
143
+ "test:e2e:load-ata-standard": "pnpm test-validator && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/load-ata-standard.test.ts --reporter=verbose",
144
+ "test:e2e:load-ata-unified": "pnpm test-validator && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/load-ata-unified.test.ts --reporter=verbose",
145
+ "test:e2e:load-ata-combined": "pnpm test-validator && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/load-ata-combined.test.ts --reporter=verbose",
146
+ "test:e2e:load-ata-spl-t22": "pnpm test-validator && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/load-ata-spl-t22.test.ts --reporter=verbose",
147
+ "test:e2e:load-ata:all": "pnpm test-validator && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/load-ata-standard.test.ts --bail=1 && pnpm test-validator && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/load-ata-unified.test.ts --bail=1 && pnpm test-validator && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/load-ata-combined.test.ts --bail=1 && pnpm test-validator && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/load-ata-spl-t22.test.ts --bail=1",
148
+ "test:e2e:ctoken:all": "pnpm test-validator && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/create-compressed-mint.test.ts --bail=1 && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/create-associated-ctoken.test.ts --bail=1 && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/mint-to-ctoken.test.ts --bail=1 && pnpm test-validator && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/mint-to-compressed.test.ts --bail=1 && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/mint-to-interface.test.ts --bail=1 && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/mint-workflow.test.ts --bail=1 && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/update-mint.test.ts --bail=1 && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/update-metadata.test.ts --bail=1 && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/compressible-load.test.ts --bail=1 && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/wrap.test.ts --bail=1 && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/get-mint-interface.test.ts --bail=1 && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/get-account-interface.test.ts --bail=1 && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/create-mint-interface.test.ts --bail=1 && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/create-ata-interface.test.ts --bail=1 && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/get-or-create-ata-interface.test.ts --bail=1 && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/transfer-interface.test.ts --bail=1 && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/unwrap.test.ts --bail=1 && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/decompress2.test.ts --bail=1 && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/payment-flows.test.ts --bail=1 && vitest run tests/e2e/v1-v2-migration.test.ts --bail=1 && pnpm test-validator && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/load-ata-standard.test.ts --bail=1 && pnpm test-validator && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/load-ata-unified.test.ts --bail=1 && pnpm test-validator && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/load-ata-combined.test.ts --bail=1 && pnpm test-validator && LIGHT_PROTOCOL_BETA=true vitest run tests/e2e/load-ata-spl-t22.test.ts --bail=1",
169
149
  "test:e2e:all": "pnpm test:e2e:legacy:all && pnpm test:e2e:ctoken:all",
170
150
  "pull-idl": "../../scripts/push-compressed-token-idl.sh",
171
151
  "build": "if [ \"$LIGHT_PROTOCOL_VERSION\" = \"V2\" ]; then LIGHT_PROTOCOL_VERSION=V2 pnpm build:bundle; else LIGHT_PROTOCOL_VERSION=V1 pnpm build:bundle; fi",