@lightprotocol/compressed-token 0.15.2 → 0.15.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 +14 -18
- package/dist/cjs/browser/index.cjs.map +1 -1
- package/dist/cjs/node/index.cjs +14 -18
- package/dist/cjs/node/index.cjs.map +1 -1
- package/dist/es/browser/index.js +14 -18
- package/dist/es/browser/index.js.map +1 -1
- package/dist/types/index.d.ts +34 -27
- package/package.json +6 -5
package/dist/es/browser/index.js
CHANGED
|
@@ -6710,6 +6710,20 @@ class CompressedTokenProgram {
|
|
|
6710
6710
|
* Public key that identifies the CompressedPda program
|
|
6711
6711
|
*/
|
|
6712
6712
|
static programId = new PublicKey('cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m');
|
|
6713
|
+
/**
|
|
6714
|
+
* Set a custom programId via PublicKey or base58 encoded string.
|
|
6715
|
+
* This method is not required for regular usage.
|
|
6716
|
+
*
|
|
6717
|
+
* Use this only if you know what you are doing.
|
|
6718
|
+
*/
|
|
6719
|
+
static setProgramId(programId) {
|
|
6720
|
+
this.programId =
|
|
6721
|
+
typeof programId === 'string'
|
|
6722
|
+
? new PublicKey(programId)
|
|
6723
|
+
: programId;
|
|
6724
|
+
// Reset program when programId changes
|
|
6725
|
+
this._program = null;
|
|
6726
|
+
}
|
|
6713
6727
|
static _program = null;
|
|
6714
6728
|
/** @internal */
|
|
6715
6729
|
static get program() {
|
|
@@ -7071,24 +7085,6 @@ class CompressedTokenProgram {
|
|
|
7071
7085
|
}
|
|
7072
7086
|
static async compressSplTokenAccount(params) {
|
|
7073
7087
|
const { feePayer, authority, tokenAccount, mint, remainingAmount, outputStateTree, } = params;
|
|
7074
|
-
// const outputData: TokenTransferOutputData[] = [
|
|
7075
|
-
// {
|
|
7076
|
-
// owner: authority,
|
|
7077
|
-
// amount: remainingAmount ?? new BN(0),
|
|
7078
|
-
// lamports: bn(subremainingAmount),
|
|
7079
|
-
// tlv: null,
|
|
7080
|
-
// },
|
|
7081
|
-
// ];
|
|
7082
|
-
// const {
|
|
7083
|
-
// inputTokenDataWithContext,
|
|
7084
|
-
// packedOutputTokenData,
|
|
7085
|
-
// remainingAccountMetas,
|
|
7086
|
-
// } = packCompressedTokenAccounts({
|
|
7087
|
-
// inputCompressedTokenAccounts: [],
|
|
7088
|
-
// outputStateTrees: outputStateTree,
|
|
7089
|
-
// rootIndices: [],
|
|
7090
|
-
// tokenTransferOutputs,
|
|
7091
|
-
// });
|
|
7092
7088
|
const remainingAccountMetas = [
|
|
7093
7089
|
{
|
|
7094
7090
|
pubkey: outputStateTree,
|