@lightprotocol/compressed-token 0.14.1 → 0.14.2

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.
@@ -1,19 +1,5 @@
1
- import {
2
- CompressedProof,
3
- ParsedTokenAccount,
4
- TokenTransferOutputData as TokenTransferOutputData$1,
5
- InputTokenDataWithContext as InputTokenDataWithContext$1,
6
- Rpc,
7
- } from '@lightprotocol/stateless.js';
8
- import {
9
- PublicKey,
10
- AccountMeta,
11
- TransactionInstruction,
12
- Signer,
13
- ConfirmOptions,
14
- TransactionSignature,
15
- Keypair,
16
- } from '@solana/web3.js';
1
+ import { CompressedProof, ParsedTokenAccount, TokenTransferOutputData as TokenTransferOutputData$1, InputTokenDataWithContext as InputTokenDataWithContext$1, Rpc } from '@lightprotocol/stateless.js';
2
+ import { PublicKey, AccountMeta, TransactionInstruction, Signer, ConfirmOptions, TransactionSignature, Keypair } from '@solana/web3.js';
17
3
  import { BN, Program } from '@coral-xyz/anchor';
18
4
 
19
5
  type LightCompressedToken = {
@@ -26,7 +12,7 @@ type LightCompressedToken = {
26
12
  'This instruction creates a token pool for a given mint. Every spl mint',
27
13
  'can have one token pool. When a token is compressed the tokens are',
28
14
  'transferrred to the token pool, and their compressed equivalent is',
29
- 'minted into a Merkle tree.',
15
+ 'minted into a Merkle tree.'
30
16
  ];
31
17
  accounts: [
32
18
  {
@@ -59,7 +45,7 @@ type LightCompressedToken = {
59
45
  name: 'cpiAuthorityPda';
60
46
  isMut: false;
61
47
  isSigner: false;
62
- },
48
+ }
63
49
  ];
64
50
  args: [];
65
51
  },
@@ -72,7 +58,7 @@ type LightCompressedToken = {
72
58
  'every amount and pubkey input pair. A constant amount of lamports can be',
73
59
  'transferred to each output account to enable. A use case to add lamports',
74
60
  'to a compressed token account is to prevent spam. This is the only way',
75
- 'to add lamports to a compressed token account.',
61
+ 'to add lamports to a compressed token account.'
76
62
  ];
77
63
  accounts: [
78
64
  {
@@ -101,7 +87,7 @@ type LightCompressedToken = {
101
87
  isMut: true;
102
88
  isSigner: false;
103
89
  docs: [
104
- 'account to a token account of a different mint will fail',
90
+ 'account to a token account of a different mint will fail'
105
91
  ];
106
92
  },
107
93
  {
@@ -155,7 +141,7 @@ type LightCompressedToken = {
155
141
  isMut: true;
156
142
  isSigner: false;
157
143
  isOptional: true;
158
- },
144
+ }
159
145
  ];
160
146
  args: [
161
147
  {
@@ -175,7 +161,7 @@ type LightCompressedToken = {
175
161
  type: {
176
162
  option: 'u64';
177
163
  };
178
- },
164
+ }
179
165
  ];
180
166
  },
181
167
  {
@@ -188,7 +174,7 @@ type LightCompressedToken = {
188
174
  'accounts specify less lamports than inputs the remaining lamports are',
189
175
  'transferred to an output compressed account. Signer must be owner or',
190
176
  'delegate. If a delegated token account is transferred the delegate is',
191
- 'not preserved.',
177
+ 'not preserved.'
192
178
  ];
193
179
  accounts: [
194
180
  {
@@ -204,7 +190,7 @@ type LightCompressedToken = {
204
190
  docs: [
205
191
  'Authority is verified through proof since both owner and delegate',
206
192
  'are included in the token data hash, which is a public input to the',
207
- 'validity proof.',
193
+ 'validity proof.'
208
194
  ];
209
195
  },
210
196
  {
@@ -265,13 +251,13 @@ type LightCompressedToken = {
265
251
  name: 'systemProgram';
266
252
  isMut: false;
267
253
  isSigner: false;
268
- },
254
+ }
269
255
  ];
270
256
  args: [
271
257
  {
272
258
  name: 'inputs';
273
259
  type: 'bytes';
274
- },
260
+ }
275
261
  ];
276
262
  },
277
263
  {
@@ -282,7 +268,7 @@ type LightCompressedToken = {
282
268
  'be called by a delegate.',
283
269
  'The instruction creates two output accounts:',
284
270
  '1. one account with delegated amount',
285
- '2. one account with remaining(change) amount',
271
+ '2. one account with remaining(change) amount'
286
272
  ];
287
273
  accounts: [
288
274
  {
@@ -298,7 +284,7 @@ type LightCompressedToken = {
298
284
  docs: [
299
285
  'Authority is verified through proof since both owner and delegate',
300
286
  'are included in the token data hash, which is a public input to the',
301
- 'validity proof.',
287
+ 'validity proof.'
302
288
  ];
303
289
  },
304
290
  {
@@ -341,20 +327,20 @@ type LightCompressedToken = {
341
327
  name: 'systemProgram';
342
328
  isMut: false;
343
329
  isSigner: false;
344
- },
330
+ }
345
331
  ];
346
332
  args: [
347
333
  {
348
334
  name: 'inputs';
349
335
  type: 'bytes';
350
- },
336
+ }
351
337
  ];
352
338
  },
