@lightprotocol/stateless.js 0.16.0 → 0.17.1

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 (113) 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 +7 -14
  7. package/dist/cjs/browser/errors.d.ts +49 -40
  8. package/dist/cjs/browser/idls/account_compression.d.ts +56 -56
  9. package/dist/cjs/browser/idls/index.d.ts +4 -22
  10. package/dist/cjs/browser/idls/light_compressed_token.d.ts +209 -89
  11. package/dist/cjs/browser/idls/light_registry.d.ts +60 -60
  12. package/dist/cjs/browser/idls/light_system_program.d.ts +55 -55
  13. package/dist/cjs/browser/index.cjs +3223 -4792
  14. package/dist/cjs/browser/index.cjs.map +1 -1
  15. package/dist/cjs/browser/instruction/pack-compressed-accounts.d.ts +5 -24
  16. package/dist/cjs/browser/programs/system.d.ts +10 -61
  17. package/dist/cjs/browser/rpc-interface.d.ts +871 -1127
  18. package/dist/cjs/browser/rpc.d.ts +31 -143
  19. package/dist/cjs/browser/state/BN254.d.ts +2 -9
  20. package/dist/cjs/browser/state/compressed-account.d.ts +6 -23
  21. package/dist/cjs/browser/test-helpers/merkle-tree/indexed-array.d.ts +4 -18
  22. package/dist/cjs/browser/test-helpers/merkle-tree/merkle-tree.d.ts +6 -19
  23. package/dist/cjs/browser/test-helpers/test-rpc/get-compressed-accounts.d.ts +3 -12
  24. package/dist/cjs/browser/test-helpers/test-rpc/get-compressed-token-accounts.d.ts +5 -21
  25. package/dist/cjs/browser/test-helpers/test-rpc/get-parsed-events.d.ts +3 -10
  26. package/dist/cjs/browser/test-helpers/test-rpc/test-rpc.d.ts +31 -135
  27. package/dist/cjs/browser/utils/address.d.ts +3 -12
  28. package/dist/cjs/browser/utils/airdrop.d.ts +2 -14
  29. package/dist/cjs/browser/utils/calculate-compute-unit-price.d.ts +1 -4
  30. package/dist/cjs/browser/utils/conversion.d.ts +3 -9
  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/test-utils.d.ts +1 -5
  35. package/dist/cjs/browser/utils/validation.d.ts +2 -9
  36. package/dist/cjs/browser/wallet/interface.d.ts +4 -15
  37. package/dist/cjs/browser/wallet/use-wallet.d.ts +5 -20
  38. package/dist/cjs/node/actions/common.d.ts +1 -4
  39. package/dist/cjs/node/actions/compress.d.ts +2 -14
  40. package/dist/cjs/node/actions/create-account.d.ts +3 -27
  41. package/dist/cjs/node/actions/decompress.d.ts +2 -14
  42. package/dist/cjs/node/actions/transfer.d.ts +2 -15
  43. package/dist/cjs/node/constants.d.ts +7 -14
  44. package/dist/cjs/node/errors.d.ts +49 -40
  45. package/dist/cjs/node/idls/account_compression.d.ts +56 -56
  46. package/dist/cjs/node/idls/index.d.ts +4 -22
  47. package/dist/cjs/node/idls/light_compressed_token.d.ts +209 -89
  48. package/dist/cjs/node/idls/light_registry.d.ts +60 -60
  49. package/dist/cjs/node/idls/light_system_program.d.ts +55 -55
  50. package/dist/cjs/node/index.cjs +1070 -2329
  51. package/dist/cjs/node/index.cjs.map +1 -1
  52. package/dist/cjs/node/instruction/pack-compressed-accounts.d.ts +5 -24
  53. package/dist/cjs/node/programs/system.d.ts +10 -61
  54. package/dist/cjs/node/rpc-interface.d.ts +871 -1127
  55. package/dist/cjs/node/rpc.d.ts +31 -143
  56. package/dist/cjs/node/state/BN254.d.ts +2 -9
  57. package/dist/cjs/node/state/compressed-account.d.ts +6 -23
  58. package/dist/cjs/node/test-helpers/merkle-tree/indexed-array.d.ts +4 -18
  59. package/dist/cjs/node/test-helpers/merkle-tree/merkle-tree.d.ts +6 -19
  60. package/dist/cjs/node/test-helpers/test-rpc/get-compressed-accounts.d.ts +3 -12
  61. package/dist/cjs/node/test-helpers/test-rpc/get-compressed-token-accounts.d.ts +5 -21
  62. package/dist/cjs/node/test-helpers/test-rpc/get-parsed-events.d.ts +3 -10
  63. package/dist/cjs/node/test-helpers/test-rpc/test-rpc.d.ts +31 -135
  64. package/dist/cjs/node/utils/address.d.ts +3 -12
  65. package/dist/cjs/node/utils/airdrop.d.ts +2 -14
  66. package/dist/cjs/node/utils/calculate-compute-unit-price.d.ts +1 -4
  67. package/dist/cjs/node/utils/conversion.d.ts +3 -9
  68. package/dist/cjs/node/utils/parse-validity-proof.d.ts +1 -3
  69. package/dist/cjs/node/utils/pipe.d.ts +1 -4
  70. package/dist/cjs/node/utils/send-and-confirm.d.ts +11 -42
  71. package/dist/cjs/node/utils/test-utils.d.ts +1 -5
  72. package/dist/cjs/node/utils/validation.d.ts +2 -9
  73. package/dist/cjs/node/wallet/interface.d.ts +4 -15
  74. package/dist/cjs/node/wallet/use-wallet.d.ts +5 -20
  75. package/dist/es/browser/actions/common.d.ts +1 -4
  76. package/dist/es/browser/actions/compress.d.ts +2 -14
  77. package/dist/es/browser/actions/create-account.d.ts +3 -27
  78. package/dist/es/browser/actions/decompress.d.ts +2 -14
  79. package/dist/es/browser/actions/transfer.d.ts +2 -15
  80. package/dist/es/browser/constants.d.ts +7 -14
  81. package/dist/es/browser/errors.d.ts +49 -40
  82. package/dist/es/browser/idls/account_compression.d.ts +56 -56
  83. package/dist/es/browser/idls/index.d.ts +4 -22
  84. package/dist/es/browser/idls/light_compressed_token.d.ts +209 -89
  85. package/dist/es/browser/idls/light_registry.d.ts +60 -60
  86. package/dist/es/browser/idls/light_system_program.d.ts +55 -55
  87. package/dist/es/browser/index.js +3209 -4698
  88. package/dist/es/browser/index.js.map +1 -1
  89. package/dist/es/browser/instruction/pack-compressed-accounts.d.ts +5 -24
  90. package/dist/es/browser/programs/system.d.ts +10 -61
  91. package/dist/es/browser/rpc-interface.d.ts +871 -1127
  92. package/dist/es/browser/rpc.d.ts +31 -143
  93. package/dist/es/browser/state/BN254.d.ts +2 -9
  94. package/dist/es/browser/state/compressed-account.d.ts +6 -23
  95. package/dist/es/browser/test-helpers/merkle-tree/indexed-array.d.ts +4 -18
  96. package/dist/es/browser/test-helpers/merkle-tree/merkle-tree.d.ts +6 -19
  97. package/dist/es/browser/test-helpers/test-rpc/get-compressed-accounts.d.ts +3 -12
  98. package/dist/es/browser/test-helpers/test-rpc/get-compressed-token-accounts.d.ts +5 -21
  99. package/dist/es/browser/test-helpers/test-rpc/get-parsed-events.d.ts +3 -10
  100. package/dist/es/browser/test-helpers/test-rpc/test-rpc.d.ts +31 -135
  101. package/dist/es/browser/utils/address.d.ts +3 -12
  102. package/dist/es/browser/utils/airdrop.d.ts +2 -14
  103. package/dist/es/browser/utils/calculate-compute-unit-price.d.ts +1 -4
  104. package/dist/es/browser/utils/conversion.d.ts +3 -9
  105. package/dist/es/browser/utils/parse-validity-proof.d.ts +1 -3
  106. package/dist/es/browser/utils/pipe.d.ts +1 -4
  107. package/dist/es/browser/utils/send-and-confirm.d.ts +11 -42
  108. package/dist/es/browser/utils/test-utils.d.ts +1 -5
  109. package/dist/es/browser/utils/validation.d.ts +2 -9
  110. package/dist/es/browser/wallet/interface.d.ts +4 -15
  111. package/dist/es/browser/wallet/use-wallet.d.ts +5 -20
  112. package/dist/types/index.d.ts +1433 -2192
  113. package/package.json +1 -1
