@lightprotocol/stateless.js 0.22.0 → 0.22.1-alpha.0

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.
Files changed (39) hide show
  1. package/README.md +10 -10
  2. package/dist/cjs/browser/compressible/action.d.ts +77 -0
  3. package/dist/cjs/browser/compressible/index.d.ts +13 -0
  4. package/dist/cjs/browser/compressible/instruction.d.ts +177 -0
  5. package/dist/cjs/browser/compressible/layout.d.ts +47 -0
  6. package/dist/cjs/browser/compressible/types.d.ts +112 -0
  7. package/dist/cjs/browser/compressible/utils.d.ts +16 -0
  8. package/dist/cjs/browser/constants.d.ts +7 -5
  9. package/dist/cjs/browser/index.cjs +1 -1
  10. package/dist/cjs/browser/index.cjs.map +1 -1
  11. package/dist/cjs/browser/index.d.ts +1 -0
  12. package/dist/cjs/browser/programs/system/pack.d.ts +79 -10
  13. package/dist/cjs/browser/rpc-interface.d.ts +47 -47
  14. package/dist/cjs/browser/rpc.d.ts +17 -3
  15. package/dist/cjs/browser/test-helpers/test-rpc/test-rpc.d.ts +6 -2
  16. package/dist/cjs/browser/utils/address.d.ts +13 -0
  17. package/dist/cjs/browser/utils/conversion.d.ts +1 -0
  18. package/dist/cjs/browser/utils/index.d.ts +1 -0
  19. package/dist/cjs/browser/utils/packed-accounts.d.ts +161 -0
  20. package/dist/cjs/node/compressible/action.d.ts +77 -0
  21. package/dist/cjs/node/compressible/index.d.ts +13 -0
  22. package/dist/cjs/node/compressible/instruction.d.ts +177 -0
  23. package/dist/cjs/node/compressible/layout.d.ts +47 -0
  24. package/dist/cjs/node/compressible/types.d.ts +112 -0
  25. package/dist/cjs/node/compressible/utils.d.ts +16 -0
  26. package/dist/cjs/node/constants.d.ts +7 -5
  27. package/dist/cjs/node/index.cjs +1 -1
  28. package/dist/cjs/node/index.cjs.map +1 -1
  29. package/dist/cjs/node/index.d.ts +1 -0
  30. package/dist/cjs/node/programs/system/pack.d.ts +79 -10
  31. package/dist/cjs/node/rpc-interface.d.ts +47 -47
  32. package/dist/cjs/node/rpc.d.ts +17 -3
  33. package/dist/cjs/node/test-helpers/test-rpc/test-rpc.d.ts +6 -2
  34. package/dist/cjs/node/utils/address.d.ts +13 -0
  35. package/dist/cjs/node/utils/conversion.d.ts +1 -0
  36. package/dist/cjs/node/utils/index.d.ts +1 -0
  37. package/dist/cjs/node/utils/packed-accounts.d.ts +161 -0
  38. package/dist/types/index.d.ts +665 -45
  39. package/package.json +1 -1
@@ -1,9 +1,10 @@
1
1
  import * as _solana_web3_js from '@solana/web3.js';
2
- import { PublicKey, Connection, Commitment, Keypair, Signer, TransactionInstruction, AddressLookupTableAccount, VersionedTransaction, ConfirmOptions, TransactionSignature, RpcResponseAndContext, SignatureResult, DataSlice, MemcmpFilter, ConnectionConfig, ParsedTransactionWithMeta, AccountMeta } from '@solana/web3.js';
2
+ import { PublicKey, Connection, Commitment, Keypair, Signer, TransactionInstruction, AddressLookupTableAccount, VersionedTransaction, ConfirmOptions, TransactionSignature, RpcResponseAndContext, SignatureResult, AccountMeta, DataSlice, MemcmpFilter, ConnectionConfig, AccountInfo, ParsedTransactionWithMeta } from '@solana/web3.js';
3
3
  import { Buffer as Buffer$1 } from 'buffer';
4
4
  import { Struct } from 'superstruct';
5
5
  import BN from 'bn.js';
6
6
  import * as buffer_layout from 'buffer-layout';
7
+ import * as borsh from '@coral-xyz/borsh';
7
8
  import { Layout } from '@coral-xyz/borsh';
8
9
 
9
10
  /**
@@ -20,8 +21,21 @@ declare function encodeBN254toBase58(bigintNumber: BN): string;
20
21
 
21
22
  declare const bn: (number: string | number | BN | Buffer$1 | Uint8Array | number[], base?: number | "hex" | undefined, endian?: BN.Endianness | undefined) => BN;
22
23
 
24
+ /**
25
+ * Derive an address for a compressed account from a seed and an address Merkle
26
+ * tree public key.
27
+ *
28
+ * @param seed 32 bytes seed to derive the address from
29
+ * @param addressMerkleTreePubkey Address Merkle tree public key as bytes.
30
+ * @param programIdBytes Program ID bytes.
31
+ * @returns Derived address as bytes
32
+ */
33
+ declare function deriveAddressV2(seed: Uint8Array, addressMerkleTreePubkey: Uint8Array, programIdBytes: Uint8Array): Uint8Array;
34
+ declare function hashVWithBumpSeed(bytes: Uint8Array[]): Uint8Array;
23
35
  declare function deriveAddressSeed(seeds: Uint8Array[], programId: PublicKey): Uint8Array;
24
36
  /**
37
+ * @deprecated Use {@link deriveAddressV2} instead, unless you're using v1.
38
+ *
25
39
  * Derive an address for a compressed account from a seed and an address Merkle
26
40
  * tree public key.
27
41
  *
@@ -118,6 +132,7 @@ declare const toCamelCase: (object: any) => any;
118
132
  */
119
133
  declare function hashToBn254FieldSizeBe(bytes: Buffer$1): [Buffer$1, number] | null;