353
339
  {
354
340
  name: 'revoke';
355
341
  docs: [
356
342
  'Revokes a delegation. The instruction merges all inputs into one output',
357
- 'account. Cannot be called by a delegate. Delegates are not preserved.',
343
+ 'account. Cannot be called by a delegate. Delegates are not preserved.'
358
344
  ];
359
345
  accounts: [
360
346
  {
@@ -370,7 +356,7 @@ type LightCompressedToken = {
370
356
  docs: [
371
357
  'Authority is verified through proof since both owner and delegate',
372
358
  'are included in the token data hash, which is a public input to the',
373
- 'validity proof.',
359
+ 'validity proof.'
374
360
  ];
375
361
  },
376
362
  {
@@ -413,20 +399,20 @@ type LightCompressedToken = {
413
399
  name: 'systemProgram';
414
400
  isMut: false;
415
401
  isSigner: false;
416
- },
402
+ }
417
403
  ];
418
404
  args: [
419
405
  {
420
406
  name: 'inputs';
421
407
  type: 'bytes';
422
- },
408
+ }
423
409
  ];
424
410
  },
425
411
  {
426
412
  name: 'freeze';
427
413
  docs: [
428
414
  'Freezes compressed token accounts. Inputs must not be frozen. Creates as',
429
- 'many outputs as inputs. Balances and delegates are preserved.',
415
+ 'many outputs as inputs. Balances and delegates are preserved.'
430
416
  ];
431
417
  accounts: [
432
418
  {
@@ -485,20 +471,20 @@ type LightCompressedToken = {
485
471
  name: 'mint';
486
472
  isMut: false;
487
473
  isSigner: false;
488
- },
474
+ }
489
475
  ];
490
476
  args: [
491
477
  {
492
478
  name: 'inputs';
493
479
  type: 'bytes';
494
- },
480
+ }
495
481
  ];
496
482
  },
497
483
  {
498
484
  name: 'thaw';
499
485
  docs: [
500
486
  'Thaws frozen compressed token accounts. Inputs must be frozen. Creates',
501
- 'as many outputs as inputs. Balances and delegates are preserved.',
487
+ 'as many outputs as inputs. Balances and delegates are preserved.'
502
488
  ];
503
489
  accounts: [
504
490
  {
@@ -557,13 +543,13 @@ type LightCompressedToken = {
557
543
  name: 'mint';
558
544
  isMut: false;
559
545
  isSigner: false;
560
- },
546
+ }
561
547
  ];
562
548
  args: [
563
549
  {
564
550
  name: 'inputs';
565
551
  type: 'bytes';
566
- },
552
+ }
567
553
  ];
568
554
  },
569
555
  {
@@ -571,7 +557,7 @@ type LightCompressedToken = {
571
557
  docs: [
572
558
  'Burns compressed tokens and spl tokens from the pool account. Delegates',
573
559
  'can burn tokens. The output compressed token account remains delegated.',
574
- 'Creates one output compressed token account.',
560
+ 'Creates one output compressed token account.'
575
561
  ];
576
562
  accounts: [
577
563
  {
@@ -587,7 +573,7 @@ type LightCompressedToken = {
587
573
  docs: [
588
574
  'Authority is verified through proof since both owner and delegate',
589
575
  'are included in the token data hash, which is a public input to the',
590
- 'validity proof.',
576
+ 'validity proof.'
591
577
  ];
592
578
  },
593
579
  {
@@ -644,13 +630,13 @@ type LightCompressedToken = {
644
630
  name: 'systemProgram';
645
631
  isMut: false;
646
632
  isSigner: false;
647
- },
633
+ }
648
634
  ];
649
635
  args: [
650
636
  {
651
637
  name: 'inputs';
652
638
  type: 'bytes';
653
- },
639
+ }
654
640
  ];
655
641
  },
656
642
  {
@@ -658,7 +644,7 @@ type LightCompressedToken = {
658
644
  docs: [
659
645
  'This function is a stub to allow Anchor to include the input types in',
660
646
  'the IDL. It should not be included in production builds nor be called in',
661
- 'practice.',
647
+ 'practice.'
662
648
  ];
663
649
  accounts: [
664
650
  {
@@ -674,7 +660,7 @@ type LightCompressedToken = {
674
660
  docs: [
675
661
  'Authority is verified through proof since both owner and delegate',
676
662
  'are included in the token data hash, which is a public input to the',
677
- 'validity proof.',
663
+ 'validity proof.'
678
664
  ];
679
665
  },
680
666
  {
@@ -735,7 +721,7 @@ type LightCompressedToken = {
735
721
  name: 'systemProgram';
736
722
  isMut: false;
737
723
  isSigner: false;
738
- },
724
+ }
739
725
  ];
740
726
  args: [
741
727
  {
@@ -749,9 +735,9 @@ type LightCompressedToken = {
749
735
  type: {
750
736
  defined: 'TokenData';
751
737
  };
752
- },
738
+ }
753
739
  ];
754
- },
740
+ }
755
741
  ];
756
742
  types: [
757
743
  {
@@ -767,7 +753,7 @@ type LightCompressedToken = {
767
753
  {
768
754
  name: 'programOwner';
769
755
  docs: [
770
- 'Program owner of the Merkle tree. This will be used for program owned Merkle trees.',
756
+ 'Program owner of the Merkle tree. This will be used for program owned Merkle trees.'
771
757
  ];
772
758
  type: 'publicKey';
773
759
  },
@@ -779,10 +765,10 @@ type LightCompressedToken = {
779
765
  'forested by light foresters. The variable is not used in the account',
780
766
  'compression program but the registry program. The registry program',
781
767
  'implements access control to prevent contention during forester. The',
782
- 'forester pubkey specified in this struct can bypass contention checks.',
768
+ 'forester pubkey specified in this struct can bypass contention checks.'
783
769
  ];
784
770
  type: 'publicKey';
785
- },
771
+ }
786
772
  ];
787
773
  };