@@ -6,7 +6,7 @@ export type LightSystemProgram = {
6
6
  name: 'SOL_POOL_PDA_SEED';
7
7
  type: 'bytes';
8
8
  value: '[115, 111, 108, 95, 112, 111, 111, 108, 95, 112, 100, 97]';
9
- },
9
+ }
10
10
  ];
11
11
  instructions: [
12
12
  {
@@ -26,7 +26,7 @@ export type LightSystemProgram = {
26
26
  name: 'associatedMerkleTree';
27
27
  isMut: false;
28
28
  isSigner: false;
29
- },
29
+ }
30
30
  ];
31
31
  args: [];
32
32
  },
@@ -38,7 +38,7 @@ export type LightSystemProgram = {
38
38
  isMut: true;
39
39
  isSigner: true;
40
40
  docs: [
41
- 'Fee payer needs to be mutable to pay rollover and protocol fees.',
41
+ 'Fee payer needs to be mutable to pay rollover and protocol fees.'
42
42
  ];
43
43
  },
44
44
  {
@@ -61,7 +61,7 @@ export type LightSystemProgram = {
61
61
  isMut: false;
62
62
  isSigner: false;
63
63
  docs: [
64
- 'This pda is used to invoke the account compression program.',
64
+ 'This pda is used to invoke the account compression program.'
65
65
  ];
66
66
  },
67
67
  {
@@ -77,7 +77,7 @@ export type LightSystemProgram = {
77
77
  isOptional: true;
78
78
  docs: [
79
79
  'Sol pool pda is used to store the native sol that has been compressed.',
80
- "It's only required when compressing or decompressing sol.",
80
+ "It's only required when compressing or decompressing sol."
81
81
  ];
82
82
  },
83
83
  {
@@ -88,20 +88,20 @@ export type LightSystemProgram = {
88
88
  docs: [
89
89
  'Only needs to be provided for decompression as a recipient for the',
90
90
  'decompressed sol.',
91
- 'Compressed sol originate from authority.',
91
+ 'Compressed sol originate from authority.'
92
92
  ];
93
93
  },
94
94
  {
95
95
  name: 'systemProgram';
96
96
  isMut: false;
97
97
  isSigner: false;
98
- },
98
+ }
99
99
  ];
100
100
  args: [
101
101
  {
102
102
  name: 'inputs';
103
103
  type: 'bytes';
104
- },
104
+ }
105
105
  ];
