@lightprotocol/compressed-token 0.10.0 → 0.10.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/dist/cjs/browser/index.cjs +90 -8
- package/dist/cjs/browser/index.cjs.map +1 -1
- package/dist/cjs/node/index.cjs +90 -8
- package/dist/cjs/node/index.cjs.map +1 -1
- package/dist/es/browser/index.js +91 -10
- package/dist/es/browser/index.js.map +1 -1
- package/dist/types/index.d.ts +54 -5
- package/package.json +2 -2
package/dist/types/index.d.ts
CHANGED
|
@@ -2046,6 +2046,28 @@ type ApproveAndMintToParams = {
|
|
|
2046
2046
|
*/
|
|
2047
2047
|
merkleTree?: PublicKey;
|
|
2048
2048
|
};
|
|
2049
|
+
type CreateTokenProgramLookupTableParams = {
|
|
2050
|
+
/**
|
|
2051
|
+
* The payer of the transaction.
|
|
2052
|
+
*/
|
|
2053
|
+
payer: PublicKey;
|
|
2054
|
+
/**
|
|
2055
|
+
* The authority of the transaction.
|
|
2056
|
+
*/
|
|
2057
|
+
authority: PublicKey;
|
|
2058
|
+
/**
|
|
2059
|
+
* Recently finalized Solana slot.
|
|
2060
|
+
*/
|
|
2061
|
+
recentSlot: number;
|
|
2062
|
+
/**
|
|
2063
|
+
* Optional Mint addresses to store in the lookup table.
|
|
2064
|
+
*/
|
|
2065
|
+
mints?: PublicKey[];
|
|
2066
|
+
/**
|
|
2067
|
+
* Optional additional addresses to store in the lookup table.
|
|
2068
|
+
*/
|
|
2069
|
+
remainingAccounts?: PublicKey[];
|
|
2070
|
+
};
|
|
2049
2071
|
/**
|
|
2050
2072
|
* Sum up the token amounts of the compressed token accounts
|
|
2051
2073
|
*/
|
|
@@ -2122,7 +2144,14 @@ declare class CompressedTokenProgram {
|
|
|
2122
2144
|
*/
|
|
2123
2145
|
static transfer(params: TransferParams): Promise<TransactionInstruction>;
|
|
2124
2146
|
/**
|
|
2125
|
-
*
|
|
2147
|
+
* Create lookup table instructions for the token program's default accounts.
|
|
2148
|
+
*/
|
|
2149
|
+
static createTokenProgramLookupTable(params: CreateTokenProgramLookupTableParams): Promise<{
|
|
2150
|
+
instructions: TransactionInstruction[];
|
|
2151
|
+
address: PublicKey;
|
|
2152
|
+
}>;
|
|
2153
|
+
/**
|
|
2154
|
+
* Create compress instruction
|
|
2126
2155
|
* @returns compressInstruction
|
|
2127
2156
|
*/
|
|
2128
2157
|
static compress(params: CompressParams): Promise<TransactionInstruction>;
|
|
@@ -2212,16 +2241,18 @@ declare function createMint(rpc: Rpc, payer: Signer, mintAuthority: PublicKey, d
|
|
|
2212
2241
|
* @param rpc Rpc to use
|
|
2213
2242
|
* @param payer Payer of the transaction fees
|
|
2214
2243
|
* @param mint Mint for the account
|
|
2215
|
-
* @param destination Address of the account to mint to
|
|
2244
|
+
* @param destination Address of the account to mint to. Can be an array of
|
|
2245
|
+
* addresses if the amount is an array of amounts.
|
|
2216
2246
|
* @param authority Minting authority
|
|
2217
|
-
* @param amount Amount to mint
|
|
2247
|
+
* @param amount Amount to mint. Can be an array of amounts if the
|
|
2248
|
+
* destination is an array of addresses.
|
|
2218
2249
|
* @param merkleTree State tree account that the compressed tokens should be
|
|
2219
2250
|
* part of. Defaults to the default state tree account.
|
|
2220
2251
|
* @param confirmOptions Options for confirming the transaction
|
|
2221
2252
|
*
|
|
2222
2253
|
* @return Signature of the confirmed transaction
|
|
2223
2254
|
*/
|
|
2224
|
-
declare function mintTo(rpc: Rpc, payer: Signer, mint: PublicKey, destination: PublicKey, authority: Signer, amount: number | BN, merkleTree?: PublicKey, confirmOptions?: ConfirmOptions): Promise<TransactionSignature>;
|
|
2255
|
+
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>;
|
|
2225
2256
|
|
|
2226
2257
|
/**
|
|
2227
2258
|
* Register an existing mint with the CompressedToken program
|
|
@@ -2267,4 +2298,22 @@ declare function selectMinCompressedTokenAccountsForTransfer(accounts: ParsedTok
|
|
|
2267
2298
|
totalLamports: BN | null
|
|
2268
2299
|
];
|
|
2269
2300
|
|
|
2270
|
-
|
|
2301
|
+
/**
|
|
2302
|
+
* Create a lookup table for the token program's default accounts
|
|
2303
|
+
*
|
|
2304
|
+
* @param rpc Rpc connection to use
|
|
2305
|
+
* @param payer Payer of the transaction fees
|
|
2306
|
+
* @param authority Authority of the lookup table
|
|
2307
|
+
* @param mints Optional array of mint public keys to include in
|
|
2308
|
+
* the lookup table
|
|
2309
|
+
* @param additionalAccounts Optional array of additional account public keys
|
|
2310
|
+
* to include in the lookup table
|
|
2311
|
+
*
|
|
2312
|
+
* @return Transaction signatures and the address of the created lookup table
|
|
2313
|
+
*/
|
|
2314
|
+
declare function createTokenProgramLookupTable(rpc: Rpc, payer: Signer, authority: Signer, mints?: PublicKey[], additionalAccounts?: PublicKey[]): Promise<{
|
|
2315
|
+
txIds: TransactionSignature[];
|
|
2316
|
+
address: PublicKey;
|
|
2317
|
+
}>;
|
|
2318
|
+
|
|
2319
|
+
export { type ApproveAndMintToParams, CPI_AUTHORITY_SEED, type CompressedTokenInstructionDataInvoke, CompressedTokenProgram, type CreateMintParams, type CreateTokenProgramLookupTableParams, 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, createTokenProgramLookupTable, 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.10.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "JS client to interact with the compressed-token program",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/node/index.cjs",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"license": "Apache-2.0",
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@solana/web3.js": "^1.95.0",
|
|
40
|
-
"@lightprotocol/stateless.js": "0.10.
|
|
40
|
+
"@lightprotocol/stateless.js": "0.10.1"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@coral-xyz/anchor": "0.29.0",
|