788
774
  },
@@ -796,7 +782,7 @@ type LightCompressedToken = {
796
782
  },
797
783
  {
798
784
  name: 'Frozen';
799
- },
785
+ }
800
786
  ];
801
787
  };
802
788
  },
@@ -828,7 +814,7 @@ type LightCompressedToken = {
828
814
  defined: 'CompressedAccountData';
829
815
  };
830
816
  };
831
- },
817
+ }
832
818
  ];
833
819
  };
834
820
  },
@@ -852,7 +838,7 @@ type LightCompressedToken = {
852
838
  type: {
853
839
  array: ['u8', 32];
854
840
  };
855
- },
841
+ }
856
842
  ];
857
843
  };
858
844
  },
@@ -865,7 +851,7 @@ type LightCompressedToken = {
865
851
  name: 'setContext';
866
852
  docs: [
867
853
  'Is set by the program that is invoking the CPI to signal that is should',
868
- 'set the cpi context.',
854
+ 'set the cpi context.'
869
855
  ];
870
856
  type: 'bool';
871
857
  },
@@ -873,17 +859,17 @@ type LightCompressedToken = {
873
859
  name: 'firstSetContext';
874
860
  docs: [
875
861
  'Is set to wipe the cpi context since someone could have set it before',
876
- 'with unrelated data.',
862
+ 'with unrelated data.'
877
863
  ];
878
864
  type: 'bool';
879
865
  },
880
866
  {
881
867
  name: 'cpiContextAccountIndex';
882
868
  docs: [
883
- 'Index of cpi context account in remaining accounts.',
869
+ 'Index of cpi context account in remaining accounts.'
884
870
  ];
885
871
  type: 'u8';
886
- },
872
+ }
887
873
  ];
888
874
  };
889
875
  },
@@ -909,7 +895,7 @@ type LightCompressedToken = {
909
895
  type: {
910
896
  array: ['u8', 32];
911
897
  };
912
- },
898
+ }
913
899
  ];
914
900
  };
915
901
  },
@@ -935,7 +921,7 @@ type LightCompressedToken = {
935
921
  docs: [
936
922
  'Is required if the signer is delegate,',
937
923
  '-> delegate is authority account,',
938
- 'owner = Some(owner) is the owner of the token account.',
924
+ 'owner = Some(owner) is the owner of the token account.'
939
925
  ];
940
926
  type: {
941
927
  option: {
@@ -982,14 +968,14 @@ type LightCompressedToken = {
982
968
  type: {
983
969
  option: 'u8';
984
970
  };
985
- },
971
+ }
986
972
  ];
987
973
  };
988
974
  },
989
975
  {
990
976
  name: 'DelegatedTransfer';
991
977
  docs: [
992
- 'Struct to provide the owner when the delegate is signer of the transaction.',
978
+ 'Struct to provide the owner when the delegate is signer of the transaction.'
993
979
  ];
994
980
  type: {
995
981
  kind: 'struct';
@@ -1004,12 +990,12 @@ type LightCompressedToken = {
1004
990
  'Index of change compressed account in output compressed accounts. In',
1005
991
  "case that the delegate didn't spend the complete delegated compressed",
1006
992
  'account balance the change compressed account will be delegated to her',
1007
- 'as well.',
993
+ 'as well.'
1008
994
  ];
1009
995
  type: {
1010
996
  option: 'u8';
1011
997
  };
1012
- },
998
+ }
1013
999
  ];
1014
1000
  };
1015
1001
  },
