@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
@@ -8,7 +8,7 @@ export type LightCompressedToken = {
8
8
  'This instruction creates a token pool for a given mint. Every spl mint',
9
9
  'can have one token pool. When a token is compressed the tokens are',
10
10
  'transferrred to the token pool, and their compressed equivalent is',
11
- 'minted into a Merkle tree.',
11
+ 'minted into a Merkle tree.'
12
12
  ];
13
13
  accounts: [
14
14
  {
@@ -41,7 +41,7 @@ export type LightCompressedToken = {
41
41
  name: 'cpiAuthorityPda';
42
42
  isMut: false;
43
43
  isSigner: false;
44
- },
44
+ }
45
45
  ];
46
46
  args: [];
47
47
  },
@@ -54,7 +54,7 @@ export type LightCompressedToken = {
54
54
  'every amount and pubkey input pair. A constant amount of lamports can be',
55
55
  'transferred to each output account to enable. A use case to add lamports',
56
56
  'to a compressed token account is to prevent spam. This is the only way',
57
- 'to add lamports to a compressed token account.',
57
+ 'to add lamports to a compressed token account.'
58
58
  ];
59
59
  accounts: [
60
60
  {
@@ -82,9 +82,6 @@ export type LightCompressedToken = {
82
82
  name: 'tokenPoolPda';
83
83
  isMut: true;
84
84
  isSigner: false;
85
- docs: [
86
- 'account to a token account of a different mint will fail',
87
- ];
88
85
  },
89
86
  {
90
87
  name: 'tokenProgram';
@@ -137,7 +134,7 @@ export type LightCompressedToken = {
137
134
  isMut: true;
138
135
  isSigner: false;
139
136
  isOptional: true;
140
- },
137
+ }
141
138
  ];
142
139
  args: [
143
140
  {
@@ -157,11 +154,16 @@ export type LightCompressedToken = {
157
154
  type: {
158
155
  option: 'u64';
159
156
  };
160
- },
157
+ }
161
158
  ];
162
159
  },
163
160
  {
164
161
  name: 'compressSplTokenAccount';
162
+ docs: [
163
+ 'Compresses the balance of an spl token account sub an optional remaining',
164
+ 'amount. This instruction does not close the spl token account. To close',
165
+ 'the account bundle a close spl account instruction in your transaction.'
166
+ ];
165
167
  accounts: [
166
168
  {
167
169
  name: 'feePayer';
@@ -176,7 +178,7 @@ export type LightCompressedToken = {
176
178
  docs: [
177
179
  'Authority is verified through proof since both owner and delegate',
178
180
  'are included in the token data hash, which is a public input to the',
179
- 'validity proof.',
181
+ 'validity proof.'
180
182
  ];
181
183
  },
182
184
  {
@@ -237,7 +239,7 @@ export type LightCompressedToken = {
237
239
  name: 'systemProgram';
238
240
  isMut: false;
239
241
  isSigner: false;
240
- },
242
+ }
241
243
  ];
242
244
  args: [
243
245
  {
@@ -257,7 +259,7 @@ export type LightCompressedToken = {
257
259
  defined: 'CompressedCpiContext';
258
260
  };
259
261
  };
260
- },
262
+ }
261
263
  ];
262
264
  },
263
265
  {
@@ -270,7 +272,7 @@ export type LightCompressedToken = {
270
272
  'accounts specify less lamports than inputs the remaining lamports are',
271
273
  'transferred to an output compressed account. Signer must be owner or',
272
274
  'delegate. If a delegated token account is transferred the delegate is',
273
- 'not preserved.',
275
+ 'not preserved.'
274
276
  ];
275
277
  accounts: [
276
278
  {
@@ -286,7 +288,7 @@ export type LightCompressedToken = {
286
288
  docs: [
287
289
  'Authority is verified through proof since both owner and delegate',
288
290
  'are included in the token data hash, which is a public input to the',
289
- 'validity proof.',
291
+ 'validity proof.'
290
292
  ];
291
293
  },
292
294
  {
@@ -347,13 +349,13 @@ export type LightCompressedToken = {
347
349
  name: 'systemProgram';
348
350
  isMut: false;
349
351
  isSigner: false;
350
- },
352
+ }
351
353
  ];
352
354
  args: [
353
355
  {
354
356
  name: 'inputs';
355
357
  type: 'bytes';
356
- },
358
+ }
357
359
  ];
358
360
  },
