@lightprotocol/compressed-token 0.20.7 → 0.20.9

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.
@@ -2601,12 +2601,11 @@ declare function selectMinCompressedTokenAccountsForTransfer(accounts: ParsedTok
2601
2601
  maxPossibleAmount: BN
2602
2602
  ];
2603
2603
  /**
2604
- * Selects the minimal number of compressed token accounts for a transfer idempotently.
2605
- *
2606
- * 1. Sorts accounts by amount (descending)
2607
- * 2. Accumulates amount until it meets or exceeds transfer amount
2604
+ * Executes {@link selectMinCompressedTokenAccountsForTransfer} strategy,
2605
+ * returns partial amounts if insufficient accounts are found instead of
2606
+ * throwing an error.
2608
2607
  */
2609
- declare function selectMinCompressedTokenAccountsForTransferIdempotent(accounts: ParsedTokenAccount[], transferAmount: BN, maxInputs?: number): [
2608
+ declare function selectMinCompressedTokenAccountsForTransferOrPartial(accounts: ParsedTokenAccount[], transferAmount: BN, maxInputs?: number): [
2610
2609
  selectedAccounts: ParsedTokenAccount[],
2611
2610
  total: BN,
2612
2611
  totalLamports: BN | null,
@@ -2658,13 +2657,15 @@ declare function selectSmartCompressedTokenAccountsForTransfer(accounts: ParsedT
2658
2657
  maxPossibleAmount: BN
2659
2658
  ];
2660
2659
  /**
2661
- * Idempotently runs {@link selectSmartCompressedTokenAccountsForTransfer} strategy.
2660
+ * Executes {@link selectMinCompressedTokenAccountsForTransfer} strategy,
2661
+ * returns partial amounts if insufficient accounts are found instead of
2662
+ * throwing an error.
2662
2663
  */
2663
- declare function selectSmartCompressedTokenAccountsForTransferIdempotent(accounts: ParsedTokenAccount[], transferAmount: BN, maxInputs?: number): [
2664
+ declare function selectSmartCompressedTokenAccountsForTransferOrPartial(accounts: ParsedTokenAccount[], transferAmount: BN, maxInputs?: number): [
2664
2665
  selectedAccounts: ParsedTokenAccount[],
2665
2666
  total: BN,
2666
2667
  totalLamports: BN | null,
2667
2668
  maxPossibleAmount: BN
2668
2669
  ];
2669
2670
 
2670
- export { type ApproveAndMintToParams, COMPRESS_SPL_TOKEN_ACCOUNT_DISCRIMINATOR, CPI_AUTHORITY_SEED, CREATE_TOKEN_POOL_DISCRIMINATOR, type CompressParams, type CompressSplTokenAccountInstructionData, type CompressSplTokenAccountParams, type CompressedCpiContext, type CompressedTokenInstructionDataTransfer, CompressedTokenInstructionDataTransferLayout, CompressedTokenProgram, CpiContextLayout, type CreateMintParams, type CreateTokenProgramLookupTableParams, type DecompressParams, type DelegatedTransfer, DelegatedTransferLayout, ERROR_NO_ACCOUNTS_FOUND, IDL, type InputTokenDataWithContext, type LightCompressedToken, MINT_TO_DISCRIMINATOR, type MergeTokenAccountsParams, type MintToInstructionData, type MintToParams, POOL_SEED, type PackCompressedTokenAccountsParams, type PackedTokenTransferOutputData, type RegisterMintParams, SPL_TOKEN_MINT_RENT_EXEMPT_BALANCE, TRANSFER_DISCRIMINATOR, type TokenData, type TokenTransferOutputData, type TransferParams, type approveAccountsLayoutParams, approveAndMintTo, compress, compressSplTokenAccount, compressSplTokenAccountInstructionDataLayout, createDecompressOutputState, createMint, createTokenPool, createTokenPoolAccountsLayout, type createTokenPoolAccountsLayoutParams, createTokenProgramLookupTable, createTransferOutputState, decodeCompressSplTokenAccountInstructionData, decodeMintToInstructionData, decodeTransferInstructionData, decompress, encodeCompressSplTokenAccountInstructionData, encodeMintToInstructionData, encodeTransferInstructionData, type freezeAccountsLayoutParams, mergeTokenAccounts, mintTo, mintToAccountsLayout, type mintToAccountsLayoutParams, mintToLayout, packCompressedTokenAccounts, parseTokenData, type revokeAccountsLayoutParams, selectMinCompressedTokenAccountsForTransfer, selectMinCompressedTokenAccountsForTransferIdempotent, selectSmartCompressedTokenAccountsForTransfer, selectSmartCompressedTokenAccountsForTransferIdempotent, sumUpTokenAmount, type thawAccountsLayoutParams, transfer, transferAccountsLayout, type transferAccountsLayoutParams, validateSameTokenOwner };
2671
+ export { type ApproveAndMintToParams, COMPRESS_SPL_TOKEN_ACCOUNT_DISCRIMINATOR, CPI_AUTHORITY_SEED, CREATE_TOKEN_POOL_DISCRIMINATOR, type CompressParams, type CompressSplTokenAccountInstructionData, type CompressSplTokenAccountParams, type CompressedCpiContext, type CompressedTokenInstructionDataTransfer, CompressedTokenInstructionDataTransferLayout, CompressedTokenProgram, CpiContextLayout, type CreateMintParams, type CreateTokenProgramLookupTableParams, type DecompressParams, type DelegatedTransfer, DelegatedTransferLayout, ERROR_NO_ACCOUNTS_FOUND, IDL, type InputTokenDataWithContext, type LightCompressedToken, MINT_TO_DISCRIMINATOR, type MergeTokenAccountsParams, type MintToInstructionData, type MintToParams, POOL_SEED, type PackCompressedTokenAccountsParams, type PackedTokenTransferOutputData, type RegisterMintParams, SPL_TOKEN_MINT_RENT_EXEMPT_BALANCE, TRANSFER_DISCRIMINATOR, type TokenData, type TokenTransferOutputData, type TransferParams, type approveAccountsLayoutParams, approveAndMintTo, compress, compressSplTokenAccount, compressSplTokenAccountInstructionDataLayout, createDecompressOutputState, createMint, createTokenPool, createTokenPoolAccountsLayout, type createTokenPoolAccountsLayoutParams, createTokenProgramLookupTable, createTransferOutputState, decodeCompressSplTokenAccountInstructionData, decodeMintToInstructionData, decodeTransferInstructionData, decompress, encodeCompressSplTokenAccountInstructionData, encodeMintToInstructionData, encodeTransferInstructionData, type freezeAccountsLayoutParams, mergeTokenAccounts, mintTo, mintToAccountsLayout, type mintToAccountsLayoutParams, mintToLayout, packCompressedTokenAccounts, parseTokenData, type revokeAccountsLayoutParams, selectMinCompressedTokenAccountsForTransfer, selectMinCompressedTokenAccountsForTransferOrPartial, selectSmartCompressedTokenAccountsForTransfer, selectSmartCompressedTokenAccountsForTransferOrPartial, sumUpTokenAmount, type thawAccountsLayoutParams, transfer, transferAccountsLayout, type transferAccountsLayoutParams, validateSameTokenOwner };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightprotocol/compressed-token",
3
- "version": "0.20.7",
3
+ "version": "0.20.9",
4
4
  "description": "JS client to interact with the compressed-token program",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/node/index.cjs",
@@ -31,7 +31,7 @@
31
31
  "peerDependencies": {
32
32
  "@solana/spl-token": ">=0.3.9",
33
33
  "@solana/web3.js": ">=1.73.5",
34
- "@lightprotocol/stateless.js": "0.20.7"
34
+ "@lightprotocol/stateless.js": "0.20.9"
35
35
  },
36
36
  "dependencies": {
37
37
  "@coral-xyz/borsh": "^0.29.0",