@lightprotocol/stateless.js 0.20.3 → 0.20.4

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 (70) hide show
  1. package/dist/cjs/browser/actions/common.d.ts +1 -4
  2. package/dist/cjs/browser/actions/compress.d.ts +2 -14
  3. package/dist/cjs/browser/actions/create-account.d.ts +3 -27
  4. package/dist/cjs/browser/actions/decompress.d.ts +2 -14
  5. package/dist/cjs/browser/actions/transfer.d.ts +2 -15
  6. package/dist/cjs/browser/constants.d.ts +15 -30
  7. package/dist/cjs/browser/errors.d.ts +49 -40
  8. package/dist/cjs/browser/idl.d.ts +45 -45
  9. package/dist/cjs/browser/index.cjs +1 -9611
  10. package/dist/cjs/browser/index.cjs.map +1 -1
  11. package/dist/cjs/browser/instruction/pack-compressed-accounts.d.ts +5 -24
  12. package/dist/cjs/browser/programs/layout.d.ts +17 -39
  13. package/dist/cjs/browser/programs/system.d.ts +10 -61
  14. package/dist/cjs/browser/rpc-interface.d.ts +871 -1127
  15. package/dist/cjs/browser/rpc.d.ts +34 -158
  16. package/dist/cjs/browser/state/BN254.d.ts +2 -9
  17. package/dist/cjs/browser/state/compressed-account.d.ts +6 -23
  18. package/dist/cjs/browser/state/types.d.ts +1 -1
  19. package/dist/cjs/browser/test-helpers/merkle-tree/indexed-array.d.ts +4 -18
  20. package/dist/cjs/browser/test-helpers/merkle-tree/merkle-tree.d.ts +6 -19
  21. package/dist/cjs/browser/test-helpers/test-rpc/get-compressed-accounts.d.ts +3 -12
  22. package/dist/cjs/browser/test-helpers/test-rpc/get-compressed-token-accounts.d.ts +5 -21
  23. package/dist/cjs/browser/test-helpers/test-rpc/get-parsed-events.d.ts +4 -14
  24. package/dist/cjs/browser/test-helpers/test-rpc/test-rpc.d.ts +31 -135
  25. package/dist/cjs/browser/test-helpers/test-utils.d.ts +1 -5
  26. package/dist/cjs/browser/utils/address.d.ts +3 -12
  27. package/dist/cjs/browser/utils/airdrop.d.ts +2 -14
  28. package/dist/cjs/browser/utils/calculate-compute-unit-price.d.ts +1 -4
  29. package/dist/cjs/browser/utils/conversion.d.ts +5 -9
  30. package/dist/cjs/browser/utils/get-light-state-tree-info.d.ts +4 -28
  31. package/dist/cjs/browser/utils/parse-validity-proof.d.ts +1 -3
  32. package/dist/cjs/browser/utils/pipe.d.ts +1 -4
  33. package/dist/cjs/browser/utils/send-and-confirm.d.ts +11 -42
  34. package/dist/cjs/browser/utils/validation.d.ts +6 -9
  35. package/dist/cjs/node/actions/common.d.ts +1 -4
  36. package/dist/cjs/node/actions/compress.d.ts +2 -14
  37. package/dist/cjs/node/actions/create-account.d.ts +3 -27
  38. package/dist/cjs/node/actions/decompress.d.ts +2 -14
  39. package/dist/cjs/node/actions/transfer.d.ts +2 -15
  40. package/dist/cjs/node/constants.d.ts +15 -30
  41. package/dist/cjs/node/errors.d.ts +49 -40
  42. package/dist/cjs/node/idl.d.ts +45 -45
  43. package/dist/cjs/node/index.cjs +1 -8310
  44. package/dist/cjs/node/index.cjs.map +1 -1
  45. package/dist/cjs/node/instruction/pack-compressed-accounts.d.ts +5 -24
  46. package/dist/cjs/node/programs/layout.d.ts +17 -39
  47. package/dist/cjs/node/programs/system.d.ts +10 -61
  48. package/dist/cjs/node/rpc-interface.d.ts +871 -1127
  49. package/dist/cjs/node/rpc.d.ts +34 -158
  50. package/dist/cjs/node/state/BN254.d.ts +2 -9
  51. package/dist/cjs/node/state/compressed-account.d.ts +6 -23
  52. package/dist/cjs/node/state/types.d.ts +1 -1
  53. package/dist/cjs/node/test-helpers/merkle-tree/indexed-array.d.ts +4 -18
  54. package/dist/cjs/node/test-helpers/merkle-tree/merkle-tree.d.ts +6 -19
  55. package/dist/cjs/node/test-helpers/test-rpc/get-compressed-accounts.d.ts +3 -12
  56. package/dist/cjs/node/test-helpers/test-rpc/get-compressed-token-accounts.d.ts +5 -21
  57. package/dist/cjs/node/test-helpers/test-rpc/get-parsed-events.d.ts +4 -14
  58. package/dist/cjs/node/test-helpers/test-rpc/test-rpc.d.ts +31 -135
  59. package/dist/cjs/node/test-helpers/test-utils.d.ts +1 -5
  60. package/dist/cjs/node/utils/address.d.ts +3 -12
  61. package/dist/cjs/node/utils/airdrop.d.ts +2 -14
  62. package/dist/cjs/node/utils/calculate-compute-unit-price.d.ts +1 -4
  63. package/dist/cjs/node/utils/conversion.d.ts +5 -9
  64. package/dist/cjs/node/utils/get-light-state-tree-info.d.ts +4 -28
  65. package/dist/cjs/node/utils/parse-validity-proof.d.ts +1 -3
  66. package/dist/cjs/node/utils/pipe.d.ts +1 -4
  67. package/dist/cjs/node/utils/send-and-confirm.d.ts +11 -42
  68. package/dist/cjs/node/utils/validation.d.ts +6 -9
  69. package/dist/types/index.d.ts +1131 -2097
  70. package/package.json +2 -1
@@ -1,12 +1,6 @@
1
1
  import { PublicKey, MemcmpFilter, DataSlice } from '@solana/web3.js';
2
2
  import { Struct } from 'superstruct';
3
- import {
4
- BN254,
5
- CompressedProof,
6
- CompressedAccountWithMerkleContext,
7
- MerkleContextWithMerkleProof,
8
- TokenData,
9
- } from './state';
3
+ import { BN254, CompressedProof, CompressedAccountWithMerkleContext, MerkleContextWithMerkleProof, TokenData } from './state';
10
4
  import BN from 'bn.js';