359
361
  {
@@ -364,7 +366,7 @@ export type LightCompressedToken = {
364
366
  'be called by a delegate.',
365
367
  'The instruction creates two output accounts:',
366
368
  '1. one account with delegated amount',
367
- '2. one account with remaining(change) amount',
369
+ '2. one account with remaining(change) amount'
368
370
  ];
369
371
  accounts: [
370
372
  {
@@ -380,7 +382,7 @@ export type LightCompressedToken = {
380
382
  docs: [
381
383
  'Authority is verified through proof since both owner and delegate',
382
384
  'are included in the token data hash, which is a public input to the',
383
- 'validity proof.',
385
+ 'validity proof.'
384
386
  ];
385
387
  },
386
388
  {
@@ -423,20 +425,20 @@ export type LightCompressedToken = {
423
425
  name: 'systemProgram';
424
426
  isMut: false;
425
427
  isSigner: false;
426
- },
428
+ }
427
429
  ];
428
430
  args: [
429
431
  {
430
432
  name: 'inputs';
431
433
  type: 'bytes';
432
- },
434
+ }
433
435
  ];
434
436
  },
435
437
  {
436
438
  name: 'revoke';
437
439
  docs: [
438
440
  'Revokes a delegation. The instruction merges all inputs into one output',
439
- 'account. Cannot be called by a delegate. Delegates are not preserved.',
441
+ 'account. Cannot be called by a delegate. Delegates are not preserved.'
440
442
  ];
441
443
  accounts: [
442
444
  {
@@ -452,7 +454,7 @@ export type LightCompressedToken = {
452
454
  docs: [
453
455
  'Authority is verified through proof since both owner and delegate',
454
456
  'are included in the token data hash, which is a public input to the',
455
- 'validity proof.',
457
+ 'validity proof.'
456
458
  ];
457
459
  },
458
460
  {
@@ -495,20 +497,20 @@ export type LightCompressedToken = {
495
497
  name: 'systemProgram';
496
498
  isMut: false;
497
499
  isSigner: false;
498
- },
500
+ }
499
501
  ];
500
502
  args: [
501
503
  {
502
504
  name: 'inputs';
503
505
  type: 'bytes';
504
- },
506
+ }
505
507
  ];
506
508
  },
507
509
  {
508
510
  name: 'freeze';
509
511
  docs: [
510
512
  'Freezes compressed token accounts. Inputs must not be frozen. Creates as',
511
- 'many outputs as inputs. Balances and delegates are preserved.',
513
+ 'many outputs as inputs. Balances and delegates are preserved.'
512
514
  ];
513
515
  accounts: [
514
516
  {
@@ -567,20 +569,20 @@ export type LightCompressedToken = {
567
569
  name: 'mint';
568
570
  isMut: false;
569
571
  isSigner: false;
570
- },
572
+ }
571
573
  ];
572
574
  args: [
573
575
  {
574
576
  name: 'inputs';
575
577
  type: 'bytes';
576
- },
578
+ }
577
579
  ];
578
580
  },
579
581
  {
580
582
  name: 'thaw';
581
583
  docs: [
582
584
  'Thaws frozen compressed token accounts. Inputs must be frozen. Creates',
583
- 'as many outputs as inputs. Balances and delegates are preserved.',
585
+ 'as many outputs as inputs. Balances and delegates are preserved.'
584
586
  ];
585
587
  accounts: [
586
588
  {
@@ -639,13 +641,13 @@ export type LightCompressedToken = {
639
641
  name: 'mint';
640
642
  isMut: false;
641
643
  isSigner: false;
642
- },
644
+ }
643
645
  ];
644
646
  args: [
645
647
  {
646
648
  name: 'inputs';
647
649
  type: 'bytes';
648
- },
650
+ }
649
651
  ];
650
652
  },
