@lightprotocol/compressed-token 0.14.3 → 0.15.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.
- package/README.md +19 -7
- package/dist/cjs/browser/index.cjs +8 -113
- package/dist/cjs/browser/index.cjs.map +1 -1
- package/dist/cjs/node/index.cjs +8 -113
- package/dist/cjs/node/index.cjs.map +1 -1
- package/dist/es/browser/index.js +8 -113
- package/dist/es/browser/index.js.map +1 -1
- package/dist/types/index.d.ts +8 -113
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,24 +1,36 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://github.com/ldiego08/light-protocol/raw/main/assets/logo.svg" width="90" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">@lightprotocol/compressed-token</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<b>This is the JavaScript SDK for interacting with the Compressed Token program on Solana.</b>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://badge.fury.io/js/@lightprotocol%2Fcompressed-token">
|
|
13
|
+
<img src="https://badge.fury.io/js/@lightprotocol%2Fcompressed-token.svg" alt="package npm version" height="18" />
|
|
14
|
+
</a>
|
|
15
|
+
<img src="https://img.shields.io/npm/l/%40lightprotocol%2Fcompressed-token" alt="package license" height="18">
|
|
16
|
+
<img src="https://img.shields.io/npm/dw/%40lightprotocol%2Fcompressed-token" alt="package weekly downloads" height="18" />
|
|
17
|
+
</p>
|
|
2
18
|
|
|
3
|
-
Use this to interact with the compressed-token program on Solana via the
|
|
4
|
-
Compression RPC API.
|
|
5
19
|
|
|
6
20
|
### Installation
|
|
7
21
|
|
|
8
|
-
**For use in Node.js or
|
|
22
|
+
**For use in Node.js or web**
|
|
9
23
|
|
|
10
24
|
```bash
|
|
11
25
|
npm install --save \
|
|
12
26
|
@lightprotocol/compressed-token \
|
|
13
27
|
@lightprotocol/stateless.js \
|
|
14
|
-
@solana/web3.js \
|
|
15
|
-
@coral-xyz/anchor@0.29
|
|
16
28
|
```
|
|
17
29
|
|
|
18
30
|
### Documentation and examples
|
|
19
31
|
|
|
20
32
|
- [Latest Source code](https://github.com/lightprotocol/lightprotocol/tree/main/js/compressed-token)
|
|
21
|
-
-
|
|
33
|
+
- [Creating and sending compressed tokens](https://www.zkcompression.com/developers/typescript-client#creating-minting-and-transferring-a-compressed-token)
|
|
22
34
|
|
|
23
35
|
### Getting help
|
|
24
36
|
|
|
@@ -1555,128 +1555,23 @@ const IDL = {
|
|
|
1555
1555
|
errors: [
|
|
1556
1556
|
{
|
|
1557
1557
|
code: 6000,
|
|
1558
|
-
name: '
|
|
1559
|
-
msg: '
|
|
1558
|
+
name: 'SignerCheckFailed',
|
|
1559
|
+
msg: 'Signer check failed',
|
|
1560
1560
|
},
|
|
1561
1561
|
{
|
|
1562
1562
|
code: 6001,
|
|
1563
|
-
name: '
|
|
1564
|
-
msg: '
|
|
1563
|
+
name: 'CreateTransferInstructionFailed',
|
|
1564
|
+
msg: 'Create transfer instruction failed',
|
|
1565
1565
|
},
|
|
1566
1566
|
{
|
|
1567
1567
|
code: 6002,
|
|
1568
|
-
name: '
|
|
1569
|
-
msg: '
|
|
1568
|
+
name: 'AccountNotFound',
|
|
1569
|
+
msg: 'Account not found',
|
|
1570
1570
|
},
|
|
1571
1571
|
{
|
|
1572
1572
|
code: 6003,
|
|
1573
|
-
name: '
|
|
1574
|
-
msg: '
|
|
1575
|
-
},
|
|
1576
|
-
{
|
|
1577
|
-
code: 6004,
|
|
1578
|
-
name: 'ComputeDecompressSumFailed',
|
|
1579
|
-
msg: 'ComputeDecompressSumFailed',
|
|
1580
|
-
},
|
|
1581
|
-
{
|
|
1582
|
-
code: 6005,
|
|
1583
|
-
name: 'SumCheckFailed',
|
|
1584
|
-
msg: 'SumCheckFailed',
|
|
1585
|
-
},
|
|
1586
|
-
{
|
|
1587
|
-
code: 6006,
|
|
1588
|
-
name: 'DecompressRecipientUndefinedForDecompress',
|
|
1589
|
-
msg: 'DecompressRecipientUndefinedForDecompress',
|
|
1590
|
-
},
|
|
1591
|
-
{
|
|
1592
|
-
code: 6007,
|
|
1593
|
-
name: 'CompressedPdaUndefinedForDecompress',
|
|
1594
|
-
msg: 'CompressedPdaUndefinedForDecompress',
|
|
1595
|
-
},
|
|
1596
|
-
{
|
|
1597
|
-
code: 6008,
|
|
1598
|
-
name: 'DeCompressAmountUndefinedForDecompress',
|
|
1599
|
-
msg: 'DeCompressAmountUndefinedForDecompress',
|
|
1600
|
-
},
|
|
1601
|
-
{
|
|
1602
|
-
code: 6009,
|
|
1603
|
-
name: 'CompressedPdaUndefinedForCompress',
|
|
1604
|
-
msg: 'CompressedPdaUndefinedForCompress',
|
|
1605
|
-
},
|
|
1606
|
-
{
|
|
1607
|
-
code: 6010,
|
|
1608
|
-
name: 'DeCompressAmountUndefinedForCompress',
|
|
1609
|
-
msg: 'DeCompressAmountUndefinedForCompress',
|
|
1610
|
-
},
|
|
1611
|
-
{
|
|
1612
|
-
code: 6011,
|
|
1613
|
-
name: 'DelegateSignerCheckFailed',
|
|
1614
|
-
msg: 'DelegateSignerCheckFailed',
|
|
1615
|
-
},
|
|
1616
|
-
{
|
|
1617
|
-
code: 6012,
|
|
1618
|
-
name: 'MintTooLarge',
|
|
1619
|
-
msg: 'Minted amount greater than u64::MAX',
|
|
1620
|
-
},
|
|
1621
|
-
{
|
|
1622
|
-
code: 6013,
|
|
1623
|
-
name: 'SplTokenSupplyMismatch',
|
|
1624
|
-
msg: 'SplTokenSupplyMismatch',
|
|
1625
|
-
},
|
|
1626
|
-
{
|
|
1627
|
-
code: 6014,
|
|
1628
|
-
name: 'HeapMemoryCheckFailed',
|
|
1629
|
-
msg: 'HeapMemoryCheckFailed',
|
|
1630
|
-
},
|
|
1631
|
-
{
|
|
1632
|
-
code: 6015,
|
|
1633
|
-
name: 'InstructionNotCallable',
|
|
1634
|
-
msg: 'The instruction is not callable',
|
|
1635
|
-
},
|
|
1636
|
-
{
|
|
1637
|
-
code: 6016,
|
|
1638
|
-
name: 'ArithmeticUnderflow',
|
|
1639
|
-
msg: 'ArithmeticUnderflow',
|
|
1640
|
-
},
|
|
1641
|
-
{
|
|
1642
|
-
code: 6017,
|
|
1643
|
-
name: 'HashToFieldError',
|
|
1644
|
-
msg: 'HashToFieldError',
|
|
1645
|
-
},
|
|
1646
|
-
{
|
|
1647
|
-
code: 6018,
|
|
1648
|
-
name: 'InvalidAuthorityMint',
|
|
1649
|
-
msg: 'Expected the authority to be also a mint authority',
|
|
1650
|
-
},
|
|
1651
|
-
{
|
|
1652
|
-
code: 6019,
|
|
1653
|
-
name: 'InvalidFreezeAuthority',
|
|
1654
|
-
msg: 'Provided authority is not the freeze authority',
|
|
1655
|
-
},
|
|
1656
|
-
{
|
|
1657
|
-
code: 6020,
|
|
1658
|
-
name: 'InvalidDelegateIndex',
|
|
1659
|
-
},
|
|
1660
|
-
{
|
|
1661
|
-
code: 6021,
|
|
1662
|
-
name: 'TokenPoolPdaUndefined',
|
|
1663
|
-
},
|
|
1664
|
-
{
|
|
1665
|
-
code: 6022,
|
|
1666
|
-
name: 'IsTokenPoolPda',
|
|
1667
|
-
msg: 'Compress or decompress recipient is the same account as the token pool pda.',
|
|
1668
|
-
},
|
|
1669
|
-
{
|
|
1670
|
-
code: 6023,
|
|
1671
|
-
name: 'InvalidTokenPoolPda',
|
|
1672
|
-
},
|
|
1673
|
-
{
|
|
1674
|
-
code: 6024,
|
|
1675
|
-
name: 'NoInputTokenAccountsProvided',
|
|
1676
|
-
},
|
|
1677
|
-
{
|
|
1678
|
-
code: 6025,
|
|
1679
|
-
name: 'NoInputsProvided',
|
|
1573
|
+
name: 'SerializationError',
|
|
1574
|
+
msg: 'Serialization error',
|
|
1680
1575
|
},
|
|
1681
1576
|
],
|
|
1682
1577
|
};
|