@@ -1047,12 +1033,12 @@ type LightCompressedToken = {
1047
1033
  {
1048
1034
  name: 'tlv';
1049
1035
  docs: [
1050
- 'Placeholder for TokenExtension tlv data (unimplemented)',
1036
+ 'Placeholder for TokenExtension tlv data (unimplemented)'
1051
1037
  ];
1052
1038
  type: {
1053
1039
  option: 'bytes';
1054
1040
  };
1055
- },
1041
+ }
1056
1042
  ];
1057
1043
  };
1058
1044
  },
@@ -1108,7 +1094,7 @@ type LightCompressedToken = {
1108
1094
  {
1109
1095
  name: 'isCompress';
1110
1096
  type: 'bool';
1111
- },
1097
+ }
1112
1098
  ];
1113
1099
  };
1114
1100
  },
@@ -1172,7 +1158,7 @@ type LightCompressedToken = {
1172
1158
  defined: 'CompressedCpiContext';
1173
1159
  };
1174
1160
  };
1175
- },
1161
+ }
1176
1162
  ];
1177
1163
  };
1178
1164
  },
@@ -1200,7 +1186,7 @@ type LightCompressedToken = {
1200
1186
  {
1201
1187
  name: 'nextMerkleTree';
1202
1188
  type: 'publicKey';
1203
- },
1189
+ }
1204
1190
  ];
1205
1191
  };
1206
1192
  },
@@ -1216,7 +1202,7 @@ type LightCompressedToken = {
1216
1202
  {
1217
1203
  name: 'seq';
1218
1204
  type: 'u64';
1219
- },
1205
+ }
1220
1206
  ];
1221
1207
  };
1222
1208
  },
@@ -1242,7 +1228,7 @@ type LightCompressedToken = {
1242
1228
  {
1243
1229
  name: 'addressMerkleTreeRootIndex';
1244
1230
  type: 'u16';
1245
- },
1231
+ }
1246
1232
  ];
1247
1233
  };
1248
1234
  },
@@ -1260,7 +1246,7 @@ type LightCompressedToken = {
1260
1246
  {
1261
1247
  name: 'merkleTreeIndex';
1262
1248
  type: 'u8';
1263
- },
1249
+ }
1264
1250
  ];
1265
1251
  };
1266
1252
  },
@@ -1284,17 +1270,17 @@ type LightCompressedToken = {
1284
1270
  {
1285
1271
  name: 'rootIndex';
1286
1272
  docs: [
1287
- 'Index of root used in inclusion validity proof.',
1273
+ 'Index of root used in inclusion validity proof.'
1288
1274
  ];
1289
1275
  type: 'u16';
1290
1276
  },
1291
1277
  {
1292
1278
  name: 'readOnly';
1293
1279
  docs: [
1294
- 'Placeholder to mark accounts read-only unimplemented set to false.',
1280
+ 'Placeholder to mark accounts read-only unimplemented set to false.'
1295
1281
  ];
1296
1282
  type: 'bool';
1297
- },
1283
+ }
1298
1284
  ];
1299
1285
  };
1300
1286
  },
@@ -1319,14 +1305,14 @@ type LightCompressedToken = {
1319
1305
  name: 'queueIndex';
1320
1306
  docs: [
1321
1307
  'Index of leaf in queue. Placeholder of batched Merkle tree updates',
1322
- 'currently unimplemented.',
1308
+ 'currently unimplemented.'
1323
1309
  ];
1324
1310
  type: {
1325
1311
  option: {
1326
1312
  defined: 'QueueIndex';
1327
1313
  };
1328
1314
  };
1329
- },
1315
+ }
1330
1316
  ];
1331
1317
  };
1332
1318
  },
@@ -1356,12 +1342,12 @@ type LightCompressedToken = {
1356
1342
  {
1357
1343
  name: 'tlv';
1358
1344
  docs: [
1359
- 'Placeholder for TokenExtension tlv data (unimplemented)',
1345
+ 'Placeholder for TokenExtension tlv data (unimplemented)'
1360
1346
  ];
1361
1347
  type: {
1362
1348
  option: 'bytes';
1363
1349
  };
1364
- },
1350
+ }
1365
1351
  ];
1366
1352
  };
1367
1353
  },
@@ -1435,7 +1421,7 @@ type LightCompressedToken = {
1435
1421
  type: {
1436
1422
  option: 'bytes';
1437
1423
  };
1438
- },
1424
+ }
1439
1425
  ];
1440
1426
  };
1441
1427
  },
@@ -1453,7 +1439,7 @@ type LightCompressedToken = {
1453
1439
  name: 'index';
1454
1440
  docs: ['Index of compressed account hash in queue.'];
1455
1441
  type: 'u16';
1456
- },
1442
+ }
1457
1443
  ];
1458
1444
  };
1459
1445
  },
