@lightprotocol/stateless.js 0.20.9 → 0.22.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 (76) hide show
  1. package/dist/cjs/browser/actions/compress.d.ts +9 -7
  2. package/dist/cjs/browser/actions/create-account.d.ts +25 -28
  3. package/dist/cjs/browser/actions/decompress.d.ts +6 -7
  4. package/dist/cjs/browser/actions/index.d.ts +1 -1
  5. package/dist/cjs/browser/actions/transfer.d.ts +7 -11
  6. package/dist/cjs/browser/constants.d.ts +40 -7
  7. package/dist/cjs/browser/index.cjs +1 -1
  8. package/dist/cjs/browser/index.cjs.map +1 -1
  9. package/dist/cjs/browser/index.d.ts +1 -3
  10. package/dist/cjs/browser/programs/index.d.ts +0 -1
  11. package/dist/cjs/{node → browser/programs/system}/idl.d.ts +5 -27
  12. package/dist/cjs/browser/programs/system/index.d.ts +5 -0
  13. package/dist/cjs/browser/programs/{layout.d.ts → system/layout.d.ts} +37 -1
  14. package/dist/cjs/browser/programs/system/pack.d.ts +74 -0
  15. package/dist/cjs/browser/programs/{system.d.ts → system/program.d.ts} +25 -49
  16. package/dist/cjs/browser/programs/system/select-compressed-accounts.d.ts +10 -0
  17. package/dist/cjs/browser/rpc-interface.d.ts +1689 -82
  18. package/dist/cjs/browser/rpc.d.ts +27 -67
  19. package/dist/cjs/browser/state/BN254.d.ts +0 -1
  20. package/dist/cjs/browser/state/bn.d.ts +3 -0
  21. package/dist/cjs/browser/state/compressed-account.d.ts +189 -15
  22. package/dist/cjs/browser/state/index.d.ts +1 -0
  23. package/dist/cjs/browser/state/types.d.ts +345 -31
  24. package/dist/cjs/browser/test-helpers/test-rpc/get-compressed-token-accounts.d.ts +3 -3
  25. package/dist/cjs/browser/test-helpers/test-rpc/test-rpc.d.ts +21 -49
  26. package/dist/cjs/browser/utils/calculate-compute-unit-price.d.ts +1 -1
  27. package/dist/cjs/browser/utils/conversion.d.ts +2 -0
  28. package/dist/cjs/browser/utils/get-state-tree-infos.d.ts +48 -0
  29. package/dist/cjs/browser/utils/index.d.ts +4 -2
  30. package/dist/cjs/browser/utils/parse-validity-proof.d.ts +3 -3
  31. package/dist/cjs/browser/utils/send-and-confirm.d.ts +1 -1
  32. package/dist/cjs/browser/utils/state-tree-lookup-table.d.ts +68 -0
  33. package/dist/cjs/browser/utils/validation.d.ts +2 -2
  34. package/dist/cjs/node/actions/compress.d.ts +9 -7
  35. package/dist/cjs/node/actions/create-account.d.ts +25 -28
  36. package/dist/cjs/node/actions/decompress.d.ts +6 -7
  37. package/dist/cjs/node/actions/index.d.ts +1 -1
  38. package/dist/cjs/node/actions/transfer.d.ts +7 -11
  39. package/dist/cjs/node/constants.d.ts +40 -7
  40. package/dist/cjs/node/index.cjs +1 -1
  41. package/dist/cjs/node/index.cjs.map +1 -1
  42. package/dist/cjs/node/index.d.ts +1 -3
  43. package/dist/cjs/node/programs/index.d.ts +0 -1
  44. package/dist/cjs/{browser → node/programs/system}/idl.d.ts +5 -27
  45. package/dist/cjs/node/programs/system/index.d.ts +5 -0
  46. package/dist/cjs/node/programs/{layout.d.ts → system/layout.d.ts} +37 -1
  47. package/dist/cjs/node/programs/system/pack.d.ts +74 -0
  48. package/dist/cjs/node/programs/{system.d.ts → system/program.d.ts} +25 -49
  49. package/dist/cjs/node/programs/system/select-compressed-accounts.d.ts +10 -0
  50. package/dist/cjs/node/rpc-interface.d.ts +1689 -82
  51. package/dist/cjs/node/rpc.d.ts +27 -67
  52. package/dist/cjs/node/state/BN254.d.ts +0 -1
  53. package/dist/cjs/node/state/bn.d.ts +3 -0
  54. package/dist/cjs/node/state/compressed-account.d.ts +189 -15
  55. package/dist/cjs/node/state/index.d.ts +1 -0
  56. package/dist/cjs/node/state/types.d.ts +345 -31
  57. package/dist/cjs/node/test-helpers/test-rpc/get-compressed-token-accounts.d.ts +3 -3
  58. package/dist/cjs/node/test-helpers/test-rpc/test-rpc.d.ts +21 -49
  59. package/dist/cjs/node/utils/calculate-compute-unit-price.d.ts +1 -1
  60. package/dist/cjs/node/utils/conversion.d.ts +2 -0
  61. package/dist/cjs/node/utils/get-state-tree-infos.d.ts +48 -0
  62. package/dist/cjs/node/utils/index.d.ts +4 -2
  63. package/dist/cjs/node/utils/parse-validity-proof.d.ts +3 -3
  64. package/dist/cjs/node/utils/send-and-confirm.d.ts +1 -1
  65. package/dist/cjs/node/utils/state-tree-lookup-table.d.ts +68 -0
  66. package/dist/cjs/node/utils/validation.d.ts +2 -2
  67. package/dist/types/index.d.ts +3177 -1063
  68. package/package.json +16 -8
  69. package/dist/cjs/browser/instruction/index.d.ts +0 -1
  70. package/dist/cjs/browser/instruction/pack-compressed-accounts.d.ts +0 -51
  71. package/dist/cjs/browser/utils/get-light-state-tree-info.d.ts +0 -76
  72. package/dist/cjs/node/instruction/index.d.ts +0 -1
  73. package/dist/cjs/node/instruction/pack-compressed-accounts.d.ts +0 -51
  74. package/dist/cjs/node/utils/get-light-state-tree-info.d.ts +0 -76
  75. /package/dist/cjs/browser/{actions/common.d.ts → utils/dedupe-signer.d.ts} +0 -0
  76. /package/dist/cjs/node/{actions/common.d.ts → utils/dedupe-signer.d.ts} +0 -0