106
106
  },
107
107
  {
@@ -112,7 +112,7 @@ export type LightSystemProgram = {
112
112
  isMut: true;
113
113
  isSigner: true;
114
114
  docs: [
115
- 'Fee payer needs to be mutable to pay rollover and protocol fees.',
115
+ 'Fee payer needs to be mutable to pay rollover and protocol fees.'
116
116
  ];
117
117
  },
118
118
  {
@@ -167,13 +167,13 @@ export type LightSystemProgram = {
167
167
  isMut: true;
168
168
  isSigner: false;
169
169
  isOptional: true;
170
- },
170
+ }
171
171
  ];
172
172
  args: [
173
173
  {
174
174
  name: 'inputs';
175
175
  type: 'bytes';
176
- },
176
+ }
177
177
  ];
178
178
  },
179
179
  {
@@ -181,7 +181,7 @@ export type LightSystemProgram = {
181
181
  docs: [
182
182
  'This function is a stub to allow Anchor to include the input types in',
183
183
  'the IDL. It should not be included in production builds nor be called in',
184
- 'practice.',
184
+ 'practice.'
185
185
  ];
186
186
  accounts: [
187
187
  {
@@ -189,7 +189,7 @@ export type LightSystemProgram = {
189
189
  isMut: true;
190
190
  isSigner: true;
191
191
  docs: [
192
- 'Fee payer needs to be mutable to pay rollover and protocol fees.',
192
+ 'Fee payer needs to be mutable to pay rollover and protocol fees.'
193
193
  ];
194
194
  },
195
195
  {
@@ -212,7 +212,7 @@ export type LightSystemProgram = {
212
212
  isMut: false;
213
213
  isSigner: false;
214
214
  docs: [
215
- 'This pda is used to invoke the account compression program.',
215
+ 'This pda is used to invoke the account compression program.'
216
216
  ];
217
217
  },
218
218
  {
@@ -228,7 +228,7 @@ export type LightSystemProgram = {
228
228
  isOptional: true;
229
229
  docs: [
230
230
  'Sol pool pda is used to store the native sol that has been compressed.',
231
- "It's only required when compressing or decompressing sol.",
231
+ "It's only required when compressing or decompressing sol."
232
232
  ];
233
233
  },
234
234
  {
@@ -239,14 +239,14 @@ export type LightSystemProgram = {
239
239
  docs: [
240
240
  'Only needs to be provided for decompression as a recipient for the',
241
241
  'decompressed sol.',
242
- 'Compressed sol originate from authority.',
242
+ 'Compressed sol originate from authority.'
243
243
  ];
244
244
  },
245
245
  {
246
246
  name: 'systemProgram';
247
247
  isMut: false;
248
248
  isSigner: false;
249
- },
249
+ }
250
250
  ];
251
251
  args: [
252
252
  {
@@ -266,15 +266,15 @@ export type LightSystemProgram = {
266
266
  type: {
267
267
  defined: 'PublicTransactionEvent';
268
268
  };
269
- },
269
+ }
270
270
  ];
271
- },
271
+ }
272
272
  ];
273
273
  accounts: [
274
274
  {
275
275
  name: 'stateMerkleTreeAccount';
276
276
  docs: [
277
- 'Concurrent state Merkle tree used for public compressed transactions.',
277
+ 'Concurrent state Merkle tree used for public compressed transactions.'
278
278
  ];
279
279
  type: {
280
280
  kind: 'struct';
@@ -284,7 +284,7 @@ export type LightSystemProgram = {
284
284
  type: {
285
285
  defined: 'MerkleTreeMetadata';
286
286
  };
287
- },
287
+ }
288
288
  ];
289
289
  };
290
290
  },
@@ -296,7 +296,7 @@ export type LightSystemProgram = {
296
296
  'Collected instruction data is combined with the instruction data of the executing cpi,',
297
297
  'and executed as a single transaction.',
298
298
  'This enables to use input compressed accounts that are owned by multiple programs,',
299
- 'with one zero-knowledge proof.',
299
+ 'with one zero-knowledge proof.'
300
300
  ];
301
301
  type: {
302
302
  kind: 'struct';
@@ -316,10 +316,10 @@ export type LightSystemProgram = {
316
316
  defined: 'InstructionDataInvokeCpi';
317
317
  };
318
318
  };
319
- },
319
+ }
320
320
  ];