@@ -1471,14 +1457,14 @@ type LightCompressedToken = {
1471
1457
  name: 'rolloverFee';
1472
1458
  docs: [
1473
1459
  'This fee is used for rent for the next account.',
1474
- 'It accumulates in the account so that once the corresponding Merkle tree account is full it can be rolled over',
1460
+ 'It accumulates in the account so that once the corresponding Merkle tree account is full it can be rolled over'
1475
1461
  ];
1476
1462
  type: 'u64';
1477
1463
  },
1478
1464
  {
1479
1465
  name: 'rolloverThreshold';
1480
1466
  docs: [
1481
- 'The threshold in percentage points when the account should be rolled over (95 corresponds to 95% filled).',
1467
+ 'The threshold in percentage points when the account should be rolled over (95 corresponds to 95% filled).'
1482
1468
  ];
1483
1469
  type: 'u64';
1484
1470
  },
@@ -1490,7 +1476,7 @@ type LightCompressedToken = {
1490
1476
  {
1491
1477
  name: 'rolledoverSlot';
1492
1478
  docs: [
1493
- 'The slot when the account was rolled over, a rolled over account should not be written to.',
1479
+ 'The slot when the account was rolled over, a rolled over account should not be written to.'
1494
1480
  ];
1495
1481
  type: 'u64';
1496
1482
  },
@@ -1499,7 +1485,7 @@ type LightCompressedToken = {
1499
1485
  docs: [
1500
1486
  'If current slot is greater than rolledover_slot + close_threshold and',
1501
1487
  "the account is empty it can be closed. No 'close' functionality has been",
1502
- 'implemented yet.',
1488
+ 'implemented yet.'
1503
1489
  ];
1504
1490
  type: 'u64';
1505
1491
  },
@@ -1507,10 +1493,10 @@ type LightCompressedToken = {
1507
1493
  name: 'additionalBytes';
1508
1494
  docs: [
1509
1495
  'Placeholder for bytes of additional accounts which are tied to the',
1510
- 'Merkle trees operation and need to be rolled over as well.',
1496
+ 'Merkle trees operation and need to be rolled over as well.'
1511
1497
  ];
1512
1498
  type: 'u64';
1513
- },
1499
+ }
1514
1500
  ];
1515
1501
  };
1516
1502
  },
@@ -1538,7 +1524,7 @@ type LightCompressedToken = {
1538
1524
  name: 'delegate';
1539
1525
  docs: [
1540
1526
  'If `delegate` is `Some` then `delegated_amount` represents',
1541
- 'the amount authorized by the delegate',
1527
+ 'the amount authorized by the delegate'
1542
1528
  ];
1543
1529
  type: {
1544
1530
  option: 'publicKey';
@@ -1554,15 +1540,15 @@ type LightCompressedToken = {
1554
1540
  {
1555
1541
  name: 'tlv';
1556
1542
  docs: [
1557
- 'Placeholder for TokenExtension tlv data (unimplemented)',
1543
+ 'Placeholder for TokenExtension tlv data (unimplemented)'
1558
1544
  ];
1559
1545
  type: {
1560
1546
  option: 'bytes';
1561
1547
  };
1562
- },
1548
+ }
1563
1549
  ];
1564
1550
  };
1565
- },
1551
+ }
1566
1552
  ];
1567
1553
  errors: [
1568
1554
  {
@@ -1689,7 +1675,7 @@ type LightCompressedToken = {
1689
1675
  {
1690
1676
  code: 6025;
1691
1677
  name: 'NoInputsProvided';
1692
- },
1678
+ }
1693
1679
  ];
1694
1680
  };
1695
1681
  declare const IDL: LightCompressedToken;