@@ -1,10 +1,10 @@
1
1
  import { Connection, ConnectionConfig, PublicKey } from '@solana/web3.js';
2
2
  import { Buffer } from 'buffer';
3
- import { CompressedProofWithContext, CompressedTransaction, CompressionApiInterface, GetCompressedTokenAccountsByOwnerOrDelegateOptions, HexInputsForProver, ParsedTokenAccount, SignatureWithMetadata, LatestNonVotingSignatures, LatestNonVotingSignaturesPaginated, WithContext, GetCompressedAccountsByOwnerConfig, WithCursor, AddressWithTree, HashWithTree, CompressedMintTokenHolders, TokenBalance, PaginatedOptions } from './rpc-interface';
4
- import { MerkleContextWithMerkleProof, BN254, CompressedAccountWithMerkleContext, CompressedProof } from './state';
3
+ import { ValidityProofWithContext, CompressedTransaction, CompressionApiInterface, GetCompressedTokenAccountsByOwnerOrDelegateOptions, HexInputsForProver, ParsedTokenAccount, SignatureWithMetadata, LatestNonVotingSignatures, LatestNonVotingSignaturesPaginated, WithContext, GetCompressedAccountsByOwnerConfig, WithCursor, AddressWithTree, HashWithTree, CompressedMintTokenHolders, TokenBalance, PaginatedOptions } from './rpc-interface';
4
+ import { MerkleContextWithMerkleProof, BN254, CompressedAccountWithMerkleContext, ValidityProof, AddressTreeInfo } from './state';
5
5
  import BN from 'bn.js';
6
6
  import { LightWasm } from './test-helpers';
7
- import { ActiveTreeBundle } from './state/types';
7
+ import { TreeInfo } from './state/types';
8
8
  /** @internal */