651
653
  {
@@ -653,7 +655,7 @@ export type LightCompressedToken = {
653
655
  docs: [
654
656
  'Burns compressed tokens and spl tokens from the pool account. Delegates',
655
657
  'can burn tokens. The output compressed token account remains delegated.',
656
- 'Creates one output compressed token account.',
658
+ 'Creates one output compressed token account.'
657
659
  ];
658
660
  accounts: [
659
661
  {
@@ -669,7 +671,7 @@ export type LightCompressedToken = {
669
671
  docs: [
670
672
  'Authority is verified through proof since both owner and delegate',
671
673
  'are included in the token data hash, which is a public input to the',
672
- 'validity proof.',
674
+ 'validity proof.'
673
675
  ];
674
676
  },
675
677
  {
@@ -726,13 +728,13 @@ export type LightCompressedToken = {
726
728
  name: 'systemProgram';
727
729
  isMut: false;
728
730
  isSigner: false;
729
- },
731
+ }
730
732
  ];
731
733
  args: [
732
734
  {
733
735
  name: 'inputs';
734
736
  type: 'bytes';
735
- },
737
+ }
736
738
  ];
737
739
  },
738
740
  {
@@ -740,7 +742,7 @@ export type LightCompressedToken = {
740
742
  docs: [
741
743
  'This function is a stub to allow Anchor to include the input types in',
742
744
  'the IDL. It should not be included in production builds nor be called in',
743
- 'practice.',
745
+ 'practice.'
744
746
  ];
745
747
  accounts: [
746
748
  {
@@ -756,7 +758,7 @@ export type LightCompressedToken = {
756
758
  docs: [
757
759
  'Authority is verified through proof since both owner and delegate',
758
760
  'are included in the token data hash, which is a public input to the',
759
- 'validity proof.',
761
+ 'validity proof.'
760
762
  ];
761
763
  },
762
764
  {
@@ -817,7 +819,7 @@ export type LightCompressedToken = {
817
819
  name: 'systemProgram';
818
820
  isMut: false;
819
821
  isSigner: false;
820
- },
822
+ }
821
823
  ];
822
824
  args: [
823
825
  {
@@ -831,9 +833,9 @@ export type LightCompressedToken = {
831
833
  type: {
832
834
  defined: 'TokenData';
833
835
  };
834
- },
836
+ }
835
837
  ];
836
- },
838
+ }
837
839
  ];
838
840
  types: [
839
841
  {
@@ -849,7 +851,7 @@ export type LightCompressedToken = {
849
851
  {
850
852
  name: 'programOwner';
851
853
  docs: [
852
- 'Program owner of the Merkle tree. This will be used for program owned Merkle trees.',
854
+ 'Program owner of the Merkle tree. This will be used for program owned Merkle trees.'
853
855
  ];
854
856
  type: 'publicKey';
855
857
  },
@@ -861,10 +863,10 @@ export type LightCompressedToken = {
861
863
  'forested by light foresters. The variable is not used in the account',
862
864
  'compression program but the registry program. The registry program',
863
865
  'implements access control to prevent contention during forester. The',
864
- 'forester pubkey specified in this struct can bypass contention checks.',
866
+ 'forester pubkey specified in this struct can bypass contention checks.'
865
867
  ];
866
868
  type: 'publicKey';
867
- },
869
+ }
868
870
  ];
869
871
  };
870
872
  },
@@ -878,7 +880,7 @@ export type LightCompressedToken = {
878
880
  },
879
881
  {
880
882
  name: 'Frozen';
881
- },
883
+ }
882
884
  ];
883
885
  };
884
886
  },
@@ -910,7 +912,7 @@ export type LightCompressedToken = {
910
912
  defined: 'CompressedAccountData';
911
913
  };
912
914
  };
913
- },
915
+ }
914
916
  ];
915
917
  };
916
918
  },
@@ -934,7 +936,7 @@ export type LightCompressedToken = {
934
936
  type: {
935
937
  array: ['u8', 32];
936
938
  };
937
- },
939
+ }
938
940
  ];
939
941
  };
940
942
  },