11
5
  export interface LatestNonVotingSignatures {
12
6
  context: {
@@ -150,15 +144,11 @@ export type WithCursor<T> = {
150
144
  /**
151
145
  * @internal
152
146
  */
153
- export declare function createRpcResult<T, U>(
154
- result: Struct<T, U>,
155
- ): Struct<RpcResult<T>, null>;
147
+ export declare function createRpcResult<T, U>(result: Struct<T, U>): Struct<RpcResult<T>, null>;
156
148
  /**
157
149
  * @internal
158
150
  */
159
- export declare function jsonRpcResult<T, U>(
160
- schema: Struct<T, U>,
161
- ): Struct<RpcResult<T>, null>;
151
+ export declare function jsonRpcResult<T, U>(schema: Struct<T, U>): Struct<RpcResult<T>, null>;
162
152
  export type WithRpcContext<T> = {
163
153
  context: {
164
154
  slot: number;
@@ -168,14 +158,68 @@ export type WithRpcContext<T> = {
168
158
  /**
169
159
  * @internal
170
160
  */
171
- export declare function jsonRpcResultAndContext<T, U>(
172
- value: Struct<T, U>,
173
- ): Struct<RpcResult<WithRpcContext<T>>, null>;
161
+ export declare function jsonRpcResultAndContext<T, U>(value: Struct<T, U>): Struct<RpcResult<WithRpcContext<T>>, null>;
174
162
  /**
175
163
  * @internal
176
164
  */
177
- export declare const CompressedAccountResult: Struct<
178
- {
165
+ export declare const CompressedAccountResult: Struct<{
166
+ data: {
167
+ data: string;
168
+ dataHash: BN;
169
+ discriminator: BN;
170
+ } | null;
171
+ lamports: BN;
172
+ address: number[] | null;
173
+ hash: BN;
174
+ owner: PublicKey;
175
+ leafIndex: number;
176
+ tree: PublicKey;
177
+ seq: BN | null;
178
+ slotCreated: BN;
179
+ }, {
180
+ address: Struct<number[] | null, null>;
181
+ hash: Struct<BN, null>;
182
+ data: Struct<{
183
+ data: string;
184
+ dataHash: BN;
185
+ discriminator: BN;
186
+ } | null, {
187
+ data: Struct<string, null>;
188
+ dataHash: Struct<BN, null>;
189
+ discriminator: Struct<BN, null>;
190
+ }>;
191
+ lamports: Struct<BN, null>;
192
+ owner: Struct<PublicKey, null>;
193
+ leafIndex: Struct<number, null>;
194
+ tree: Struct<PublicKey, null>;
195
+ seq: Struct<BN | null, null>;
196
+ slotCreated: Struct<BN, null>;
197
+ }>;
198
+ export declare const TokenDataResult: Struct<{
199
+ owner: PublicKey;
200
+ mint: PublicKey;
201
+ amount: BN;
202
+ delegate: PublicKey | null;
203
+ state: string;
204
+ }, {
205
+ mint: Struct<PublicKey, null>;
206
+ owner: Struct<PublicKey, null>;
207
+ amount: Struct<BN, null>;
208
+ delegate: Struct<PublicKey | null, null>;
209
+ state: Struct<string, null>;
210
+ }>;
211
+ /**
212
+ * @internal
213
+ */
214
+ export declare const CompressedTokenAccountResult: Struct<{
215
+ tokenData: {
216
+ owner: PublicKey;
217
+ mint: PublicKey;
218
+ amount: BN;
219
+ delegate: PublicKey | null;
220
+ state: string;
221
+ };
222
+ account: {
179
223
  data: {
180
224
  data: string;
181
225
  dataHash: BN;
@@ -189,51 +233,198 @@ export declare const CompressedAccountResult: Struct<
189
233
  tree: PublicKey;
190
234
  seq: BN | null;
191
235
  slotCreated: BN;
192
- },
193
- {
194
- address: Struct<number[] | null, null>;
195
- hash: Struct<BN, null>;
196
- data: Struct<
197
- {
198
- data: string;
199
- dataHash: BN;
200
- discriminator: BN;
201
- } | null,
202
- {
203
- data: Struct<string, null>;
204
- dataHash: Struct<BN, null>;
205
- discriminator: Struct<BN, null>;
206
- }
207
- >;
208
- lamports: Struct<BN, null>;
209
- owner: Struct<PublicKey, null>;
210
- leafIndex: Struct<number, null>;
211
- tree: Struct<PublicKey, null>;
212
- seq: Struct<BN | null, null>;
213
- slotCreated: Struct<BN, null>;
214
- }
215
- >;
216
- export declare const TokenDataResult: Struct<
217
- {
236
+ };
237
+ }, {
238
+ tokenData: Struct<{
218
239
  owner: PublicKey;
219
240
  mint: PublicKey;
220
241
  amount: BN;
221
242
  delegate: PublicKey | null;
222
243
  state: string;
223
- },
224
- {
244
+ }, {
225
245
  mint: Struct<PublicKey, null>;
226
246
  owner: Struct<PublicKey, null>;
227
247
  amount: Struct<BN, null>;
228
248
  delegate: Struct<PublicKey | null, null>;
229
249
  state: Struct<string, null>;
230
- }
231
- >;
250
+ }>;
251
+ account: Struct<{
252
+ data: {
253
+ data: string;
254
+ dataHash: BN;
255
+ discriminator: BN;
256
+ } | null;
257
+ lamports: BN;
258
+ address: number[] | null;
259
+ hash: BN;
260
+ owner: PublicKey;
261
+ leafIndex: number;
262
+ tree: PublicKey;
263
+ seq: BN | null;
264
+ slotCreated: BN;
265
+ }, {
266
+ address: Struct<number[] | null, null>;
267
+ hash: Struct<BN, null>;
268
+ data: Struct<{
269
+ data: string;
270
+ dataHash: BN;
271
+ discriminator: BN;
272
+ } | null, {
273
+ data: Struct<string, null>;
274
+ dataHash: Struct<BN, null>;
275
+ discriminator: Struct<BN, null>;
276
+ }>;
277
+ lamports: Struct<BN, null>;
278
+ owner: Struct<PublicKey, null>;
279
+ leafIndex: Struct<number, null>;
280
+ tree: Struct<PublicKey, null>;
281
+ seq: Struct<BN | null, null>;
282
+ slotCreated: Struct<BN, null>;
283
+ }>;
284
+ }>;
285
+ /**
286
+ * @internal
287
+ */
288
+ export declare const MultipleCompressedAccountsResult: Struct<{
289
+ items: {
290
+ data: {
291
+ data: string;
292
+ dataHash: BN;
293
+ discriminator: BN;
294
+ } | null;
295
+ lamports: BN;
296
+ address: number[] | null;
297
+ hash: BN;
298
+ owner: PublicKey;
299
+ leafIndex: number;
300
+ tree: PublicKey;
301
+ seq: BN | null;
302
+ slotCreated: BN;
303
+ }[];
304
+ }, {
305
+ items: Struct<{
306
+ data: {
307
+ data: string;
308
+ dataHash: BN;
309
+ discriminator: BN;
310
+ } | null;
311
+ lamports: BN;
312
+ address: number[] | null;
313
+ hash: BN;
314
+ owner: PublicKey;
315
+ leafIndex: number;
316
+ tree: PublicKey;
317
+ seq: BN | null;
318
+ slotCreated: BN;
319
+ }[], Struct<{
320
+ data: {
321
+ data: string;
322
+ dataHash: BN;
323
+ discriminator: BN;
324
+ } | null;
325
+ lamports: BN;
326
+ address: number[] | null;
327
+ hash: BN;
328
+ owner: PublicKey;
329
+ leafIndex: number;
330
+ tree: PublicKey;
331
+ seq: BN | null;
332
+ slotCreated: BN;
333
+ }, {
334
+ address: Struct<number[] | null, null>;
335
+ hash: Struct<BN, null>;
336
+ data: Struct<{
337
+ data: string;
338
+ dataHash: BN;
339
+ discriminator: BN;
340
+ } | null, {
341
+ data: Struct<string, null>;
342
+ dataHash: Struct<BN, null>;
343
+ discriminator: Struct<BN, null>;
344
+ }>;
345
+ lamports: Struct<BN, null>;
346
+ owner: Struct<PublicKey, null>;
347
+ leafIndex: Struct<number, null>;
348
+ tree: Struct<PublicKey, null>;
349
+ seq: Struct<BN | null, null>;
350
+ slotCreated: Struct<BN, null>;
351
+ }>>;
352
+ }>;
353
+ /**
354
+ * @internal
355
+ */
356
+ export declare const CompressedAccountsByOwnerResult: Struct<{
357
+ items: {
358
+ data: {
359
+ data: string;
360
+ dataHash: BN;
361
+ discriminator: BN;
362
+ } | null;
363
+ lamports: BN;
364
+ address: number[] | null;
365
+ hash: BN;
366
+ owner: PublicKey;
367
+ leafIndex: number;
368
+ tree: PublicKey;
369
+ seq: BN | null;
370
+ slotCreated: BN;
371
+ }[];
372
+ cursor: string | null;
373
+ }, {
374
+ items: Struct<{
375
+ data: {
376
+ data: string;
377
+ dataHash: BN;
378
+ discriminator: BN;
379
+ } | null;
380
+ lamports: BN;
381
+ address: number[] | null;
382
+ hash: BN;
383
+ owner: PublicKey;
384
+ leafIndex: number;
385
+ tree: PublicKey;
386
+ seq: BN | null;
387
+ slotCreated: BN;
388
+ }[], Struct<{
389
+ data: {
390
+ data: string;
391
+ dataHash: BN;
392
+ discriminator: BN;
393
+ } | null;
394
+ lamports: BN;
395
+ address: number[] | null;
396
+ hash: BN;
397
+ owner: PublicKey;
398
+ leafIndex: number;
399
+ tree: PublicKey;
400
+ seq: BN | null;
401
+ slotCreated: BN;
402
+ }, {
403
+ address: Struct<number[] | null, null>;
404
+ hash: Struct<BN, null>;
405
+ data: Struct<{
406
+ data: string;
407
+ dataHash: BN;
408
+ discriminator: BN;
409
+ } | null, {
410
+ data: Struct<string, null>;
411
+ dataHash: Struct<BN, null>;
412
+ discriminator: Struct<BN, null>;
413
+ }>;
414
+ lamports: Struct<BN, null>;
415
+ owner: Struct<PublicKey, null>;
416
+ leafIndex: Struct<number, null>;
417
+ tree: Struct<PublicKey, null>;
418
+ seq: Struct<BN | null, null>;
419
+ slotCreated: Struct<BN, null>;
420
+ }>>;
421
+ cursor: Struct<string | null, null>;
422
+ }>;
232
423
  /**
233
424
  * @internal
234
425
  */
235
- export declare const CompressedTokenAccountResult: Struct<
236
- {
426
+ export declare const CompressedTokenAccountsByOwnerOrDelegateResult: Struct<{
427
+ items: {
237
428
  tokenData: {
238
429
  owner: PublicKey;
239
430
  mint: PublicKey;
@@ -256,71 +447,18 @@ export declare const CompressedTokenAccountResult: Struct<
256
447
  seq: BN | null;
257
448
  slotCreated: BN;
258
449
  };
259
- },
260
- {
261
- tokenData: Struct<
262
- {
263
- owner: PublicKey;
264
- mint: PublicKey;
265
- amount: BN;
266
- delegate: PublicKey | null;
267
- state: string;
268
- },
269
- {
270
- mint: Struct<PublicKey, null>;
271
- owner: Struct<PublicKey, null>;
272
- amount: Struct<BN, null>;
273
- delegate: Struct<PublicKey | null, null>;
274
- state: Struct<string, null>;
275
- }
276
- >;
277
- account: Struct<
278
- {
279
- data: {
280
- data: string;
281
- dataHash: BN;
282
- discriminator: BN;
283
- } | null;
284
- lamports: BN;
285
- address: number[] | null;
286
- hash: BN;
287
- owner: PublicKey;
288
- leafIndex: number;
289
- tree: PublicKey;
290
- seq: BN | null;
291
- slotCreated: BN;
292
- },
293
- {
294
- address: Struct<number[] | null, null>;
295
- hash: Struct<BN, null>;
296
- data: Struct<
297
- {
298
- data: string;
299
- dataHash: BN;
300
- discriminator: BN;
301
- } | null,
302
- {
303
- data: Struct<string, null>;
304
- dataHash: Struct<BN, null>;
305
- discriminator: Struct<BN, null>;
306
- }
307
- >;
308
- lamports: Struct<BN, null>;
309
- owner: Struct<PublicKey, null>;
310
- leafIndex: Struct<number, null>;
311
- tree: Struct<PublicKey, null>;
312
- seq: Struct<BN | null, null>;
313
- slotCreated: Struct<BN, null>;
314
- }
315
- >;
316
- }
317
- >;
318
- /**
319
- * @internal
320
- */
321
- export declare const MultipleCompressedAccountsResult: Struct<
322
- {
323
- items: {
450
+ }[];
451
+ cursor: string | null;
452
+ }, {
453
+ items: Struct<{
454
+ tokenData: {
455
+ owner: PublicKey;
456
+ mint: PublicKey;
457
+ amount: BN;
458
+ delegate: PublicKey | null;
459
+ state: string;
460
+ };
461
+ account: {
324
462
  data: {
325
463
  data: string;
326
464
  dataHash: BN;
@@ -334,73 +472,16 @@ export declare const MultipleCompressedAccountsResult: Struct<
334
472
  tree: PublicKey;
335
473
  seq: BN | null;
336
474
  slotCreated: BN;
337
- }[];
338
- },
339
- {
340
- items: Struct<
341
- {
342
- data: {
343
- data: string;
344
- dataHash: BN;
345
- discriminator: BN;
346
- } | null;
347
- lamports: BN;
348
- address: number[] | null;
349
- hash: BN;
350
- owner: PublicKey;
351
- leafIndex: number;
352
- tree: PublicKey;
353
- seq: BN | null;
354
- slotCreated: BN;
355
- }[],
356
- Struct<
357
- {
358
- data: {
359
- data: string;
360
- dataHash: BN;
361
- discriminator: BN;
362
- } | null;
363
- lamports: BN;
364
- address: number[] | null;
365
- hash: BN;
366
- owner: PublicKey;
367
- leafIndex: number;
368
- tree: PublicKey;
369
- seq: BN | null;
370
- slotCreated: BN;
371
- },
372
- {
373
- address: Struct<number[] | null, null>;
374
- hash: Struct<BN, null>;
375
- data: Struct<
376
- {
377
- data: string;
378
- dataHash: BN;
379
- discriminator: BN;
380
- } | null,
381
- {
382
- data: Struct<string, null>;
383
- dataHash: Struct<BN, null>;
384
- discriminator: Struct<BN, null>;
385
- }
386
- >;
387
- lamports: Struct<BN, null>;
388
- owner: Struct<PublicKey, null>;
389
- leafIndex: Struct<number, null>;
390
- tree: Struct<PublicKey, null>;
391
- seq: Struct<BN | null, null>;
392
- slotCreated: Struct<BN, null>;
393
- }
394
- >
395
- >;
396
- }
397
- >;
398
- /**
399
- * @internal
400
- */
401
- export declare const CompressedAccountsByOwnerResult: Struct<
402
- {
403
- items: {
475
+ };
476
+ }[], Struct<{
477
+ tokenData: {
478
+ owner: PublicKey;
479
+ mint: PublicKey;
480
+ amount: BN;
481
+ delegate: PublicKey | null;
482
+ state: string;
483
+ };
484
+ account: {
404
485
  data: {
405
486
  data: string;
406
487
  dataHash: BN;
@@ -414,213 +495,57 @@ export declare const CompressedAccountsByOwnerResult: Struct<
414
495
  tree: PublicKey;
415
496
  seq: BN | null;
416
497
  slotCreated: BN;
417
- }[];
418
- cursor: string | null;
419
- },
420
- {
421
- items: Struct<
422
- {
423
- data: {
424
- data: string;
425
- dataHash: BN;
426
- discriminator: BN;
427
- } | null;
428
- lamports: BN;
429
- address: number[] | null;
430
- hash: BN;
431
- owner: PublicKey;
432
- leafIndex: number;
433
- tree: PublicKey;
434
- seq: BN | null;
435
- slotCreated: BN;
436
- }[],
437
- Struct<
438
- {
439
- data: {
440
- data: string;
441
- dataHash: BN;
442
- discriminator: BN;
443
- } | null;
444
- lamports: BN;
445
- address: number[] | null;
446
- hash: BN;
447
- owner: PublicKey;
448
- leafIndex: number;
449
- tree: PublicKey;
450
- seq: BN | null;
451
- slotCreated: BN;
452
- },
453
- {
454
- address: Struct<number[] | null, null>;
455
- hash: Struct<BN, null>;
456
- data: Struct<
457
- {
458
- data: string;
459
- dataHash: BN;
460
- discriminator: BN;
461
- } | null,
462
- {
463
- data: Struct<string, null>;
464
- dataHash: Struct<BN, null>;
465
- discriminator: Struct<BN, null>;
466
- }
467
- >;
468
- lamports: Struct<BN, null>;
469
- owner: Struct<PublicKey, null>;
470
- leafIndex: Struct<number, null>;
471
- tree: Struct<PublicKey, null>;
472
- seq: Struct<BN | null, null>;
473
- slotCreated: Struct<BN, null>;
474
- }
475
- >
476
- >;
477
- cursor: Struct<string | null, null>;
478
- }
479
- >;
480
- /**
481
- * @internal
482
- */
483
- export declare const CompressedTokenAccountsByOwnerOrDelegateResult: Struct<
484
- {
485
- items: {
486
- tokenData: {
487
- owner: PublicKey;
488
- mint: PublicKey;
489
- amount: BN;
490
- delegate: PublicKey | null;
491
- state: string;
492
- };
493
- account: {
494
- data: {
495
- data: string;
496
- dataHash: BN;
497
- discriminator: BN;
498
- } | null;
499
- lamports: BN;
500
- address: number[] | null;
501
- hash: BN;
502
- owner: PublicKey;
503
- leafIndex: number;
504
- tree: PublicKey;
505
- seq: BN | null;
506
- slotCreated: BN;
507
- };
508
- }[];
509
- cursor: string | null;
510
- },
511
- {
512
- items: Struct<
513
- {
514
- tokenData: {
515
- owner: PublicKey;
516
- mint: PublicKey;
517
- amount: BN;
518
- delegate: PublicKey | null;
519
- state: string;
520
- };
521
- account: {
522
- data: {
523
- data: string;
524
- dataHash: BN;
525
- discriminator: BN;
526
- } | null;
527
- lamports: BN;
528
- address: number[] | null;
529
- hash: BN;
530
- owner: PublicKey;
531
- leafIndex: number;
532
- tree: PublicKey;
533
- seq: BN | null;
534
- slotCreated: BN;
535
- };
536
- }[],
537
- Struct<
538
- {
539
- tokenData: {
540
- owner: PublicKey;
541
- mint: PublicKey;
542
- amount: BN;
543
- delegate: PublicKey | null;
544
- state: string;
545
- };
546
- account: {
547
- data: {
548
- data: string;
549
- dataHash: BN;
550
- discriminator: BN;
551
- } | null;
552
- lamports: BN;
553
- address: number[] | null;
554
- hash: BN;
555
- owner: PublicKey;
556
- leafIndex: number;
557
- tree: PublicKey;
558
- seq: BN | null;
559
- slotCreated: BN;
560
- };
561
- },
562
- {
563
- tokenData: Struct<
564
- {
565
- owner: PublicKey;
566
- mint: PublicKey;
567
- amount: BN;
568
- delegate: PublicKey | null;
569
- state: string;
570
- },
571
- {
572
- mint: Struct<PublicKey, null>;
573
- owner: Struct<PublicKey, null>;
574
- amount: Struct<BN, null>;
575
- delegate: Struct<PublicKey | null, null>;
576
- state: Struct<string, null>;
577
- }
578
- >;
579
- account: Struct<
580
- {
581
- data: {
582
- data: string;
583
- dataHash: BN;
584
- discriminator: BN;
585
- } | null;
586
- lamports: BN;
587
- address: number[] | null;
588
- hash: BN;
589
- owner: PublicKey;
590
- leafIndex: number;
591
- tree: PublicKey;
592
- seq: BN | null;
593
- slotCreated: BN;
594
- },
595
- {
596
- address: Struct<number[] | null, null>;
597
- hash: Struct<BN, null>;
598
- data: Struct<
599
- {
600
- data: string;
601
- dataHash: BN;
602
- discriminator: BN;
603
- } | null,
604
- {
605
- data: Struct<string, null>;
606
- dataHash: Struct<BN, null>;
607
- discriminator: Struct<BN, null>;
608
- }
609
- >;
610
- lamports: Struct<BN, null>;
611
- owner: Struct<PublicKey, null>;
612
- leafIndex: Struct<number, null>;
613
- tree: Struct<PublicKey, null>;
614
- seq: Struct<BN | null, null>;
615
- slotCreated: Struct<BN, null>;
616
- }
617
- >;
618
- }
619
- >
620
- >;
621
- cursor: Struct<string | null, null>;
622
- }
623
- >;
498
+ };
499
+ }, {
500
+ tokenData: Struct<{
501
+ owner: PublicKey;
502
+ mint: PublicKey;
503
+ amount: BN;
504
+ delegate: PublicKey | null;
505
+ state: string;
506
+ }, {
507
+ mint: Struct<PublicKey, null>;
508
+ owner: Struct<PublicKey, null>;
509
+ amount: Struct<BN, null>;
510
+ delegate: Struct<PublicKey | null, null>;
511
+ state: Struct<string, null>;
512
+ }>;
513
+ account: Struct<{
514
+ data: {
515
+ data: string;
516
+ dataHash: BN;
517
+ discriminator: BN;
518
+ } | null;
519
+ lamports: BN;
520
+ address: number[] | null;
521
+ hash: BN;
522
+ owner: PublicKey;
523
+ leafIndex: number;
524
+ tree: PublicKey;
525
+ seq: BN | null;
526
+ slotCreated: BN;
527
+ }, {
528
+ address: Struct<number[] | null, null>;
529
+ hash: Struct<BN, null>;
530
+ data: Struct<{
531
+ data: string;
532
+ dataHash: BN;
533
+ discriminator: BN;
534
+ } | null, {
535
+ data: Struct<string, null>;
536
+ dataHash: Struct<BN, null>;
537
+ discriminator: Struct<BN, null>;
538
+ }>;
539
+ lamports: Struct<BN, null>;
540
+ owner: Struct<PublicKey, null>;
541
+ leafIndex: Struct<number, null>;
542
+ tree: Struct<PublicKey, null>;
543
+ seq: Struct<BN | null, null>;
544
+ slotCreated: Struct<BN, null>;
545
+ }>;
546
+ }>>;
547
+ cursor: Struct<string | null, null>;
548
+ }>;
624
549
  /**
625
550
  * @internal
626
551
  */
@@ -632,782 +557,601 @@ export declare const HealthResult: Struct<string, null>;
632
557
  /**
633
558
  * @internal
634
559
  */
635
- export declare const LatestNonVotingSignaturesResult: Struct<
636
- {
637
- items: {
638
- error: string | null;
639
- blockTime: number;
640
- signature: string;
641
- slot: number;
642
- }[];
643
- },
644
- {
645
- items: Struct<
646
- {
647
- error: string | null;
648
- blockTime: number;
649
- signature: string;
650
- slot: number;
651
- }[],
652
- Struct<
653
- {
654
- error: string | null;
655
- blockTime: number;
656
- signature: string;
657
- slot: number;
658
- },
659
- {
660
- signature: Struct<string, null>;
661
- slot: Struct<number, null>;
662
- blockTime: Struct<number, null>;
663
- error: Struct<string | null, null>;
664
- }
665
- >
666
- >;
667
- }
668
- >;
560
+ export declare const LatestNonVotingSignaturesResult: Struct<{
561
+ items: {
562
+ error: string | null;
563
+ blockTime: number;
564
+ signature: string;
565
+ slot: number;
566
+ }[];
567
+ }, {
568
+ items: Struct<{
569
+ error: string | null;
570
+ blockTime: number;
571
+ signature: string;
572
+ slot: number;
573
+ }[], Struct<{
574
+ error: string | null;
575
+ blockTime: number;
576
+ signature: string;
577
+ slot: number;
578
+ }, {
579
+ signature: Struct<string, null>;
580
+ slot: Struct<number, null>;
581
+ blockTime: Struct<number, null>;
582
+ error: Struct<string | null, null>;
583
+ }>>;
584
+ }>;
669
585
  /**
670
586
  * @internal
671
587
  */
672
- export declare const LatestNonVotingSignaturesResultPaginated: Struct<
673
- {
674
- items: {
675
- blockTime: number;
676
- signature: string;
677
- slot: number;
678
- }[];
679
- cursor: string | null;
680
- },
681
- {
682
- items: Struct<
683
- {
684
- blockTime: number;
685
- signature: string;
686
- slot: number;
687
- }[],
688
- Struct<
689
- {
690
- blockTime: number;
691
- signature: string;
692
- slot: number;
693
- },
694
- {
695
- signature: Struct<string, null>;
696
- slot: Struct<number, null>;
697
- blockTime: Struct<number, null>;
698
- }
699
- >
700
- >;
701
- cursor: Struct<string | null, null>;
702
- }
703
- >;
588
+ export declare const LatestNonVotingSignaturesResultPaginated: Struct<{
589
+ items: {
590
+ blockTime: number;
591
+ signature: string;
592
+ slot: number;
593
+ }[];
594
+ cursor: string | null;
595
+ }, {
596
+ items: Struct<{
597
+ blockTime: number;
598
+ signature: string;
599
+ slot: number;
600
+ }[], Struct<{
601
+ blockTime: number;
602
+ signature: string;
603
+ slot: number;
604
+ }, {
605
+ signature: Struct<string, null>;
606
+ slot: Struct<number, null>;
607
+ blockTime: Struct<number, null>;
608
+ }>>;
609
+ cursor: Struct<string | null, null>;
610
+ }>;
704
611
  /**
705
612
  * @internal
706
613
  */
707
- export declare const MerkeProofResult: Struct<
708
- {
709
- root: BN;
710
- hash: BN;
711
- leafIndex: number;
712
- merkleTree: PublicKey;
713
- proof: BN[];
714
- rootSeq: number;
715
- },
716
- {
717
- hash: Struct<BN, null>;
718
- leafIndex: Struct<number, null>;
719
- merkleTree: Struct<PublicKey, null>;
720
- proof: Struct<BN[], Struct<BN, null>>;
721
- rootSeq: Struct<number, null>;
722
- root: Struct<BN, null>;
723
- }
724
- >;
614
+ export declare const MerkeProofResult: Struct<{
615
+ root: BN;
616
+ hash: BN;
617
+ leafIndex: number;
618
+ merkleTree: PublicKey;
619
+ proof: BN[];
620
+ rootSeq: number;
621
+ }, {
622
+ hash: Struct<BN, null>;
623
+ leafIndex: Struct<number, null>;
624
+ merkleTree: Struct<PublicKey, null>;
625
+ proof: Struct<BN[], Struct<BN, null>>;
626
+ rootSeq: Struct<number, null>;
627
+ root: Struct<BN, null>;
628
+ }>;
725
629
  /**
726
630
  * @internal
727
631
  */
728
- export declare const NewAddressProofResult: Struct<
729
- {
730
- root: BN;
731
- address: BN;
732
- merkleTree: PublicKey;
733
- proof: BN[];
734
- rootSeq: number;
735
- nextIndex: number;
736
- lowerRangeAddress: BN;
737
- higherRangeAddress: BN;
738
- lowElementLeafIndex: number;
739
- },
740
- {
741
- address: Struct<BN, null>;
742
- nextIndex: Struct<number, null>;
743
- merkleTree: Struct<PublicKey, null>;
744
- proof: Struct<BN[], Struct<BN, null>>;
745
- rootSeq: Struct<number, null>;
746
- root: Struct<BN, null>;
747
- lowerRangeAddress: Struct<BN, null>;
748
- higherRangeAddress: Struct<BN, null>;
749
- lowElementLeafIndex: Struct<number, null>;
750
- }
751
- >;
632
+ export declare const NewAddressProofResult: Struct<{
633
+ root: BN;
634
+ address: BN;
635
+ merkleTree: PublicKey;
636
+ proof: BN[];
637
+ rootSeq: number;
638
+ nextIndex: number;
639
+ lowerRangeAddress: BN;
640
+ higherRangeAddress: BN;
641
+ lowElementLeafIndex: number;
642
+ }, {
643
+ address: Struct<BN, null>;
644
+ nextIndex: Struct<number, null>;
645
+ merkleTree: Struct<PublicKey, null>;
646
+ proof: Struct<BN[], Struct<BN, null>>;
647
+ rootSeq: Struct<number, null>;
648
+ root: Struct<BN, null>;
649
+ lowerRangeAddress: Struct<BN, null>;
650
+ higherRangeAddress: Struct<BN, null>;
651
+ lowElementLeafIndex: Struct<number, null>;
652
+ }>;
752
653
  /**
753
654
  * @internal
754
655
  */
755
- export declare const ValidityProofResult: Struct<
756
- {
757
- compressedProof: {
758
- a: number[];
759
- b: number[];
760
- c: number[];
761
- };
762
- leafIndices: number[];
763
- leaves: BN[];
764
- rootIndices: number[];
765
- roots: BN[];
766
- merkleTrees: PublicKey[];
767
- },
768
- {
769
- compressedProof: Struct<
770
- {
771
- a: number[];
772
- b: number[];
773
- c: number[];
774
- },
775
- {
776
- a: Struct<number[], Struct<number, null>>;
777
- b: Struct<number[], Struct<number, null>>;
778
- c: Struct<number[], Struct<number, null>>;
779
- }
780
- >;
781
- leafIndices: Struct<number[], Struct<number, null>>;
782
- leaves: Struct<BN[], Struct<BN, null>>;
783
- rootIndices: Struct<number[], Struct<number, null>>;
784
- roots: Struct<BN[], Struct<BN, null>>;
785
- merkleTrees: Struct<PublicKey[], Struct<PublicKey, null>>;
786
- }
787
- >;
656
+ export declare const ValidityProofResult: Struct<{
657
+ compressedProof: {
658
+ a: number[];
659
+ c: number[];
660
+ b: number[];
661
+ };
662
+ leafIndices: number[];
663
+ leaves: BN[];
664
+ rootIndices: number[];
665
+ roots: BN[];
666
+ merkleTrees: PublicKey[];
667
+ }, {
668
+ compressedProof: Struct<{
669
+ a: number[];
670
+ c: number[];
671
+ b: number[];
672
+ }, {
673
+ a: Struct<number[], Struct<number, null>>;
674
+ b: Struct<number[], Struct<number, null>>;
675
+ c: Struct<number[], Struct<number, null>>;
676
+ }>;
677
+ leafIndices: Struct<number[], Struct<number, null>>;
678
+ leaves: Struct<BN[], Struct<BN, null>>;
679
+ rootIndices: Struct<number[], Struct<number, null>>;
680
+ roots: Struct<BN[], Struct<BN, null>>;
681
+ merkleTrees: Struct<PublicKey[], Struct<PublicKey, null>>;
682
+ }>;
788
683
  /**
789
684
  * @internal
790
685
  */
791
- export declare const MultipleMerkleProofsResult: Struct<
792
- {
793
- root: BN;
794
- hash: BN;
795
- leafIndex: number;
796
- merkleTree: PublicKey;
797
- proof: BN[];
798
- rootSeq: number;
799
- }[],
800
- Struct<
801
- {
802
- root: BN;
803
- hash: BN;
804
- leafIndex: number;
805
- merkleTree: PublicKey;
806
- proof: BN[];
807
- rootSeq: number;
808
- },
809
- {
810
- hash: Struct<BN, null>;
811
- leafIndex: Struct<number, null>;
812
- merkleTree: Struct<PublicKey, null>;
813
- proof: Struct<BN[], Struct<BN, null>>;
814
- rootSeq: Struct<number, null>;
815
- root: Struct<BN, null>;
816
- }
817
- >
818
- >;
686
+ export declare const MultipleMerkleProofsResult: Struct<{
687
+ root: BN;
688
+ hash: BN;
689
+ leafIndex: number;
690
+ merkleTree: PublicKey;
691
+ proof: BN[];
692
+ rootSeq: number;
693
+ }[], Struct<{
694
+ root: BN;
695
+ hash: BN;
696
+ leafIndex: number;
697
+ merkleTree: PublicKey;
698
+ proof: BN[];
699
+ rootSeq: number;
700
+ }, {
701
+ hash: Struct<BN, null>;
702
+ leafIndex: Struct<number, null>;
703
+ merkleTree: Struct<PublicKey, null>;
704
+ proof: Struct<BN[], Struct<BN, null>>;
705
+ rootSeq: Struct<number, null>;
706
+ root: Struct<BN, null>;
707
+ }>>;
819
708
  /**
820
709
  * @internal
821
710
  */
822
- export declare const BalanceResult: Struct<
823
- {
824
- amount: BN;
825
- },
826
- {
827
- amount: Struct<BN, null>;
828
- }
829
- >;
711
+ export declare const BalanceResult: Struct<{
712
+ amount: BN;
713
+ }, {
714
+ amount: Struct<BN, null>;
715
+ }>;
830
716
  export declare const NativeBalanceResult: Struct<BN, null>;
831
- export declare const TokenBalanceResult: Struct<
832
- {
717
+ export declare const TokenBalanceResult: Struct<{
718
+ mint: PublicKey;
719
+ balance: BN;
720
+ }, {
721
+ balance: Struct<BN, null>;
722
+ mint: Struct<PublicKey, null>;
723
+ }>;
724
+ export declare const TokenBalanceListResult: Struct<{
725
+ cursor: string | null;
726
+ tokenBalances: {
833
727
  mint: PublicKey;
834
728
  balance: BN;
835
- },
836
- {
729
+ }[];
730
+ }, {
731
+ tokenBalances: Struct<{
732
+ mint: PublicKey;
733
+ balance: BN;
734
+ }[], Struct<{
735
+ mint: PublicKey;
736
+ balance: BN;
737
+ }, {
837
738
  balance: Struct<BN, null>;
838
739
  mint: Struct<PublicKey, null>;
839
- }
840
- >;
841
- export declare const TokenBalanceListResult: Struct<
842
- {
843
- cursor: string | null;
844
- tokenBalances: {
845
- mint: PublicKey;
846
- balance: BN;
847
- }[];
848
- },
849
- {
850
- tokenBalances: Struct<
851
- {
740
+ }>>;
741
+ cursor: Struct<string | null, null>;
742
+ }>;
743
+ export declare const TokenBalanceListResultV2: Struct<{
744
+ items: {
745
+ mint: PublicKey;
746
+ balance: BN;
747
+ }[];
748
+ cursor: string | null;
749
+ }, {
750
+ items: Struct<{
751
+ mint: PublicKey;
752
+ balance: BN;
753
+ }[], Struct<{
754
+ mint: PublicKey;
755
+ balance: BN;
756
+ }, {
757
+ balance: Struct<BN, null>;
758
+ mint: Struct<PublicKey, null>;
759
+ }>>;
760
+ cursor: Struct<string | null, null>;
761
+ }>;
762
+ export declare const CompressedMintTokenHoldersResult: Struct<{
763
+ items: {
764
+ owner: PublicKey;
765
+ balance: BN;
766
+ }[];
767
+ cursor: string | null;
768
+ }, {
769
+ cursor: Struct<string | null, null>;
770
+ items: Struct<{
771
+ owner: PublicKey;
772
+ balance: BN;
773
+ }[], Struct<{
774
+ owner: PublicKey;
775
+ balance: BN;
776
+ }, {
777
+ balance: Struct<BN, null>;
778
+ owner: Struct<PublicKey, null>;
779
+ }>>;
780
+ }>;
781
+ export declare const AccountProofResult: Struct<{
782
+ root: number[];
783
+ hash: number[];
784
+ proof: number[][];
785
+ }, {
786
+ hash: Struct<number[], Struct<number, null>>;
787
+ root: Struct<number[], Struct<number, null>>;
788
+ proof: Struct<number[][], Struct<number[], Struct<number, null>>>;
789
+ }>;
790
+ export declare const toUnixTimestamp: (blockTime: string) => number;
791
+ export declare const SignatureListResult: Struct<{
792
+ items: {
793
+ blockTime: number;
794
+ signature: string;
795
+ slot: number;
796
+ }[];
797
+ }, {
798
+ items: Struct<{
799
+ blockTime: number;
800
+ signature: string;
801
+ slot: number;
802
+ }[], Struct<{
803
+ blockTime: number;
804
+ signature: string;
805
+ slot: number;
806
+ }, {
807
+ blockTime: Struct<number, null>;
808
+ signature: Struct<string, null>;
809
+ slot: Struct<number, null>;
810
+ }>>;
811
+ }>;
812
+ export declare const SignatureListWithCursorResult: Struct<{
813
+ items: {
814
+ blockTime: number;
815
+ signature: string;
816
+ slot: number;
817
+ }[];
818
+ cursor: string | null;
819
+ }, {
820
+ items: Struct<{
821
+ blockTime: number;
822
+ signature: string;
823
+ slot: number;
824
+ }[], Struct<{
825
+ blockTime: number;
826
+ signature: string;
827
+ slot: number;
828
+ }, {
829
+ blockTime: Struct<number, null>;
830
+ signature: Struct<string, null>;
831
+ slot: Struct<number, null>;
832
+ }>>;
833
+ cursor: Struct<string | null, null>;
834
+ }>;
835
+ export declare const CompressedTransactionResult: Struct<{
836
+ compressionInfo: {
837
+ closedAccounts: {
838
+ account: {
839
+ data: {
840
+ data: string;
841
+ dataHash: BN;
842
+ discriminator: BN;
843
+ } | null;
844
+ lamports: BN;
845
+ address: number[] | null;
846
+ hash: BN;
847
+ owner: PublicKey;
848
+ leafIndex: number;
849
+ tree: PublicKey;
850
+ seq: BN | null;
851
+ slotCreated: BN;
852
+ };
853
+ optionalTokenData: {
854
+ owner: PublicKey;
852
855
  mint: PublicKey;
853
- balance: BN;
854
- }[],
855
- Struct<
856
- {
857
- mint: PublicKey;
858
- balance: BN;
859
- },
860
- {
861
- balance: Struct<BN, null>;
862
- mint: Struct<PublicKey, null>;
863
- }
864
- >
865
- >;
866
- cursor: Struct<string | null, null>;
867
- }
868
- >;
869
- export declare const TokenBalanceListResultV2: Struct<
870
- {
871
- items: {
872
- mint: PublicKey;
873
- balance: BN;
856
+ amount: BN;
857
+ delegate: PublicKey | null;
858
+ state: string;
859
+ } | null;
874
860
  }[];
875
- cursor: string | null;
876
- },
877
- {
878
- items: Struct<
879
- {
861
+ openedAccounts: {
862
+ account: {
863
+ data: {
864
+ data: string;
865
+ dataHash: BN;
866
+ discriminator: BN;
867
+ } | null;
868
+ lamports: BN;
869
+ address: number[] | null;
870
+ hash: BN;
871
+ owner: PublicKey;
872
+ leafIndex: number;
873
+ tree: PublicKey;
874
+ seq: BN | null;
875
+ slotCreated: BN;
876
+ };
877
+ optionalTokenData: {
878
+ owner: PublicKey;
880
879
  mint: PublicKey;
881
- balance: BN;
882
- }[],
883
- Struct<
884
- {
885
- mint: PublicKey;
886
- balance: BN;
887
- },
888
- {
889
- balance: Struct<BN, null>;
890
- mint: Struct<PublicKey, null>;
891
- }
892
- >
893
- >;
894
- cursor: Struct<string | null, null>;
895
- }
896
- >;
897
- export declare const CompressedMintTokenHoldersResult: Struct<
898
- {
899
- items: {
900
- owner: PublicKey;
901
- balance: BN;
880
+ amount: BN;
881
+ delegate: PublicKey | null;
882
+ state: string;
883
+ } | null;
902
884
  }[];
903
- cursor: string | null;
904
- },
905
- {
906
- cursor: Struct<string | null, null>;
907
- items: Struct<
908
- {
885
+ };
886
+ transaction?: any;
887
+ }, {
888
+ compressionInfo: Struct<{
889
+ closedAccounts: {
890
+ account: {
891
+ data: {
892
+ data: string;
893
+ dataHash: BN;
894
+ discriminator: BN;
895
+ } | null;
896
+ lamports: BN;
897
+ address: number[] | null;
898
+ hash: BN;
909
899
  owner: PublicKey;
910
- balance: BN;
911
- }[],
912
- Struct<
913
- {
914
- owner: PublicKey;
915
- balance: BN;
916
- },
917
- {
918
- balance: Struct<BN, null>;
919
- owner: Struct<PublicKey, null>;
920
- }
921
- >
922
- >;
923
- }
924
- >;
925
- export declare const AccountProofResult: Struct<
926
- {
927
- root: number[];
928
- hash: number[];
929
- proof: number[][];
930
- },
931
- {
932
- hash: Struct<number[], Struct<number, null>>;
933
- root: Struct<number[], Struct<number, null>>;
934
- proof: Struct<number[][], Struct<number[], Struct<number, null>>>;
935
- }
936
- >;
937
- export declare const toUnixTimestamp: (blockTime: string) => number;
938
- export declare const SignatureListResult: Struct<
939
- {
940
- items: {
941
- blockTime: number;
942
- signature: string;
943
- slot: number;
900
+ leafIndex: number;
901
+ tree: PublicKey;
902
+ seq: BN | null;
903
+ slotCreated: BN;
904
+ };
905
+ optionalTokenData: {
906
+ owner: PublicKey;
907
+ mint: PublicKey;
908
+ amount: BN;
909
+ delegate: PublicKey | null;
910
+ state: string;
911
+ } | null;
944
912
  }[];
945
- },
946
- {
947
- items: Struct<
948
- {
949
- blockTime: number;
950
- signature: string;
951
- slot: number;
952
- }[],
953
- Struct<
954
- {
955
- blockTime: number;
956
- signature: string;
957
- slot: number;
958
- },
959
- {
960
- blockTime: Struct<number, null>;
961
- signature: Struct<string, null>;
962
- slot: Struct<number, null>;
963
- }
964
- >
965
- >;
966
- }
967
- >;
968
- export declare const SignatureListWithCursorResult: Struct<
969
- {
970
- items: {
971
- blockTime: number;
972
- signature: string;
973
- slot: number;
913
+ openedAccounts: {
914
+ account: {
915
+ data: {
916
+ data: string;
917
+ dataHash: BN;
918
+ discriminator: BN;
919
+ } | null;
920
+ lamports: BN;
921
+ address: number[] | null;
922
+ hash: BN;
923
+ owner: PublicKey;
924
+ leafIndex: number;
925
+ tree: PublicKey;
926
+ seq: BN | null;
927
+ slotCreated: BN;
928
+ };
929
+ optionalTokenData: {
930
+ owner: PublicKey;
931
+ mint: PublicKey;
932
+ amount: BN;
933
+ delegate: PublicKey | null;
934
+ state: string;
935
+ } | null;
974
936
  }[];
975
- cursor: string | null;
976
- },
977
- {
978
- items: Struct<
979
- {
980
- blockTime: number;
981
- signature: string;
982
- slot: number;
983
- }[],
984
- Struct<
985
- {
986
- blockTime: number;
987
- signature: string;
988
- slot: number;
989
- },
990
- {
991
- blockTime: Struct<number, null>;
992
- signature: Struct<string, null>;
993
- slot: Struct<number, null>;
994
- }
995
- >
996
- >;
997
- cursor: Struct<string | null, null>;
998
- }
999
- >;
1000
- export declare const CompressedTransactionResult: Struct<
1001
- {
1002
- compressionInfo: {
1003
- closedAccounts: {
1004
- account: {
1005
- data: {
1006
- data: string;
1007
- dataHash: BN;
1008
- discriminator: BN;
1009
- } | null;
1010
- lamports: BN;
1011
- address: number[] | null;
1012
- hash: BN;
1013
- owner: PublicKey;
1014
- leafIndex: number;
1015
- tree: PublicKey;
1016
- seq: BN | null;
1017
- slotCreated: BN;
1018
- };
1019
- optionalTokenData: {
1020
- owner: PublicKey;
1021
- mint: PublicKey;
1022
- amount: BN;
1023
- delegate: PublicKey | null;
1024
- state: string;
937
+ }, {
938
+ closedAccounts: Struct<{
939
+ account: {
940
+ data: {
941
+ data: string;
942
+ dataHash: BN;
943
+ discriminator: BN;
944
+ } | null;
945
+ lamports: BN;
946
+ address: number[] | null;
947
+ hash: BN;
948
+ owner: PublicKey;
949
+ leafIndex: number;
950
+ tree: PublicKey;
951
+ seq: BN | null;
952
+ slotCreated: BN;
953
+ };
954
+ optionalTokenData: {
955
+ owner: PublicKey;
956
+ mint: PublicKey;
957
+ amount: BN;
958
+ delegate: PublicKey | null;
959
+ state: string;
960
+ } | null;
961
+ }[], Struct<{
962
+ account: {
963
+ data: {
964
+ data: string;
965
+ dataHash: BN;
966
+ discriminator: BN;
1025
967
  } | null;
1026
- }[];
1027
- openedAccounts: {
1028
- account: {
1029
- data: {
1030
- data: string;
1031
- dataHash: BN;
1032
- discriminator: BN;
1033
- } | null;
1034
- lamports: BN;
1035
- address: number[] | null;
1036
- hash: BN;
1037
- owner: PublicKey;
1038
- leafIndex: number;
1039
- tree: PublicKey;
1040
- seq: BN | null;
1041
- slotCreated: BN;
1042
- };
1043
- optionalTokenData: {
1044
- owner: PublicKey;
1045
- mint: PublicKey;
1046
- amount: BN;
1047
- delegate: PublicKey | null;
1048
- state: string;
968
+ lamports: BN;
969
+ address: number[] | null;
970
+ hash: BN;
971
+ owner: PublicKey;
972
+ leafIndex: number;
973
+ tree: PublicKey;
974
+ seq: BN | null;
975
+ slotCreated: BN;
976
+ };
977
+ optionalTokenData: {
978
+ owner: PublicKey;
979
+ mint: PublicKey;
980
+ amount: BN;
981
+ delegate: PublicKey | null;
982
+ state: string;
983
+ } | null;
984
+ }, {
985
+ account: Struct<{
986
+ data: {
987
+ data: string;
988
+ dataHash: BN;
989
+ discriminator: BN;
1049
990
  } | null;
1050
- }[];
1051
- };
1052
- transaction?: any;
1053
- },
1054
- {
1055
- compressionInfo: Struct<
1056
- {
1057
- closedAccounts: {
1058
- account: {
1059
- data: {
1060
- data: string;
1061
- dataHash: BN;
1062
- discriminator: BN;
1063
- } | null;
1064
- lamports: BN;
1065
- address: number[] | null;
1066
- hash: BN;
1067
- owner: PublicKey;
1068
- leafIndex: number;
1069
- tree: PublicKey;
1070
- seq: BN | null;
1071
- slotCreated: BN;
1072
- };
1073
- optionalTokenData: {
1074
- owner: PublicKey;
1075
- mint: PublicKey;
1076
- amount: BN;
1077
- delegate: PublicKey | null;
1078
- state: string;
1079
- } | null;
1080
- }[];
1081
- openedAccounts: {
1082
- account: {
1083
- data: {
1084
- data: string;
1085
- dataHash: BN;
1086
- discriminator: BN;
1087
- } | null;
1088
- lamports: BN;
1089
- address: number[] | null;
1090
- hash: BN;
1091
- owner: PublicKey;
1092
- leafIndex: number;
1093
- tree: PublicKey;
1094
- seq: BN | null;
1095
- slotCreated: BN;
1096
- };
1097
- optionalTokenData: {
1098
- owner: PublicKey;
1099
- mint: PublicKey;
1100
- amount: BN;
1101
- delegate: PublicKey | null;
1102
- state: string;
1103
- } | null;
1104
- }[];
1105
- },
1106
- {
1107
- closedAccounts: Struct<
1108
- {
1109
- account: {
1110
- data: {
1111
- data: string;
1112
- dataHash: BN;
1113
- discriminator: BN;
1114
- } | null;
1115
- lamports: BN;
1116
- address: number[] | null;
1117
- hash: BN;
1118
- owner: PublicKey;
1119
- leafIndex: number;
1120
- tree: PublicKey;
1121
- seq: BN | null;
1122
- slotCreated: BN;
1123
- };
1124
- optionalTokenData: {
1125
- owner: PublicKey;
1126
- mint: PublicKey;
1127
- amount: BN;
1128
- delegate: PublicKey | null;
1129
- state: string;
1130
- } | null;
1131
- }[],
1132
- Struct<
1133
- {
1134
- account: {
1135
- data: {
1136
- data: string;
1137
- dataHash: BN;
1138
- discriminator: BN;
1139
- } | null;
1140
- lamports: BN;
1141
- address: number[] | null;
1142
- hash: BN;
1143
- owner: PublicKey;
1144
- leafIndex: number;
1145
- tree: PublicKey;
1146
- seq: BN | null;
1147
- slotCreated: BN;
1148
- };
1149
- optionalTokenData: {
1150
- owner: PublicKey;
1151
- mint: PublicKey;
1152
- amount: BN;
1153
- delegate: PublicKey | null;
1154
- state: string;
1155
- } | null;
1156
- },
1157
- {
1158
- account: Struct<
1159
- {
1160
- data: {
1161
- data: string;
1162
- dataHash: BN;
1163
- discriminator: BN;
1164
- } | null;
1165
- lamports: BN;
1166
- address: number[] | null;
1167
- hash: BN;
1168
- owner: PublicKey;
1169
- leafIndex: number;
1170
- tree: PublicKey;
1171
- seq: BN | null;
1172
- slotCreated: BN;
1173
- },
1174
- {
1175
- address: Struct<number[] | null, null>;
1176
- hash: Struct<BN, null>;
1177
- data: Struct<
1178
- {
1179
- data: string;
1180
- dataHash: BN;
1181
- discriminator: BN;
1182
- } | null,
1183
- {
1184
- data: Struct<string, null>;
1185
- dataHash: Struct<BN, null>;
1186
- discriminator: Struct<BN, null>;
1187
- }
1188
- >;
1189
- lamports: Struct<BN, null>;
1190
- owner: Struct<PublicKey, null>;
1191
- leafIndex: Struct<number, null>;
1192
- tree: Struct<PublicKey, null>;
1193
- seq: Struct<BN | null, null>;
1194
- slotCreated: Struct<BN, null>;
1195
- }
1196
- >;
1197
- optionalTokenData: Struct<
1198
- {
1199
- owner: PublicKey;
1200
- mint: PublicKey;
1201
- amount: BN;
1202
- delegate: PublicKey | null;
1203
- state: string;
1204
- } | null,
1205
- {
1206
- mint: Struct<PublicKey, null>;
1207
- owner: Struct<PublicKey, null>;
1208
- amount: Struct<BN, null>;
1209
- delegate: Struct<PublicKey | null, null>;
1210
- state: Struct<string, null>;
1211
- }
1212
- >;
1213
- }
1214
- >
1215
- >;
1216
- openedAccounts: Struct<
1217
- {
1218
- account: {
1219
- data: {
1220
- data: string;
1221
- dataHash: BN;
1222
- discriminator: BN;
1223
- } | null;
1224
- lamports: BN;
1225
- address: number[] | null;
1226
- hash: BN;
1227
- owner: PublicKey;
1228
- leafIndex: number;
1229
- tree: PublicKey;
1230
- seq: BN | null;
1231
- slotCreated: BN;
1232
- };
1233
- optionalTokenData: {
1234
- owner: PublicKey;
1235
- mint: PublicKey;
1236
- amount: BN;
1237
- delegate: PublicKey | null;
1238
- state: string;
1239
- } | null;
1240
- }[],
1241
- Struct<
1242
- {
1243
- account: {
1244
- data: {
1245
- data: string;
1246
- dataHash: BN;
1247
- discriminator: BN;
1248
- } | null;
1249
- lamports: BN;
1250
- address: number[] | null;
1251
- hash: BN;
1252
- owner: PublicKey;
1253
- leafIndex: number;
1254
- tree: PublicKey;
1255
- seq: BN | null;
1256
- slotCreated: BN;
1257
- };
1258
- optionalTokenData: {
1259
- owner: PublicKey;
1260
- mint: PublicKey;
1261
- amount: BN;
1262
- delegate: PublicKey | null;
1263
- state: string;
1264
- } | null;
1265
- },
1266
- {
1267
- account: Struct<
1268
- {
1269
- data: {
1270
- data: string;
1271
- dataHash: BN;
1272
- discriminator: BN;
1273
- } | null;
1274
- lamports: BN;
1275
- address: number[] | null;
1276
- hash: BN;
1277
- owner: PublicKey;
1278
- leafIndex: number;
1279
- tree: PublicKey;
1280
- seq: BN | null;
1281
- slotCreated: BN;
1282
- },
1283
- {
1284
- address: Struct<number[] | null, null>;
1285
- hash: Struct<BN, null>;
1286
- data: Struct<
1287
- {
1288
- data: string;
1289
- dataHash: BN;
1290
- discriminator: BN;
1291
- } | null,
1292
- {
1293
- data: Struct<string, null>;
1294
- dataHash: Struct<BN, null>;
1295
- discriminator: Struct<BN, null>;
1296
- }
1297
- >;
1298
- lamports: Struct<BN, null>;
1299
- owner: Struct<PublicKey, null>;
1300
- leafIndex: Struct<number, null>;
1301
- tree: Struct<PublicKey, null>;
1302
- seq: Struct<BN | null, null>;
1303
- slotCreated: Struct<BN, null>;
1304
- }
1305
- >;
1306
- optionalTokenData: Struct<
1307
- {
1308
- owner: PublicKey;
1309
- mint: PublicKey;
1310
- amount: BN;
1311
- delegate: PublicKey | null;
1312
- state: string;
1313
- } | null,
1314
- {
1315
- mint: Struct<PublicKey, null>;
1316
- owner: Struct<PublicKey, null>;
1317
- amount: Struct<BN, null>;
1318
- delegate: Struct<PublicKey | null, null>;
1319
- state: Struct<string, null>;
1320
- }
1321
- >;
1322
- }
1323
- >
1324
- >;
1325
- }
1326
- >;
1327
- transaction: Struct<any, null>;
1328
- }
1329
- >;
991
+ lamports: BN;
992
+ address: number[] | null;
993
+ hash: BN;
994
+ owner: PublicKey;
995
+ leafIndex: number;
996
+ tree: PublicKey;
997
+ seq: BN | null;
998
+ slotCreated: BN;
999
+ }, {
1000
+ address: Struct<number[] | null, null>;
1001
+ hash: Struct<BN, null>;
1002
+ data: Struct<{
1003
+ data: string;
1004
+ dataHash: BN;
1005
+ discriminator: BN;
1006
+ } | null, {
1007
+ data: Struct<string, null>;
1008
+ dataHash: Struct<BN, null>;
1009
+ discriminator: Struct<BN, null>;
1010
+ }>;
1011
+ lamports: Struct<BN, null>;
1012
+ owner: Struct<PublicKey, null>;
1013
+ leafIndex: Struct<number, null>;
1014
+ tree: Struct<PublicKey, null>;
1015
+ seq: Struct<BN | null, null>;
1016
+ slotCreated: Struct<BN, null>;
1017
+ }>;
1018
+ optionalTokenData: Struct<{
1019
+ owner: PublicKey;
1020
+ mint: PublicKey;
1021
+ amount: BN;
1022
+ delegate: PublicKey | null;
1023
+ state: string;
1024
+ } | null, {
1025
+ mint: Struct<PublicKey, null>;
1026
+ owner: Struct<PublicKey, null>;
1027
+ amount: Struct<BN, null>;
1028
+ delegate: Struct<PublicKey | null, null>;
1029
+ state: Struct<string, null>;
1030
+ }>;
1031
+ }>>;
1032
+ openedAccounts: Struct<{
1033
+ account: {
1034
+ data: {
1035
+ data: string;
1036
+ dataHash: BN;
1037
+ discriminator: BN;
1038
+ } | null;
1039
+ lamports: BN;
1040
+ address: number[] | null;
1041
+ hash: BN;
1042
+ owner: PublicKey;
1043
+ leafIndex: number;
1044
+ tree: PublicKey;
1045
+ seq: BN | null;
1046
+ slotCreated: BN;
1047
+ };
1048
+ optionalTokenData: {
1049
+ owner: PublicKey;
1050
+ mint: PublicKey;
1051
+ amount: BN;
1052
+ delegate: PublicKey | null;
1053
+ state: string;
1054
+ } | null;
1055
+ }[], Struct<{
1056
+ account: {
1057
+ data: {
1058
+ data: string;
1059
+ dataHash: BN;
1060
+ discriminator: BN;
1061
+ } | null;
1062
+ lamports: BN;
1063
+ address: number[] | null;
1064
+ hash: BN;
1065
+ owner: PublicKey;
1066
+ leafIndex: number;
1067
+ tree: PublicKey;
1068
+ seq: BN | null;
1069
+ slotCreated: BN;
1070
+ };
1071
+ optionalTokenData: {
1072
+ owner: PublicKey;
1073
+ mint: PublicKey;
1074
+ amount: BN;
1075
+ delegate: PublicKey | null;
1076
+ state: string;
1077
+ } | null;
1078
+ }, {
1079
+ account: Struct<{
1080
+ data: {
1081
+ data: string;
1082
+ dataHash: BN;
1083
+ discriminator: BN;
1084
+ } | null;
1085
+ lamports: BN;
1086
+ address: number[] | null;
1087
+ hash: BN;
1088
+ owner: PublicKey;
1089
+ leafIndex: number;
1090
+ tree: PublicKey;
1091
+ seq: BN | null;
1092
+ slotCreated: BN;
1093
+ }, {
1094
+ address: Struct<number[] | null, null>;
1095
+ hash: Struct<BN, null>;
1096
+ data: Struct<{
1097
+ data: string;
1098
+ dataHash: BN;
1099
+ discriminator: BN;
1100
+ } | null, {
1101
+ data: Struct<string, null>;
1102
+ dataHash: Struct<BN, null>;
1103
+ discriminator: Struct<BN, null>;
1104
+ }>;
1105
+ lamports: Struct<BN, null>;
1106
+ owner: Struct<PublicKey, null>;
1107
+ leafIndex: Struct<number, null>;
1108
+ tree: Struct<PublicKey, null>;
1109
+ seq: Struct<BN | null, null>;
1110
+ slotCreated: Struct<BN, null>;
1111
+ }>;
1112
+ optionalTokenData: Struct<{
1113
+ owner: PublicKey;
1114
+ mint: PublicKey;
1115
+ amount: BN;
1116
+ delegate: PublicKey | null;
1117
+ state: string;
1118
+ } | null, {
1119
+ mint: Struct<PublicKey, null>;
1120
+ owner: Struct<PublicKey, null>;
1121
+ amount: Struct<BN, null>;
1122
+ delegate: Struct<PublicKey | null, null>;
1123
+ state: Struct<string, null>;
1124
+ }>;
1125
+ }>>;
1126
+ }>;
1127
+ transaction: Struct<any, null>;
1128
+ }>;
1330
1129
  export interface CompressionApiInterface {
1331
- getCompressedAccount(
1332
- address?: BN254,
1333
- hash?: BN254,
1334
- ): Promise<CompressedAccountWithMerkleContext | null>;
1130
+ getCompressedAccount(address?: BN254, hash?: BN254): Promise<CompressedAccountWithMerkleContext | null>;
1335
1131
  getCompressedBalance(address?: BN254, hash?: BN254): Promise<BN | null>;
1336
1132
  getCompressedBalanceByOwner(owner: PublicKey): Promise<BN>;
1337
- getCompressedAccountProof(
1338
- hash: BN254,
1339
- ): Promise<MerkleContextWithMerkleProof>;
1340
- getMultipleCompressedAccounts(
1341
- hashes: BN254[],
1342
- ): Promise<CompressedAccountWithMerkleContext[]>;
1343
- getMultipleCompressedAccountProofs(
1344
- hashes: BN254[],
1345
- ): Promise<MerkleContextWithMerkleProof[]>;
1346
- getValidityProof(
1347
- hashes: BN254[],
1348
- newAddresses: BN254[],
1349
- ): Promise<CompressedProofWithContext>;
1350
- getValidityProofV0(
1351
- hashes: HashWithTree[],
1352
- newAddresses: AddressWithTree[],
1353
- ): Promise<CompressedProofWithContext>;
1354
- getValidityProofAndRpcContext(
1355
- hashes: HashWithTree[],
1356
- newAddresses: AddressWithTree[],
1357
- ): Promise<WithContext<CompressedProofWithContext>>;
1358
- getCompressedAccountsByOwner(
1359
- owner: PublicKey,
1360
- config?: GetCompressedAccountsByOwnerConfig,
1361
- ): Promise<WithCursor<CompressedAccountWithMerkleContext[]>>;
1362
- getCompressedMintTokenHolders(
1363
- mint: PublicKey,
1364
- options?: PaginatedOptions,
1365
- ): Promise<WithContext<WithCursor<CompressedMintTokenHolders[]>>>;
1366
- getCompressedTokenAccountsByOwner(
1367
- publicKey: PublicKey,
1368
- options: GetCompressedTokenAccountsByOwnerOrDelegateOptions,
1369
- ): Promise<WithCursor<ParsedTokenAccount[]>>;
1370
- getCompressedTokenAccountsByDelegate(
1371
- delegate: PublicKey,
1372
- options: GetCompressedTokenAccountsByOwnerOrDelegateOptions,
1373
- ): Promise<WithCursor<ParsedTokenAccount[]>>;
1133
+ getCompressedAccountProof(hash: BN254): Promise<MerkleContextWithMerkleProof>;
1134
+ getMultipleCompressedAccounts(hashes: BN254[]): Promise<CompressedAccountWithMerkleContext[]>;
1135
+ getMultipleCompressedAccountProofs(hashes: BN254[]): Promise<MerkleContextWithMerkleProof[]>;
1136
+ getValidityProof(hashes: BN254[], newAddresses: BN254[]): Promise<CompressedProofWithContext>;
1137
+ getValidityProofV0(hashes: HashWithTree[], newAddresses: AddressWithTree[]): Promise<CompressedProofWithContext>;
1138
+ getValidityProofAndRpcContext(hashes: HashWithTree[], newAddresses: AddressWithTree[]): Promise<WithContext<CompressedProofWithContext>>;
1139
+ getCompressedAccountsByOwner(owner: PublicKey, config?: GetCompressedAccountsByOwnerConfig): Promise<WithCursor<CompressedAccountWithMerkleContext[]>>;
1140
+ getCompressedMintTokenHolders(mint: PublicKey, options?: PaginatedOptions): Promise<WithContext<WithCursor<CompressedMintTokenHolders[]>>>;
1141
+ getCompressedTokenAccountsByOwner(publicKey: PublicKey, options: GetCompressedTokenAccountsByOwnerOrDelegateOptions): Promise<WithCursor<ParsedTokenAccount[]>>;
1142
+ getCompressedTokenAccountsByDelegate(delegate: PublicKey, options: GetCompressedTokenAccountsByOwnerOrDelegateOptions): Promise<WithCursor<ParsedTokenAccount[]>>;
1374
1143
  getCompressedTokenAccountBalance(hash: BN254): Promise<{
1375
1144
  amount: BN;
1376
1145
  }>;
1377
- getCompressedTokenBalancesByOwner(
1378
- publicKey: PublicKey,
1379
- options: GetCompressedTokenAccountsByOwnerOrDelegateOptions,
1380
- ): Promise<WithCursor<TokenBalance[]>>;
1381
- getCompressedTokenBalancesByOwnerV2(
1382
- publicKey: PublicKey,
1383
- options: GetCompressedTokenAccountsByOwnerOrDelegateOptions,
1384
- ): Promise<WithContext<WithCursor<TokenBalance[]>>>;
1385
- getTransactionWithCompressionInfo(
1386
- signature: string,
1387
- ): Promise<CompressedTransaction | null>;
1388
- getCompressionSignaturesForAccount(
1389
- hash: BN254,
1390
- ): Promise<SignatureWithMetadata[]>;
1391
- getCompressionSignaturesForAddress(
1392
- address: PublicKey,
1393
- options?: PaginatedOptions,
1394
- ): Promise<WithCursor<SignatureWithMetadata[]>>;
1395
- getCompressionSignaturesForOwner(
1396
- owner: PublicKey,
1397
- options?: PaginatedOptions,
1398
- ): Promise<WithCursor<SignatureWithMetadata[]>>;
1399
- getCompressionSignaturesForTokenOwner(
1400
- owner: PublicKey,
1401
- options?: PaginatedOptions,
1402
- ): Promise<WithCursor<SignatureWithMetadata[]>>;
1403
- getLatestNonVotingSignatures(
1404
- limit?: number,
1405
- cursor?: string,
1406
- ): Promise<LatestNonVotingSignatures>;
1407
- getLatestCompressionSignatures(
1408
- cursor?: string,
1409
- limit?: number,
1410
- ): Promise<LatestNonVotingSignaturesPaginated>;
1146
+ getCompressedTokenBalancesByOwner(publicKey: PublicKey, options: GetCompressedTokenAccountsByOwnerOrDelegateOptions): Promise<WithCursor<TokenBalance[]>>;
1147
+ getCompressedTokenBalancesByOwnerV2(publicKey: PublicKey, options: GetCompressedTokenAccountsByOwnerOrDelegateOptions): Promise<WithContext<WithCursor<TokenBalance[]>>>;
1148
+ getTransactionWithCompressionInfo(signature: string): Promise<CompressedTransaction | null>;
1149
+ getCompressionSignaturesForAccount(hash: BN254): Promise<SignatureWithMetadata[]>;
1150
+ getCompressionSignaturesForAddress(address: PublicKey, options?: PaginatedOptions): Promise<WithCursor<SignatureWithMetadata[]>>;
1151
+ getCompressionSignaturesForOwner(owner: PublicKey, options?: PaginatedOptions): Promise<WithCursor<SignatureWithMetadata[]>>;
1152
+ getCompressionSignaturesForTokenOwner(owner: PublicKey, options?: PaginatedOptions): Promise<WithCursor<SignatureWithMetadata[]>>;
1153
+ getLatestNonVotingSignatures(limit?: number, cursor?: string): Promise<LatestNonVotingSignatures>;
1154
+ getLatestCompressionSignatures(cursor?: string, limit?: number): Promise<LatestNonVotingSignaturesPaginated>;
1411
1155
  getIndexerHealth(): Promise<string>;
1412
1156
  getIndexerSlot(): Promise<number>;
1413
1157
  }