9
9
  export declare function parseAccountData({ discriminator, data, dataHash, }: {
10
10
  discriminator: BN;
@@ -35,7 +35,7 @@ export declare function wrapBigNumbersAsStrings(text: string): string;
35
35
  /** @internal */
36
36
  export declare const rpcRequest: (rpcEndpoint: string, method: string, params?: any, convertToCamelCase?: boolean, debug?: boolean) => Promise<any>;
37
37
  /** @internal */
38
- export declare const proverRequest: (proverEndpoint: string, method: "inclusion" | "new-address" | "combined", params?: any, log?: boolean, publicInputHash?: BN | undefined) => Promise<CompressedProof>;
38
+ export declare const proverRequest: (proverEndpoint: string, method: "inclusion" | "new-address" | "combined", params?: any, log?: boolean, _publicInputHash?: BN | undefined) => Promise<ValidityProof>;
39
39
  export type NonInclusionMerkleProofInputs = {
40
40
  root: BN;
41
41
  value: BN;
@@ -54,8 +54,7 @@ export type MerkleContextWithNewAddressProof = {
54
54
  nextIndex: BN;
55
55
  merkleProofHashedIndexedElementLeaf: BN[];
56
56
  indexHashedIndexedElementLeaf: BN;
57
- merkleTree: PublicKey;
58
- nullifierQueue: PublicKey;
57
+ treeInfo: AddressTreeInfo;
59
58
  };
60
59
  export type NonInclusionJsonStruct = {
61
60
  root: string;
@@ -69,55 +68,38 @@ export type NonInclusionJsonStruct = {
69
68
  export declare function convertMerkleProofsWithContextToHex(merkleProofsWithContext: MerkleContextWithMerkleProof[]): HexInputsForProver[];
70
69
  export declare function convertNonInclusionMerkleProofInputsToHex(nonInclusionMerkleProofInputs: MerkleContextWithNewAddressProof[]): NonInclusionJsonStruct[];
71
70
  export declare function getPublicInputHash(accountProofs: MerkleContextWithMerkleProof[], accountHashes: BN254[], newAddressProofs: MerkleContextWithNewAddressProof[], lightWasm: LightWasm): BN;
72
- /**
73
- * Get the queue for a given tree
74
- *
75
- * @param info - The active state tree addresses
76
- * @param tree - The tree to get the queue for
77
- * @returns The queue for the given tree, or undefined if not found
78
- */
79
- export declare function getQueueForTree(info: ActiveTreeBundle[], tree: PublicKey): PublicKey;
80
- /**
81
- * Get the tree for a given queue
82
- *
83
- * @param info - The active state tree addresses
84
- * @param queue - The queue to get the tree for
85
- * @returns The tree for the given queue, or undefined if not found
86
- */
87
- export declare function getTreeForQueue(info: ActiveTreeBundle[], queue: PublicKey): PublicKey;
88
- /**
89
- * Get a random tree and queue from the active state tree addresses.
90
- *
91
- * Prevents write lock contention on state trees.
92
- *
93
- * @param info - The active state tree addresses
94
- * @returns A random tree and queue
95
- */
96
- export declare function pickRandomTreeAndQueue(info: ActiveTreeBundle[]): {
97
- tree: PublicKey;
98
- queue: PublicKey;
99
- };
71
+ export interface NullifierMetadata {
72
+ nullifier: BN254;
73
+ txHash: BN254;
74
+ }
100
75
  /**
101
76
  *
102
77
  */
103
78
  export declare class Rpc extends Connection implements CompressionApiInterface {
104
79
  compressionApiEndpoint: string;
105
80
  proverEndpoint: string;
106
- activeStateTreeInfo: ActiveTreeBundle[] | null;
81
+ allStateTreeInfos: TreeInfo[] | null;
82
+ lastStateTreeFetchTime: number | null;
83
+ CACHE_TTL: number;
84
+ fetchPromise: Promise<TreeInfo[]> | null;
107
85
  constructor(endpoint: string, compressionApiEndpoint: string, proverEndpoint: string, config?: ConnectionConfig);
108
86
  /**
109
- * Manually set state tree addresses
87
+ * @deprecated Use {@link getStateTreeInfos} instead
110
88
  */
111
- setStateTreeInfo(info: ActiveTreeBundle[]): void;
89
+ getCachedActiveStateTreeInfo(): Promise<void>;
112
90
  /**
113
- * Get the active state tree addresses from the cluster.
114
- * If not already cached, fetches from the cluster.
91
+ * @deprecated Use {@link getStateTreeInfos} instead
115
92
  */
116
- getCachedActiveStateTreeInfo(): Promise<ActiveTreeBundle[]>;
93
+ getCachedActiveStateTreeInfos(): Promise<void>;
117
94
  /**
118
- * Fetch the latest state tree addresses from the cluster.
95
+ * Get a list of all state tree infos. If not already cached, fetches from
96
+ * the cluster.
119
97
  */
120
- getLatestActiveStateTreeInfo(): Promise<ActiveTreeBundle[]>;
98
+ getStateTreeInfos(): Promise<TreeInfo[]>;
99
+ /**
100
+ * @internal
101
+ */
102
+ doFetch(): Promise<TreeInfo[]>;
121
103
  /**
122
104
  * Fetch the compressed account for the specified account address or hash
123
105
  */
@@ -246,31 +228,9 @@ export declare class Rpc extends Connection implements CompressionApiInterface {
246
228
  * @returns Array of validity proofs for new addresses
247
229
  */
248
230
  getMultipleNewAddressProofs(addresses: BN254[]): Promise<MerkleContextWithNewAddressProof[]>;
249
- /**
250
- * Advanced usage of getValidityProof: fetches ZKP directly from a custom
251
- * non-rpcprover. Note: This uses the proverEndpoint specified in the
252
- * constructor. For normal usage, please use {@link getValidityProof}
253
- * instead.
254
- *
255
- * Fetch the latest validity proof for (1) compressed accounts specified by
256
- * an array of account hashes. (2) new unique addresses specified by an
257
- * array of addresses.
258
- *
259
- * Validity proofs prove the presence of compressed accounts in state trees
260
- * and the non-existence of addresses in address trees, respectively. They
261
- * enable verification without recomputing the merkle proof path, thus
262
- * lowering verification and data costs.
263
- *
264
- * @param hashes Array of BN254 hashes.
265
- * @param newAddresses Array of BN254 new addresses.
266
- * @returns validity proof with context
267
- */
268
- getValidityProofDirect(hashes?: BN254[], newAddresses?: BN254[]): Promise<CompressedProofWithContext>;
269
231
  /**
270
232
  * @deprecated use {@link getValidityProofV0} instead.
271
233
  *
272
- *
273
- *
274
234
  * Fetch the latest validity proof for (1) compressed accounts specified by
275
235
  * an array of account hashes. (2) new unique addresses specified by an
276
236
  * array of addresses.
@@ -284,7 +244,7 @@ export declare class Rpc extends Connection implements CompressionApiInterface {
284
244
  * @param newAddresses Array of BN254 new addresses.
285
245
  * @returns validity proof with context
286
246
  */
287
- getValidityProof(hashes?: BN254[], newAddresses?: BN254[]): Promise<CompressedProofWithContext>;
247
+ getValidityProof(hashes?: BN254[], newAddresses?: BN254[]): Promise<ValidityProofWithContext>;
288
248
  /**
289
249
  * Fetch the latest validity proof for (1) compressed accounts specified by
290
250
  * an array of account hashes. (2) new unique addresses specified by an
@@ -299,7 +259,7 @@ export declare class Rpc extends Connection implements CompressionApiInterface {
299
259
  * @param newAddresses Array of { address: BN254, tree: PublicKey, queue: PublicKey }.
300
260
  * @returns validity proof with context
301
261
  */
302
- getValidityProofV0(hashes?: HashWithTree[], newAddresses?: AddressWithTree[]): Promise<CompressedProofWithContext>;
262
+ getValidityProofV0(hashes?: HashWithTree[], newAddresses?: AddressWithTree[]): Promise<ValidityProofWithContext>;
303
263
  /**
304
264
  * Fetch the latest validity proof for (1) compressed accounts specified by
305
265
  * an array of account hashes. (2) new unique addresses specified by an
@@ -316,5 +276,5 @@ export declare class Rpc extends Connection implements CompressionApiInterface {
316
276
  * state tree/queue.
317
277
  * @returns validity proof with context
318
278
  */
319
- getValidityProofAndRpcContext(hashes?: HashWithTree[], newAddresses?: AddressWithTree[]): Promise<WithContext<CompressedProofWithContext>>;
279
+ getValidityProofAndRpcContext(hashes?: HashWithTree[], newAddresses?: AddressWithTree[]): Promise<WithContext<ValidityProofWithContext>>;
320
280
  }
@@ -7,7 +7,6 @@ import { Buffer } from 'buffer';
7
7
  * are used to from working with the web3.js PublicKey type.
8
8
  */
9
9
  export type BN254 = BN;
10
- export declare const bn: (number: string | number | BN | Buffer | Uint8Array | number[], base?: number | "hex" | undefined, endian?: BN.Endianness | undefined) => BN;
11
10
  /** Create a bigint instance with <254-bit max size and base58 capabilities */
12
11
  export declare const createBN254: (number: string | number | BN | Buffer | Uint8Array | number[], base?: number | "hex" | "base58" | undefined) => BN254;
13
12
  /** Convert <254-bit bigint to Base58 string. */
@@ -0,0 +1,3 @@
1
+ import BN from 'bn.js';
2
+ import { Buffer } from 'buffer';
3
+ export declare const bn: (number: string | number | BN | Buffer | Uint8Array | number[], base?: number | "hex" | undefined, endian?: BN.Endianness | undefined) => BN;
@@ -1,31 +1,205 @@
1
- import BN from 'bn.js';
2
1
  import { PublicKey } from '@solana/web3.js';
3
- import { CompressedAccount, CompressedAccountData } from './types';
2
+ import { CompressedAccountData, CompressedAccountLegacy, PackedMerkleContextLegacy, TreeInfo } from './types';
3
+ import BN from 'bn.js';
4
4
  import { BN254 } from './BN254';
5
+ /**
6
+ * @deprecated use {@link CompressedAccount} instead
7
+ */
5
8
  export type CompressedAccountWithMerkleContext = CompressedAccount & MerkleContext & {
6
9
  readOnly: boolean;
7
10
  };
8
11
  /**
9
- * Context for compressed account inserted into a state Merkle tree
10
- * */
11
- export type MerkleContext = {
12
- /** State Merkle tree */
12
+ * @deprecated use {@link CompressedAccount} instead
13
+ */
14
+ export type CompressedAccountWithMerkleContextLegacy = CompressedAccount & MerkleContext;
15
+ /**
16
+ * Compressed account + metadata about the state tree in which the account is
17
+ * stored.
18
+ */
19
+ export type CompressedAccount = {
20
+ /**
21
+ * Public key of program or user owning the account.
22
+ */
23
+ owner: PublicKey;
24
+ /**
25
+ * Lamports attached to the account.
26
+ */
27
+ lamports: BN;
28
+ /**
29
+ * Optional unique account ID that is persistent across transactions.
30
+ */
31
+ address: number[] | null;
32
+ /**
33
+ * Optional data attached to the account.
34
+ */
35
+ data: CompressedAccountData | null;
36
+ } & MerkleContext & {
37
+ /**
38
+ * Read only.
39
+ */
40
+ readOnly: boolean;
41
+ };
42
+ /**
43
+ * @deprecated use {@link MerkleContext} instead.
44
+ *
45
+ * Legacy MerkleContext.
46
+ */
47
+ export type MerkleContextLegacy = {
48
+ /**
49
+ * State tree
50
+ */
13
51
  merkleTree: PublicKey;
14
- /** The state nullfier queue belonging to merkleTree */
52
+ /**
53
+ * Nullifier queue
54
+ */
15
55
  nullifierQueue: PublicKey;
16
- /** Poseidon hash of the utxo preimage. Is a leaf in state merkle tree */
56
+ /**
57
+ * Poseidon hash of the account. Stored as leaf in state tree
58
+ */
17
59
  hash: number[];
18
- /** 'hash' position within the Merkle tree */
60
+ /**
61
+ * Position of `hash` in the State tree
62
+ */
19
63
  leafIndex: number;
20
64
  };
65
+ /**
66
+ * Context for compressed account stored in a state tree
67
+ */
68
+ export type MerkleContext = {
69
+ /**
70
+ * Tree info
71
+ */
72
+ treeInfo: TreeInfo;
73
+ /**
74
+ * Poseidon hash of the account. Stored as leaf in state tree
75
+ */
76
+ hash: BN;
77
+ /**
78
+ * Position of `hash` in the State tree
79
+ */
80
+ leafIndex: number;
81
+ /**
82
+ * Whether the account can be proven by index or by merkle proof
83
+ */
84
+ proveByIndex: boolean;
85
+ };
86
+ /**
87
+ * MerkleContext with merkle proof
88
+ */
21
89
  export type MerkleContextWithMerkleProof = MerkleContext & {
22
- /** Recent valid 'hash' proof path, expires after n slots */
90
+ /**
91
+ * Recent valid 'hash' proof path, expires after n slots
92
+ */
23
93
  merkleProof: BN254[];
24
- /** Index of state root the merkleproof is valid for, expires after n slots */
94
+ /**
95
+ * Index of state root the merkleproof is valid for, expires after n slots
96
+ */
25
97
  rootIndex: number;
26
- /** Current root */
98
+ /**
99
+ * Current root
100
+ */
27
101
  root: BN254;
28
102
  };
29
- export declare const createCompressedAccount: (owner: PublicKey, lamports?: BN, data?: CompressedAccountData, address?: number[]) => CompressedAccount;
30
- export declare const createCompressedAccountWithMerkleContext: (merkleContext: MerkleContext, owner: PublicKey, lamports?: BN, data?: CompressedAccountData, address?: number[]) => CompressedAccountWithMerkleContext;
31
- export declare const createMerkleContext: (merkleTree: PublicKey, nullifierQueue: PublicKey, hash: number[], leafIndex: number) => MerkleContext;
103
+ /**
104
+ * Packed compressed account and state tree info.
105
+ */
106
+ export type PackedStateTreeInfo = {
107
+ /**
108
+ * Recent valid root index.
109
+ */
110
+ rootIndex: number;
111
+ /**
112
+ * Whether the account can be proven by index or by merkle proof
113
+ */
114
+ proveByIndex: boolean;
115
+ /**
116
+ * Index of the merkle tree in which the account is stored.
117
+ */
118
+ merkleTreePubkeyIndex: number;
119
+ /**
120
+ * Index of the queue in which the account is stored.
121
+ */
122
+ queuePubkeyIndex: number;
123
+ /**
124
+ * Index of the leaf in the state tree.
125
+ */
126
+ leafIndex: number;
127
+ };
128
+ /**
129
+ * Packed tree info for a new program-derived address (PDA).
130
+ */
131
+ export type PackedAddressTreeInfo = {
132
+ /**
133
+ * Index of the merkle tree in which the account is stored.
134
+ */
135
+ addressMerkleTreePubkeyIndex: number;
136
+ /**
137
+ * Index of the queue in which the account is stored.
138
+ */
139
+ addressQueuePubkeyIndex: number;
140
+ /**
141
+ * Recent valid root index.
142
+ */
143
+ rootIndex: number;
144
+ };
145
+ /**
146
+ * Compressed account meta in instruction.
147
+ *
148
+ */
149
+ export type CompressedAccountMeta = {
150
+ /**
151
+ * Packed Tree info.
152
+ */
153
+ treeInfo: PackedStateTreeInfo;
154
+ /**
155
+ * Address.
156
+ */
157
+ address: number[] | null;
158
+ /**
159
+ * Lamports.
160
+ */
161
+ lamports: BN | null;
162
+ /**
163
+ * index of state tree in which the new account state is stored.
164
+ */
165
+ outputStateTreeIndex: number;
166
+ };
167
+ /**
168
+ * Create an output compressed account meta for a new account.
169
+ * Client-side only.
170
+ */
171
+ export declare const createCompressedAccountMeta: (treeInfo: PackedStateTreeInfo, outputStateTreeIndex: number, address?: number[], lamports?: BN) => CompressedAccountMeta;
172
+ /**
173
+ * @deprecated Use {@link PackedStateTreeInfo} instead.
174
+ * Packed compressed account with merkle context.
175
+ */
176
+ export interface PackedCompressedAccountWithMerkleContext {
177
+ /**
178
+ * Compressed account.
179
+ */
180
+ compressedAccount: CompressedAccountLegacy;
181
+ /**
182
+ * Merkle context.
183
+ */
184
+ merkleContext: PackedMerkleContextLegacy;
185
+ /**
186
+ * Root index.
187
+ */
188
+ rootIndex: number;
189
+ /**
190
+ * Read only.
191
+ */
192
+ readOnly: boolean;
193
+ }
194
+ /**
195
+ * @deprecated use {@link createCompressedAccountMeta} instead.
196
+ */
197
+ export declare const createCompressedAccountLegacy: (owner: PublicKey, lamports?: BN, data?: CompressedAccountData, address?: number[]) => CompressedAccountLegacy;
198
+ /**
199
+ * @deprecated.
200
+ */
201
+ export declare const createCompressedAccountWithMerkleContextLegacy: (merkleContext: MerkleContext, owner: PublicKey, lamports?: BN, data?: CompressedAccountData, address?: number[]) => CompressedAccountWithMerkleContext;
202
+ /**
203
+ * @deprecated use {@link createCompressedAccountMeta} instead.
204
+ */
205
+ export declare const createMerkleContextLegacy: (treeInfo: TreeInfo, hash: BN254, leafIndex: number, proveByIndex?: boolean) => MerkleContext;
@@ -1,3 +1,4 @@
1
1
  export * from './BN254';
2
+ export * from './bn';
2
3
  export * from './compressed-account';
3
4
  export * from './types';