@lightprotocol/compressed-token 0.6.0 → 0.8.0

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.
@@ -227,10 +227,7 @@ const IDL = {
227
227
  name: 'selfProgram',
228
228
  isMut: false,
229
229
  isSigner: false,
230
- docs: [
231
- '(different program) checked in light system program to derive',
232
- 'cpi_authority_pda and check that this program is the signer of the cpi.',
233
- ],
230
+ docs: ['this program is the signer of the cpi.'],
234
231
  },
235
232
  {
236
233
  name: 'tokenPoolPda',
@@ -324,10 +321,7 @@ const IDL = {
324
321
  name: 'selfProgram',
325
322
  isMut: false,
326
323
  isSigner: false,
327
- docs: [
328
- '(different program) checked in light system program to derive',
329
- 'cpi_authority_pda and check that this program is the signer of the cpi.',
330
- ],
324
+ docs: ['this program is the signer of the cpi.'],
331
325
  },
332
326
  {
333
327
  name: 'systemProgram',
@@ -399,10 +393,7 @@ const IDL = {
399
393
  name: 'selfProgram',
400
394
  isMut: false,
401
395
  isSigner: false,
402
- docs: [
403
- '(different program) checked in light system program to derive',
404
- 'cpi_authority_pda and check that this program is the signer of the cpi.',
405
- ],
396
+ docs: ['this program is the signer of the cpi.'],
406
397
  },
407
398
  {
408
399
  name: 'systemProgram',
@@ -469,10 +460,7 @@ const IDL = {
469
460
  name: 'selfProgram',
470
461
  isMut: false,
471
462
  isSigner: false,
472
- docs: [
473
- '(different program) checked in light system program to derive',
474
- 'cpi_authority_pda and check that this program is the signer of the cpi.',
475
- ],
463
+ docs: ['that this program is the signer of the cpi.'],
476
464
  },
477
465
  {
478
466
  name: 'systemProgram',
@@ -544,10 +532,7 @@ const IDL = {
544
532
  name: 'selfProgram',
545
533
  isMut: false,
546
534
  isSigner: false,
547
- docs: [
548
- '(different program) checked in light system program to derive',
549
- 'cpi_authority_pda and check that this program is the signer of the cpi.',
550
- ],
535
+ docs: ['that this program is the signer of the cpi.'],
551
536
  },
552
537
  {
553
538
  name: 'systemProgram',
@@ -712,10 +697,7 @@ const IDL = {
712
697
  name: 'selfProgram',
713
698
  isMut: false,
714
699
  isSigner: false,
715
- docs: [
716
- '(different program) checked in light system program to derive',
717
- 'cpi_authority_pda and check that this program is the signer of the cpi.',
718
- ],
700
+ docs: ['this program is the signer of the cpi.'],
719
701
  },
720
702
  {
721
703
  name: 'tokenPoolPda',
@@ -775,6 +757,18 @@ const IDL = {
775
757
  ],
776
758
  type: 'publicKey',
777
759
  },
760
+ {
761
+ name: 'forester',
762
+ docs: [
763
+ 'Optional privileged forester pubkey, can be set for custom Merkle trees',
764
+ 'without a network fee. Merkle trees without network fees are not',
765
+ 'forested by light foresters. The variable is not used in the account',
766
+ 'compression program but the registry program. The registry program',
767
+ 'implements access control to prevent contention during forester. The',
768
+ 'forester pubkey specified in this struct can bypass contention checks.',
769
+ ],
770
+ type: 'publicKey',
771
+ },
778
772
  ],
779
773
  },
780
774
  },
@@ -1286,6 +1280,13 @@ const IDL = {
1286
1280
  ],
1287
1281
  type: 'u16',
1288
1282
  },
1283
+ {
1284
+ name: 'readOnly',
1285
+ docs: [
1286
+ 'Placeholder to mark accounts read-only unimplemented set to false.',
1287
+ ],
1288
+ type: 'bool',
1289
+ },
1289
1290
  ],
1290
1291
  },
1291
1292
  },
@@ -1494,6 +1495,14 @@ const IDL = {
1494
1495
  ],
1495
1496
  type: 'u64',
1496
1497
  },
1498
+ {
1499
+ name: 'additionalBytes',
1500
+ docs: [
1501
+ 'Placeholder for bytes of additional accounts which are tied to the',
1502
+ 'Merkle trees operation and need to be rolled over as well.',
1503
+ ],
1504
+ type: 'u64',
1505
+ },
1497
1506
  ],
1498
1507
  },
1499
1508
  },
@@ -1652,6 +1661,19 @@ const IDL = {
1652
1661
  code: 6020,
1653
1662
  name: 'InvalidDelegateIndex',
1654
1663
  },
1664
+ {
1665
+ code: 6021,
1666
+ name: 'TokenPoolPdaUndefined',
1667
+ },
1668
+ {
1669
+ code: 6022,
1670
+ name: 'IsTokenPoolPda',
1671
+ msg: 'Compress or decompress recipient is the same account as the token pool pda.',
1672
+ },
1673
+ {
1674
+ code: 6023,
1675
+ name: 'InvalidTokenPoolPda',
1676
+ },
1655
1677
  ],
1656
1678
  };
1657
1679
 
@@ -7036,7 +7058,7 @@ merkleTree, confirmOptions) {
7036
7058
  const compressedTokenAccounts = await rpc.getCompressedTokenAccountsByOwner(owner.publicKey, {
7037
7059
  mint,
7038
7060
  });
7039
- const [inputAccounts] = selectMinCompressedTokenAccountsForTransfer(compressedTokenAccounts, amount);
7061
+ const [inputAccounts] = selectMinCompressedTokenAccountsForTransfer(compressedTokenAccounts.items, amount);
7040
7062
  const proof = await rpc.getValidityProof(inputAccounts.map(account => bn(account.compressedAccount.hash)));
7041
7063
  const ix = await CompressedTokenProgram.transfer({
7042
7064
  payer: payer.publicKey,
@@ -7108,7 +7130,7 @@ merkleTree, confirmOptions) {
7108
7130
  mint,
7109
7131
  });
7110
7132
  /// TODO: consider using a different selection algorithm
7111
- const [inputAccounts] = selectMinCompressedTokenAccountsForTransfer(compressedTokenAccounts, amount);
7133
+ const [inputAccounts] = selectMinCompressedTokenAccountsForTransfer(compressedTokenAccounts.items, amount);
7112
7134
  const proof = await rpc.getValidityProof(inputAccounts.map(account => bn(account.compressedAccount.hash)));
7113
7135
  const ix = await CompressedTokenProgram.decompress({
7114
7136
  payer: payer.publicKey,