@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
@@ -16,14 +16,14 @@ export type LightRegistry = {
16
16
  name: 'PROTOCOL_CONFIG_PDA_SEED';
17
17
  type: 'bytes';
18
18
  value: '[97, 117, 116, 104, 111, 114, 105, 116, 121]';
19
- },
19
+ }
20
20
  ];
21
21
  instructions: [
22
22
  {
23
23
  name: 'initializeProtocolConfig';
24
24
  docs: [
25
25
  'Initializes the protocol config pda. Can only be called once by the',
26
- 'program account keypair.',
26
+ 'program account keypair.'
27
27
  ];
28
28
  accounts: [
29
29
  {
@@ -50,7 +50,7 @@ export type LightRegistry = {
50
50
  name: 'selfProgram';
51
51
  isMut: false;
52
52
  isSigner: false;
53
- },
53
+ }
54
54
  ];
55
55
  args: [
56
56
  {
@@ -62,7 +62,7 @@ export type LightRegistry = {
62
62
  type: {
63
63
  defined: 'ProtocolConfig';
64
64
  };
65
- },
65
+ }
66
66
  ];
67
67
  },
68
68
  {
@@ -88,7 +88,7 @@ export type LightRegistry = {
88
88
  isMut: false;
89
89
  isSigner: true;
90
90
  isOptional: true;
91
- },
91
+ }
92
92
  ];
93
93
  args: [
94
94
  {
@@ -98,7 +98,7 @@ export type LightRegistry = {
98
98
  defined: 'ProtocolConfig';
99
99
  };
100
100
  };
101
- },
101
+ }
102
102
  ];
103
103
  },
104
104
  {
@@ -144,15 +144,15 @@ export type LightRegistry = {
144
144
  isMut: false;
145
145
  isSigner: true;
146
146
  docs: [
147
- '- is signer so that only the program deployer can register a program.',
147
+ '- is signer so that only the program deployer can register a program.'
148
148
  ];
149
- },
149
+ }
150
150
  ];
151
151
  args: [
152
152
  {
153
153
  name: 'bump';
154
154
  type: 'u8';
155
- },
155
+ }
156
156
  ];
157
157
  },
158
158
  {
@@ -187,13 +187,13 @@ export type LightRegistry = {
187
187
  name: 'registeredProgramPda';
188
188
  isMut: true;
189
189
  isSigner: false;
190
- },
190
+ }
191
191
  ];
192
192
  args: [
193
193
  {
194
194
  name: 'bump';
195
195
  type: 'u8';
196
- },
196
+ }
197
197
  ];
198
198
  },
199
199
  {
@@ -223,7 +223,7 @@ export type LightRegistry = {
223
223
  name: 'systemProgram';
224
224
  isMut: false;
225
225
  isSigner: false;
226
- },
226
+ }
227
227
  ];
228
228
  args: [
229
229
  {
@@ -245,7 +245,7 @@ export type LightRegistry = {
245
245
  type: {
246
246
  option: 'u64';
247
247
  };
248
- },
248
+ }
249
249
  ];
250
250
  },
251
251
  {
@@ -266,7 +266,7 @@ export type LightRegistry = {
266
266
  isMut: false;
267
267
  isSigner: true;
268
268
  isOptional: true;
269
- },
269
+ }
270
270
  ];
271
271
  args: [
272
272
  {
@@ -276,7 +276,7 @@ export type LightRegistry = {
276
276
  defined: 'ForesterConfig';
277
277
  };
278
278
  };
279
- },
279
+ }
280
280
  ];
281
281
  },
282
282
  {
@@ -296,13 +296,13 @@ export type LightRegistry = {
296
296
  name: 'foresterPda';
297
297
  isMut: true;
298
298
  isSigner: false;
299
- },
299
+ }
300
300
  ];
301
301
  args: [
302
302
  {
303
303
  name: 'newWeight';
304
304
  type: 'u64';
305
- },
305
+ }
306
306
  ];