@@ -947,7 +949,7 @@ export type LightCompressedToken = {
947
949
  name: 'setContext';
948
950
  docs: [
949
951
  'Is set by the program that is invoking the CPI to signal that is should',
950
- 'set the cpi context.',
952
+ 'set the cpi context.'
951
953
  ];
952
954
  type: 'bool';
953
955
  },
@@ -955,17 +957,17 @@ export type LightCompressedToken = {
955
957
  name: 'firstSetContext';
956
958
  docs: [
957
959
  'Is set to wipe the cpi context since someone could have set it before',
958
- 'with unrelated data.',
960
+ 'with unrelated data.'
959
961
  ];
960
962
  type: 'bool';
961
963
  },
962
964
  {
963
965
  name: 'cpiContextAccountIndex';
964
966
  docs: [
965
- 'Index of cpi context account in remaining accounts.',
967
+ 'Index of cpi context account in remaining accounts.'
966
968
  ];
967
969
  type: 'u8';
968
- },
970
+ }
969
971
  ];
970
972
  };
971
973
  },
@@ -991,7 +993,7 @@ export type LightCompressedToken = {
991
993
  type: {
992
994
  array: ['u8', 32];
993
995
  };
994
- },
996
+ }
995
997
  ];
996
998
  };
997
999
  },
@@ -1017,7 +1019,7 @@ export type LightCompressedToken = {
1017
1019
  docs: [
1018
1020
  'Is required if the signer is delegate,',
1019
1021
  '-> delegate is authority account,',
1020
- 'owner = Some(owner) is the owner of the token account.',
1022
+ 'owner = Some(owner) is the owner of the token account.'
1021
1023
  ];
1022
1024
  type: {
1023
1025
  option: {
@@ -1064,14 +1066,14 @@ export type LightCompressedToken = {
1064
1066
  type: {
1065
1067
  option: 'u8';
1066
1068
  };
1067
- },
1069
+ }
1068
1070
  ];
1069
1071
  };
1070
1072
  },
1071
1073
  {
1072
1074
  name: 'DelegatedTransfer';
1073
1075
  docs: [
1074
- 'Struct to provide the owner when the delegate is signer of the transaction.',
1076
+ 'Struct to provide the owner when the delegate is signer of the transaction.'
1075
1077
  ];
1076
1078
  type: {
1077
1079
  kind: 'struct';
@@ -1086,12 +1088,12 @@ export type LightCompressedToken = {
1086
1088
  'Index of change compressed account in output compressed accounts. In',
1087
1089
  "case that the delegate didn't spend the complete delegated compressed",
1088
1090
  'account balance the change compressed account will be delegated to her',
1089
- 'as well.',
1091
+ 'as well.'
1090
1092
  ];
1091
1093
  type: {
1092
1094
  option: 'u8';
1093
1095
  };
1094
- },
1096
+ }
1095
1097
  ];
1096
1098
  };
1097
1099
  },
@@ -1129,12 +1131,12 @@ export type LightCompressedToken = {
1129
1131
  {
1130
1132
  name: 'tlv';
1131
1133
  docs: [
1132
- 'Placeholder for TokenExtension tlv data (unimplemented)',
1134
+ 'Placeholder for TokenExtension tlv data (unimplemented)'
1133
1135
  ];
1134
1136
  type: {
1135
1137
  option: 'bytes';
1136
1138
  };
1137
- },
1139
+ }
1138
1140
  ];
1139
1141
  };
1140
1142
  },
@@ -1190,7 +1192,7 @@ export type LightCompressedToken = {
1190
1192
  {
1191
1193
  name: 'isCompress';
1192
1194
  type: 'bool';
1193
- },
1195
+ }
1194
1196
  ];
1195
1197
  };
1196
1198
  },
@@ -1254,7 +1256,7 @@ export type LightCompressedToken = {
1254
1256
  defined: 'CompressedCpiContext';
1255
1257
  };
1256
1258
  };
1257
- },
1259
+ }
1258
1260
  ];
1259
1261
  };
1260
1262
  },
@@ -1282,7 +1284,7 @@ export type LightCompressedToken = {
1282
1284
  {
1283
1285
  name: 'nextMerkleTree';
1284
1286
  type: 'publicKey';
1285
- },
1287
+ }
1286
1288
  ];