321
321
  };
322
- },
322
+ }
323
323
  ];
324
324
  types: [
325
325
  {
@@ -335,7 +335,7 @@ export type LightSystemProgram = {
335
335
  {
336
336
  name: 'programOwner';
337
337
  docs: [
338
- 'Program owner of the Merkle tree. This will be used for program owned Merkle trees.',
338
+ 'Program owner of the Merkle tree. This will be used for program owned Merkle trees.'
339
339
  ];
340
340
  type: 'publicKey';
341
341
  },
@@ -347,10 +347,10 @@ export type LightSystemProgram = {
347
347
  'forested by light foresters. The variable is not used in the account',
348
348
  'compression program but the registry program. The registry program',
349
349
  'implements access control to prevent contention during forester. The',
350
- 'forester pubkey specified in this struct can bypass contention checks.',
350
+ 'forester pubkey specified in this struct can bypass contention checks.'
351
351
  ];
352
352
  type: 'publicKey';
353
- },
353
+ }
354
354
  ];
355
355
  };
356
356
  },
@@ -378,7 +378,7 @@ export type LightSystemProgram = {
378
378
  {
379
379
  name: 'nextMerkleTree';
380
380
  type: 'publicKey';
381
- },
381
+ }
382
382
  ];
383
383
  };
384
384
  },