@@ -1849,9 +1835,7 @@ type PackCompressedTokenAccountsParams = {
1849
1835
  /**
1850
1836
  * Packs Compressed Token Accounts.
1851
1837
  */
1852
- declare function packCompressedTokenAccounts(
1853
- params: PackCompressedTokenAccountsParams,
1854
- ): {
1838
+ declare function packCompressedTokenAccounts(params: PackCompressedTokenAccountsParams): {
1855
1839
  inputTokenDataWithContext: InputTokenDataWithContext$1[];
1856
1840
  remainingAccountMetas: AccountMeta[];
1857
1841
  packedOutputTokenData: PackedTokenTransferOutputData[];
@@ -2130,9 +2114,7 @@ declare const validateSameTokenOwner: (accounts: ParsedTokenAccount[]) => void;
2130
2114
  /**
2131
2115
  * Parse compressed token accounts to get the mint, current owner and delegate.
2132
2116
  */
2133
- declare const parseTokenData: (
2134
- compressedTokenAccounts: ParsedTokenAccount[],
2135
- ) => {
2117
+ declare const parseTokenData: (compressedTokenAccounts: ParsedTokenAccount[]) => {
2136
2118
  mint: PublicKey;
2137
2119
  currentOwner: PublicKey;
2138
2120
  delegate: PublicKey | null;
@@ -2145,11 +2127,7 @@ declare const parseTokenData: (
2145
2127
  * @returns Output token data for the transfer
2146
2128
  * instruction
2147
2129
  */
2148
- declare function createTransferOutputState(
2149
- inputCompressedTokenAccounts: ParsedTokenAccount[],
2150
- toAddress: PublicKey,
2151
- amount: number | BN,
2152
- ): TokenTransferOutputData$1[];
2130
+ declare function createTransferOutputState(inputCompressedTokenAccounts: ParsedTokenAccount[], toAddress: PublicKey, amount: number | BN): TokenTransferOutputData$1[];
2153
2131
  /**
2154
2132
  * Create the output state for a compress transaction.
2155
2133
  * @param inputCompressedTokenAccounts Input state
@@ -2157,10 +2135,7 @@ declare function createTransferOutputState(
2157
2135
  * @returns Output token data for the compress
2158
2136
  * instruction
2159
2137
  */
2160
- declare function createDecompressOutputState(
2161
- inputCompressedTokenAccounts: ParsedTokenAccount[],
2162
- amount: number | BN,
2163
- ): TokenTransferOutputData$1[];
2138
+ declare function createDecompressOutputState(inputCompressedTokenAccounts: ParsedTokenAccount[], amount: number | BN): TokenTransferOutputData$1[];
2164
2139
  declare class CompressedTokenProgram {
2165
2140
  /**
2166
2141
  * @internal
@@ -2185,16 +2160,12 @@ declare class CompressedTokenProgram {
2185
2160
  /**
2186
2161
  * Construct createMint instruction for compressed tokens
2187
2162
  */
2188
- static createMint(
2189
- params: CreateMintParams,
2190
- ): Promise<TransactionInstruction[]>;
2163
+ static createMint(params: CreateMintParams): Promise<TransactionInstruction[]>;
2191
2164
  /**
2192
2165
  * Enable compression for an existing SPL mint, creating an omnibus account.
2193
2166
  * For new mints, use `CompressedTokenProgram.createMint`.
2194
2167
  */
2195
- static createTokenPool(
2196
- params: RegisterMintParams,
2197
- ): Promise<TransactionInstruction>;
2168
+ static createTokenPool(params: RegisterMintParams): Promise<TransactionInstruction>;
2198
2169
  /**
2199
2170
  * Construct mintTo instruction for compressed tokens
2200
2171
  */
@@ -2202,9 +2173,7 @@ declare class CompressedTokenProgram {
2202
2173
  /**
2203
2174
  * Mint tokens from registed SPL mint account to a compressed account
2204
2175
  */
2205
- static approveAndMintTo(
2206
- params: ApproveAndMintToParams,
2207
- ): Promise<TransactionInstruction[]>;
2176
+ static approveAndMintTo(params: ApproveAndMintToParams): Promise<TransactionInstruction[]>;
2208
2177
  /**
2209
2178
  * Construct transfer instruction for compressed tokens
2210
2179
  */
@@ -2212,9 +2181,7 @@ declare class CompressedTokenProgram {
2212
2181
  /**
2213
2182
  * Create lookup table instructions for the token program's default accounts.
2214
2183
  */
2215
- static createTokenProgramLookupTable(
2216
- params: CreateTokenProgramLookupTableParams,
2217
- ): Promise<{
2184
+ static createTokenProgramLookupTable(params: CreateTokenProgramLookupTableParams): Promise<{
2218
2185
  instructions: TransactionInstruction[];
2219
2186
  address: PublicKey;
2220
2187
  }>;
@@ -2226,12 +2193,8 @@ declare class CompressedTokenProgram {
2226
2193
  /**
2227
2194
  * Construct decompress instruction
2228
2195
  */
2229
- static decompress(
2230
- params: DecompressParams,
2231
- ): Promise<TransactionInstruction>;
2232
- static mergeTokenAccounts(
2233
- params: MergeTokenAccountsParams,
2234
- ): Promise<TransactionInstruction[]>;
2196
+ static decompress(params: DecompressParams): Promise<TransactionInstruction>;
2197
+ static mergeTokenAccounts(params: MergeTokenAccountsParams): Promise<TransactionInstruction[]>;
2235
2198
  }
2236
2199
 
2237
2200
  /**
@@ -2249,16 +2212,7 @@ declare class CompressedTokenProgram {
2249
2212
  *
2250
2213
  * @return Signature of the confirmed transaction
2251
2214
  */
2252
- declare function approveAndMintTo(
2253
- rpc: Rpc,
2254
- payer: Signer,
2255
- mint: PublicKey,
2256
- destination: PublicKey,
2257
- authority: Signer,
2258
- amount: number | BN,
2259
- merkleTree?: PublicKey,
2260
- confirmOptions?: ConfirmOptions,
2261
- ): Promise<TransactionSignature>;
2215
+ declare function approveAndMintTo(rpc: Rpc, payer: Signer, mint: PublicKey, destination: PublicKey, authority: Signer, amount: number | BN, merkleTree?: PublicKey, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2262
2216
 
2263
2217
  /**
2264
2218
  * Compress SPL tokens
@@ -2278,17 +2232,7 @@ declare function approveAndMintTo(
2278
2232
  *
2279
2233
  * @return Signature of the confirmed transaction
2280
2234
  */
2281
- declare function compress(
2282
- rpc: Rpc,
2283
- payer: Signer,
2284
- mint: PublicKey,
2285
- amount: number | BN | number[] | BN[],
2286
- owner: Signer,
2287
- sourceTokenAccount: PublicKey,
2288
- toAddress: PublicKey | Array<PublicKey>,
2289
- merkleTree?: PublicKey,
2290
- confirmOptions?: ConfirmOptions,
2291
- ): Promise<TransactionSignature>;
2235
+ declare function compress(rpc: Rpc, payer: Signer, mint: PublicKey, amount: number | BN | number[] | BN[], owner: Signer, sourceTokenAccount: PublicKey, toAddress: PublicKey | Array<PublicKey>, merkleTree?: PublicKey, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2292
2236
 
2293
2237
  /**
2294
2238
  * Decompress compressed tokens
@@ -2308,16 +2252,7 @@ declare function compress(
2308
2252
  *
2309
2253
  * @return Signature of the confirmed transaction
2310
2254
  */
2311
- declare function decompress(
2312
- rpc: Rpc,
2313
- payer: Signer,
2314
- mint: PublicKey,
2315
- amount: number | BN,
2316
- owner: Signer,
2317
- toAddress: PublicKey,
2318
- merkleTree?: PublicKey,
2319
- confirmOptions?: ConfirmOptions,
2320
- ): Promise<TransactionSignature>;
2255
+ declare function decompress(rpc: Rpc, payer: Signer, mint: PublicKey, amount: number | BN, owner: Signer, toAddress: PublicKey, merkleTree?: PublicKey, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2321
2256
 
2322
2257
  /**
2323
2258
  * Create and initialize a new compressed token mint
@@ -2331,14 +2266,7 @@ declare function decompress(
2331
2266
  *
2332
2267
  * @return Address of the new mint and the transaction signature
2333
2268
  */
2334
- declare function createMint(
2335
- rpc: Rpc,
2336
- payer: Signer,
2337
- mintAuthority: PublicKey,
2338
- decimals: number,
2339
- keypair?: Keypair,
2340
- confirmOptions?: ConfirmOptions,
2341
- ): Promise<{
2269
+ declare function createMint(rpc: Rpc, payer: Signer, mintAuthority: PublicKey, decimals: number, keypair?: Keypair, confirmOptions?: ConfirmOptions): Promise<{
2342
2270
  mint: PublicKey;
2343
2271
  transactionSignature: TransactionSignature;
2344
2272
  }>;
@@ -2360,16 +2288,7 @@ declare function createMint(
2360
2288
  *
2361
2289
  * @return Signature of the confirmed transaction
2362
2290
  */
2363
- declare function mintTo(
2364
- rpc: Rpc,
2365
- payer: Signer,
2366
- mint: PublicKey,
2367
- destination: PublicKey | PublicKey[],
2368
- authority: Signer,
2369
- amount: number | BN | number[] | BN[],
2370
- merkleTree?: PublicKey,
2371
- confirmOptions?: ConfirmOptions,
2372
- ): Promise<TransactionSignature>;
2291
+ declare function mintTo(rpc: Rpc, payer: Signer, mint: PublicKey, destination: PublicKey | PublicKey[], authority: Signer, amount: number | BN | number[] | BN[], merkleTree?: PublicKey, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2373
2292
 
2374
2293
  /**
2375
2294
  * Merge multiple compressed token accounts for a given mint into a single
@@ -2384,14 +2303,7 @@ declare function mintTo(
2384
2303
  *
2385
2304
  * @return Array of transaction signatures
2386
2305
  */
2387
- declare function mergeTokenAccounts(
2388
- rpc: Rpc,
2389
- payer: Signer,
2390
- mint: PublicKey,
2391
- owner: Signer,
2392
- merkleTree?: PublicKey,
2393
- confirmOptions?: ConfirmOptions,
2394
- ): Promise<TransactionSignature>;
2306
+ declare function mergeTokenAccounts(rpc: Rpc, payer: Signer, mint: PublicKey, owner: Signer, merkleTree?: PublicKey, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2395
2307
 
2396
2308
  /**
2397
2309
  * Register an existing mint with the CompressedToken program
@@ -2404,12 +2316,7 @@ declare function mergeTokenAccounts(
2404
2316
  *
2405
2317
  * @return transaction signature
2406
2318
  */
2407
- declare function createTokenPool(
2408
- rpc: Rpc,
2409
- payer: Signer,
2410
- mintAddress: PublicKey,
2411
- confirmOptions?: ConfirmOptions,
2412
- ): Promise<TransactionSignature>;
2319
+ declare function createTokenPool(rpc: Rpc, payer: Signer, mintAddress: PublicKey, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2413
2320
 
2414
2321
  /**
2415
2322
  * Transfer compressed tokens from one owner to another
@@ -2428,16 +2335,7 @@ declare function createTokenPool(
2428
2335
  *
2429
2336
  * @return Signature of the confirmed transaction
2430
2337
  */
2431
- declare function transfer(
2432
- rpc: Rpc,
2433
- payer: Signer,
2434
- mint: PublicKey,
2435
- amount: number | BN,
2436
- owner: Signer,
2437
- toAddress: PublicKey,
2438
- merkleTree?: PublicKey,
2439
- confirmOptions?: ConfirmOptions,
2440
- ): Promise<TransactionSignature>;
2338
+ declare function transfer(rpc: Rpc, payer: Signer, mint: PublicKey, amount: number | BN, owner: Signer, toAddress: PublicKey, merkleTree?: PublicKey, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
2441
2339
  /**
2442
2340
  * Selects the minimal number of compressed token accounts for a transfer.
2443
2341
  *
@@ -2445,13 +2343,10 @@ declare function transfer(
2445
2343
  * 2. Accumulates the amount until it is greater than or equal to the transfer
2446
2344
  * amount
2447
2345
  */
2448
- declare function selectMinCompressedTokenAccountsForTransfer(
2449
- accounts: ParsedTokenAccount[],
2450
- transferAmount: BN,
2451
- ): [
2346
+ declare function selectMinCompressedTokenAccountsForTransfer(accounts: ParsedTokenAccount[], transferAmount: BN): [
2452
2347
  selectedAccounts: ParsedTokenAccount[],
2453
2348
  total: BN,
2454
- totalLamports: BN | null,
2349
+ totalLamports: BN | null
2455
2350
  ];
2456
2351
 
2457
2352
  /**
@@ -2467,51 +2362,9 @@ declare function selectMinCompressedTokenAccountsForTransfer(
2467
2362
  *
2468
2363
  * @return Transaction signatures and the address of the created lookup table
2469
2364
  */
2470
- declare function createTokenProgramLookupTable(
2471
- rpc: Rpc,
2472
- payer: Signer,
2473
- authority: Signer,
2474
- mints?: PublicKey[],
2475
- additionalAccounts?: PublicKey[],
2476
- ): Promise<{
2365
+ declare function createTokenProgramLookupTable(rpc: Rpc, payer: Signer, authority: Signer, mints?: PublicKey[], additionalAccounts?: PublicKey[]): Promise<{
2477
2366
  txIds: TransactionSignature[];
2478
2367
  address: PublicKey;
2479
2368
  }>;
2480
2369
 
2481
- export {
2482
- type ApproveAndMintToParams,
2483
- CPI_AUTHORITY_SEED,
2484
- type CompressedTokenInstructionDataInvoke,
2485
- CompressedTokenProgram,
2486
- type CreateMintParams,
2487
- type CreateTokenProgramLookupTableParams,
2488
- IDL,
2489
- type InputTokenDataWithContext,
2490
- type LightCompressedToken,
2491
- type MergeTokenAccountsParams,
2492
- type MintToParams,
2493
- POOL_SEED,
2494
- type PackCompressedTokenAccountsParams,
2495
- type PackedTokenTransferOutputData,
2496
- type RegisterMintParams,
2497
- SPL_TOKEN_MINT_RENT_EXEMPT_BALANCE,
2498
- type TokenData,
2499
- type TokenTransferOutputData,
2500
- type TransferParams,
2501
- approveAndMintTo,
2502
- compress,
2503
- createDecompressOutputState,
2504
- createMint,
2505
- createTokenPool,
2506
- createTokenProgramLookupTable,
2507
- createTransferOutputState,
2508
- decompress,
2509
- mergeTokenAccounts,
2510
- mintTo,
2511
- packCompressedTokenAccounts,
2512
- parseTokenData,
2513
- selectMinCompressedTokenAccountsForTransfer,
2514
- sumUpTokenAmount,
2515
- transfer,
2516
- validateSameTokenOwner,
2517
- };
2370
+ export { type ApproveAndMintToParams, CPI_AUTHORITY_SEED, type CompressedTokenInstructionDataInvoke, CompressedTokenProgram, type CreateMintParams, type CreateTokenProgramLookupTableParams, IDL, type InputTokenDataWithContext, type LightCompressedToken, type MergeTokenAccountsParams, type MintToParams, POOL_SEED, type PackCompressedTokenAccountsParams, type PackedTokenTransferOutputData, type RegisterMintParams, SPL_TOKEN_MINT_RENT_EXEMPT_BALANCE, type TokenData, type TokenTransferOutputData, type TransferParams, approveAndMintTo, compress, createDecompressOutputState, createMint, createTokenPool, createTokenProgramLookupTable, createTransferOutputState, decompress, mergeTokenAccounts, mintTo, packCompressedTokenAccounts, parseTokenData, selectMinCompressedTokenAccountsForTransfer, sumUpTokenAmount, transfer, validateSameTokenOwner };