307
307
  },
308
308
  {
@@ -311,7 +311,7 @@ export type LightRegistry = {
311
311
  'Registers the forester for the epoch.',
312
312
  '1. Only the forester can register herself for the epoch.',
313
313
  '2. Protocol config is copied.',
314
- '3. Epoch account is created if needed.',
314
+ '3. Epoch account is created if needed.'
315
315
  ];
316
316
  accounts: [
317
317
  {
@@ -335,7 +335,7 @@ export type LightRegistry = {
335
335
  isSigner: false;
336
336
  docs: [
337
337
  'Instruction checks that current_epoch is the the current epoch and that',
338
- 'the epoch is in registration phase.',
338
+ 'the epoch is in registration phase.'
339
339
  ];
340
340
  },
341
341
  {
@@ -352,13 +352,13 @@ export type LightRegistry = {
352
352
  name: 'systemProgram';
353
353
  isMut: false;
354
354
  isSigner: false;
355
- },
355
+ }
356
356
  ];
357
357
  args: [
358
358
  {
359
359
  name: 'epoch';
360
360
  type: 'u64';
361
- },
361
+ }
362
362
  ];
363
363
  },
364
364
  {
@@ -366,7 +366,7 @@ export type LightRegistry = {
366
366
  docs: [
367
367
  'This transaction can be included as additional instruction in the first',
368
368
  'work instructions during the active phase.',
369
- 'Registration Period must be over.',
369
+ 'Registration Period must be over.'
370
370
  ];
371
371
  accounts: [
372
372
  {
@@ -383,7 +383,7 @@ export type LightRegistry = {
383
383
  name: 'epochPda';
384
384
  isMut: false;
385
385
  isSigner: false;
386
- },
386
+ }
387
387
  ];
388
388
  args: [];
389
389
  },
@@ -404,7 +404,7 @@ export type LightRegistry = {
404
404
  name: 'epochPda';
405
405
  isMut: true;
406
406
  isSigner: false;
407
- },
407
+ }
408
408
  ];
409
409
  args: [];
410
410
  },
@@ -416,7 +416,7 @@ export type LightRegistry = {
416
416
  isMut: true;
417
417
  isSigner: true;
418
418
  docs: [
419
- 'Anyone can create new trees just the fees cannot be set arbitrarily.',
419
+ 'Anyone can create new trees just the fees cannot be set arbitrarily.'
420
420
  ];
421
421
  },
422
422
  {
@@ -460,7 +460,7 @@ export type LightRegistry = {
460
460
  isMut: false;
461
461
  isSigner: false;
462
462
  isOptional: true;
463
- },
463
+ }
464
464
  ];
465
465
  args: [
466
466
  {
@@ -490,7 +490,7 @@ export type LightRegistry = {
490
490
  type: {
491
491
  defined: 'AddressQueueConfig';
492
492
  };
493
- },
493
+ }
494
494
  ];
495
495
  },
496
496
  {
@@ -501,7 +501,7 @@ export type LightRegistry = {
501
501
  isMut: true;
502
502
  isSigner: true;
503
503
  docs: [
504
- 'Anyone can create new trees just the fees cannot be set arbitrarily.',
504
+ 'Anyone can create new trees just the fees cannot be set arbitrarily.'
505
505
  ];
506
506
  },
507
507
  {
@@ -545,7 +545,7 @@ export type LightRegistry = {
545
545
  isMut: false;
546
546
  isSigner: false;
547
547
  isOptional: true;
548
- },
548
+ }
549
549
  ];
550
550
  args: [
551
551
  {
@@ -575,7 +575,7 @@ export type LightRegistry = {
575
575
  type: {
576
576
  defined: 'NullifierQueueConfig';
577
577
  };
578
- },
578
+ }
579
579
  ];
580
580
  },
581
581
  {
@@ -621,7 +621,7 @@ export type LightRegistry = {
621
621
  name: 'nullifierQueue';
622
622
  isMut: true;
623
623
  isSigner: false;
624
- },
624
+ }
625
625
  ];