1287
1289
  };
1288
1290
  },
@@ -1298,7 +1300,7 @@ export type LightCompressedToken = {
1298
1300
  {
1299
1301
  name: 'seq';
1300
1302
  type: 'u64';
1301
- },
1303
+ }
1302
1304
  ];
1303
1305
  };
1304
1306
  },
@@ -1324,7 +1326,7 @@ export type LightCompressedToken = {
1324
1326
  {
1325
1327
  name: 'addressMerkleTreeRootIndex';
1326
1328
  type: 'u16';
1327
- },
1329
+ }
1328
1330
  ];
1329
1331
  };
1330
1332
  },
@@ -1342,7 +1344,7 @@ export type LightCompressedToken = {
1342
1344
  {
1343
1345
  name: 'merkleTreeIndex';
1344
1346
  type: 'u8';
1345
- },
1347
+ }
1346
1348
  ];
1347
1349
  };
1348
1350
  },
@@ -1366,17 +1368,17 @@ export type LightCompressedToken = {
1366
1368
  {
1367
1369
  name: 'rootIndex';
1368
1370
  docs: [
1369
- 'Index of root used in inclusion validity proof.',
1371
+ 'Index of root used in inclusion validity proof.'
1370
1372
  ];
1371
1373
  type: 'u16';
1372
1374
  },
1373
1375
  {
1374
1376
  name: 'readOnly';
1375
1377
  docs: [
1376
- 'Placeholder to mark accounts read-only unimplemented set to false.',
1378
+ 'Placeholder to mark accounts read-only unimplemented set to false.'
1377
1379
  ];
1378
1380
  type: 'bool';
1379
- },
1381
+ }
1380
1382
  ];
1381
1383
  };
1382
1384
  },
@@ -1401,14 +1403,14 @@ export type LightCompressedToken = {
1401
1403
  name: 'queueIndex';
1402
1404
  docs: [
1403
1405
  'Index of leaf in queue. Placeholder of batched Merkle tree updates',
1404
- 'currently unimplemented.',
1406
+ 'currently unimplemented.'
1405
1407
  ];
1406
1408
  type: {
1407
1409
  option: {
1408
1410
  defined: 'QueueIndex';
1409
1411
  };
1410
1412
  };
1411
- },
1413
+ }
1412
1414
  ];
1413
1415
  };
1414
1416
  },
@@ -1438,12 +1440,12 @@ export type LightCompressedToken = {
1438
1440
  {
1439
1441
  name: 'tlv';
1440
1442
  docs: [
1441
- 'Placeholder for TokenExtension tlv data (unimplemented)',
1443
+ 'Placeholder for TokenExtension tlv data (unimplemented)'
1442
1444
  ];
1443
1445
  type: {
1444
1446
  option: 'bytes';
1445
1447
  };
1446
- },
1448
+ }
1447
1449
  ];
1448
1450
  };
1449
1451
  },
@@ -1517,7 +1519,7 @@ export type LightCompressedToken = {
1517
1519
  type: {
1518
1520
  option: 'bytes';
1519
1521
  };
1520
- },
1522
+ }
1521
1523
  ];
1522
1524
  };
1523
1525
  },
@@ -1535,7 +1537,7 @@ export type LightCompressedToken = {
1535
1537
  name: 'index';
1536
1538
  docs: ['Index of compressed account hash in queue.'];
1537
1539
  type: 'u16';
1538
- },
1540
+ }
1539
1541
  ];
1540
1542
  };
1541
1543
  },
@@ -1553,14 +1555,14 @@ export type LightCompressedToken = {
1553
1555
  name: 'rolloverFee';
1554
1556
  docs: [
1555
1557
  'This fee is used for rent for the next account.',
1556
- 'It accumulates in the account so that once the corresponding Merkle tree account is full it can be rolled over',
1558
+ 'It accumulates in the account so that once the corresponding Merkle tree account is full it can be rolled over'
1557
1559
  ];
1558
1560
  type: 'u64';
1559
1561
  },
