@lightprotocol/compressed-token 0.3.1 → 0.3.3
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/dist/cjs/browser/index.cjs +17 -27
- package/dist/cjs/browser/index.cjs.map +1 -1
- package/dist/cjs/node/index.cjs +17 -27
- package/dist/cjs/node/index.cjs.map +1 -1
- package/dist/es/browser/index.js +18 -28
- package/dist/es/browser/index.js.map +1 -1
- package/dist/types/index.d.ts +15 -34
- package/package.json +2 -2
package/dist/types/index.d.ts
CHANGED
|
@@ -3,11 +3,11 @@ import { PublicKey, AccountMeta, TransactionInstruction, Signer, ConfirmOptions,
|
|
|
3
3
|
import { BN, Program } from '@coral-xyz/anchor';
|
|
4
4
|
|
|
5
5
|
type LightCompressedToken = {
|
|
6
|
-
version: '0.4.
|
|
6
|
+
version: '0.4.1';
|
|
7
7
|
name: 'light_compressed_token';
|
|
8
8
|
instructions: [
|
|
9
9
|
{
|
|
10
|
-
name: '
|
|
10
|
+
name: 'createTokenPool';
|
|
11
11
|
docs: [
|
|
12
12
|
'This instruction expects a mint account to be created in a separate',
|
|
13
13
|
'token program instruction with token authority as mint authority. This',
|
|
@@ -879,12 +879,6 @@ type LightCompressedToken = {
|
|
|
879
879
|
option: 'u8';
|
|
880
880
|
};
|
|
881
881
|
},
|
|
882
|
-
{
|
|
883
|
-
name: 'isNative';
|
|
884
|
-
type: {
|
|
885
|
-
option: 'u64';
|
|
886
|
-
};
|
|
887
|
-
},
|
|
888
882
|
{
|
|
889
883
|
name: 'merkleContext';
|
|
890
884
|
type: {
|
|
@@ -894,6 +888,12 @@ type LightCompressedToken = {
|
|
|
894
888
|
{
|
|
895
889
|
name: 'rootIndex';
|
|
896
890
|
type: 'u16';
|
|
891
|
+
},
|
|
892
|
+
{
|
|
893
|
+
name: 'lamports';
|
|
894
|
+
type: {
|
|
895
|
+
option: 'u64';
|
|
896
|
+
};
|
|
897
897
|
}
|
|
898
898
|
];
|
|
899
899
|
};
|
|
@@ -1344,18 +1344,6 @@ type LightCompressedToken = {
|
|
|
1344
1344
|
type: {
|
|
1345
1345
|
defined: 'AccountState';
|
|
1346
1346
|
};
|
|
1347
|
-
},
|
|
1348
|
-
{
|
|
1349
|
-
name: 'isNative';
|
|
1350
|
-
docs: [
|
|
1351
|
-
'If is_some, this is a native token, and the value logs the rent-exempt',
|
|
1352
|
-
'reserve. An Account is required to be rent-exempt, so the value is',
|
|
1353
|
-
'used by the Processor to ensure that wrapped SOL accounts do not',
|
|
1354
|
-
'drop below this threshold.'
|
|
1355
|
-
];
|
|
1356
|
-
type: {
|
|
1357
|
-
option: 'u64';
|
|
1358
|
-
};
|
|
1359
1347
|
}
|
|
1360
1348
|
];
|
|
1361
1349
|
};
|
|
@@ -1512,10 +1500,6 @@ type InputTokenDataWithContext = {
|
|
|
1512
1500
|
* Optional: The index of the delegate in remaining accounts
|
|
1513
1501
|
*/
|
|
1514
1502
|
delegateIndex: number | null;
|
|
1515
|
-
/**
|
|
1516
|
-
* Optional: Whether the token is native (wSOL)
|
|
1517
|
-
*/
|
|
1518
|
-
isNative: BN | null;
|
|
1519
1503
|
/**
|
|
1520
1504
|
* The index of the merkle tree address in remaining accounts
|
|
1521
1505
|
*/
|
|
@@ -1528,6 +1512,10 @@ type InputTokenDataWithContext = {
|
|
|
1528
1512
|
* The index of the leaf in the merkle tree
|
|
1529
1513
|
*/
|
|
1530
1514
|
leafIndex: number;
|
|
1515
|
+
/**
|
|
1516
|
+
* Lamports in the input token account.
|
|
1517
|
+
*/
|
|
1518
|
+
lamports: BN | null;
|
|
1531
1519
|
};
|
|
1532
1520
|
type CompressedTokenInstructionDataInvoke = {
|
|
1533
1521
|
/**
|
|
@@ -1583,13 +1571,6 @@ type TokenData = {
|
|
|
1583
1571
|
* The account's state
|
|
1584
1572
|
*/
|
|
1585
1573
|
state: number;
|
|
1586
|
-
/**
|
|
1587
|
-
* If is_some, this is a native token, and the value logs the rent-exempt
|
|
1588
|
-
* reserve. An Account is required to be rent-exempt, so the value is used
|
|
1589
|
-
* by the Processor to ensure that wrapped SOL accounts do not drop below
|
|
1590
|
-
* this threshold.
|
|
1591
|
-
*/
|
|
1592
|
-
isNative: BN | null;
|
|
1593
1574
|
};
|
|
1594
1575
|
|
|
1595
1576
|
type PackCompressedTokenAccountsParams = {
|
|
@@ -1887,7 +1868,7 @@ declare class CompressedTokenProgram {
|
|
|
1887
1868
|
* Enable compression for an existing SPL mint, creating an omnibus account.
|
|
1888
1869
|
* For new mints, use `CompressedTokenProgram.createMint`.
|
|
1889
1870
|
*/
|
|
1890
|
-
static
|
|
1871
|
+
static createTokenPool(params: RegisterMintParams): Promise<TransactionInstruction>;
|
|
1891
1872
|
/**
|
|
1892
1873
|
* Construct mintTo instruction for compressed tokens
|
|
1893
1874
|
*/
|
|
@@ -2013,7 +1994,7 @@ declare function mintTo(rpc: Rpc, payer: Signer, mint: PublicKey, destination: P
|
|
|
2013
1994
|
*
|
|
2014
1995
|
* @return transaction signature
|
|
2015
1996
|
*/
|
|
2016
|
-
declare function
|
|
1997
|
+
declare function createTokenPool(rpc: Rpc, payer: Signer, mintAddress: PublicKey, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
|
|
2017
1998
|
|
|
2018
1999
|
/**
|
|
2019
2000
|
* Transfer compressed tokens from one owner to another
|
|
@@ -2046,4 +2027,4 @@ declare function selectMinCompressedTokenAccountsForTransfer(accounts: ParsedTok
|
|
|
2046
2027
|
totalLamports: BN | null
|
|
2047
2028
|
];
|
|
2048
2029
|
|
|
2049
|
-
export { type ApproveAndMintToParams, CPI_AUTHORITY_SEED, type CompressedTokenInstructionDataInvoke, CompressedTokenProgram, type CreateMintParams, IDL, type InputTokenDataWithContext, type LightCompressedToken, 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, createTransferOutputState, decompress, mintTo, packCompressedTokenAccounts, parseTokenData,
|
|
2030
|
+
export { type ApproveAndMintToParams, CPI_AUTHORITY_SEED, type CompressedTokenInstructionDataInvoke, CompressedTokenProgram, type CreateMintParams, IDL, type InputTokenDataWithContext, type LightCompressedToken, 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, createTransferOutputState, decompress, mintTo, packCompressedTokenAccounts, parseTokenData, selectMinCompressedTokenAccountsForTransfer, sumUpTokenAmount, transfer, validateSameTokenOwner };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lightprotocol/compressed-token",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "JS client to interact with the compressed-token program",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"license": "Apache-2.0",
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@solana/web3.js": "^1.91.8",
|
|
45
|
-
"@lightprotocol/stateless.js": "0.4.
|
|
45
|
+
"@lightprotocol/stateless.js": "0.4.3"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@coral-xyz/anchor": "0.29.0",
|