626
626
  args: [
627
627
  {
@@ -655,7 +655,7 @@ export type LightRegistry = {
655
655
  };
656
656
  };
657
657
  };
658
- },
658
+ }
659
659
  ];
660
660
  },
661
661
  {
@@ -701,7 +701,7 @@ export type LightRegistry = {
701
701
  name: 'logWrapper';
702
702
  isMut: false;
703
703
  isSigner: false;
704
- },
704
+ }
705
705
  ];
706
706
  args: [
707
707
  {
@@ -747,10 +747,10 @@ export type LightRegistry = {
747
747
  {
748
748
  array: ['u8', 32];
749
749
  },
750
- 16,
750
+ 16
751
751
  ];
752
752
  };
753
- },
753
+ }
754
754
  ];
755
755
  },
756
756
  {
@@ -801,13 +801,13 @@ export type LightRegistry = {
801
801
  name: 'oldQueue';
802
802
  isMut: true;
803
803
  isSigner: false;
804
- },
804
+ }
805
805
  ];
806
806
  args: [
807
807
  {
808
808
  name: 'bump';
809
809
  type: 'u8';
810
- },
810
+ }
811
811
  ];
812
812
  },
813
813
  {
@@ -873,15 +873,15 @@ export type LightRegistry = {
873
873
  name: 'protocolConfigPda';
874
874
  isMut: false;
875
875
  isSigner: false;
876
- },
876
+ }
877
877
  ];
878
878
  args: [
879
879
  {
880
880
  name: 'bump';
881
881
  type: 'u8';
882
- },
882
+ }
883
883
  ];
884
- },
884
+ }
885
885
  ];
886
886
  accounts: [
887
887
  {
@@ -907,7 +907,7 @@ export type LightRegistry = {
907
907
  {
908
908
  name: 'registeredWeight';
909
909
  type: 'u64';
910
- },
910
+ }
911
911
  ];
912
912
  };
913
913
  },
@@ -942,7 +942,7 @@ export type LightRegistry = {
942
942
  name: 'hasReportedWork';
943
943
  docs: [
944
944
  'Work can be reported in an extra round to earn extra performance based',
945
- 'rewards.',
945
+ 'rewards.'
946
946
  ];
947
947
  type: 'bool';
948
948
  },
@@ -950,7 +950,7 @@ export type LightRegistry = {
950
950
  name: 'foresterIndex';
951
951
  docs: [
952
952
  'Start index of the range that determines when the forester is eligible to perform work.',
953
- 'End index is forester_start_index + weight',
953
+ 'End index is forester_start_index + weight'
954
954
  ];
955
955
  type: 'u64';
956
956
  },
@@ -962,7 +962,7 @@ export type LightRegistry = {
962
962
  name: 'totalEpochWeight';
963
963
  docs: [
964
964
  'Total epoch weight is registered weight of the epoch account after',
965
- 'registration is concluded and active epoch period starts.',
965
+ 'registration is concluded and active epoch period starts.'
966
966
  ];
967
967
  type: {
968
968
  option: 'u64';
@@ -977,10 +977,10 @@ export type LightRegistry = {
977
977
  {
978
978
  name: 'finalizeCounter';
979
979
  docs: [
980
- 'Incremented every time finalize registration is called.',
980
+ 'Incremented every time finalize registration is called.'
981
981
  ];
982
982
  type: 'u64';
983
- },
983
+ }
984
984
  ];
985
985
  };
986
986
  },
@@ -1002,7 +1002,7 @@ export type LightRegistry = {
1002
1002
  type: {
1003
1003
  defined: 'ProtocolConfig';
1004
1004
  };
1005
- },
1005
+ }
1006
1006
  ];
1007
1007
  };
1008
1008
  },