1560
1562
  {
1561
1563
  name: 'rolloverThreshold';
1562
1564
  docs: [
1563
- 'The threshold in percentage points when the account should be rolled over (95 corresponds to 95% filled).',
1565
+ 'The threshold in percentage points when the account should be rolled over (95 corresponds to 95% filled).'
1564
1566
  ];
1565
1567
  type: 'u64';
1566
1568
  },
@@ -1572,7 +1574,7 @@ export type LightCompressedToken = {
1572
1574
  {
1573
1575
  name: 'rolledoverSlot';
1574
1576
  docs: [
1575
- 'The slot when the account was rolled over, a rolled over account should not be written to.',
1577
+ 'The slot when the account was rolled over, a rolled over account should not be written to.'
1576
1578
  ];
1577
1579
  type: 'u64';
1578
1580
  },
@@ -1581,7 +1583,7 @@ export type LightCompressedToken = {
1581
1583
  docs: [
1582
1584
  'If current slot is greater than rolledover_slot + close_threshold and',
1583
1585
  "the account is empty it can be closed. No 'close' functionality has been",
1584
- 'implemented yet.',
1586
+ 'implemented yet.'
1585
1587
  ];
1586
1588
  type: 'u64';
1587
1589
  },
@@ -1589,10 +1591,10 @@ export type LightCompressedToken = {
1589
1591
  name: 'additionalBytes';
1590
1592
  docs: [
1591
1593
  'Placeholder for bytes of additional accounts which are tied to the',
1592
- 'Merkle trees operation and need to be rolled over as well.',
1594
+ 'Merkle trees operation and need to be rolled over as well.'
1593
1595
  ];
1594
1596
  type: 'u64';
1595
- },
1597
+ }
1596
1598
  ];
1597
1599
  };
1598
1600
  },
@@ -1620,7 +1622,7 @@ export type LightCompressedToken = {
1620
1622
  name: 'delegate';
1621
1623
  docs: [
1622
1624
  'If `delegate` is `Some` then `delegated_amount` represents',
1623
- 'the amount authorized by the delegate',
1625
+ 'the amount authorized by the delegate'
1624
1626
  ];
1625
1627
  type: {
1626
1628
  option: 'publicKey';
@@ -1636,37 +1638,155 @@ export type LightCompressedToken = {
1636
1638
  {
1637
1639
  name: 'tlv';
1638
1640
  docs: [
1639
- 'Placeholder for TokenExtension tlv data (unimplemented)',
1641
+ 'Placeholder for TokenExtension tlv data (unimplemented)'
1640
1642
  ];
1641
1643
  type: {
1642
1644
  option: 'bytes';
1643
1645
  };
1644
- },
1646
+ }
1645
1647
  ];
1646
1648
  };
1647
- },
1649
+ }
1648
1650
  ];