120
134
  /**
135
+ * TODO: make consistent with latest rust. (use u8::max bumpseed)
121
136
  * Hash the provided `bytes` with Keccak256 and ensure that the result fits in
122
137
  * the BN254 prime field by truncating the resulting hash to 31 bytes.
123
138
  *
@@ -305,11 +320,11 @@ declare const versionedEndpoint: (base: string) => string;
305
320
  declare const FIELD_SIZE: BN;
306
321
  declare const HIGHEST_ADDRESS_PLUS_ONE: BN;
307
322
  declare const COMPUTE_BUDGET_PATTERN: number[];
308
- declare const INVOKE_DISCRIMINATOR: Buffer$1;
309
- declare const INVOKE_CPI_DISCRIMINATOR: Buffer$1;
310
- declare const INVOKE_CPI_WITH_READ_ONLY_DISCRIMINATOR: Buffer$1;
311
- declare const INVOKE_CPI_WITH_ACCOUNT_INFO_DISCRIMINATOR: Buffer$1;
312
- declare const INSERT_INTO_QUEUES_DISCRIMINATOR: Buffer$1;
323
+ declare const INVOKE_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
324
+ declare const INVOKE_CPI_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
325
+ declare const INVOKE_CPI_WITH_READ_ONLY_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
326
+ declare const INVOKE_CPI_WITH_ACCOUNT_INFO_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
327
+ declare const INSERT_INTO_QUEUES_DISCRIMINATOR: Buffer$1<ArrayBuffer>;
313
328
  declare const noopProgram = "noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV";
314
329
  declare const lightSystemProgram = "SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7";
315
330
  declare const accountCompressionProgram = "compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq";
@@ -379,11 +394,13 @@ declare const cpiContextPubkey = "cpi1uHzrEhBG733DoEJNgHCyRS3XmmyVNZx5fonubE4";
379
394
  declare const merkletreePubkey = "smt1NamzXdq4AMqS2fS2F1i5KTYPZRhoHgWx38d8WsT";
380
395
  declare const addressTree = "amt1Ayt45jfbdw5YSo7iz6WZxUmnZsQTYXy82hVwyC2";
381
396
  declare const addressQueue = "aq1S9z4reTSQAdgWHGD2zDaS39sjGrAxbR31vxJ2F4F";
397
+ declare const addressTreeV2: PublicKey;
382
398
  declare const merkleTree2Pubkey = "smt2rJAFdyJJupwMKAqTNAJwvjhmiZ4JYGZmbVRw1Ho";
383
399
  declare const nullifierQueue2Pubkey = "nfq2hgS7NYemXsFaFUCe3EMXSDSfnZnAe27jC6aPP1X";
384
400
  declare const cpiContext2Pubkey = "cpi2cdhkH5roePvcudTgUL8ppEBfTay1desGh8G8QxK";
385
401
  declare const batchMerkleTree = "HLKs5NJ8FXkJg8BrzJt56adFYYuwg5etzDtBbQYTsixu";
386
402
  declare const batchQueue = "6L7SzhYB3anwEQ9cphpJ1U7Scwj57bx2xueReg7R9cKU";
403
+ declare const batchCpiContext = "7Hp52chxaew8bW1ApR4fck2bh6Y8qA1pu3qwH6N9zaLj";
387
404
  declare const confirmConfig: ConfirmOptions;
388
405
  declare const DEFAULT_MERKLE_TREE_HEIGHT = 26;
389
406
  declare const DEFAULT_MERKLE_TREE_ROOTS = 2800;
@@ -466,6 +483,167 @@ declare function getAllStateTreeInfos({ connection, stateTreeLUTPairs, }: {
466
483
  stateTreeLUTPairs: StateTreeLUTPair[];
467
484
  }): Promise<TreeInfo[]>;
468
485
 
486
+ /**
487
+ * This file provides two variants of packed accounts for Light Protocol:
488
+ *
489
+ * 1. PackedAccounts - Matches CpiAccounts (11 system accounts)
490
+ * - Includes: LightSystemProgram, Authority, RegisteredProgramPda, NoopProgram,
491
+ * AccountCompressionAuthority, AccountCompressionProgram, InvokingProgram,
492
+ * [Optional: SolPoolPda, DecompressionRecipient], SystemProgram, [Optional: CpiContext]
493
+ *
494
+ * 2. PackedAccountsSmall - Matches CpiAccountsSmall (9 system accounts max)
495
+ * - Includes: LightSystemProgram, Authority, RegisteredProgramPda,
496
+ * AccountCompressionAuthority, AccountCompressionProgram, SystemProgram,
497
+ * [Optional: SolPoolPda, DecompressionRecipient, CpiContext]
498
+ * - Excludes: NoopProgram and InvokingProgram for a more compact structure
499
+ */
500
+ /**
501
+ * Create a PackedAccounts instance to pack the light protocol system accounts
502
+ * for your custom program instruction. Typically, you will append them to the
503
+ * end of your instruction's accounts / remainingAccounts.
504
+ *
505
+ * This matches the full CpiAccounts structure with 11 system accounts including
506
+ * NoopProgram and InvokingProgram. For a more compact version, use PackedAccountsSmall.
507
+ *
508
+ * @example
509
+ * ```ts
510
+ * const packedAccounts = PackedAccounts.newWithSystemAccounts(config);
511
+ *
512
+ * const instruction = new TransactionInstruction({
513
+ * keys: [...yourInstructionAccounts, ...packedAccounts.toAccountMetas()],
514
+ * programId: selfProgram,
515
+ * data: data,
516
+ * });
517
+ * ```
518
+ */
519
+ declare class PackedAccounts {
520
+ private preAccounts;
521
+ private systemAccounts;
522
+ private nextIndex;
523
+ private map;
524
+ static newWithSystemAccounts(config: SystemAccountMetaConfig): PackedAccounts;
525
+ addPreAccountsSigner(pubkey: PublicKey): void;
526
+ addPreAccountsSignerMut(pubkey: PublicKey): void;
527
+ addPreAccountsMeta(accountMeta: AccountMeta): void;
528
+ addSystemAccounts(config: SystemAccountMetaConfig): void;
529
+ insertOrGet(pubkey: PublicKey): number;
530
+ insertOrGetReadOnly(pubkey: PublicKey): number;
531
+ insertOrGetConfig(pubkey: PublicKey, isSigner: boolean, isWritable: boolean): number;
532
+ private hashSetAccountsToMetas;
533
+ private getOffsets;
534
+ toAccountMetas(): {
535
+ remainingAccounts: AccountMeta[];
536
+ systemStart: number;
537
+ packedStart: number;
538
+ };
539
+ }
540
+ /**
541
+ * Creates a PackedAccounts instance with system accounts for the specified
542
+ * program. This is a convenience wrapper around SystemAccountMetaConfig.new()
543
+ * and PackedAccounts.newWithSystemAccounts().
544
+ *
545
+ * @param programId - The program ID that will be using these system accounts
546
+ * @returns A new PackedAccounts instance with system accounts configured
547
+ *
548
+ * @example
549
+ * ```ts
550
+ * const packedAccounts = createPackedAccounts(myProgram.programId);
551
+ *
552
+ * const instruction = new TransactionInstruction({
553
+ * keys: [...yourInstructionAccounts, ...packedAccounts.toAccountMetas().remainingAccounts],
554
+ * programId: myProgram.programId,
555
+ * data: instructionData,
556
+ * });
557
+ * ```
558
+ */
559
+ declare function createPackedAccounts(programId: PublicKey): PackedAccounts;
560
+ /**
561
+ * Creates a PackedAccounts instance with system accounts and CPI context for the specified program.
562
+ * This is a convenience wrapper that includes CPI context configuration.
563
+ *
564
+ * @param programId - The program ID that will be using these system accounts
565
+ * @param cpiContext - The CPI context account public key
566
+ * @returns A new PackedAccounts instance with system accounts and CPI context configured
567
+ *
568
+ * @example
569
+ * ```ts
570
+ * const packedAccounts = createPackedAccountsWithCpiContext(
571
+ * myProgram.programId,
572
+ * cpiContextAccount
573
+ * );
574
+ * ```
575
+ */
576
+ declare function createPackedAccountsWithCpiContext(programId: PublicKey, cpiContext: PublicKey): PackedAccounts;
577
+ declare class SystemAccountMetaConfig {
578
+ selfProgram: PublicKey;
579
+ cpiContext?: PublicKey;
580
+ solCompressionRecipient?: PublicKey;
581
+ solPoolPda?: PublicKey;
582
+ private constructor();
583
+ static new(selfProgram: PublicKey): SystemAccountMetaConfig;
584
+ static newWithCpiContext(selfProgram: PublicKey, cpiContext: PublicKey): SystemAccountMetaConfig;
585
+ }
586
+ /**
587
+ * Get the light protocol system accounts for your custom program instruction.
588
+ * Use via `link PackedAccounts.addSystemAccounts(config)`.
589
+ */
590
+ declare function getLightSystemAccountMetas(config: SystemAccountMetaConfig): AccountMeta[];
591
+ /**
592
+ * PackedAccountsSmall matches the CpiAccountsSmall structure with simplified account ordering.
593
+ * This is a more compact version that excludes NoopProgram and InvokingProgram.
594
+ */
595
+ declare class PackedAccountsSmall {
596
+ private preAccounts;
597
+ private systemAccounts;
598
+ private nextIndex;
599
+ private map;
600
+ static newWithSystemAccounts(config: SystemAccountMetaConfig): PackedAccountsSmall;
601
+ /**
602
+ * Returns the internal map of pubkey to [index, AccountMeta].
603
+ * For debugging purposes only.
604
+ */
605
+ getNamedMetas(): Map<string, [number, AccountMeta]>;
606
+ addPreAccountsSigner(pubkey: PublicKey): void;
607
+ addPreAccountsSignerMut(pubkey: PublicKey): void;
608
+ addPreAccountsMeta(accountMeta: AccountMeta): void;
609
+ addSystemAccounts(config: SystemAccountMetaConfig): void;
610
+ insertOrGet(pubkey: PublicKey): number;
611
+ insertOrGetReadOnly(pubkey: PublicKey): number;
612
+ insertOrGetConfig(pubkey: PublicKey, isSigner: boolean, isWritable: boolean): number;
613
+ private hashSetAccountsToMetas;
614
+ private getOffsets;
615
+ toAccountMetas(): {
616
+ remainingAccounts: AccountMeta[];
617
+ systemStart: number;
618
+ packedStart: number;
619
+ };
620
+ }
621
+ /**
622
+ * Get the light protocol system accounts for the small variant.
623
+ * This matches CpiAccountsSmall ordering: removes NoopProgram and InvokingProgram.
624
+ */
625
+ declare function getLightSystemAccountMetasSmall(config: SystemAccountMetaConfig): AccountMeta[];
626
+ /**
627
+ * Creates a PackedAccountsSmall instance with system accounts for the specified program.
628
+ * This uses the simplified account ordering that matches CpiAccountsSmall.
629
+ */
630
+ declare function createPackedAccountsSmall(programId: PublicKey): PackedAccountsSmall;
631
+ /**
632
+ * Creates a PackedAccountsSmall instance with system accounts and CPI context.
633
+ */
634
+ declare function createPackedAccountsSmallWithCpiContext(programId: PublicKey, cpiContext: PublicKey): PackedAccountsSmall;
635
+ declare class SystemAccountPubkeys {
636
+ lightSystemProgram: PublicKey;
637
+ systemProgram: PublicKey;
638
+ accountCompressionProgram: PublicKey;
639
+ accountCompressionAuthority: PublicKey;
640
+ registeredProgramPda: PublicKey;
641
+ noopProgram: PublicKey;
642
+ solPoolPda: PublicKey;
643
+ private constructor();
644
+ static default(): SystemAccountPubkeys;
645
+ }
646
+
469
647
  declare enum TreeType {
470
648
  /**
471
649
  * v1 state merkle tree
@@ -612,7 +790,7 @@ interface CompressedAccountLegacy {
612
790
  /**
613
791
  * Optional data attached to the account.
614
792
  */
615
- data: CompressedAccountData | null;
793
+ data: CompressedAccountData$1 | null;
616
794
  }
617
795
  /**
618
796
  * @deprecated Use {@link CompressedAccountMeta} instead.
@@ -646,7 +824,7 @@ type NewAddressProofInput = {
646
824
  /**
647
825
  * Describes compressed account data.
648
826
  */