@@ -396,14 +396,14 @@ export type LightSystemProgram = {
396
396
  name: 'rolloverFee';
397
397
  docs: [
398
398
  'This fee is used for rent for the next account.',
399
- 'It accumulates in the account so that once the corresponding Merkle tree account is full it can be rolled over',
399
+ 'It accumulates in the account so that once the corresponding Merkle tree account is full it can be rolled over'
400
400
  ];
401
401
  type: 'u64';
402
402
  },
403
403
  {
404
404
  name: 'rolloverThreshold';
405
405
  docs: [
406
- 'The threshold in percentage points when the account should be rolled over (95 corresponds to 95% filled).',
406
+ 'The threshold in percentage points when the account should be rolled over (95 corresponds to 95% filled).'
407
407
  ];
408
408
  type: 'u64';
409
409
  },
@@ -415,7 +415,7 @@ export type LightSystemProgram = {
415
415
  {
416
416
  name: 'rolledoverSlot';
417
417
  docs: [
418
- 'The slot when the account was rolled over, a rolled over account should not be written to.',
418
+ 'The slot when the account was rolled over, a rolled over account should not be written to.'
419
419
  ];
420
420
  type: 'u64';
421
421
  },
@@ -424,7 +424,7 @@ export type LightSystemProgram = {
424
424
  docs: [
425
425
  'If current slot is greater than rolledover_slot + close_threshold and',
426
426
  "the account is empty it can be closed. No 'close' functionality has been",
427
- 'implemented yet.',
427
+ 'implemented yet.'
428
428
  ];
429
429
  type: 'u64';
430
430
  },
@@ -432,10 +432,10 @@ export type LightSystemProgram = {
432
432
  name: 'additionalBytes';
433
433
  docs: [
434
434
  'Placeholder for bytes of additional accounts which are tied to the',
435
- 'Merkle trees operation and need to be rolled over as well.',
435
+ 'Merkle trees operation and need to be rolled over as well.'
436
436
  ];
437
437
  type: 'u64';
438
- },
438
+ }
439
439
  ];
440
440
  };
441
441
  },
@@ -491,7 +491,7 @@ export type LightSystemProgram = {
491
491
  {
492
492
  name: 'isCompress';
493
493
  type: 'bool';
494
- },
494
+ }
495
495
  ];
496
496
  };
497
497
  },
@@ -517,7 +517,7 @@ export type LightSystemProgram = {
517
517
  {
518
518
  name: 'addressMerkleTreeRootIndex';
519
519
  type: 'u16';
520
- },
520
+ }
521
521
  ];
522
522
  };
523
523
  },
@@ -535,7 +535,7 @@ export type LightSystemProgram = {
535
535
  {
536
536
  name: 'merkleTreeIndex';
537
537
  type: 'u8';
538
- },
538
+ }
539
539
  ];
540
540
  };
541
541
  },
@@ -561,7 +561,7 @@ export type LightSystemProgram = {
561
561
  type: {
562
562
  array: ['u8', 32];
563
563
  };
564
- },
564
+ }
565
565
  ];
566
566
  };
567
567
  },
@@ -625,7 +625,7 @@ export type LightSystemProgram = {
625
625
  defined: 'CompressedCpiContext';
626
626
  };
627
627
  };