1649
1651
  errors: [
1650
1652
  {
1651
1653
  code: 6000;
1652
- name: 'SignerCheckFailed';
1653
- msg: 'Signer check failed';
1654
+ name: 'PublicKeyAmountMissmatch';
1655
+ msg: 'public keys and amounts must be of same length';
1654
1656
  },
1655
1657
  {
1656
1658
  code: 6001;
1657
- name: 'CreateTransferInstructionFailed';
1658
- msg: 'Create transfer instruction failed';
1659
+ name: 'ComputeInputSumFailed';
1660
+ msg: 'ComputeInputSumFailed';
1659
1661
  },
1660
1662
  {
1661
1663
  code: 6002;
1662
- name: 'AccountNotFound';
1663
- msg: 'Account not found';
1664
+ name: 'ComputeOutputSumFailed';
1665
+ msg: 'ComputeOutputSumFailed';
1664
1666
  },
1665
1667
  {
1666
1668
  code: 6003;
1667
- name: 'SerializationError';
1668
- msg: 'Serialization error';
1669
+ name: 'ComputeCompressSumFailed';
1670
+ msg: 'ComputeCompressSumFailed';
1671
+ },
1672
+ {
1673
+ code: 6004;
1674
+ name: 'ComputeDecompressSumFailed';
1675
+ msg: 'ComputeDecompressSumFailed';
1676
+ },
1677
+ {
1678
+ code: 6005;
1679
+ name: 'SumCheckFailed';
1680
+ msg: 'SumCheckFailed';
1681
+ },
1682
+ {
1683
+ code: 6006;
1684
+ name: 'DecompressRecipientUndefinedForDecompress';
1685
+ msg: 'DecompressRecipientUndefinedForDecompress';
1686
+ },
1687
+ {
1688
+ code: 6007;
1689
+ name: 'CompressedPdaUndefinedForDecompress';
1690
+ msg: 'CompressedPdaUndefinedForDecompress';
1691
+ },
1692
+ {
1693
+ code: 6008;
1694
+ name: 'DeCompressAmountUndefinedForDecompress';
1695
+ msg: 'DeCompressAmountUndefinedForDecompress';
1696
+ },
1697
+ {
1698
+ code: 6009;
1699
+ name: 'CompressedPdaUndefinedForCompress';
1700
+ msg: 'CompressedPdaUndefinedForCompress';
1701
+ },
1702
+ {
1703
+ code: 6010;
1704
+ name: 'DeCompressAmountUndefinedForCompress';
1705
+ msg: 'DeCompressAmountUndefinedForCompress';
1706
+ },
1707
+ {
1708
+ code: 6011;
1709
+ name: 'DelegateSignerCheckFailed';
1710
+ msg: 'DelegateSignerCheckFailed';
1711
+ },
1712
+ {
1713
+ code: 6012;
1714
+ name: 'MintTooLarge';
1715
+ msg: 'Minted amount greater than u64::MAX';
1716
+ },
1717
+ {
1718
+ code: 6013;
1719
+ name: 'SplTokenSupplyMismatch';
1720
+ msg: 'SplTokenSupplyMismatch';
1721
+ },
1722
+ {
1723
+ code: 6014;
1724
+ name: 'HeapMemoryCheckFailed';
1725
+ msg: 'HeapMemoryCheckFailed';
1726
+ },
1727
+ {
1728
+ code: 6015;
1729
+ name: 'InstructionNotCallable';
1730
+ msg: 'The instruction is not callable';
1731
+ },
1732
+ {
1733
+ code: 6016;
1734
+ name: 'ArithmeticUnderflow';
1735
+ msg: 'ArithmeticUnderflow';
1736
+ },
1737
+ {
1738
+ code: 6017;
1739
+ name: 'HashToFieldError';
1740
+ msg: 'HashToFieldError';
1741
+ },
1742
+ {
1743
+ code: 6018;
1744
+ name: 'InvalidAuthorityMint';
1745
+ msg: 'Expected the authority to be also a mint authority';
1746
+ },
1747
+ {
1748
+ code: 6019;
1749
+ name: 'InvalidFreezeAuthority';
1750
+ msg: 'Provided authority is not the freeze authority';
1751
+ },
1752
+ {
1753
+ code: 6020;
1754
+ name: 'InvalidDelegateIndex';
1755
+ },
1756
+ {
1757
+ code: 6021;
1758
+ name: 'TokenPoolPdaUndefined';
1759
+ },
1760
+ {
1761
+ code: 6022;
1762
+ name: 'IsTokenPoolPda';
1763
+ msg: 'Compress or decompress recipient is the same account as the token pool pda.';
1764
+ },
1765
+ {
1766
+ code: 6023;
1767
+ name: 'InvalidTokenPoolPda';
1768
+ },
1769
+ {
1770
+ code: 6024;
1771
+ name: 'NoInputTokenAccountsProvided';
1772
+ },
1773
+ {
1774
+ code: 6025;
1775
+ name: 'NoInputsProvided';
1776
+ },
1777
+ {
1778
+ code: 6026;
1779
+ name: 'MintHasNoFreezeAuthority';
1669
1780
  },
1781
+ {
1782
+ code: 6027;
1783
+ name: 'MintWithInvalidExtension';
1784
+ },
1785
+ {
1786
+ code: 6028;
1787
+ name: 'InsufficientTokenAccountBalance';
1788
+ msg: 'The token account balance is less than the remaining amount.';
1789
+ }
1670
1790
  ];
1671
1791
  };
1672
1792
  export declare const IDL: LightCompressedToken;