649
- interface CompressedAccountData {
827
+ interface CompressedAccountData$1 {
650
828
  /**
651
829
  * 8 bytes.
652
830
  */
@@ -941,7 +1119,7 @@ type CompressedAccount = {
941
1119
  /**
942
1120
  * Optional data attached to the account.
943
1121
  */
944
- data: CompressedAccountData | null;
1122
+ data: CompressedAccountData$1 | null;
945
1123
  } & MerkleContext & {
946
1124
  /**
947
1125
  * Read only.
@@ -1103,11 +1281,11 @@ interface PackedCompressedAccountWithMerkleContext {
1103
1281
  /**
1104
1282
  * @deprecated use {@link createCompressedAccountMeta} instead.
1105
1283
  */
1106
- declare const createCompressedAccountLegacy: (owner: PublicKey, lamports?: BN, data?: CompressedAccountData, address?: number[]) => CompressedAccountLegacy;
1284
+ declare const createCompressedAccountLegacy: (owner: PublicKey, lamports?: BN, data?: CompressedAccountData$1, address?: number[]) => CompressedAccountLegacy;
1107
1285
  /**
1108
1286
  * @deprecated.
1109
1287
  */
1110
- declare const createCompressedAccountWithMerkleContextLegacy: (merkleContext: MerkleContext, owner: PublicKey, lamports?: BN, data?: CompressedAccountData, address?: number[]) => CompressedAccountWithMerkleContext;
1288
+ declare const createCompressedAccountWithMerkleContextLegacy: (merkleContext: MerkleContext, owner: PublicKey, lamports?: BN, data?: CompressedAccountData$1, address?: number[]) => CompressedAccountWithMerkleContext;
1111
1289
  /**
1112
1290
  * @deprecated use {@link createCompressedAccountMeta} instead.
1113
1291
  */
@@ -2406,21 +2584,21 @@ declare const HealthResult: Struct<string, null>;
2406
2584
  */
2407
2585
  declare const LatestNonVotingSignaturesResult: Struct<{
2408
2586
  items: {
2409
- signature: string;
2410
2587
  error: string | null;
2411
2588
  slot: number;
2589
+ signature: string;
2412
2590
  blockTime: number;
2413
2591
  }[];
2414
2592
  }, {
2415
2593
  items: Struct<{
2416
- signature: string;
2417
2594
  error: string | null;
2418
2595
  slot: number;
2596
+ signature: string;
2419
2597
  blockTime: number;
2420
2598
  }[], Struct<{
2421
- signature: string;
2422
2599
  error: string | null;
2423
2600
  slot: number;
2601
+ signature: string;
2424
2602
  blockTime: number;
2425
2603
  }, {
2426
2604
  signature: Struct<string, null>;
@@ -2434,19 +2612,19 @@ declare const LatestNonVotingSignaturesResult: Struct<{
2434
2612
  */
2435
2613
  declare const LatestNonVotingSignaturesResultPaginated: Struct<{
2436
2614
  items: {
2437
- signature: string;
2438
2615
  slot: number;
2616
+ signature: string;
2439
2617
  blockTime: number;
2440
2618
  }[];
2441
2619
  cursor: string | null;
2442
2620
  }, {
2443
2621
  items: Struct<{
2444
- signature: string;
2445
2622
  slot: number;
2623
+ signature: string;
2446
2624
  blockTime: number;
2447
2625
  }[], Struct<{
2448
- signature: string;
2449
2626
  slot: number;
2627
+ signature: string;
2450
2628
  blockTime: number;
2451
2629
  }, {
2452
2630
  signature: Struct<string, null>;
@@ -2461,10 +2639,10 @@ declare const LatestNonVotingSignaturesResultPaginated: Struct<{
2461
2639
  declare const MerkleProofResult: Struct<{
2462
2640
  proof: BN[];
2463
2641
  leafIndex: number;
2464
- root: BN;
2465
2642
  hash: BN;
2466
2643
  merkleTree: PublicKey;
2467
2644
  rootSeq: number;
2645
+ root: BN;
2468
2646
  }, {
2469
2647
  hash: Struct<BN, null>;
2470
2648
  leafIndex: Struct<number, null>;
@@ -2480,9 +2658,9 @@ declare const MerkleProofResultV2: Struct<{
2480
2658
  proof: BN[];
2481
2659
  leafIndex: number;
2482
2660
  proveByIndex: boolean;
2483
- root: BN;
2484
2661
  hash: BN;
2485
2662
  rootSeq: number;
2663
+ root: BN;
2486
2664
  treeContext: {
2487
2665
  cpiContext: PublicKey | null;
2488
2666
  tree: PublicKey;
@@ -2537,9 +2715,9 @@ declare const MerkleProofResultV2: Struct<{
2537
2715
  declare const NewAddressProofResult: Struct<{
2538
2716
  proof: BN[];
2539
2717
  address: BN;
2540
- root: BN;
2541
2718
  merkleTree: PublicKey;
2542
2719
  rootSeq: number;
2720
+ root: BN;
2543
2721
  nextIndex: number;
2544
2722
  lowerRangeAddress: BN;
2545
2723
  higherRangeAddress: BN;
@@ -2619,8 +2797,8 @@ declare const ValidityProofResultV2: Struct<{
2619
2797
  proveByIndex: boolean;
2620
2798
  };
2621
2799
  leafIndex: number;
2622
- root: BN;
2623
2800
  hash: BN;
2801
+ root: BN;
2624
2802
  }[];
2625
2803
  addresses: {
2626
2804
  address: BN;
@@ -2667,8 +2845,8 @@ declare const ValidityProofResultV2: Struct<{
2667
2845
  proveByIndex: boolean;
2668
2846
  };
2669
2847
  leafIndex: number;
2670
- root: BN;
2671
2848
  hash: BN;
2849
+ root: BN;
2672
2850
  }[], Struct<{
2673
2851
  merkleContext: {
2674
2852
  cpiContext: PublicKey | null;
@@ -2687,8 +2865,8 @@ declare const ValidityProofResultV2: Struct<{
2687
2865
  proveByIndex: boolean;
2688
2866
  };
2689
2867
  leafIndex: number;
2690
- root: BN;
2691
2868
  hash: BN;
2869
+ root: BN;
2692
2870
  }, {
2693
2871
  hash: Struct<BN, null>;
2694
2872
  root: Struct<BN, null>;
@@ -2801,17 +2979,17 @@ declare const ValidityProofResultV2: Struct<{
2801
2979
  declare const MultipleMerkleProofsResult: Struct<{
2802
2980
  proof: BN[];
2803
2981
  leafIndex: number;
2804
- root: BN;
2805
2982
  hash: BN;
2806
2983
  merkleTree: PublicKey;
2807
2984
  rootSeq: number;
2985
+ root: BN;
2808
2986
  }[], Struct<{
2809
2987
  proof: BN[];
2810
2988
  leafIndex: number;
2811
- root: BN;
2812
2989
  hash: BN;
2813
2990
  merkleTree: PublicKey;
2814
2991
  rootSeq: number;
2992
+ root: BN;
2815
2993
  }, {
2816
2994
  hash: Struct<BN, null>;
2817
2995
  leafIndex: Struct<number, null>;
@@ -2827,9 +3005,9 @@ declare const MultipleMerkleProofsResultV2: Struct<{
2827
3005
  proof: BN[];
2828
3006
  leafIndex: number;
2829
3007
  proveByIndex: boolean;
2830
- root: BN;
2831
3008
  hash: BN;
2832
3009
  rootSeq: number;
3010
+ root: BN;
2833
3011
  treeContext: {
2834
3012
  cpiContext: PublicKey | null;
2835
3013
  tree: PublicKey;
@@ -2846,9 +3024,9 @@ declare const MultipleMerkleProofsResultV2: Struct<{
2846
3024
  proof: BN[];
2847
3025
  leafIndex: number;
2848
3026
  proveByIndex: boolean;
2849
- root: BN;
2850
3027
  hash: BN;
2851
3028
  rootSeq: number;
3029
+ root: BN;
2852
3030
  treeContext: {
2853
3031
  cpiContext: PublicKey | null;
2854
3032
  tree: PublicKey;
@@ -2972,8 +3150,8 @@ declare const CompressedMintTokenHoldersResult: Struct<{
2972
3150
  }>;
2973
3151
  declare const AccountProofResult: Struct<{
2974
3152
  proof: number[][];
2975
- root: number[];
2976
3153
  hash: number[];
3154
+ root: number[];
2977
3155
  }, {
2978
3156
  hash: Struct<number[], Struct<number, null>>;
2979
3157
  root: Struct<number[], Struct<number, null>>;
@@ -2982,18 +3160,18 @@ declare const AccountProofResult: Struct<{
2982
3160
  declare const toUnixTimestamp: (blockTime: string) => number;
2983
3161
  declare const SignatureListResult: Struct<{
2984
3162
  items: {
2985
- signature: string;
2986
3163
  slot: number;
3164
+ signature: string;
2987
3165
  blockTime: number;
2988
3166
  }[];
2989
3167
  }, {
2990
3168
  items: Struct<{
2991
- signature: string;
2992
3169
  slot: number;
3170
+ signature: string;
2993
3171
  blockTime: number;
2994
3172
  }[], Struct<{
2995
- signature: string;
2996
3173
  slot: number;
3174
+ signature: string;
2997
3175
  blockTime: number;
2998
3176
  }, {
2999
3177
  blockTime: Struct<number, null>;
@@ -3003,19 +3181,19 @@ declare const SignatureListResult: Struct<{
3003
3181
  }>;
3004
3182
  declare const SignatureListWithCursorResult: Struct<{
3005
3183
  items: {
3006
- signature: string;
3007
3184
  slot: number;
3185
+ signature: string;
3008
3186
  blockTime: number;
3009
3187
  }[];
3010
3188
  cursor: string | null;
3011
3189
  }, {
3012
3190
  items: Struct<{
3013
- signature: string;
3014
3191
  slot: number;
3192
+ signature: string;
3015
3193
  blockTime: number;
3016
3194
  }[], Struct<{
3017
- signature: string;
3018
3195
  slot: number;
3196
+ signature: string;
3019
3197
  blockTime: number;
3020
3198
  }, {
3021
3199
  blockTime: Struct<number, null>;
@@ -4116,6 +4294,10 @@ declare class TestRpc extends Connection implements CompressionApiInterface {
4116
4294
  */
4117
4295
  getValidityProof(hashes?: BN254[], newAddresses?: BN254[]): Promise<ValidityProofWithContext>;
4118
4296
  getValidityProofV0(hashes?: HashWithTree[], newAddresses?: AddressWithTree[]): Promise<ValidityProofWithContext>;
4297
+ getCompressibleAccountInfo(address: PublicKey, programId: PublicKey, addressTreeInfo: TreeInfo, rpc: TestRpc): Promise<{
4298
+ accountInfo: AccountInfo<Buffer>;
4299
+ merkleContext?: MerkleContext;
4300
+ } | null>;
4119
4301
  }
4120
4302
 
4121
4303
  declare class IndexedElement {
@@ -4376,7 +4558,7 @@ declare function parseAccountData({ discriminator, data, dataHash, }: {
4376
4558
  dataHash: BN;
4377
4559
  }): {
4378
4560
  discriminator: number[];
4379
- data: Buffer$1;
4561
+ data: Buffer$1<ArrayBuffer>;
4380
4562
  dataHash: number[];
4381
4563
  };
4382
4564
  /**
@@ -4641,6 +4823,20 @@ declare class Rpc extends Connection implements CompressionApiInterface {
4641
4823
  * @returns validity proof with context
4642
4824
  */
4643
4825
  getValidityProofAndRpcContext(hashes?: HashWithTree[], newAddresses?: AddressWithTree[]): Promise<WithContext<ValidityProofWithContext>>;
4826
+ /**
4827
+ * Get account info from either compressed or onchain storage.
4828
+ * @param address The account address to fetch.
4829
+ * @param programId The owner program ID.
4830
+ * @param addressTreeInfo The address tree info used to store the account.
4831
+ * @param rpc The RPC client to use.
4832
+ *
4833
+ * @returns Account info with compression info, or null if account
4834
+ * doesn't exist.
4835
+ */
4836
+ getCompressibleAccountInfo(address: PublicKey, programId: PublicKey, addressTreeInfo: TreeInfo, rpc: Rpc): Promise<{
4837
+ accountInfo: AccountInfo<Buffer$1>;
4838
+ merkleContext?: MerkleContext;
4839
+ } | null>;
4644
4840
  }
4645
4841
 
4646
4842
  /**
@@ -5815,15 +6011,8 @@ declare function getIndexOrAdd(accountsArray: PublicKey[], key: PublicKey): numb
5815
6011
  */
5816
6012
  declare function padOutputStateMerkleTrees(outputStateMerkleTrees: PublicKey, numberOfOutputCompressedAccounts: number): PublicKey[];
5817
6013
  declare function toAccountMetas(remainingAccounts: PublicKey[]): AccountMeta[];
5818
- interface PackedStateTreeInfos {
5819
- packedTreeInfos: PackedStateTreeInfo[];
5820
- outputTreeIndex: number;
5821
- }
5822
- interface PackedTreeInfos {
5823
- stateTrees?: PackedStateTreeInfos;
5824
- addressTrees: PackedAddressTreeInfo[];
5825
- }
5826
6014
  /**
6015
+ * @deprecated Use {@link packTreeInfos} instead.
5827
6016
  * Packs TreeInfos. Replaces PublicKey with index pointer to remaining accounts.
5828
6017
  *
5829
6018
  * Only use for MUT, CLOSE, NEW_ADDRESSES. For INIT, pass
@@ -5839,7 +6028,7 @@ interface PackedTreeInfos {
5839
6028
  * @returns Remaining accounts, packed state and address tree infos, state tree
5840
6029
  * output index and address tree infos.
5841
6030
  */
5842
- declare function packTreeInfos(remainingAccounts: PublicKey[], accountProofInputs: AccountProofInput[], newAddressProofInputs: NewAddressProofInput[]): PackedTreeInfos;
6031
+ declare function packTreeInfosWithPubkeys(remainingAccounts: PublicKey[], accountProofInputs: AccountProofInput[], newAddressProofInputs: NewAddressProofInput[]): PackedTreeInfos;
5843
6032
  /**
5844
6033
  * Packs Compressed Accounts.
5845
6034
  *
@@ -5863,6 +6052,80 @@ declare function packCompressedAccounts(inputCompressedAccounts: CompressedAccou
5863
6052
  packedOutputCompressedAccounts: OutputCompressedAccountWithPackedContext[];
5864
6053
  remainingAccounts: PublicKey[];
5865
6054
  };
6055
+ /**
6056
+ * Root index for state tree proofs.
6057
+ */
6058
+ type RootIndex = {
6059
+ proofByIndex: boolean;
6060
+ rootIndex: number;
6061
+ };
6062
+ /**
6063
+ * Creates a RootIndex for proving by merkle proof.
6064
+ */
6065
+ declare function createRootIndex(rootIndex: number): RootIndex;
6066
+ /**
6067
+ * Creates a RootIndex for proving by leaf index.
6068
+ */
6069
+ declare function createRootIndexByIndex(): RootIndex;
6070
+ /**
6071
+ * Account proof inputs for state tree accounts.
6072
+ */
6073
+ type AccountProofInputs = {
6074
+ hash: Uint8Array;
6075
+ root: Uint8Array;
6076
+ rootIndex: RootIndex;
6077
+ leafIndex: number;
6078
+ treeInfo: TreeInfo;
6079
+ };
6080
+ /**
6081
+ * Address proof inputs for address tree accounts.
6082
+ */
6083
+ type AddressProofInputs = {
6084
+ address: Uint8Array;
6085
+ root: Uint8Array;
6086
+ rootIndex: number;
6087
+ treeInfo: TreeInfo;
6088
+ };
6089
+ /**
6090
+ * Validity proof with context structure that matches Rust implementation.
6091
+ */
6092
+ type ValidityProofWithContextV2 = {
6093
+ proof: ValidityProof | null;
6094
+ accounts: AccountProofInputs[];
6095
+ addresses: AddressProofInputs[];
6096
+ };
6097
+ /**
6098
+ * Packed state tree infos.
6099
+ */
6100
+ type PackedStateTreeInfos = {
6101
+ packedTreeInfos: PackedStateTreeInfo[];
6102
+ outputTreeIndex: number;
6103
+ };
6104
+ /**
6105
+ * Packed tree infos containing both state and address trees.
6106
+ */
6107
+ type PackedTreeInfos = {
6108
+ stateTrees: PackedStateTreeInfos | null;
6109
+ addressTrees: PackedAddressTreeInfo[];
6110
+ };
6111
+ /**
6112
+ * Packs tree infos from ValidityProofWithContext into packed format. This is a
6113
+ * TypeScript equivalent of the Rust pack_tree_infos method.
6114
+ *
6115
+ * @param validityProof - The validity proof with context (flat format)
6116
+ * @param packedAccounts - The packed accounts manager (supports both PackedAccounts and PackedAccountsSmall)
6117
+ * @returns Packed tree infos
6118
+ */
6119
+ declare function packTreeInfos(validityProof: ValidityProofWithContext, packedAccounts: PackedAccounts | PackedAccountsSmall): PackedTreeInfos;
6120
+ /**
6121
+ * Packs tree infos from ValidityProofWithContextV2 into packed format. This is
6122
+ * a TypeScript equivalent of the Rust pack_tree_infos method.
6123
+ *
6124
+ * @param validityProof - The validity proof with context (structured format)
6125
+ * @param packedAccounts - The packed accounts manager (supports both PackedAccounts and PackedAccountsSmall)
6126
+ * @returns Packed tree infos
6127
+ */
6128
+ declare function packTreeInfos(validityProof: ValidityProofWithContextV2, packedAccounts: PackedAccounts | PackedAccountsSmall): PackedTreeInfos;
5866
6129
 
5867
6130
  declare const sumUpLamports: (accounts: CompressedAccountWithMerkleContext[]) => BN;
5868
6131
  /**
@@ -6118,4 +6381,361 @@ declare class MerkleTreeError extends MetaError {
6118
6381
  declare class UtilsError extends MetaError {
6119
6382
  }
6120
6383
 
6121
- export { ADDRESS_QUEUE_ROLLOVER_FEE, ADDRESS_TREE_NETWORK_FEE, ALICE, type AccountProofInput, AccountProofResult, type ActiveTreeBundle, type AddressTreeInfo, type AddressWithTree, type AddressWithTreeInfo, AppendLeavesInputLayout, AppendNullifyCreateAddressInputsMetaLayout, type BN254, BOB, BalanceResult, CHARLIE, COMPRESSED_TOKEN_PROGRAM_ID, COMPUTE_BUDGET_PATTERN, type ClientSubscriptionId, type CompressedAccount, type CompressedAccountData, CompressedAccountLayout, type CompressedAccountLegacy, type CompressedAccountMeta, CompressedAccountResult, CompressedAccountResultV2, type CompressedAccountWithMerkleContext, type CompressedAccountWithMerkleContextLegacy, CompressedAccountsByOwnerResult, CompressedAccountsByOwnerResultV2, type CompressedCpiContext, CompressedCpiContextLayout, type CompressedMintTokenHolders, CompressedMintTokenHoldersResult, type CompressedProof, CompressedProofLayout, type CompressedProofWithContext, CompressedTokenAccountResult, CompressedTokenAccountResultV2, CompressedTokenAccountsByOwnerOrDelegateResult, CompressedTokenAccountsByOwnerOrDelegateResultV2, type CompressedTransaction, CompressedTransactionResult, CompressedTransactionResultV2, type CompressionApiInterface, CreateUtxoError, CreateUtxoErrorCode, DAVE, DEFAULT_MERKLE_TREE_HEIGHT, DEFAULT_MERKLE_TREE_ROOTS, DEFAULT_ZERO, type EventWithParsedTokenTlvData, FIELD_SIZE, type GetCompressedAccountConfig, type GetCompressedAccountsByOwnerConfig, type GetCompressedAccountsConfig, type GetCompressedAccountsFilter, type GetCompressedTokenAccountsByOwnerOrDelegateOptions, HIGHEST_ADDRESS_PLUS_ONE, HashError, HashErrorCode, type HashWithTree, type HashWithTreeInfo, HealthResult, type HexBatchInputsForProver, type HexInputsForProver, IDL, INSERT_INTO_QUEUES_DISCRIMINATOR, INVOKE_CPI_DISCRIMINATOR, INVOKE_CPI_WITH_ACCOUNT_INFO_DISCRIMINATOR, INVOKE_CPI_WITH_READ_ONLY_DISCRIMINATOR, INVOKE_DISCRIMINATOR, InAccountLayout, IndexedArray, IndexedElement, IndexedElementBundle, type InputTokenDataWithContext, InsertAddressInputLayout, InsertNullifierInputLayout, type InstructionDataInvoke, type InstructionDataInvokeCpi, InstructionDataInvokeCpiLayout, InstructionDataInvokeCpiWithReadOnlyLayout, InstructionDataInvokeLayout, type LatestNonVotingSignatures, type LatestNonVotingSignaturesPaginated, LatestNonVotingSignaturesResult, LatestNonVotingSignaturesResultPaginated, LightSystemProgram, type LightSystemProgram$1 as LightSystemProgramIDL, type LightWasm, LookupTableError, LookupTableErrorCode, type MerkleContext, MerkleContextLayout, type MerkleContextLegacy, type MerkleContextWithMerkleProof, type MerkleContextWithNewAddressProof, MerkleProofResult, MerkleProofResultV2, MerkleTree, MerkleTreeError, MerkleTreeErrorCode, type MerkleTreeSequenceNumber, MerkleTreeSequenceNumberLayout, MultipleCompressedAccountsResult, MultipleCompressedAccountsResultV2, MultipleMerkleProofsResult, MultipleMerkleProofsResultV2, NativeBalanceResult, type NewAddressParams, NewAddressParamsAssignedPackedLayout, NewAddressParamsLayout, type NewAddressParamsPacked, type NewAddressProofInput, NewAddressProofResult, type NonInclusionJsonStruct, type NonInclusionMerkleProofInputs, type NullifierMetadata, type OutputCompressedAccountWithPackedContext, type PackedAddressTreeInfo, type PackedCompressedAccountWithMerkleContext, PackedMerkleContextLayout, type PackedMerkleContextLegacy, PackedReadOnlyAddressLayout, PackedReadOnlyCompressedAccountLayout, type PackedStateTreeInfo, type PackedStateTreeInfos, type PackedTreeInfos, type PaginatedOptions, type ParsedTokenAccount, ProofError, ProofErrorCode, type PublicTransactionEvent, PublicTransactionEventLayout, RootIndexResultV2, Rpc, RpcError, RpcErrorCode, type RpcResult, type RpcResultError, type RpcResultSuccess, STATE_MERKLE_TREE_NETWORK_FEE, STATE_MERKLE_TREE_ROLLOVER_FEE, SelectInUtxosError, SelectInUtxosErrorCode, SignatureListResult, SignatureListWithCursorResult, type SignatureWithMetadata, SlotResult, type StateTreeInfo, type StateTreeLUTPair, TRANSACTION_MERKLE_TREE_ROLLOVER_THRESHOLD, TestRpc, type TestRpcConfig, type TokenBalance, TokenBalanceListResult, TokenBalanceListResultV2, TokenBalanceResult, type TokenData$1 as TokenData, TokenDataLayout, TokenDataResult, type TreeInfo, TreeType, UTXO_MERGE_MAXIMUM, UTXO_MERGE_THRESHOLD, UtilsError, UtilsErrorCode, UtxoError, UtxoErrorCode, VERSION, type ValidityProof, ValidityProofResult, ValidityProofResultV2, type ValidityProofWithContext, type WithContext, type WithCursor, type WithRpcContext, accountCompressionProgram, addressQueue, addressTree, airdropSol, batchMerkleTree, batchQueue, bn, bufToDecStr, buildAndSignTx, buildTx, byteArrayToKeypair, calculateComputeUnitPrice, checkValidityProofShape, compress, confirmConfig, confirmTransaction, confirmTx, convertInvokeCpiWithReadOnlyToInvoke, convertMerkleProofsWithContextToHex, convertNonInclusionMerkleProofInputsToHex, convertToPublicTransactionEvent, cpiContext2Pubkey, cpiContextPubkey, createAccount, createAccountWithLamports, createBN254, createCompressedAccountLegacy, createCompressedAccountMeta, createCompressedAccountWithMerkleContextLegacy, createMerkleContextLegacy, createRpc, createRpcResult, createStateTreeLookupTable, decodeInstructionDataInvoke, decodeInstructionDataInvokeCpi, decodeInstructionDataInvokeCpiWithReadOnly, decodePublicTransactionEvent, decompress, dedupeSigner, deepEqual, defaultStateTreeLookupTables, defaultStaticAccounts, defaultStaticAccountsStruct, defaultTestStateTreeAccounts, defaultTestStateTreeAccounts2, deriveAddress, deriveAddressSeed, deserializeAppendNullifyCreateAddressInputsIndexer, encodeBN254toBase58, encodeInstructionDataInvoke, encodePublicTransactionEvent, extendStateTreeLookupTable, featureFlags, getAccountCompressionAuthority, getAllStateTreeInfos, getCompressedTokenAccountByHashTest, getCompressedTokenAccounts, getCompressedTokenAccountsByDelegateTest, getCompressedTokenAccountsByOwnerTest, getConnection, getDefaultAddressTreeInfo, getIndexOrAdd, getParsedEvents, getPublicInputHash, getRegisteredProgramPda, getStateTreeInfoByPubkey, getTestKeypair, getTestRpc, getTreeInfoByPubkey, hashToBn254FieldSizeBe, hashvToBn254FieldSizeBe, invokeAccountsLayout, type invokeAccountsLayoutParams, isLocalTest, isSmallerThanBn254FieldSizeBe, jsonRpcResult, jsonRpcResultAndContext, lightSystemProgram, localTestActiveStateTreeInfos, merkleTree2Pubkey, merkletreePubkey, negateAndCompressProof, newAccountWithLamports, noopProgram, nullifiedStateTreeLookupTableDevnet, nullifiedStateTreeLookupTableMainnet, nullifierQueue2Pubkey, nullifierQueuePubkey, nullifyLookupTable, packCompressedAccounts, packNewAddressParams, packTreeInfos, padOutputStateMerkleTrees, parseAccountData, parseEvents, parseLightTransaction, parsePublicTransactionEventWithIdl, parseTokenLayoutWithIdl, pickRandomTreeAndQueue, pipe, placeholderValidityProof, proofFromJsonStruct, proverRequest, pushUniqueItems, rpcRequest, selectMinCompressedSolAccountsForTransfer, selectStateTreeInfo, sendAndConfirmTx, sleep, stateTreeLookupTableDevnet, stateTreeLookupTableMainnet, sumUpLamports, toAccountMetas, toArray, toCamelCase, toHex, toUnixTimestamp, transfer, validateNumbers, validateNumbersForInclusionProof, validateNumbersForNonInclusionProof, validateNumbersForProof, validateSameOwner, validateSufficientBalance, versionedEndpoint, wrapBigNumbersAsStrings };
6384
+ /**
6385
+ * Standard instruction discriminators for compressible instructions
6386
+ * These match the Rust implementation discriminators
6387
+ */
6388
+ declare const COMPRESSIBLE_DISCRIMINATORS: {
6389
+ readonly INITIALIZE_COMPRESSION_CONFIG: readonly [133, 228, 12, 169, 56, 76, 222, 61];
6390
+ readonly UPDATE_COMPRESSION_CONFIG: readonly [135, 215, 243, 81, 163, 146, 33, 70];
6391
+ readonly DECOMPRESS_ACCOUNTS_IDEMPOTENT: readonly [114, 67, 61, 123, 234, 31, 1, 112];
6392
+ };
6393
+ /**
6394
+ * Generic compressed account data structure for decompress operations
6395
+ * This is generic over the account variant type, allowing programs to use their specific enums
6396
+ */
6397
+ type CompressedAccountData<T = any> = {
6398
+ /** The compressed account metadata containing tree info, address, and output index */
6399
+ meta: CompressedAccountMeta;
6400
+ /** Program-specific account variant enum */
6401
+ data: T;
6402
+ /** PDA seeds (without bump) used to derive the PDA address */
6403
+ seeds: Uint8Array[];
6404
+ };
6405
+ /**
6406
+ * Instruction data structure for decompress_accounts_idempotent
6407
+ * This matches the exact format expected by Anchor programs
6408
+ */
6409
+ type DecompressMultipleAccountsIdempotentData<T = any> = {
6410
+ proof: ValidityProof;
6411
+ compressedAccounts: CompressedAccountData<T>[];
6412
+ bumps: number[];
6413
+ systemAccountsOffset: number;
6414
+ };
6415
+ /**
6416
+ * Instruction data for update compression config
6417
+ */
6418
+ type UpdateCompressionConfigData = {
6419
+ newCompressionDelay: number | null;
6420
+ newRentRecipient: PublicKey | null;
6421
+ newAddressSpace: PublicKey[] | null;
6422
+ newUpdateAuthority: PublicKey | null;
6423
+ };
6424
+ /**
6425
+ * Generic instruction data for compress account
6426
+ * This matches the expected format for compress account instructions
6427
+ */
6428
+ type GenericCompressAccountInstruction = {
6429
+ proof: ValidityProof;
6430
+ compressedAccountMeta: CompressedAccountMeta;
6431
+ };
6432
+
6433
+ /**
6434
+ * Borsh schema for updateCompressionConfig instruction data
6435
+ */
6436
+ declare const UpdateCompressionConfigSchema: borsh.Layout<UpdateCompressionConfigData>;
6437
+ /**
6438
+ * Borsh schema for ValidityProof
6439
+ */
6440
+ declare const ValidityProofSchema: borsh.Layout<ValidityProof>;
6441
+ /**
6442
+ * Borsh schema for PackedStateTreeInfo
6443
+ */
6444
+ declare const PackedStateTreeInfoSchema: borsh.Layout<PackedStateTreeInfo>;
6445
+ /**
6446
+ * Borsh schema for CompressedAccountMeta
6447
+ */
6448
+ declare const CompressedAccountMetaSchema: borsh.Layout<CompressedAccountMeta>;
6449
+ /**
6450
+ * Borsh schema for GenericCompressAccountInstruction
6451
+ */
6452
+ declare const GenericCompressAccountInstructionSchema: borsh.Layout<GenericCompressAccountInstruction>;
6453
+ /**
6454
+ * Helper function to create borsh schema for CompressedAccountData
6455
+ * This is generic to work with any data type T
6456
+ */
6457
+ declare function createCompressedAccountDataSchema<T>(dataSchema: borsh.Layout<T>): borsh.Layout<CompressedAccountData<T>>;
6458
+ /**
6459
+ * Helper function to create borsh schema for DecompressMultipleAccountsIdempotentData
6460
+ * This is generic to work with any data type T
6461
+ */
6462
+ declare function createDecompressMultipleAccountsIdempotentDataSchema<T>(dataSchema: borsh.Layout<T>): borsh.Layout<DecompressMultipleAccountsIdempotentData<T>>;
6463
+ /**
6464
+ * Serialize instruction data with custom discriminator
6465
+ */
6466
+ declare function serializeInstructionData<T>(schema: borsh.Layout<T>, data: T, discriminator: Uint8Array | number[]): Buffer;
6467
+ /**
6468
+ * Serialize instruction data for initializeCompressionConfig using Borsh
6469
+ */
6470
+ declare function serializeInitializeCompressionConfigData(compressionDelay: number, rentRecipient: _solana_web3_js.PublicKey, addressSpace: _solana_web3_js.PublicKey[], configBump: number | null): Buffer;
6471
+
6472
+ /**
6473
+ * Create an instruction to initialize a compression config.
6474
+ *
6475
+ * @param programId Program ID for the compressible program
6476
+ * @param discriminator Instruction discriminator (8 bytes)
6477
+ * @param payer Fee payer
6478
+ * @param authority Program upgrade authority
6479
+ * @param compressionDelay Compression delay (in slots)
6480
+ * @param rentRecipient Rent recipient public key
6481
+ * @param addressSpace Array of address space public keys
6482
+ * @param configBump Optional config bump (defaults to 0)
6483
+ * @returns TransactionInstruction
6484
+ */
6485
+ declare function createInitializeCompressionConfigInstruction(programId: PublicKey, discriminator: Uint8Array | number[], payer: PublicKey, authority: PublicKey, compressionDelay: number, rentRecipient: PublicKey, addressSpace: PublicKey[], configBump?: number | null): TransactionInstruction;
6486
+ /**
6487
+ * Create an instruction to update a compression config.
6488
+ *
6489
+ * @param programId Program ID for the compressible program
6490
+ * @param discriminator Instruction discriminator (8 bytes)
6491
+ * @param authority Current config authority
6492
+ * @param newCompressionDelay Optional new compression delay
6493
+ * @param newRentRecipient Optional new rent recipient
6494
+ * @param newAddressSpace Optional new address space array
6495
+ * @param newUpdateAuthority Optional new update authority
6496
+ * @returns TransactionInstruction
6497
+ */
6498
+ declare function createUpdateCompressionConfigInstruction(programId: PublicKey, discriminator: Uint8Array | number[], authority: PublicKey, newCompressionDelay?: number | null, newRentRecipient?: PublicKey | null, newAddressSpace?: PublicKey[] | null, newUpdateAuthority?: PublicKey | null): TransactionInstruction;
6499
+ /**
6500
+ * Create an instruction to compress a generic compressible account.
6501
+ *
6502
+ * @param programId Program ID for the compressible program
6503
+ * @param discriminator Instruction discriminator (8 bytes)
6504
+ * @param payer Fee payer
6505
+ * @param pdaToCompress PDA to compress
6506
+ * @param rentRecipient Rent recipient public key
6507
+ * @param compressedAccountMeta Compressed account metadata
6508
+ * @param validityProof Validity proof for compression
6509
+ * @param systemAccounts Additional system accounts (optional)
6510
+ * @returns TransactionInstruction
6511
+ */
6512
+ declare function createCompressAccountInstruction(programId: PublicKey, discriminator: Uint8Array | number[], payer: PublicKey, pdaToCompress: PublicKey, rentRecipient: PublicKey, compressedAccountMeta: CompressedAccountMeta, validityProof: ValidityProof, systemAccounts?: AccountMeta[]): TransactionInstruction;
6513
+ /**
6514
+ * Create an instruction to decompress one or more compressed accounts idempotently.
6515
+ *
6516
+ * @param programId Program ID for the compressible program
6517
+ * @param discriminator Instruction discriminator (8 bytes)
6518
+ * @param feePayer Fee payer
6519
+ * @param rentPayer Rent payer
6520
+ * @param solanaAccounts Array of PDA accounts to decompress
6521
+ * @param compressedAccountsData Array of compressed account data
6522
+ * @param bumps Array of PDA bumps
6523
+ * @param validityProof Validity proof for decompression
6524
+ * @param systemAccounts Additional system accounts (optional)
6525
+ * @param coder Borsh schema for account data
6526
+ * @returns TransactionInstruction
6527
+ */
6528
+ declare function createDecompressAccountsIdempotentInstruction<T = any>(programId: PublicKey, discriminator: Uint8Array | number[], feePayer: PublicKey, rentPayer: PublicKey, solanaAccounts: PublicKey[], compressedAccountsData: CompressedAccountData<T>[], bumps: number[], validityProof: ValidityProof, systemAccounts: AccountMeta[] | undefined, coder: (data: any) => Buffer): TransactionInstruction;
6529
+ /**
6530
+ * Instruction builders for compressible accounts, following Solana SDK patterns.
6531
+ */
6532
+ declare class CompressibleInstruction {
6533
+ /**
6534
+ * Create an instruction to initialize a compression config.
6535
+ *
6536
+ * @param programId Program ID for the compressible program
6537
+ * @param discriminator Instruction discriminator (8 bytes)
6538
+ * @param payer Fee payer
6539
+ * @param authority Program upgrade authority
6540
+ * @param compressionDelay Compression delay (in slots)
6541
+ * @param rentRecipient Rent recipient public key
6542
+ * @param addressSpace Array of address space public keys
6543
+ * @param configBump Optional config bump (defaults to 0)
6544
+ * @returns TransactionInstruction
6545
+ */
6546
+ static initializeCompressionConfig(programId: PublicKey, discriminator: Uint8Array | number[], payer: PublicKey, authority: PublicKey, compressionDelay: number, rentRecipient: PublicKey, addressSpace: PublicKey[], configBump?: number | null): TransactionInstruction;
6547
+ /**
6548
+ * Create an instruction to update a compression config.
6549
+ *
6550
+ * @param programId Program ID for the compressible program
6551
+ * @param discriminator Instruction discriminator (8 bytes)
6552
+ * @param authority Current config authority
6553
+ * @param newCompressionDelay Optional new compression delay
6554
+ * @param newRentRecipient Optional new rent recipient
6555
+ * @param newAddressSpace Optional new address space array
6556
+ * @param newUpdateAuthority Optional new update authority
6557
+ * @returns TransactionInstruction
6558
+ */
6559
+ static updateCompressionConfig(programId: PublicKey, discriminator: Uint8Array | number[], authority: PublicKey, newCompressionDelay?: number | null, newRentRecipient?: PublicKey | null, newAddressSpace?: PublicKey[] | null, newUpdateAuthority?: PublicKey | null): TransactionInstruction;
6560
+ /**
6561
+ * Create an instruction to compress a generic compressible account.
6562
+ *
6563
+ * @param programId Program ID for the compressible program
6564
+ * @param discriminator Instruction discriminator (8 bytes)
6565
+ * @param payer Fee payer
6566
+ * @param pdaToCompress PDA to compress
6567
+ * @param rentRecipient Rent recipient public key
6568
+ * @param compressedAccountMeta Compressed account metadata
6569
+ * @param validityProof Validity proof for compression
6570
+ * @param systemAccounts Additional system accounts (optional)
6571
+ * @returns TransactionInstruction
6572
+ */
6573
+ static compressAccount(programId: PublicKey, discriminator: Uint8Array | number[], payer: PublicKey, pdaToCompress: PublicKey, rentRecipient: PublicKey, compressedAccountMeta: CompressedAccountMeta, validityProof: ValidityProof, systemAccounts?: AccountMeta[]): TransactionInstruction;
6574
+ /**
6575
+ * Create an instruction to decompress one or more compressed accounts idempotently.
6576
+ *
6577
+ * @param programId Program ID for the compressible program
6578
+ * @param discriminator Instruction discriminator (8 bytes)
6579
+ * @param feePayer Fee payer
6580
+ * @param rentPayer Rent payer
6581
+ * @param solanaAccounts Array of PDA accounts to decompress
6582
+ * @param compressedAccountsData Array of compressed account data
6583
+ * @param bumps Array of PDA bumps
6584
+ * @param validityProof Validity proof for decompression
6585
+ * @param systemAccounts Additional system accounts (optional)
6586
+ * @param dataSchema Borsh schema for account data
6587
+ * @returns TransactionInstruction
6588
+ */
6589
+ static decompressAccountsIdempotent<T = any>(programId: PublicKey, discriminator: Uint8Array | number[], feePayer: PublicKey, rentPayer: PublicKey, solanaAccounts: PublicKey[], compressedAccountsData: CompressedAccountData<T>[], bumps: number[], validityProof: ValidityProof, systemAccounts?: AccountMeta[], dataSchema?: any): TransactionInstruction;
6590
+ /**
6591
+ * Standard instruction discriminators for compressible instructions
6592
+ */
6593
+ static readonly DISCRIMINATORS: {
6594
+ readonly INITIALIZE_COMPRESSION_CONFIG: readonly [133, 228, 12, 169, 56, 76, 222, 61];
6595
+ readonly UPDATE_COMPRESSION_CONFIG: readonly [135, 215, 243, 81, 163, 146, 33, 70];
6596
+ readonly DECOMPRESS_ACCOUNTS_IDEMPOTENT: readonly [114, 67, 61, 123, 234, 31, 1, 112];
6597
+ };
6598
+ /**
6599
+ * Derive the compression config PDA address
6600
+ *
6601
+ * @param programId Program ID for the compressible program
6602
+ * @param configIndex Config index (defaults to 0)
6603
+ * @returns [PDA address, bump seed]
6604
+ */
6605
+ static deriveCompressionConfigAddress(programId: PublicKey, configIndex?: number): [PublicKey, number];
6606
+ /**
6607
+ * Get the program data account address and its raw data for a given program
6608
+ *
6609
+ * @param programId Program ID
6610
+ * @param connection Solana connection
6611
+ * @returns Program data address and account info
6612
+ */
6613
+ static getProgramDataAccount(programId: PublicKey, connection: _solana_web3_js.Connection): Promise<{
6614
+ programDataAddress: PublicKey;
6615
+ programDataAccountInfo: _solana_web3_js.AccountInfo<Buffer>;
6616
+ }>;
6617
+ /**
6618
+ * Check that the provided authority matches the program's upgrade authority
6619
+ *
6620
+ * @param programDataAccountInfo Program data account info
6621
+ * @param providedAuthority Authority to validate
6622
+ * @throws Error if authority doesn't match
6623
+ */
6624
+ static checkProgramUpdateAuthority(programDataAccountInfo: _solana_web3_js.AccountInfo<Buffer>, providedAuthority: PublicKey): void;
6625
+ /**
6626
+ * Serialize instruction data for initializeCompressionConfig using Borsh
6627
+ *
6628
+ * @param compressionDelay Compression delay (in slots)
6629
+ * @param rentRecipient Rent recipient public key
6630
+ * @param addressSpace Array of address space public keys
6631
+ * @param configBump Optional config bump
6632
+ * @returns Serialized instruction data with discriminator
6633
+ */
6634
+ static serializeInitializeCompressionConfigData(compressionDelay: number, rentRecipient: PublicKey, addressSpace: PublicKey[], configBump: number | null): Buffer;
6635
+ /**
6636
+ * Convert a compressed account to the format expected by instruction builders
6637
+ *
6638
+ * @param compressedAccount Compressed account from state
6639
+ * @param data Program-specific account data
6640
+ * @param seeds PDA seeds (without bump)
6641
+ * @param outputStateTreeIndex Output state tree index
6642
+ * @returns Compressed account data for instructions
6643
+ */
6644
+ static createCompressedAccountData<T>(compressedAccount: CompressedAccount, data: T, seeds: Uint8Array[], outputStateTreeIndex: number): CompressedAccountData<T>;
6645
+ }
6646
+
6647
+ /**
6648
+ * Initialize a compression config for a compressible program
6649
+ *
6650
+ * @param rpc RPC connection to use
6651
+ * @param payer Fee payer
6652
+ * @param programId Program ID for the compressible program
6653
+ * @param authority Program upgrade authority
6654
+ * @param compressionDelay Compression delay (in slots)
6655
+ * @param rentRecipient Rent recipient public key
6656
+ * @param addressSpace Array of address space public keys
6657
+ * @param configBump Optional config bump (defaults to 0)
6658
+ * @param discriminator Optional custom discriminator (defaults to standard)
6659
+ * @param confirmOptions Options for confirming the transaction
6660
+ *
6661
+ * @return Signature of the confirmed transaction
6662
+ */
6663
+ declare function initializeCompressionConfig(rpc: Rpc, payer: Signer, programId: PublicKey, authority: Signer, compressionDelay: number, rentRecipient: PublicKey, addressSpace: PublicKey[], configBump?: number | null, discriminator?: Uint8Array | number[], confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
6664
+ /**
6665
+ * Update a compression config for a compressible program
6666
+ *
6667
+ * @param rpc RPC connection to use
6668
+ * @param payer Fee payer
6669
+ * @param programId Program ID for the compressible program
6670
+ * @param authority Current config authority
6671
+ * @param newCompressionDelay Optional new compression delay
6672
+ * @param newRentRecipient Optional new rent recipient
6673
+ * @param newAddressSpace Optional new address space array
6674
+ * @param newUpdateAuthority Optional new update authority
6675
+ * @param discriminator Optional custom discriminator (defaults to standard)
6676
+ * @param confirmOptions Options for confirming the transaction
6677
+ *
6678
+ * @return Signature of the confirmed transaction
6679
+ */
6680
+ declare function updateCompressionConfig(rpc: Rpc, payer: Signer, programId: PublicKey, authority: Signer, newCompressionDelay?: number | null, newRentRecipient?: PublicKey | null, newAddressSpace?: PublicKey[] | null, newUpdateAuthority?: PublicKey | null, discriminator?: Uint8Array | number[], confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
6681
+ /**
6682
+ * Compress a generic compressible account
6683
+ *
6684
+ * @param rpc RPC connection to use
6685
+ * @param payer Fee payer and signer
6686
+ * @param programId Program ID for the compressible program
6687
+ * @param pdaToCompress PDA to compress
6688
+ * @param rentRecipient Rent recipient public key
6689
+ * @param compressedAccountMeta Compressed account metadata
6690
+ * @param validityProof Validity proof for compression
6691
+ * @param systemAccounts Additional system accounts (trees, queues, etc.)
6692
+ * @param discriminator Custom instruction discriminator (8 bytes)
6693
+ * @param confirmOptions Options for confirming the transaction
6694
+ *
6695
+ * @return Signature of the confirmed transaction
6696
+ */
6697
+ declare function compressAccount(rpc: Rpc, payer: Signer, programId: PublicKey, pdaToCompress: PublicKey, rentRecipient: PublicKey, compressedAccountMeta: CompressedAccountMeta, validityProof: ValidityProof, systemAccounts: AccountMeta[], discriminator: Uint8Array | number[], confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
6698
+ /**
6699
+ * Decompress one or more compressed accounts idempotently
6700
+ *
6701
+ * @param rpc RPC connection to use
6702
+ * @param payer Fee payer
6703
+ * @param programId Program ID for the compressible program
6704
+ * @param feePayer Fee payer (can be same as payer)
6705
+ * @param rentPayer Rent payer
6706
+ * @param solanaAccounts Array of PDA accounts to decompress
6707
+ * @param compressedAccountsData Array of compressed account data
6708
+ * @param bumps Array of PDA bumps
6709
+ * @param validityProof Validity proof for decompression
6710
+ * @param systemAccounts Additional system accounts (trees, queues, etc.)
6711
+ * @param dataSchema Borsh schema for account data serialization
6712
+ * @param discriminator Optional custom discriminator (defaults to standard)
6713
+ * @param confirmOptions Options for confirming the transaction
6714
+ *
6715
+ * @return Signature of the confirmed transaction
6716
+ */
6717
+ declare function decompressAccountsIdempotent<T = any>(rpc: Rpc, payer: Signer, programId: PublicKey, feePayer: Signer, rentPayer: Signer, solanaAccounts: PublicKey[], compressedAccountsData: CompressedAccountData<T>[], bumps: number[], validityProof: ValidityProof, systemAccounts: AccountMeta[], dataSchema: any, // borsh.Layout<T>
6718
+ discriminator?: Uint8Array | number[], confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
6719
+
6720
+ /**
6721
+ * Derive the compression config PDA address
6722
+ */
6723
+ declare function deriveCompressionConfigAddress(programId: PublicKey, configIndex?: number): [PublicKey, number];
6724
+ /**
6725
+ * Get the program data account address and its raw data for a given program.
6726
+ */
6727
+ declare function getProgramDataAccount(programId: PublicKey, connection: Connection): Promise<{
6728
+ programDataAddress: PublicKey;
6729
+ programDataAccountInfo: AccountInfo<Buffer>;
6730
+ }>;
6731
+ /**
6732
+ * Check that the provided authority matches the program's upgrade authority.
6733
+ */
6734
+ declare function checkProgramUpdateAuthority(programDataAccountInfo: AccountInfo<Buffer>, providedAuthority: PublicKey): void;
6735
+
6736
+ /**
6737
+ * Convert a compressed account to the format expected by instruction builders
6738
+ */
6739
+ declare function createCompressedAccountData<T>(compressedAccount: CompressedAccount, data: T, seeds: Uint8Array[], outputStateTreeIndex: number): CompressedAccountData<T>;
6740
+
6741
+ export { ADDRESS_QUEUE_ROLLOVER_FEE, ADDRESS_TREE_NETWORK_FEE, ALICE, type AccountProofInput, type AccountProofInputs, AccountProofResult, type ActiveTreeBundle, type AddressProofInputs, type AddressTreeInfo, type AddressWithTree, type AddressWithTreeInfo, AppendLeavesInputLayout, AppendNullifyCreateAddressInputsMetaLayout, type BN254, BOB, BalanceResult, CHARLIE, COMPRESSED_TOKEN_PROGRAM_ID, COMPRESSIBLE_DISCRIMINATORS, COMPUTE_BUDGET_PATTERN, type ClientSubscriptionId, type CompressedAccount, type CompressedAccountData$1 as CompressedAccountData, CompressedAccountLayout, type CompressedAccountLegacy, type CompressedAccountMeta, CompressedAccountMetaSchema, CompressedAccountResult, CompressedAccountResultV2, type CompressedAccountWithMerkleContext, type CompressedAccountWithMerkleContextLegacy, CompressedAccountsByOwnerResult, CompressedAccountsByOwnerResultV2, type CompressedCpiContext, CompressedCpiContextLayout, type CompressedMintTokenHolders, CompressedMintTokenHoldersResult, type CompressedProof, CompressedProofLayout, type CompressedProofWithContext, CompressedTokenAccountResult, CompressedTokenAccountResultV2, CompressedTokenAccountsByOwnerOrDelegateResult, CompressedTokenAccountsByOwnerOrDelegateResultV2, type CompressedTransaction, CompressedTransactionResult, CompressedTransactionResultV2, CompressibleInstruction, type CompressionApiInterface, CreateUtxoError, CreateUtxoErrorCode, DAVE, DEFAULT_MERKLE_TREE_HEIGHT, DEFAULT_MERKLE_TREE_ROOTS, DEFAULT_ZERO, type DecompressMultipleAccountsIdempotentData, type EventWithParsedTokenTlvData, FIELD_SIZE, type GenericCompressAccountInstruction, GenericCompressAccountInstructionSchema, type GetCompressedAccountConfig, type GetCompressedAccountsByOwnerConfig, type GetCompressedAccountsConfig, type GetCompressedAccountsFilter, type GetCompressedTokenAccountsByOwnerOrDelegateOptions, HIGHEST_ADDRESS_PLUS_ONE, HashError, HashErrorCode, type HashWithTree, type HashWithTreeInfo, HealthResult, type HexBatchInputsForProver, type HexInputsForProver, IDL, INSERT_INTO_QUEUES_DISCRIMINATOR, INVOKE_CPI_DISCRIMINATOR, INVOKE_CPI_WITH_ACCOUNT_INFO_DISCRIMINATOR, INVOKE_CPI_WITH_READ_ONLY_DISCRIMINATOR, INVOKE_DISCRIMINATOR, InAccountLayout, IndexedArray, IndexedElement, IndexedElementBundle, type InputTokenDataWithContext, InsertAddressInputLayout, InsertNullifierInputLayout, type InstructionDataInvoke, type InstructionDataInvokeCpi, InstructionDataInvokeCpiLayout, InstructionDataInvokeCpiWithReadOnlyLayout, InstructionDataInvokeLayout, type LatestNonVotingSignatures, type LatestNonVotingSignaturesPaginated, LatestNonVotingSignaturesResult, LatestNonVotingSignaturesResultPaginated, LightSystemProgram, type LightSystemProgram$1 as LightSystemProgramIDL, type LightWasm, LookupTableError, LookupTableErrorCode, type MerkleContext, MerkleContextLayout, type MerkleContextLegacy, type MerkleContextWithMerkleProof, type MerkleContextWithNewAddressProof, MerkleProofResult, MerkleProofResultV2, MerkleTree, MerkleTreeError, MerkleTreeErrorCode, type MerkleTreeSequenceNumber, MerkleTreeSequenceNumberLayout, MultipleCompressedAccountsResult, MultipleCompressedAccountsResultV2, MultipleMerkleProofsResult, MultipleMerkleProofsResultV2, NativeBalanceResult, type NewAddressParams, NewAddressParamsAssignedPackedLayout, NewAddressParamsLayout, type NewAddressParamsPacked, type NewAddressProofInput, NewAddressProofResult, type NonInclusionJsonStruct, type NonInclusionMerkleProofInputs, type NullifierMetadata, type OutputCompressedAccountWithPackedContext, PackedAccounts, PackedAccountsSmall, type PackedAddressTreeInfo, type PackedCompressedAccountWithMerkleContext, PackedMerkleContextLayout, type PackedMerkleContextLegacy, PackedReadOnlyAddressLayout, PackedReadOnlyCompressedAccountLayout, type PackedStateTreeInfo, PackedStateTreeInfoSchema, type PackedStateTreeInfos, type PackedTreeInfos, type PaginatedOptions, type ParsedTokenAccount, ProofError, ProofErrorCode, type PublicTransactionEvent, PublicTransactionEventLayout, type RootIndex, RootIndexResultV2, Rpc, RpcError, RpcErrorCode, type RpcResult, type RpcResultError, type RpcResultSuccess, STATE_MERKLE_TREE_NETWORK_FEE, STATE_MERKLE_TREE_ROLLOVER_FEE, SelectInUtxosError, SelectInUtxosErrorCode, SignatureListResult, SignatureListWithCursorResult, type SignatureWithMetadata, SlotResult, type StateTreeInfo, type StateTreeLUTPair, SystemAccountMetaConfig, SystemAccountPubkeys, TRANSACTION_MERKLE_TREE_ROLLOVER_THRESHOLD, TestRpc, type TestRpcConfig, type TokenBalance, TokenBalanceListResult, TokenBalanceListResultV2, TokenBalanceResult, type TokenData$1 as TokenData, TokenDataLayout, TokenDataResult, type TreeInfo, TreeType, UTXO_MERGE_MAXIMUM, UTXO_MERGE_THRESHOLD, type UpdateCompressionConfigData, UpdateCompressionConfigSchema, UtilsError, UtilsErrorCode, UtxoError, UtxoErrorCode, VERSION, type ValidityProof, ValidityProofResult, ValidityProofResultV2, ValidityProofSchema, type ValidityProofWithContext, type ValidityProofWithContextV2, type WithContext, type WithCursor, type WithRpcContext, accountCompressionProgram, addressQueue, addressTree, addressTreeV2, airdropSol, batchCpiContext, batchMerkleTree, batchQueue, bn, bufToDecStr, buildAndSignTx, buildTx, byteArrayToKeypair, calculateComputeUnitPrice, checkProgramUpdateAuthority, checkValidityProofShape, compress, compressAccount, CompressibleInstruction as compressibleInstruction, confirmConfig, confirmTransaction, confirmTx, convertInvokeCpiWithReadOnlyToInvoke, convertMerkleProofsWithContextToHex, convertNonInclusionMerkleProofInputsToHex, convertToPublicTransactionEvent, cpiContext2Pubkey, cpiContextPubkey, createAccount, createAccountWithLamports, createBN254, createCompressAccountInstruction, createCompressedAccountData, createCompressedAccountDataSchema, createCompressedAccountLegacy, createCompressedAccountMeta, createCompressedAccountWithMerkleContextLegacy, createDecompressAccountsIdempotentInstruction, createDecompressMultipleAccountsIdempotentDataSchema, createInitializeCompressionConfigInstruction, createMerkleContextLegacy, createPackedAccounts, createPackedAccountsSmall, createPackedAccountsSmallWithCpiContext, createPackedAccountsWithCpiContext, createRootIndex, createRootIndexByIndex, createRpc, createRpcResult, createStateTreeLookupTable, createUpdateCompressionConfigInstruction, decodeInstructionDataInvoke, decodeInstructionDataInvokeCpi, decodeInstructionDataInvokeCpiWithReadOnly, decodePublicTransactionEvent, decompress, decompressAccountsIdempotent, dedupeSigner, deepEqual, defaultStateTreeLookupTables, defaultStaticAccounts, defaultStaticAccountsStruct, defaultTestStateTreeAccounts, defaultTestStateTreeAccounts2, deriveAddress, deriveAddressSeed, deriveAddressV2, deriveCompressionConfigAddress, deserializeAppendNullifyCreateAddressInputsIndexer, encodeBN254toBase58, encodeInstructionDataInvoke, encodePublicTransactionEvent, extendStateTreeLookupTable, featureFlags, getAccountCompressionAuthority, getAllStateTreeInfos, getCompressedTokenAccountByHashTest, getCompressedTokenAccounts, getCompressedTokenAccountsByDelegateTest, getCompressedTokenAccountsByOwnerTest, getConnection, getDefaultAddressTreeInfo, getIndexOrAdd, getLightSystemAccountMetas, getLightSystemAccountMetasSmall, getParsedEvents, getProgramDataAccount, getPublicInputHash, getRegisteredProgramPda, getStateTreeInfoByPubkey, getTestKeypair, getTestRpc, getTreeInfoByPubkey, hashToBn254FieldSizeBe, hashVWithBumpSeed, hashvToBn254FieldSizeBe, initializeCompressionConfig, invokeAccountsLayout, type invokeAccountsLayoutParams, isLocalTest, isSmallerThanBn254FieldSizeBe, jsonRpcResult, jsonRpcResultAndContext, lightSystemProgram, localTestActiveStateTreeInfos, merkleTree2Pubkey, merkletreePubkey, negateAndCompressProof, newAccountWithLamports, noopProgram, nullifiedStateTreeLookupTableDevnet, nullifiedStateTreeLookupTableMainnet, nullifierQueue2Pubkey, nullifierQueuePubkey, nullifyLookupTable, packCompressedAccounts, packNewAddressParams, packTreeInfos, packTreeInfosWithPubkeys, padOutputStateMerkleTrees, parseAccountData, parseEvents, parseLightTransaction, parsePublicTransactionEventWithIdl, parseTokenLayoutWithIdl, pickRandomTreeAndQueue, pipe, placeholderValidityProof, proofFromJsonStruct, proverRequest, pushUniqueItems, rpcRequest, selectMinCompressedSolAccountsForTransfer, selectStateTreeInfo, sendAndConfirmTx, serializeInitializeCompressionConfigData, serializeInstructionData, sleep, stateTreeLookupTableDevnet, stateTreeLookupTableMainnet, sumUpLamports, toAccountMetas, toArray, toCamelCase, toHex, toUnixTimestamp, transfer, updateCompressionConfig, validateNumbers, validateNumbersForInclusionProof, validateNumbersForNonInclusionProof, validateNumbersForProof, validateSameOwner, validateSufficientBalance, versionedEndpoint, wrapBigNumbersAsStrings };