@lightprotocol/compressed-token 0.23.0-beta.5 → 0.23.0-beta.7
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.
- package/dist/cjs/browser/index.cjs +1 -1
- package/dist/cjs/browser/index.cjs.map +1 -1
- package/dist/cjs/browser/types-D7Vfriyx.cjs +2 -0
- package/dist/cjs/browser/types-D7Vfriyx.cjs.map +1 -0
- package/dist/cjs/browser/unified/index.cjs +1 -1
- package/dist/cjs/browser/unified/index.cjs.map +1 -1
- package/dist/cjs/node/index.cjs +1 -1
- package/dist/cjs/node/index.cjs.map +1 -1
- package/dist/cjs/node/types-DM7_3vD2.cjs +2 -0
- package/dist/cjs/node/types-DM7_3vD2.cjs.map +1 -0
- package/dist/cjs/node/unified/index.cjs +1 -1
- package/dist/cjs/node/unified/index.cjs.map +1 -1
- package/dist/es/browser/index.js +1 -1
- package/dist/es/browser/index.js.map +1 -1
- package/dist/es/browser/types-MLa8Txs3.js +2 -0
- package/dist/es/browser/types-MLa8Txs3.js.map +1 -0
- package/dist/es/browser/unified/index.js +1 -1
- package/dist/es/browser/unified/index.js.map +1 -1
- package/dist/types/index.d.ts +267 -72
- package/dist/types/unified/index.d.ts +377 -276
- package/package.json +2 -2
- package/dist/cjs/browser/types-txB3ZZWl.cjs +0 -2
- package/dist/cjs/browser/types-txB3ZZWl.cjs.map +0 -1
- package/dist/cjs/node/types-ClkYErSH.cjs +0 -2
- package/dist/cjs/node/types-ClkYErSH.cjs.map +0 -1
- package/dist/es/browser/types-mr7N4aLT.js +0 -2
- package/dist/es/browser/types-mr7N4aLT.js.map +0 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -589,16 +589,18 @@ declare function unpackMintData(data: Buffer$1 | Uint8Array): {
|
|
|
589
589
|
|
|
590
590
|
/**
|
|
591
591
|
* Create instruction for updating a compressed mint's mint authority.
|
|
592
|
+
* Works for both compressed and decompressed mints.
|
|
592
593
|
*
|
|
593
594
|
* @param mintInterface MintInterface from getMintInterface() - must have merkleContext
|
|
594
595
|
* @param currentMintAuthority Current mint authority public key (must sign)
|
|
595
596
|
* @param newMintAuthority New mint authority (or null to revoke)
|
|
596
597
|
* @param payer Fee payer public key
|
|
597
|
-
* @param validityProof Validity proof for the compressed mint
|
|
598
|
+
* @param validityProof Validity proof for the compressed mint (null for decompressed mints)
|
|
598
599
|
*/
|
|
599
|
-
declare function createUpdateMintAuthorityInstruction(mintInterface: MintInterface, currentMintAuthority: PublicKey, newMintAuthority: PublicKey | null, payer: PublicKey, validityProof: ValidityProofWithContext): TransactionInstruction;
|
|
600
|
+
declare function createUpdateMintAuthorityInstruction(mintInterface: MintInterface, currentMintAuthority: PublicKey, newMintAuthority: PublicKey | null, payer: PublicKey, validityProof: ValidityProofWithContext | null): TransactionInstruction;
|
|
600
601
|
/**
|
|
601
602
|
* Create instruction for updating a compressed mint's freeze authority.
|
|
603
|
+
* Works for both compressed and decompressed mints.
|
|
602
604
|
*
|
|
603
605
|
* Output queue is automatically derived from mintInterface.merkleContext.treeInfo
|
|
604
606
|
* (preferring nextTreeInfo.queue if available for rollover support).
|
|
@@ -607,9 +609,9 @@ declare function createUpdateMintAuthorityInstruction(mintInterface: MintInterfa
|
|
|
607
609
|
* @param currentFreezeAuthority Current freeze authority public key (must sign)
|
|
608
610
|
* @param newFreezeAuthority New freeze authority (or null to revoke)
|
|
609
611
|
* @param payer Fee payer public key
|
|
610
|
-
* @param validityProof Validity proof for the compressed mint
|
|
612
|
+
* @param validityProof Validity proof for the compressed mint (null for decompressed mints)
|
|
611
613
|
*/
|
|
612
|
-
declare function createUpdateFreezeAuthorityInstruction(mintInterface: MintInterface, currentFreezeAuthority: PublicKey, newFreezeAuthority: PublicKey | null, payer: PublicKey, validityProof: ValidityProofWithContext): TransactionInstruction;
|
|
614
|
+
declare function createUpdateFreezeAuthorityInstruction(mintInterface: MintInterface, currentFreezeAuthority: PublicKey, newFreezeAuthority: PublicKey | null, payer: PublicKey, validityProof: ValidityProofWithContext | null): TransactionInstruction;
|
|
613
615
|
|
|
614
616
|
/**
|
|
615
617
|
* Create instruction for updating a compressed mint's metadata field.
|
|
@@ -620,13 +622,13 @@ declare function createUpdateFreezeAuthorityInstruction(mintInterface: MintInter
|
|
|
620
622
|
* @param mintInterface MintInterface from getMintInterface() - must have merkleContext and tokenMetadata
|
|
621
623
|
* @param authority Metadata update authority public key (must sign)
|
|
622
624
|
* @param payer Fee payer public key
|
|
623
|
-
* @param validityProof Validity proof for the compressed mint
|
|
625
|
+
* @param validityProof Validity proof for the compressed mint (null for decompressed mints)
|
|
624
626
|
* @param fieldType Field to update: 'name', 'symbol', 'uri', or 'custom'
|
|
625
627
|
* @param value New value for the field
|
|
626
628
|
* @param customKey Custom key name (required if fieldType is 'custom')
|
|
627
629
|
* @param extensionIndex Extension index (default: 0)
|
|
628
630
|
*/
|
|
629
|
-
declare function createUpdateMetadataFieldInstruction(mintInterface: MintInterface, authority: PublicKey, payer: PublicKey, validityProof: ValidityProofWithContext, fieldType: 'name' | 'symbol' | 'uri' | 'custom', value: string, customKey?: string, extensionIndex?: number): TransactionInstruction;
|
|
631
|
+
declare function createUpdateMetadataFieldInstruction(mintInterface: MintInterface, authority: PublicKey, payer: PublicKey, validityProof: ValidityProofWithContext | null, fieldType: 'name' | 'symbol' | 'uri' | 'custom', value: string, customKey?: string, extensionIndex?: number): TransactionInstruction;
|
|
630
632
|
/**
|
|
631
633
|
* Create instruction for updating a compressed mint's metadata authority.
|
|
632
634
|
*
|
|
@@ -637,10 +639,10 @@ declare function createUpdateMetadataFieldInstruction(mintInterface: MintInterfa
|
|
|
637
639
|
* @param currentAuthority Current metadata update authority public key (must sign)
|
|
638
640
|
* @param newAuthority New metadata update authority public key
|
|
639
641
|
* @param payer Fee payer public key
|
|
640
|
-
* @param validityProof Validity proof for the compressed mint
|
|
642
|
+
* @param validityProof Validity proof for the compressed mint (null for decompressed mints)
|
|
641
643
|
* @param extensionIndex Extension index (default: 0)
|
|
642
644
|
*/
|
|
643
|
-
declare function createUpdateMetadataAuthorityInstruction(mintInterface: MintInterface, currentAuthority: PublicKey, newAuthority: PublicKey, payer: PublicKey, validityProof: ValidityProofWithContext, extensionIndex?: number): TransactionInstruction;
|
|
645
|
+
declare function createUpdateMetadataAuthorityInstruction(mintInterface: MintInterface, currentAuthority: PublicKey, newAuthority: PublicKey, payer: PublicKey, validityProof: ValidityProofWithContext | null, extensionIndex?: number): TransactionInstruction;
|
|
644
646
|
/**
|
|
645
647
|
* Create instruction for removing a metadata key from a compressed mint.
|
|
646
648
|
*
|
|
@@ -650,12 +652,12 @@ declare function createUpdateMetadataAuthorityInstruction(mintInterface: MintInt
|
|
|
650
652
|
* @param mintInterface MintInterface from getMintInterface() - must have merkleContext and tokenMetadata
|
|
651
653
|
* @param authority Metadata update authority public key (must sign)
|
|
652
654
|
* @param payer Fee payer public key
|
|
653
|
-
* @param validityProof Validity proof for the compressed mint
|
|
655
|
+
* @param validityProof Validity proof for the compressed mint (null for decompressed mints)
|
|
654
656
|
* @param key Metadata key to remove
|
|
655
657
|
* @param idempotent If true, don't error if key doesn't exist (default: false)
|
|
656
658
|
* @param extensionIndex Extension index (default: 0)
|
|
657
659
|
*/
|
|
658
|
-
declare function createRemoveMetadataKeyInstruction(mintInterface: MintInterface, authority: PublicKey, payer: PublicKey, validityProof: ValidityProofWithContext, key: string, idempotent?: boolean, extensionIndex?: number): TransactionInstruction;
|
|
660
|
+
declare function createRemoveMetadataKeyInstruction(mintInterface: MintInterface, authority: PublicKey, payer: PublicKey, validityProof: ValidityProofWithContext | null, key: string, idempotent?: boolean, extensionIndex?: number): TransactionInstruction;
|
|
659
661
|
|
|
660
662
|
interface CompressToPubkey {
|
|
661
663
|
bump: number;
|
|
@@ -670,8 +672,7 @@ interface CompressibleConfig {
|
|
|
670
672
|
compressToAccountPubkey?: CompressToPubkey | null;
|
|
671
673
|
}
|
|
672
674
|
interface CreateAssociatedCTokenAccountParams {
|
|
673
|
-
|
|
674
|
-
compressibleConfig?: CompressibleConfig;
|
|
675
|
+
compressibleConfig?: CompressibleConfig | null;
|
|
675
676
|
}
|
|
676
677
|
/**
|
|
677
678
|
* Default compressible config for c-token ATAs - matches Rust SDK defaults.
|
|
@@ -716,7 +717,7 @@ declare const DEFAULT_COMPRESSIBLE_CONFIG: CompressibleConfig;
|
|
|
716
717
|
* @param configAccount Config account (defaults to LIGHT_TOKEN_CONFIG).
|
|
717
718
|
* @param rentPayerPda Rent payer PDA (defaults to LIGHT_TOKEN_RENT_SPONSOR).
|
|
718
719
|
*/
|
|
719
|
-
declare function createAssociatedCTokenAccountInstruction(feePayer: PublicKey, owner: PublicKey, mint: PublicKey, compressibleConfig?: CompressibleConfig, configAccount?: PublicKey, rentPayerPda?: PublicKey): TransactionInstruction;
|
|
720
|
+
declare function createAssociatedCTokenAccountInstruction(feePayer: PublicKey, owner: PublicKey, mint: PublicKey, compressibleConfig?: CompressibleConfig | null, configAccount?: PublicKey, rentPayerPda?: PublicKey): TransactionInstruction;
|
|
720
721
|
/**
|
|
721
722
|
* Create idempotent instruction for creating an associated compressed token account.
|
|
722
723
|
* Uses the default rent sponsor PDA by default.
|
|
@@ -728,13 +729,13 @@ declare function createAssociatedCTokenAccountInstruction(feePayer: PublicKey, o
|
|
|
728
729
|
* @param configAccount Config account (defaults to LIGHT_TOKEN_CONFIG).
|
|
729
730
|
* @param rentPayerPda Rent payer PDA (defaults to LIGHT_TOKEN_RENT_SPONSOR).
|
|
730
731
|
*/
|
|
731
|
-
declare function createAssociatedCTokenAccountIdempotentInstruction(feePayer: PublicKey, owner: PublicKey, mint: PublicKey, compressibleConfig?: CompressibleConfig, configAccount?: PublicKey, rentPayerPda?: PublicKey): TransactionInstruction;
|
|
732
|
+
declare function createAssociatedCTokenAccountIdempotentInstruction(feePayer: PublicKey, owner: PublicKey, mint: PublicKey, compressibleConfig?: CompressibleConfig | null, configAccount?: PublicKey, rentPayerPda?: PublicKey): TransactionInstruction;
|
|
732
733
|
|
|
733
734
|
/**
|
|
734
735
|
* c-token-specific config for createAssociatedTokenAccountInterfaceInstruction
|
|
735
736
|
*/
|
|
736
737
|
interface CTokenConfig {
|
|
737
|
-
compressibleConfig?: CompressibleConfig;
|
|
738
|
+
compressibleConfig?: CompressibleConfig | null;
|
|
738
739
|
configAccount?: PublicKey;
|
|
739
740
|
rentPayerPda?: PublicKey;
|
|
740
741
|
}
|
|
@@ -772,18 +773,32 @@ declare function createAssociatedTokenAccountInterfaceIdempotentInstruction(paye
|
|
|
772
773
|
declare const createAtaInterfaceIdempotentInstruction: typeof createAssociatedTokenAccountInterfaceIdempotentInstruction;
|
|
773
774
|
|
|
774
775
|
/**
|
|
775
|
-
*
|
|
776
|
+
* Parameters for creating a MintTo instruction.
|
|
777
|
+
*/
|
|
778
|
+
interface CreateMintToInstructionParams {
|
|
779
|
+
/** Mint account (CMint - decompressed compressed mint) */
|
|
780
|
+
mint: PublicKey;
|
|
781
|
+
/** Destination CToken account to mint to */
|
|
782
|
+
destination: PublicKey;
|
|
783
|
+
/** Amount of tokens to mint */
|
|
784
|
+
amount: number | bigint;
|
|
785
|
+
/** Mint authority (must be signer) */
|
|
786
|
+
authority: PublicKey;
|
|
787
|
+
/** Maximum lamports for rent and top-up combined. Transaction fails if exceeded. (0 = no limit) */
|
|
788
|
+
maxTopUp?: number;
|
|
789
|
+
/** Optional fee payer for rent top-ups. If not provided, authority pays. */
|
|
790
|
+
feePayer?: PublicKey;
|
|
791
|
+
}
|
|
792
|
+
/**
|
|
793
|
+
* Create instruction for minting tokens to a CToken account.
|
|
776
794
|
*
|
|
777
|
-
*
|
|
778
|
-
*
|
|
779
|
-
*
|
|
780
|
-
* @param
|
|
781
|
-
* @
|
|
782
|
-
* @param outputStateTreeInfo Output state tree info.
|
|
783
|
-
* @param recipientAccount Recipient onchain token account address.
|
|
784
|
-
* @param amount Amount to mint.
|
|
795
|
+
* This is a simple 3-4 account instruction for minting to decompressed CToken accounts.
|
|
796
|
+
* Uses discriminator 7 (CTokenMintTo).
|
|
797
|
+
*
|
|
798
|
+
* @param params - Mint instruction parameters
|
|
799
|
+
* @returns TransactionInstruction for minting tokens
|
|
785
800
|
*/
|
|
786
|
-
declare function createMintToInstruction(
|
|
801
|
+
declare function createMintToInstruction(params: CreateMintToInstructionParams): TransactionInstruction;
|
|
787
802
|
|
|
788
803
|
/** Default compressible config PDA (V1) */
|
|
789
804
|
declare const LIGHT_TOKEN_CONFIG: PublicKey;
|
|
@@ -877,21 +892,23 @@ declare function createMintToCompressedInstruction(authority: PublicKey, payer:
|
|
|
877
892
|
}>, outputStateTreeInfo?: TreeInfo, tokenAccountVersion?: TokenDataVersion): TransactionInstruction;
|
|
878
893
|
|
|
879
894
|
/**
|
|
880
|
-
* Create mint-to instruction for SPL, Token-2022, or
|
|
895
|
+
* Create mint-to instruction for SPL, Token-2022, or CToken mints.
|
|
881
896
|
* This instruction ONLY mints to decompressed/onchain token accounts.
|
|
882
897
|
*
|
|
883
|
-
*
|
|
898
|
+
* For CToken mints, the mint must be decompressed first (CMint account must exist on-chain).
|
|
899
|
+
*
|
|
900
|
+
* @param mintInterface Mint interface (SPL, Token-2022, or CToken).
|
|
884
901
|
* @param destination Destination onchain token account address.
|
|
885
902
|
* @param authority Mint authority public key.
|
|
886
903
|
* @param payer Fee payer public key.
|
|
887
904
|
* @param amount Amount to mint.
|
|
888
|
-
* @param validityProof
|
|
889
|
-
* @param multiSigners Multi-signature signer public keys.
|
|
905
|
+
* @param validityProof Not used (legacy parameter, kept for compatibility).
|
|
906
|
+
* @param multiSigners Multi-signature signer public keys (SPL/T22 only).
|
|
890
907
|
*/
|
|
891
908
|
declare function createMintToInterfaceInstruction(mintInterface: MintInterface, destination: PublicKey, authority: PublicKey, payer: PublicKey, amount: number | bigint, validityProof?: ValidityProofWithContext, multiSigners?: PublicKey[]): TransactionInstruction;
|
|
892
909
|
|
|
893
910
|
/**
|
|
894
|
-
* Create a
|
|
911
|
+
* Create a Light token transfer instruction.
|
|
895
912
|
*
|
|
896
913
|
* For c-token accounts with compressible extension, the program needs
|
|
897
914
|
* system_program and fee_payer to handle rent top-ups.
|
|
@@ -901,20 +918,9 @@ declare function createMintToInterfaceInstruction(mintInterface: MintInterface,
|
|
|
901
918
|
* @param owner Owner of the source account (signer, also pays for compressible extension top-ups)
|
|
902
919
|
* @param amount Amount to transfer
|
|
903
920
|
* @param feePayer Optional fee payer for top-ups (defaults to owner)
|
|
904
|
-
* @returns Transaction instruction for
|
|
905
|
-
*/
|
|
906
|
-
declare function createCTokenTransferInstruction(source: PublicKey, destination: PublicKey, owner: PublicKey, amount: number | bigint, feePayer?: PublicKey): TransactionInstruction;
|
|
907
|
-
/**
|
|
908
|
-
* Construct a transfer instruction for SPL/T22/c-token. Defaults to c-token
|
|
909
|
-
* program. For cross-program transfers (SPL <> c-token), use `wrap`/`unwrap`.
|
|
910
|
-
*
|
|
911
|
-
* @param source Source token account
|
|
912
|
-
* @param destination Destination token account
|
|
913
|
-
* @param owner Owner of the source account (signer)
|
|
914
|
-
* @param amount Amount to transfer
|
|
915
|
-
* @returns instruction for c-token transfer
|
|
921
|
+
* @returns Transaction instruction for Light token transfer
|
|
916
922
|
*/
|
|
917
|
-
declare function
|
|
923
|
+
declare function createLightTokenTransferInstruction(source: PublicKey, destination: PublicKey, owner: PublicKey, amount: number | bigint, feePayer?: PublicKey): TransactionInstruction;
|
|
918
924
|
|
|
919
925
|
declare namespace BN {
|
|
920
926
|
type Endianness = "le" | "be";
|
|
@@ -1792,22 +1798,95 @@ interface InterfaceOptions {
|
|
|
1792
1798
|
/**
|
|
1793
1799
|
* Transfer tokens using the c-token interface.
|
|
1794
1800
|
*
|
|
1795
|
-
*
|
|
1801
|
+
* High-level action: resolves balances, builds all instructions (load +
|
|
1802
|
+
* transfer), signs, and sends. Creates the recipient ATA if it does not exist.
|
|
1803
|
+
*
|
|
1804
|
+
* For instruction-level control, use `createTransferInterfaceInstructions`.
|
|
1796
1805
|
*
|
|
1797
1806
|
* @param rpc RPC connection
|
|
1798
1807
|
* @param payer Fee payer (signer)
|
|
1799
1808
|
* @param source Source c-token ATA address
|
|
1800
1809
|
* @param mint Mint address
|
|
1801
|
-
* @param destination
|
|
1810
|
+
* @param destination Recipient wallet public key
|
|
1802
1811
|
* @param owner Source owner (signer)
|
|
1803
1812
|
* @param amount Amount to transfer
|
|
1804
|
-
* @param programId Token program ID (default:
|
|
1813
|
+
* @param programId Token program ID (default: LIGHT_TOKEN_PROGRAM_ID)
|
|
1805
1814
|
* @param confirmOptions Optional confirm options
|
|
1806
1815
|
* @param options Optional interface options
|
|
1807
1816
|
* @param wrap Include SPL/T22 wrapping (default: false)
|
|
1808
|
-
* @returns Transaction signature
|
|
1817
|
+
* @returns Transaction signature of the transfer transaction
|
|
1809
1818
|
*/
|
|
1810
1819
|
declare function transferInterface(rpc: Rpc, payer: Signer, source: PublicKey, mint: PublicKey, destination: PublicKey, owner: Signer, amount: number | bigint | BN, programId?: PublicKey, confirmOptions?: ConfirmOptions, options?: InterfaceOptions, wrap?: boolean): Promise<TransactionSignature>;
|
|
1820
|
+
/**
|
|
1821
|
+
* Options for createTransferInterfaceInstructions.
|
|
1822
|
+
*/
|
|
1823
|
+
interface TransferOptions extends InterfaceOptions {
|
|
1824
|
+
/** Include SPL/T22 wrapping to c-token ATA (unified path). Default: false. */
|
|
1825
|
+
wrap?: boolean;
|
|
1826
|
+
/** Token program ID. Default: LIGHT_TOKEN_PROGRAM_ID. */
|
|
1827
|
+
programId?: PublicKey;
|
|
1828
|
+
/**
|
|
1829
|
+
* Include an idempotent recipient ATA creation instruction in the
|
|
1830
|
+
* transfer transaction. No extra RPC fetch -- uses
|
|
1831
|
+
* createAssociatedTokenAccountInterfaceIdempotentInstruction which is
|
|
1832
|
+
* a no-op on-chain if the ATA already exists (~200 CU overhead).
|
|
1833
|
+
* Default: true.
|
|
1834
|
+
*/
|
|
1835
|
+
ensureRecipientAta?: boolean;
|
|
1836
|
+
}
|
|
1837
|
+
/**
|
|
1838
|
+
* Splits the last element from an array.
|
|
1839
|
+
*
|
|
1840
|
+
* Useful for separating load transactions (parallel) from the final transfer
|
|
1841
|
+
* transaction (sequential) returned by `createTransferInterfaceInstructions`.
|
|
1842
|
+
*
|
|
1843
|
+
* @returns `{ rest, last }` where `rest` is everything before the last
|
|
1844
|
+
* element and `last` is the last element.
|
|
1845
|
+
* @throws if the input array is empty.
|
|
1846
|
+
*/
|
|
1847
|
+
declare function sliceLast<T>(items: T[]): {
|
|
1848
|
+
rest: T[];
|
|
1849
|
+
last: T;
|
|
1850
|
+
};
|
|
1851
|
+
/**
|
|
1852
|
+
* Create instructions for a c-token transfer.
|
|
1853
|
+
*
|
|
1854
|
+
* Returns `TransactionInstruction[][]` -- an array of transaction instruction
|
|
1855
|
+
* arrays. Each inner array is one transaction to sign and send.
|
|
1856
|
+
*
|
|
1857
|
+
* - All transactions except the last can be sent in parallel (load/decompress).
|
|
1858
|
+
* - The last transaction is the transfer and must be sent after all others
|
|
1859
|
+
* confirm.
|
|
1860
|
+
* - For a hot sender or <=8 cold inputs, the result is a single-element array.
|
|
1861
|
+
*
|
|
1862
|
+
* Use `sliceLast` to separate the parallel prefix from the final transfer:
|
|
1863
|
+
* ```
|
|
1864
|
+
* const batches = await createTransferInterfaceInstructions(...);
|
|
1865
|
+
* const { rest, last } = sliceLast(batches);
|
|
1866
|
+
* ```
|
|
1867
|
+
*
|
|
1868
|
+
* When `ensureRecipientAta` is true (the default), an idempotent ATA creation
|
|
1869
|
+
* instruction is included in the transfer (last) transaction. No extra RPC
|
|
1870
|
+
* fetch -- the instruction is a no-op on-chain if the ATA already exists.
|
|
1871
|
+
* Set `ensureRecipientAta: false` if you manage recipient ATAs yourself.
|
|
1872
|
+
*
|
|
1873
|
+
* All transactions require payer + sender as signers.
|
|
1874
|
+
*
|
|
1875
|
+
* Hash uniqueness guarantee: all compressed accounts for the sender are
|
|
1876
|
+
* fetched once, then partitioned into non-overlapping chunks by tree version.
|
|
1877
|
+
* Each hash appears in exactly one batch. This is enforced at runtime by
|
|
1878
|
+
* `assertUniqueInputHashes` inside `_buildLoadBatches`.
|
|
1879
|
+
*
|
|
1880
|
+
* @param rpc RPC connection
|
|
1881
|
+
* @param payer Fee payer public key
|
|
1882
|
+
* @param mint Mint address
|
|
1883
|
+
* @param amount Amount to transfer
|
|
1884
|
+
* @param sender Sender public key (must sign all transactions)
|
|
1885
|
+
* @param recipient Recipient public key
|
|
1886
|
+
* @param options Optional configuration
|
|
1887
|
+
* @returns TransactionInstruction[][] -- send [0..n-2] in parallel, then [n-1]
|
|
1888
|
+
*/
|
|
1889
|
+
declare function createTransferInterfaceInstructions(rpc: Rpc, payer: PublicKey, mint: PublicKey, amount: number | bigint | BN, sender: PublicKey, recipient: PublicKey, options?: TransferOptions): Promise<TransactionInstruction[][]>;
|
|
1811
1890
|
|
|
1812
1891
|
/**
|
|
1813
1892
|
* Account info interface for compressible accounts.
|
|
@@ -1899,7 +1978,7 @@ interface LoadResult {
|
|
|
1899
1978
|
* ```typescript
|
|
1900
1979
|
* const poolInfo = await myProgram.fetchPoolState(rpc, poolAddress);
|
|
1901
1980
|
* const vault0Ata = getAssociatedTokenAddressInterface(token0Mint, poolAddress);
|
|
1902
|
-
* const vault0Info = await getAtaInterface(rpc, vault0Ata, poolAddress, token0Mint, undefined,
|
|
1981
|
+
* const vault0Info = await getAtaInterface(rpc, vault0Ata, poolAddress, token0Mint, undefined, LIGHT_TOKEN_PROGRAM_ID);
|
|
1903
1982
|
* const userAta = getAssociatedTokenAddressInterface(tokenMint, userWallet);
|
|
1904
1983
|
* const userAtaInfo = await getAtaInterface(rpc, userAta, userWallet, tokenMint);
|
|
1905
1984
|
*
|
|
@@ -1950,6 +2029,22 @@ declare function calculateCompressibleLoadComputeUnits(compressedAccountCount: n
|
|
|
1950
2029
|
*/
|
|
1951
2030
|
declare function createWrapInstruction(source: PublicKey, destination: PublicKey, owner: PublicKey, mint: PublicKey, amount: bigint, splInterfaceInfo: SplInterfaceInfo, decimals: number, payer?: PublicKey): TransactionInstruction;
|
|
1952
2031
|
|
|
2032
|
+
/**
|
|
2033
|
+
* Create an unwrap instruction that moves tokens from a c-token account to an
|
|
2034
|
+
* SPL/T22 account.
|
|
2035
|
+
*
|
|
2036
|
+
* @param source Source c-token account
|
|
2037
|
+
* @param destination Destination SPL/T22 token account
|
|
2038
|
+
* @param owner Owner of the source account (signer)
|
|
2039
|
+
* @param mint Mint address
|
|
2040
|
+
* @param amount Amount to unwrap,
|
|
2041
|
+
* @param splInterfaceInfo SPL interface info for the decompression
|
|
2042
|
+
* @param decimals Mint decimals (required for transfer_checked)
|
|
2043
|
+
* @param payer Fee payer (defaults to owner if not provided)
|
|
2044
|
+
* @returns TransactionInstruction to unwrap tokens
|
|
2045
|
+
*/
|
|
2046
|
+
declare function createUnwrapInstruction(source: PublicKey, destination: PublicKey, owner: PublicKey, mint: PublicKey, amount: bigint, splInterfaceInfo: SplInterfaceInfo, decimals: number, payer?: PublicKey): TransactionInstruction;
|
|
2047
|
+
|
|
1953
2048
|
/**
|
|
1954
2049
|
* Create and initialize a new mint for SPL/T22/c-token.
|
|
1955
2050
|
*
|
|
@@ -1960,7 +2055,7 @@ declare function createWrapInstruction(source: PublicKey, destination: PublicKey
|
|
|
1960
2055
|
* @param decimals Location of the decimal place
|
|
1961
2056
|
* @param keypair Mint keypair (defaults to a random keypair)
|
|
1962
2057
|
* @param confirmOptions Confirm options
|
|
1963
|
-
* @param programId Token program ID (defaults to
|
|
2058
|
+
* @param programId Token program ID (defaults to LIGHT_TOKEN_PROGRAM_ID)
|
|
1964
2059
|
* @param tokenMetadata Optional token metadata (c-token mints only)
|
|
1965
2060
|
* @param outputStateTreeInfo Optional output state tree info (c-token mints only)
|
|
1966
2061
|
* @param addressTreeInfo Optional address tree info (c-token mints only)
|
|
@@ -1974,6 +2069,7 @@ declare function createMintInterface(rpc: Rpc, payer: Signer, mintAuthority: Pub
|
|
|
1974
2069
|
|
|
1975
2070
|
/**
|
|
1976
2071
|
* Update the mint authority of a compressed token mint.
|
|
2072
|
+
* Works for both compressed and decompressed mints.
|
|
1977
2073
|
*
|
|
1978
2074
|
* @param rpc RPC connection
|
|
1979
2075
|
* @param payer Fee payer (signer)
|
|
@@ -1985,6 +2081,7 @@ declare function createMintInterface(rpc: Rpc, payer: Signer, mintAuthority: Pub
|
|
|
1985
2081
|
declare function updateMintAuthority(rpc: Rpc, payer: Signer, mint: PublicKey, currentMintAuthority: Signer, newMintAuthority: PublicKey | null, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
|
|
1986
2082
|
/**
|
|
1987
2083
|
* Update the freeze authority of a compressed token mint.
|
|
2084
|
+
* Works for both compressed and decompressed mints.
|
|
1988
2085
|
*
|
|
1989
2086
|
* @param rpc RPC connection
|
|
1990
2087
|
* @param payer Fee payer (signer)
|
|
@@ -1997,6 +2094,7 @@ declare function updateFreezeAuthority(rpc: Rpc, payer: Signer, mint: PublicKey,
|
|
|
1997
2094
|
|
|
1998
2095
|
/**
|
|
1999
2096
|
* Update a metadata field on a compressed token mint.
|
|
2097
|
+
* Works for both compressed and decompressed mints.
|
|
2000
2098
|
*
|
|
2001
2099
|
* @param rpc RPC connection
|
|
2002
2100
|
* @param payer Fee payer (signer)
|
|
@@ -2011,6 +2109,7 @@ declare function updateFreezeAuthority(rpc: Rpc, payer: Signer, mint: PublicKey,
|
|
|
2011
2109
|
declare function updateMetadataField(rpc: Rpc, payer: Signer, mint: PublicKey, authority: Signer, fieldType: 'name' | 'symbol' | 'uri' | 'custom', value: string, customKey?: string, extensionIndex?: number, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
|
|
2012
2110
|
/**
|
|
2013
2111
|
* Update the metadata authority of a compressed token mint.
|
|
2112
|
+
* Works for both compressed and decompressed mints.
|
|
2014
2113
|
*
|
|
2015
2114
|
* @param rpc RPC connection
|
|
2016
2115
|
* @param payer Fee payer (signer)
|
|
@@ -2023,6 +2122,7 @@ declare function updateMetadataField(rpc: Rpc, payer: Signer, mint: PublicKey, a
|
|
|
2023
2122
|
declare function updateMetadataAuthority(rpc: Rpc, payer: Signer, mint: PublicKey, currentAuthority: Signer, newAuthority: PublicKey, extensionIndex?: number, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
|
|
2024
2123
|
/**
|
|
2025
2124
|
* Remove a metadata key from a compressed token mint.
|
|
2125
|
+
* Works for both compressed and decompressed mints.
|
|
2026
2126
|
*
|
|
2027
2127
|
* @param rpc RPC connection
|
|
2028
2128
|
* @param payer Fee payer (signer)
|
|
@@ -2046,7 +2146,7 @@ declare function removeMetadataKey(rpc: Rpc, payer: Signer, mint: PublicKey, aut
|
|
|
2046
2146
|
* @param allowOwnerOffCurve Allow owner to be a PDA (default: false)
|
|
2047
2147
|
* @param confirmOptions Options for confirming the transaction
|
|
2048
2148
|
* @param programId Token program ID (default:
|
|
2049
|
-
*
|
|
2149
|
+
* LIGHT_TOKEN_PROGRAM_ID)
|
|
2050
2150
|
* @param associatedTokenProgramId ATA program ID (auto-derived if not
|
|
2051
2151
|
* provided)
|
|
2052
2152
|
* @param ctokenConfig Optional rent config
|
|
@@ -2066,7 +2166,7 @@ declare function createAtaInterface(rpc: Rpc, payer: Signer, mint: PublicKey, ow
|
|
|
2066
2166
|
* @param allowOwnerOffCurve Allow owner to be a PDA (default: false)
|
|
2067
2167
|
* @param confirmOptions Options for confirming the transaction
|
|
2068
2168
|
* @param programId Token program ID (default:
|
|
2069
|
-
*
|
|
2169
|
+
* LIGHT_TOKEN_PROGRAM_ID)
|
|
2070
2170
|
* @param associatedTokenProgramId ATA program ID (auto-derived if not
|
|
2071
2171
|
* provided)
|
|
2072
2172
|
* @param ctokenConfig Optional c-token-specific configuration
|
|
@@ -2075,7 +2175,23 @@ declare function createAtaInterface(rpc: Rpc, payer: Signer, mint: PublicKey, ow
|
|
|
2075
2175
|
*/
|
|
2076
2176
|
declare function createAtaInterfaceIdempotent(rpc: Rpc, payer: Signer, mint: PublicKey, owner: PublicKey, allowOwnerOffCurve?: boolean, confirmOptions?: ConfirmOptions, programId?: PublicKey, associatedTokenProgramId?: PublicKey, ctokenConfig?: CTokenConfig): Promise<PublicKey>;
|
|
2077
2177
|
|
|
2078
|
-
|
|
2178
|
+
/**
|
|
2179
|
+
* Mint tokens to a CToken account.
|
|
2180
|
+
*
|
|
2181
|
+
* This is a simple mint instruction for minting to decompressed CToken accounts.
|
|
2182
|
+
* The mint must be decompressed (CMint account must exist on-chain).
|
|
2183
|
+
*
|
|
2184
|
+
* @param rpc - RPC connection
|
|
2185
|
+
* @param payer - Fee payer (signer)
|
|
2186
|
+
* @param mint - Mint address (CMint account)
|
|
2187
|
+
* @param destination - Destination CToken account
|
|
2188
|
+
* @param authority - Mint authority (signer)
|
|
2189
|
+
* @param amount - Amount to mint
|
|
2190
|
+
* @param maxTopUp - Optional maximum lamports for rent top-up
|
|
2191
|
+
* @param confirmOptions - Optional confirm options
|
|
2192
|
+
* @returns Transaction signature
|
|
2193
|
+
*/
|
|
2194
|
+
declare function mintTo$1(rpc: Rpc, payer: Signer, mint: PublicKey, destination: PublicKey, authority: Signer, amount: number | bigint, maxTopUp?: number, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
|
|
2079
2195
|
|
|
2080
2196
|
/**
|
|
2081
2197
|
* Mint compressed tokens directly to compressed accounts.
|
|
@@ -2096,20 +2212,22 @@ declare function mintToCompressed(rpc: Rpc, payer: Signer, mint: PublicKey, auth
|
|
|
2096
2212
|
|
|
2097
2213
|
/**
|
|
2098
2214
|
* Mint tokens to a decompressed/onchain token account.
|
|
2099
|
-
* Works with SPL, Token-2022, and
|
|
2215
|
+
* Works with SPL, Token-2022, and CToken mints.
|
|
2100
2216
|
*
|
|
2101
2217
|
* This function ONLY mints to decompressed onchain token accounts, never to compressed accounts.
|
|
2218
|
+
* For CToken mints, the mint must be decompressed first (CMint account must exist on-chain).
|
|
2219
|
+
*
|
|
2102
2220
|
* The signature matches the standard SPL mintTo for simplicity and consistency.
|
|
2103
2221
|
*
|
|
2104
2222
|
* @param rpc - RPC connection to use
|
|
2105
2223
|
* @param payer - Transaction fee payer
|
|
2106
|
-
* @param mint - Mint address (SPL, Token-2022, or
|
|
2224
|
+
* @param mint - Mint address (SPL, Token-2022, or CToken mint)
|
|
2107
2225
|
* @param destination - Destination token account address (must be an existing onchain token account)
|
|
2108
2226
|
* @param authority - Mint authority (can be Signer or PublicKey if multiSigners provided)
|
|
2109
2227
|
* @param amount - Amount to mint
|
|
2110
2228
|
* @param multiSigners - Optional: Multi-signature signers (default: [])
|
|
2111
2229
|
* @param confirmOptions - Optional: Transaction confirmation options
|
|
2112
|
-
* @param programId - Optional: Token program ID
|
|
2230
|
+
* @param programId - Optional: Token program ID. If undefined, auto-detects.
|
|
2113
2231
|
*
|
|
2114
2232
|
* @returns Transaction signature
|
|
2115
2233
|
*/
|
|
@@ -2132,7 +2250,7 @@ declare function mintToInterface(rpc: Rpc, payer: Signer, mint: PublicKey, desti
|
|
|
2132
2250
|
* state.
|
|
2133
2251
|
* @param confirmOptions Options for confirming the transaction
|
|
2134
2252
|
* @param programId Token program ID (defaults to
|
|
2135
|
-
*
|
|
2253
|
+
* LIGHT_TOKEN_PROGRAM_ID)
|
|
2136
2254
|
* @param associatedTokenProgramId Associated token program ID (auto-derived if
|
|
2137
2255
|
* not provided)
|
|
2138
2256
|
*
|
|
@@ -2192,6 +2310,48 @@ declare function decompressInterface(rpc: Rpc, payer: Signer, owner: Signer, min
|
|
|
2192
2310
|
*/
|
|
2193
2311
|
declare function wrap(rpc: Rpc, payer: Signer, source: PublicKey, destination: PublicKey, owner: Signer, mint: PublicKey, amount: bigint, splInterfaceInfo?: SplInterfaceInfo, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
|
|
2194
2312
|
|
|
2313
|
+
/**
|
|
2314
|
+
* Build instruction batches for unwrapping c-tokens to SPL/T22 tokens.
|
|
2315
|
+
*
|
|
2316
|
+
* Returns `TransactionInstruction[][]` with the same shape as
|
|
2317
|
+
* `createLoadAtaInstructions` and `createTransferInterfaceInstructions`:
|
|
2318
|
+
* each inner array is one transaction. Load batches (if any) come first,
|
|
2319
|
+
* followed by one final unwrap transaction.
|
|
2320
|
+
*
|
|
2321
|
+
* Uses amount-aware input selection: only loads the cold inputs needed to
|
|
2322
|
+
* cover the unwrap amount (plus padding to fill a single proof batch).
|
|
2323
|
+
*
|
|
2324
|
+
* @param rpc RPC connection
|
|
2325
|
+
* @param destination Destination SPL/T22 token account (must exist)
|
|
2326
|
+
* @param owner Owner of the c-token
|
|
2327
|
+
* @param mint Mint address
|
|
2328
|
+
* @param amount Amount to unwrap (defaults to full balance)
|
|
2329
|
+
* @param payer Fee payer (defaults to owner)
|
|
2330
|
+
* @param splInterfaceInfo Optional: SPL interface info
|
|
2331
|
+
* @param interfaceOptions Optional: interface options for load
|
|
2332
|
+
* @param wrap Whether to use unified (wrap) mode for loading.
|
|
2333
|
+
* Default false.
|
|
2334
|
+
* @returns Instruction batches - each inner array is one transaction
|
|
2335
|
+
*/
|
|
2336
|
+
declare function createUnwrapInstructions(rpc: Rpc, destination: PublicKey, owner: PublicKey, mint: PublicKey, amount?: number | bigint | BN, payer?: PublicKey, splInterfaceInfo?: SplInterfaceInfo, interfaceOptions?: InterfaceOptions, wrap?: boolean): Promise<TransactionInstruction[][]>;
|
|
2337
|
+
|
|
2338
|
+
/**
|
|
2339
|
+
* Select compressed inputs for a target amount.
|
|
2340
|
+
*
|
|
2341
|
+
* Sorts by amount descending (largest first), accumulates until the target
|
|
2342
|
+
* is met, then pads to {@link MAX_INPUT_ACCOUNTS} if possible within a
|
|
2343
|
+
* single batch.
|
|
2344
|
+
*
|
|
2345
|
+
* - If the amount is covered by N <= 8 inputs, returns min(8, total) inputs.
|
|
2346
|
+
* - If more than 8 inputs are needed, returns exactly as many as required
|
|
2347
|
+
* (no padding beyond the amount-needed count).
|
|
2348
|
+
* - Returns [] when `neededAmount <= 0` or `accounts` is empty.
|
|
2349
|
+
*
|
|
2350
|
+
* @param accounts Cold compressed token accounts available for loading.
|
|
2351
|
+
* @param neededAmount Amount that must be covered by selected inputs.
|
|
2352
|
+
* @returns Subset of `accounts`, sorted largest-first.
|
|
2353
|
+
*/
|
|
2354
|
+
declare function selectInputsForAmount(accounts: ParsedTokenAccount[], neededAmount: bigint): ParsedTokenAccount[];
|
|
2195
2355
|
/**
|
|
2196
2356
|
* Create instructions to load an ATA from its AccountInterface.
|
|
2197
2357
|
*
|
|
@@ -5312,14 +5472,14 @@ declare class CompressedTokenProgram {
|
|
|
5312
5472
|
* @param mintSize Optional: mint size. Default: MINT_SIZE
|
|
5313
5473
|
*
|
|
5314
5474
|
* @returns [createMintAccountInstruction, initializeMintInstruction,
|
|
5315
|
-
*
|
|
5475
|
+
* createSplInterfaceInstruction]
|
|
5316
5476
|
*
|
|
5317
|
-
* Note that `
|
|
5477
|
+
* Note that `createSplInterfaceInstruction` must be executed after
|
|
5318
5478
|
* `initializeMintInstruction`.
|
|
5319
5479
|
*/
|
|
5320
5480
|
static createMint({ feePayer, mint, authority, freezeAuthority, decimals, rentExemptBalance, tokenProgramId, mintSize, }: CreateMintParams): Promise<TransactionInstruction[]>;
|
|
5321
5481
|
/**
|
|
5322
|
-
*
|
|
5482
|
+
* Create SPL interface (omnibus account) for an existing SPL mint.
|
|
5323
5483
|
* For new mints, use `CompressedTokenProgram.createMint`.
|
|
5324
5484
|
*
|
|
5325
5485
|
* @param feePayer Fee payer.
|
|
@@ -5327,12 +5487,16 @@ declare class CompressedTokenProgram {
|
|
|
5327
5487
|
* @param tokenProgramId Optional: Token program ID. Default: SPL
|
|
5328
5488
|
* Token Program ID
|
|
5329
5489
|
*
|
|
5330
|
-
* @returns The
|
|
5490
|
+
* @returns The createSplInterface instruction
|
|
5491
|
+
*/
|
|
5492
|
+
static createSplInterface({ feePayer, mint, tokenProgramId, }: CreateSplInterfaceParams): Promise<TransactionInstruction>;
|
|
5493
|
+
/**
|
|
5494
|
+
* @deprecated Use {@link createSplInterface} instead.
|
|
5331
5495
|
*/
|
|
5332
|
-
static createTokenPool(
|
|
5496
|
+
static createTokenPool(params: CreateSplInterfaceParams): Promise<TransactionInstruction>;
|
|
5333
5497
|
/**
|
|
5334
5498
|
* Add a token pool to an existing SPL mint. For new mints, use
|
|
5335
|
-
* {@link
|
|
5499
|
+
* {@link createSplInterface}.
|
|
5336
5500
|
*
|
|
5337
5501
|
* @param feePayer Fee payer.
|
|
5338
5502
|
* @param mint SPL Mint address.
|
|
@@ -5496,6 +5660,36 @@ declare class CompressedTokenProgram {
|
|
|
5496
5660
|
static revoke({ payer, inputCompressedTokenAccounts, recentValidityProof, recentInputStateRootIndices, }: RevokeParams): Promise<TransactionInstruction>;
|
|
5497
5661
|
}
|
|
5498
5662
|
|
|
5663
|
+
/** Solana maximum transaction size in bytes. */
|
|
5664
|
+
declare const MAX_TRANSACTION_SIZE = 1232;
|
|
5665
|
+
/**
|
|
5666
|
+
* Conservative size budget for a combined batch (load + transfer + ATA).
|
|
5667
|
+
* Leaves headroom below MAX_TRANSACTION_SIZE for edge-case key counts.
|
|
5668
|
+
*/
|
|
5669
|
+
declare const MAX_COMBINED_BATCH_BYTES = 900;
|
|
5670
|
+
/**
|
|
5671
|
+
* Conservative size budget for a load-only or setup-only batch.
|
|
5672
|
+
*/
|
|
5673
|
+
declare const MAX_LOAD_ONLY_BATCH_BYTES = 1000;
|
|
5674
|
+
/**
|
|
5675
|
+
* Estimate the serialized byte size of a V0 VersionedTransaction built from
|
|
5676
|
+
* the given instructions and signer count.
|
|
5677
|
+
*
|
|
5678
|
+
* The estimate accounts for Solana's account-key deduplication: all unique
|
|
5679
|
+
* pubkeys across every instruction (keys + programIds) are collected into a
|
|
5680
|
+
* single set, matching the behaviour of
|
|
5681
|
+
* `TransactionMessage.compileToV0Message`.
|
|
5682
|
+
*
|
|
5683
|
+
* This intentionally does NOT use address lookup tables, so the result is an
|
|
5684
|
+
* upper bound. If lookup tables are used at send time the actual size will be
|
|
5685
|
+
* smaller.
|
|
5686
|
+
*
|
|
5687
|
+
* @param instructions The instructions that will be included in the tx.
|
|
5688
|
+
* @param numSigners Number of signers (determines signature count).
|
|
5689
|
+
* @returns Estimated byte size of the serialized transaction.
|
|
5690
|
+
*/
|
|
5691
|
+
declare function estimateTransactionSize(instructions: TransactionInstruction[], numSigners: number): number;
|
|
5692
|
+
|
|
5499
5693
|
/**
|
|
5500
5694
|
* Retrieve associated token account for a given owner and mint.
|
|
5501
5695
|
*
|
|
@@ -5509,17 +5703,18 @@ declare class CompressedTokenProgram {
|
|
|
5509
5703
|
*/
|
|
5510
5704
|
declare function getAtaInterface(rpc: Rpc, ata: PublicKey, owner: PublicKey, mint: PublicKey, commitment?: Commitment, programId?: PublicKey): Promise<AccountInterface>;
|
|
5511
5705
|
/**
|
|
5512
|
-
* Create
|
|
5706
|
+
* Create instruction batches for loading token balances into an ATA.
|
|
5707
|
+
* Returns batches of instructions, each batch is one transaction.
|
|
5513
5708
|
*
|
|
5514
|
-
* @param rpc
|
|
5515
|
-
* @param ata
|
|
5516
|
-
* @param owner
|
|
5517
|
-
* @param mint
|
|
5518
|
-
* @param payer
|
|
5519
|
-
* @param options
|
|
5520
|
-
* @returns
|
|
5709
|
+
* @param rpc RPC connection
|
|
5710
|
+
* @param ata Associated token address
|
|
5711
|
+
* @param owner Owner public key
|
|
5712
|
+
* @param mint Mint public key
|
|
5713
|
+
* @param payer Fee payer (defaults to owner)
|
|
5714
|
+
* @param options Optional load options
|
|
5715
|
+
* @returns Instruction batches - each inner array is one transaction
|
|
5521
5716
|
*/
|
|
5522
|
-
declare function createLoadAtaInstructions(rpc: Rpc, ata: PublicKey, owner: PublicKey, mint: PublicKey, payer?: PublicKey, options?: InterfaceOptions): Promise<TransactionInstruction[]>;
|
|
5717
|
+
declare function createLoadAtaInstructions(rpc: Rpc, ata: PublicKey, owner: PublicKey, mint: PublicKey, payer?: PublicKey, options?: InterfaceOptions): Promise<TransactionInstruction[][]>;
|
|
5523
5718
|
/**
|
|
5524
5719
|
* Load token balances into a c-token ATA.
|
|
5525
5720
|
*
|
|
@@ -5534,4 +5729,4 @@ declare function createLoadAtaInstructions(rpc: Rpc, ata: PublicKey, owner: Publ
|
|
|
5534
5729
|
*/
|
|
5535
5730
|
declare function loadAta(rpc: Rpc, ata: PublicKey, owner: Signer, mint: PublicKey, payer?: Signer, confirmOptions?: ConfirmOptions, interfaceOptions?: InterfaceOptions): Promise<TransactionSignature | null>;
|
|
5536
5731
|
|
|
5537
|
-
export { ADD_TOKEN_POOL_DISCRIMINATOR, APPROVE_DISCRIMINATOR, type AccountInterface, Action, type AddSplInterfaceParams, type AddTokenPoolParams, type ApproveAndMintToParams, type ApproveParams, BASE_RENT_PER_EPOCH, BATCH_COMPRESS_DISCRIMINATOR, type BaseMint, type BatchCompressInstructionData, COMPRESSIBLE_CTOKEN_ACCOUNT_SIZE, COMPRESSIBLE_CTOKEN_RENT_PER_EPOCH, COMPRESSION_COST, COMPRESSION_INCENTIVE, 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, DEFAULT_COMPRESSIBLE_CONFIG, DEFAULT_PREPAY_EPOCHS, DEFAULT_WRITE_TOP_UP, type DecompressParams, type DelegatedTransfer, DelegatedTransferLayout, ERROR_MIXED_TREE_TYPES, ERROR_NO_ACCOUNTS_FOUND, ExtensionType, IDL, type InputTokenDataWithContext, type InterfaceOptions, LIGHT_TOKEN_CONFIG, LIGHT_TOKEN_RENT_SPONSOR, 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, RENT_PER_BYTE_PER_EPOCH, REVOKE_DISCRIMINATOR, type RevokeParams, SLOTS_PER_RENT_EPOCH, SPL_TOKEN_MINT_RENT_EXEMPT_BALANCE, type SelectInputAccountsOptions, type SelectedAccountsResult, type SplInterfaceActivity, type SplInterfaceInfo, TOTAL_COMPRESSION_COST, 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, calculateFeePayerCostAtCreation, checkMint, checkSplInterfaceInfo, checkTokenPoolInfo, compress, compressSplTokenAccount, compressSplTokenAccountInstructionDataLayout, convertTokenDataToAccount, createAssociatedCTokenAccountIdempotentInstruction, createAssociatedCTokenAccountInstruction, createAssociatedTokenAccountInterfaceIdempotentInstruction, createAssociatedTokenAccountInterfaceInstruction, createAtaInterface, createAtaInterfaceIdempotent, createAtaInterfaceIdempotentInstruction,
|
|
5732
|
+
export { ADD_TOKEN_POOL_DISCRIMINATOR, APPROVE_DISCRIMINATOR, type AccountInterface, Action, type AddSplInterfaceParams, type AddTokenPoolParams, type ApproveAndMintToParams, type ApproveParams, BASE_RENT_PER_EPOCH, BATCH_COMPRESS_DISCRIMINATOR, type BaseMint, type BatchCompressInstructionData, COMPRESSIBLE_CTOKEN_ACCOUNT_SIZE, COMPRESSIBLE_CTOKEN_RENT_PER_EPOCH, COMPRESSION_COST, COMPRESSION_INCENTIVE, 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, DEFAULT_COMPRESSIBLE_CONFIG, DEFAULT_PREPAY_EPOCHS, DEFAULT_WRITE_TOP_UP, type DecompressParams, type DelegatedTransfer, DelegatedTransferLayout, ERROR_MIXED_TREE_TYPES, ERROR_NO_ACCOUNTS_FOUND, ExtensionType, IDL, type InputTokenDataWithContext, type InterfaceOptions, LIGHT_TOKEN_CONFIG, LIGHT_TOKEN_RENT_SPONSOR, type LightCompressedToken, CompressedTokenProgram as LightTokenProgram, type LoadResult, MAX_COMBINED_BATCH_BYTES, MAX_LOAD_ONLY_BATCH_BYTES, MAX_TRANSACTION_SIZE, 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, RENT_PER_BYTE_PER_EPOCH, REVOKE_DISCRIMINATOR, type RevokeParams, SLOTS_PER_RENT_EPOCH, SPL_TOKEN_MINT_RENT_EXEMPT_BALANCE, type SelectInputAccountsOptions, type SelectedAccountsResult, type SplInterfaceActivity, type SplInterfaceInfo, TOTAL_COMPRESSION_COST, 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, calculateFeePayerCostAtCreation, checkMint, checkSplInterfaceInfo, checkTokenPoolInfo, compress, compressSplTokenAccount, compressSplTokenAccountInstructionDataLayout, convertTokenDataToAccount, createAssociatedCTokenAccountIdempotentInstruction, createAssociatedCTokenAccountInstruction, createAssociatedTokenAccountInterfaceIdempotentInstruction, createAssociatedTokenAccountInterfaceInstruction, createAtaInterface, createAtaInterfaceIdempotent, createAtaInterfaceIdempotentInstruction, createDecompressInterfaceInstruction, createDecompressOutputState, createLightTokenTransferInstruction, createLoadAccountsParams, createLoadAtaInstructions, createLoadAtaInstructionsFromInterface, createMint, createMintInstruction, createMintInterface, createMintToCompressedInstruction, createMintToInstruction, createMintToInterfaceInstruction, createRemoveMetadataKeyInstruction, createSplInterface, createTokenMetadata, createTokenPool, createTokenPoolAccountsLayout, type createTokenPoolAccountsLayoutParams, createTokenProgramLookupTable, createTransferInterfaceInstructions, createTransferOutputState, createUnwrapInstruction, createUnwrapInstructions, createUpdateFreezeAuthorityInstruction, createUpdateMetadataAuthorityInstruction, createUpdateMetadataFieldInstruction, createUpdateMintAuthorityInstruction, createWrapInstruction, decodeApproveInstructionData, decodeBatchCompressInstructionData, decodeCompressSplTokenAccountInstructionData, decodeMintToInstructionData, decodeRevokeInstructionData, decodeTokenMetadata, decodeTransferInstructionData, decompress, decompressDelegated, decompressInterface, deriveSplInterfaceInfo, deriveTokenPoolInfo, deserializeMint, encodeApproveInstructionData, encodeBatchCompressInstructionData, encodeCompressSplTokenAccountInstructionData, encodeMintToInstructionData, encodeRevokeInstructionData, encodeTokenMetadata, encodeTransferInstructionData, estimateTransactionSize, extractTokenMetadata, freezeAccountsLayout, type freezeAccountsLayoutParams, getAccountInterface, 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, rentPerEpoch, revoke, revokeAccountsLayout, type revokeAccountsLayoutParams, selectAccountsByPreferredTreeType, selectInputsForAmount, selectMinCompressedTokenAccountsForDecompression, selectMinCompressedTokenAccountsForTransfer, selectMinCompressedTokenAccountsForTransferOrPartial, selectSmartCompressedTokenAccountsForTransfer, selectSmartCompressedTokenAccountsForTransferOrPartial, selectSplInterfaceInfo, selectSplInterfaceInfosForDecompression, selectTokenAccountsForApprove, selectTokenPoolInfo, selectTokenPoolInfosForDecompression, serializeMint, sliceLast, sumUpTokenAmount, thawAccountsLayout, type thawAccountsLayoutParams, toAccountInfo, toOffChainMetadataJson, toTokenPoolInfo, transfer, transferAccountsLayout, type transferAccountsLayoutParams, transferDelegated, transferInterface, unpackMintData, unpackMintInterface, updateFreezeAuthority, updateMetadataAuthority, updateMetadataField, updateMintAuthority, validateSameTokenOwner, wrap };
|