@@ -1028,7 +1028,7 @@ export type LightRegistry = {
1028
1028
  {
1029
1029
  name: 'pendingWeight';
1030
1030
  docs: [
1031
- 'Pending weight which will get active once the next epoch starts.',
1031
+ 'Pending weight which will get active once the next epoch starts.'
1032
1032
  ];
1033
1033
  type: 'u64';
1034
1034
  },
@@ -1039,7 +1039,7 @@ export type LightRegistry = {
1039
1039
  {
1040
1040
  name: 'lastCompressedForesterEpochPdaHash';
1041
1041
  docs: [
1042
- 'Link to previous compressed forester epoch account hash.',
1042
+ 'Link to previous compressed forester epoch account hash.'
1043
1043
  ];
1044
1044
  type: {
1045
1045
  array: ['u8', 32];
@@ -1048,10 +1048,10 @@ export type LightRegistry = {
1048
1048
  {
1049
1049
  name: 'lastRegisteredEpoch';
1050
1050
  type: 'u64';
1051
- },
1051
+ }
1052
1052
  ];
1053
1053
  };
1054
- },
1054
+ }
1055
1055
  ];
1056
1056
  types: [
1057
1057
  {
@@ -1063,7 +1063,7 @@ export type LightRegistry = {
1063
1063
  '3. Report Work',
1064
1064
  '4. Post (Epoch has ended, and rewards can be claimed.)',
1065
1065
  '- There is always an active phase in progress, registration and report work',
1066
- 'phases run in parallel to a currently active phase.',
1066
+ 'phases run in parallel to a currently active phase.'
1067
1067
  ];
1068
1068
  type: {
1069
1069
  kind: 'struct';
@@ -1071,14 +1071,14 @@ export type LightRegistry = {
1071
1071
  {
1072
1072
  name: 'genesisSlot';
1073
1073
  docs: [
1074
- 'Solana slot when the protocol starts operating.',
1074
+ 'Solana slot when the protocol starts operating.'
1075
1075
  ];
1076
1076
  type: 'u64';
1077
1077
  },
1078
1078
  {
1079
1079
  name: 'minWeight';
1080
1080
  docs: [
1081
- 'Minimum weight required for a forester to register to an epoch.',
1081
+ 'Minimum weight required for a forester to register to an epoch.'
1082
1082
  ];
1083
1083
  type: 'u64';
1084
1084
  },
@@ -1101,7 +1101,7 @@ export type LightRegistry = {
1101
1101
  name: 'reportWorkPhaseLength';
1102
1102
  docs: [
1103
1103
  'Foresters can report work to receive performance based rewards in this',
1104
- 'phase.',
1104
+ 'phase.'
1105
1105
  ];
1106
1106
  type: 'u64';
1107
1107
  },
@@ -1145,7 +1145,7 @@ export type LightRegistry = {
1145
1145
  {
1146
1146
  name: 'placeHolderF';
1147
1147
  type: 'u64';
1148
- },
1148
+ }
1149
1149
  ];
1150
1150
  };
1151
1151
  },
@@ -1158,7 +1158,7 @@ export type LightRegistry = {
1158
1158
  name: 'fee';
1159
1159
  docs: ['Fee in percentage points.'];
1160
1160
  type: 'u64';
1161
- },
1161
+ }
1162
1162
  ];
1163
1163
  };
1164
1164
  },
@@ -1181,10 +1181,10 @@ export type LightRegistry = {
1181
1181
  },
1182
1182
  {
1183
1183
  name: 'Pre';
1184
- },
1184
+ }
1185
1185
  ];
1186
1186
  };
1187
- },
1187
+ }
1188
1188
  ];
1189
1189
  errors: [
1190
1190
  {
@@ -1287,7 +1287,7 @@ export type LightRegistry = {
1287
1287
  {
1288
1288
  code: 6024;
1289
1289
  name: 'ForesterDefined';
1290
- },
1290
+ }
1291
1291
  ];
1292
1292
  };
1293
1293
  export declare const IDL: LightRegistry;