628
- },
628
+ }
629
629
  ];
630
630
  };
631
631
  },
@@ -638,7 +638,7 @@ export type LightSystemProgram = {
638
638
  name: 'setContext';
639
639
  docs: [
640
640
  'Is set by the program that is invoking the CPI to signal that is should',
641
- 'set the cpi context.',
641
+ 'set the cpi context.'
642
642
  ];
643
643
  type: 'bool';
644
644
  },
@@ -646,17 +646,17 @@ export type LightSystemProgram = {
646
646
  name: 'firstSetContext';
647
647
  docs: [
648
648
  'Is set to wipe the cpi context since someone could have set it before',
649
- 'with unrelated data.',
649
+ 'with unrelated data.'
650
650
  ];
651
651
  type: 'bool';
652
652
  },
653
653
  {
654
654
  name: 'cpiContextAccountIndex';
655
655
  docs: [
656
- 'Index of cpi context account in remaining accounts.',
656
+ 'Index of cpi context account in remaining accounts.'
657
657
  ];
658
658
  type: 'u8';
659
- },
659
+ }
660
660
  ];
661
661
  };
662
662
  },
@@ -688,7 +688,7 @@ export type LightSystemProgram = {
688
688
  defined: 'CompressedAccountData';
689
689
  };
690
690
  };
691
- },
691
+ }
692
692
  ];
693
693
  };
694
694
  },
@@ -712,7 +712,7 @@ export type LightSystemProgram = {
712
712
  type: {
713
713
  array: ['u8', 32];
714
714
  };
715
- },
715
+ }
716
716
  ];
717
717
  };
718
718
  },
@@ -736,17 +736,17 @@ export type LightSystemProgram = {
736
736
  {
737
737
  name: 'rootIndex';
738
738
  docs: [
739
- 'Index of root used in inclusion validity proof.',
739
+ 'Index of root used in inclusion validity proof.'
740
740
  ];
741
741
  type: 'u16';
742
742
  },
743
743
  {
744
744
  name: 'readOnly';
745
745
  docs: [
746
- 'Placeholder to mark accounts read-only unimplemented set to false.',
746
+ 'Placeholder to mark accounts read-only unimplemented set to false.'
747
747
  ];
748
748
  type: 'bool';
749
- },
749
+ }
750
750
  ];
751
751
  };
752
752
  },
@@ -771,14 +771,14 @@ export type LightSystemProgram = {
771
771
  name: 'queueIndex';
772
772
  docs: [
773
773
  'Index of leaf in queue. Placeholder of batched Merkle tree updates',
774
- 'currently unimplemented.',
774
+ 'currently unimplemented.'
775
775
  ];
776
776
  type: {
777
777
  option: {
778
778
  defined: 'QueueIndex';
779
779
  };
780
780
  };
781
- },
781
+ }
782
782
  ];
783
783
  };
784
784
  },
@@ -796,7 +796,7 @@ export type LightSystemProgram = {
796
796
  name: 'index';
797
797
  docs: ['Index of compressed account hash in queue.'];
798
798
  type: 'u16';
799
- },
799
+ }
800
800
  ];
801
801
  };
802
802
  },
@@ -812,7 +812,7 @@ export type LightSystemProgram = {
812
812
  {
813
813
  name: 'seq';
814
814
  type: 'u64';
815
- },
815
+ }
816
816
  ];
817
817
  };
818
818
  },
@@ -886,10 +886,10 @@ export type LightSystemProgram = {
886
886
  type: {
887
887
  option: 'bytes';
888
888
  };
889
- },
889
+ }
890
890
  ];
891
891
  };
892
- },
892
+ }
893
893
  ];
894
894
  errors: [
895
895
  {
@@ -1059,7 +1059,7 @@ export type LightSystemProgram = {
1059
1059
  {
1060
1060
  code: 6033;
1061
1061
  name: 'DataFieldUndefined';
1062
- },
1062
+ }
1063
1063
  ];
1064
1064
  };
1065
1065
  export declare const IDL: LightSystemProgram;