@lightprotocol/compressed-token 0.11.0 → 0.12.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.
@@ -3,7 +3,7 @@ import { PublicKey, AccountMeta, TransactionInstruction, Signer, ConfirmOptions,
3
3
  import { BN, Program } from '@coral-xyz/anchor';
4
4
 
5
5
  type LightCompressedToken = {
6
- version: '0.5.0';
6
+ version: '1.0.0';
7
7
  name: 'light_compressed_token';
8
8
  instructions: [
9
9
  {
@@ -1151,12 +1151,6 @@ type LightCompressedToken = {
1151
1151
  name: 'isCompress';
1152
1152
  type: 'bool';
1153
1153
  },
1154
- {
1155
- name: 'signerSeeds';
1156
- type: {
1157
- vec: 'bytes';
1158
- };
1159
- },
1160
1154
  {
1161
1155
  name: 'cpiContext';
1162
1156
  type: {
@@ -1559,23 +1553,128 @@ type LightCompressedToken = {
1559
1553
  errors: [
1560
1554
  {
1561
1555
  code: 6000;
1562
- name: 'SignerCheckFailed';
1563
- msg: 'Signer check failed';
1556
+ name: 'PublicKeyAmountMissmatch';
1557
+ msg: 'public keys and amounts must be of same length';
1564
1558
  },
1565
1559
  {
1566
1560
  code: 6001;
1567
- name: 'CreateTransferInstructionFailed';
1568
- msg: 'Create transfer instruction failed';
1561
+ name: 'ComputeInputSumFailed';
1562
+ msg: 'ComputeInputSumFailed';
1569
1563
  },
1570
1564
  {
1571
1565
  code: 6002;
1572
- name: 'AccountNotFound';
1573
- msg: 'Account not found';
1566
+ name: 'ComputeOutputSumFailed';
1567
+ msg: 'ComputeOutputSumFailed';
1574
1568
  },
1575
1569
  {
1576
1570
  code: 6003;
1577
- name: 'SerializationError';
1578
- msg: 'Serialization error';
1571
+ name: 'ComputeCompressSumFailed';
1572
+ msg: 'ComputeCompressSumFailed';
1573
+ },
1574
+ {
1575
+ code: 6004;
1576
+ name: 'ComputeDecompressSumFailed';
1577
+ msg: 'ComputeDecompressSumFailed';
1578
+ },
1579
+ {
1580
+ code: 6005;
1581
+ name: 'SumCheckFailed';
1582
+ msg: 'SumCheckFailed';
1583
+ },
1584
+ {
1585
+ code: 6006;
1586
+ name: 'DecompressRecipientUndefinedForDecompress';
1587
+ msg: 'DecompressRecipientUndefinedForDecompress';
1588
+ },
1589
+ {
1590
+ code: 6007;
1591
+ name: 'CompressedPdaUndefinedForDecompress';
1592
+ msg: 'CompressedPdaUndefinedForDecompress';
1593
+ },
1594
+ {
1595
+ code: 6008;
1596
+ name: 'DeCompressAmountUndefinedForDecompress';
1597
+ msg: 'DeCompressAmountUndefinedForDecompress';
1598
+ },
1599
+ {
1600
+ code: 6009;
1601
+ name: 'CompressedPdaUndefinedForCompress';
1602
+ msg: 'CompressedPdaUndefinedForCompress';
1603
+ },
1604
+ {
1605
+ code: 6010;
1606
+ name: 'DeCompressAmountUndefinedForCompress';
1607
+ msg: 'DeCompressAmountUndefinedForCompress';
1608
+ },
1609
+ {
1610
+ code: 6011;
1611
+ name: 'DelegateSignerCheckFailed';
1612
+ msg: 'DelegateSignerCheckFailed';
1613
+ },
1614
+ {
1615
+ code: 6012;
1616
+ name: 'MintTooLarge';
1617
+ msg: 'Minted amount greater than u64::MAX';
1618
+ },
1619
+ {
1620
+ code: 6013;
1621
+ name: 'SplTokenSupplyMismatch';
1622
+ msg: 'SplTokenSupplyMismatch';
1623
+ },
1624
+ {
1625
+ code: 6014;
1626
+ name: 'HeapMemoryCheckFailed';
1627
+ msg: 'HeapMemoryCheckFailed';
1628
+ },
1629
+ {
1630
+ code: 6015;
1631
+ name: 'InstructionNotCallable';
1632
+ msg: 'The instruction is not callable';
1633
+ },
1634
+ {
1635
+ code: 6016;
1636
+ name: 'ArithmeticUnderflow';
1637
+ msg: 'ArithmeticUnderflow';
1638
+ },
1639
+ {
1640
+ code: 6017;
1641
+ name: 'HashToFieldError';
1642
+ msg: 'HashToFieldError';
1643
+ },
1644
+ {
1645
+ code: 6018;
1646
+ name: 'InvalidAuthorityMint';
1647
+ msg: 'Expected the authority to be also a mint authority';
1648
+ },
1649
+ {
1650
+ code: 6019;
1651
+ name: 'InvalidFreezeAuthority';
1652
+ msg: 'Provided authority is not the freeze authority';
1653
+ },
1654
+ {
1655
+ code: 6020;
1656
+ name: 'InvalidDelegateIndex';
1657
+ },
1658
+ {
1659
+ code: 6021;
1660
+ name: 'TokenPoolPdaUndefined';
1661
+ },
1662
+ {
1663
+ code: 6022;
1664
+ name: 'IsTokenPoolPda';
1665
+ msg: 'Compress or decompress recipient is the same account as the token pool pda.';
1666
+ },
1667
+ {
1668
+ code: 6023;
1669
+ name: 'InvalidTokenPoolPda';
1670
+ },
1671
+ {
1672
+ code: 6024;
1673
+ name: 'NoInputTokenAccountsProvided';
1674
+ },
1675
+ {
1676
+ code: 6025;
1677
+ name: 'NoInputsProvided';
1579
1678
  }
1580
1679
  ];
1581
1680
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightprotocol/compressed-token",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "JS client to interact with the compressed-token program",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/node/index.cjs",
@@ -36,12 +36,12 @@
36
36
  ],
37
37
  "license": "Apache-2.0",
38
38
  "peerDependencies": {
39
- "@solana/web3.js": "^1.95.0",
40
- "@lightprotocol/stateless.js": "0.11.0"
39
+ "@lightprotocol/stateless.js": "0.12.0"
41
40
  },
42
41
  "dependencies": {
43
42
  "@coral-xyz/anchor": "0.29.0",
44
- "@solana/spl-token": "^0.3.11",
43
+ "@solana/web3.js": "^1.95.3",
44
+ "@solana/spl-token": "^0.4.8",
45
45
  "buffer": "^6.0.3",
46
46
  "tweetnacl": "^1.0.3"
47
47
  },
@@ -49,32 +49,33 @@
49
49
  "@esbuild-plugins/node-globals-polyfill": "^0.2.3",
50
50
  "@rollup/plugin-alias": "^5.1.0",
51
51
  "@rollup/plugin-babel": "^6.0.4",
52
- "@rollup/plugin-commonjs": "^25.0.7",
52
+ "@rollup/plugin-commonjs": "^26.0.1",
53
53
  "@rollup/plugin-json": "^6.1.0",
54
54
  "@rollup/plugin-node-resolve": "^15.2.3",
55
- "@rollup/plugin-replace": "^5.0.5",
55
+ "@rollup/plugin-replace": "^5.0.7",
56
56
  "@rollup/plugin-terser": "^0.4.4",
57
- "@rollup/plugin-typescript": "^11.1.5",
58
- "@types/node": "^20.12.8",
59
- "@typescript-eslint/eslint-plugin": "^7.6.0",
57
+ "@rollup/plugin-typescript": "^11.1.6",
58
+ "@types/node": "^22.5.5",
59
+ "@typescript-eslint/eslint-plugin": "^7.13.1",
60
+ "@typescript-eslint/parser": "^7.13.1",
60
61
  "add": "^2.0.6",
61
62
  "crypto-browserify": "^3.12.0",
62
- "eslint": "8.57.0",
63
- "eslint-plugin-import": "^2.25.2",
64
- "eslint-plugin-n": "^15.0.0 || ^16.0.0",
65
- "eslint-plugin-promise": "^6.0.0",
63
+ "eslint": "^8.56.0",
64
+ "eslint-plugin-import": "^2.30.0",
65
+ "eslint-plugin-n": "^17.10.2",
66
+ "eslint-plugin-promise": "^7.1.0",
66
67
  "eslint-plugin-vitest": "^0.5.4",
67
68
  "prettier": "^3.3.3",
68
- "rimraf": "^5.0.7",
69
- "rollup": "^4.6.1",
69
+ "rimraf": "^6.0.1",
70
+ "rollup": "^4.21.3",
70
71
  "rollup-plugin-copy": "^3.5.0",
71
- "rollup-plugin-dts": "^6.1.0",
72
+ "rollup-plugin-dts": "^6.1.1",
72
73
  "rollup-plugin-polyfill-node": "^0.13.0",
73
74
  "rollup-plugin-visualizer": "^5.12.0",
74
75
  "ts-node": "^10.9.2",
75
- "tslib": "^2.6.2",
76
- "typescript": "^5.5.3",
77
- "vitest": "^1.6.0",
76
+ "tslib": "^2.7.0",
77
+ "typescript": "^5.6.2",
78
+ "vitest": "^2.1.1",
78
79
  "@lightprotocol/hasher.rs": "0.2.0",
79
80
  "@lightprotocol/programs": "0.3.0"
80
81
  },
@@ -103,7 +104,7 @@
103
104
  "test:e2e:compress": "pnpm test-validator && vitest run tests/e2e/compress.test.ts --reporter=verbose",
104
105
  "test:e2e:decompress": "pnpm test-validator && vitest run tests/e2e/decompress.test.ts --reporter=verbose",
105
106
  "test:e2e:rpc-token-interop": "pnpm test-validator && vitest run tests/e2e/rpc-token-interop.test.ts --reporter=verbose",
106
- "test:e2e:all": "pnpm test-validator && vitest run tests/e2e/create-mint.test.ts && vitest run tests/e2e/mint-to.test.ts && vitest run tests/e2e/transfer.test.ts && vitest run tests/e2e/compress.test.ts && vitest run tests/e2e/decompress.test.ts && vitest run tests/e2e/register-mint.test.ts && vitest run tests/e2e/approve-and-mint-to.test.ts",
107
+ "test:e2e:all": "pnpm test-validator && vitest run tests/e2e/create-mint.test.ts && vitest run tests/e2e/mint-to.test.ts && vitest run tests/e2e/transfer.test.ts && vitest run tests/e2e/compress.test.ts && vitest run tests/e2e/decompress.test.ts && vitest run tests/e2e/register-mint.test.ts && vitest run tests/e2e/approve-and-mint-to.test.ts && vitest run tests/e2e/rpc-token-interop.test.ts",
107
108
  "pull-idl": "../../scripts/push-compressed-token-idl.sh",
108
109
  "build": "rimraf dist && pnpm pull-idl && pnpm build:bundle",
109
110
  "build:bundle": "rollup -c",