flash-sdk 11.1.1-alpha.5 → 11.1.1-alpha.7
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/PerpetualsClient.d.ts +21 -21
- package/dist/PerpetualsClient.js +146 -28
- package/dist/idl/perpetuals.d.ts +10 -18
- package/dist/idl/perpetuals.js +21 -29
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -208,7 +208,7 @@ export declare class PerpetualsClient {
|
|
|
208
208
|
reservedAmount: BN;
|
|
209
209
|
minReserveUsd: BN;
|
|
210
210
|
limitPriceBufferBps: BN;
|
|
211
|
-
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[]
|
|
211
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
212
212
|
owner: PublicKey;
|
|
213
213
|
stakeStats: {
|
|
214
214
|
pendingActivation: BN;
|
|
@@ -564,7 +564,7 @@ export declare class PerpetualsClient {
|
|
|
564
564
|
reservedAmount: BN;
|
|
565
565
|
minReserveUsd: BN;
|
|
566
566
|
limitPriceBufferBps: BN;
|
|
567
|
-
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[]
|
|
567
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
568
568
|
owner: PublicKey;
|
|
569
569
|
stakeStats: {
|
|
570
570
|
pendingActivation: BN;
|
|
@@ -919,7 +919,7 @@ export declare class PerpetualsClient {
|
|
|
919
919
|
reservedAmount: BN;
|
|
920
920
|
minReserveUsd: BN;
|
|
921
921
|
limitPriceBufferBps: BN;
|
|
922
|
-
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[]
|
|
922
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
923
923
|
owner: PublicKey;
|
|
924
924
|
stakeStats: {
|
|
925
925
|
pendingActivation: BN;
|
|
@@ -1278,7 +1278,7 @@ export declare class PerpetualsClient {
|
|
|
1278
1278
|
reservedAmount: BN;
|
|
1279
1279
|
minReserveUsd: BN;
|
|
1280
1280
|
limitPriceBufferBps: BN;
|
|
1281
|
-
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[]
|
|
1281
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
1282
1282
|
owner: PublicKey;
|
|
1283
1283
|
stakeStats: {
|
|
1284
1284
|
pendingActivation: BN;
|
|
@@ -1636,7 +1636,7 @@ export declare class PerpetualsClient {
|
|
|
1636
1636
|
reservedAmount: BN;
|
|
1637
1637
|
minReserveUsd: BN;
|
|
1638
1638
|
limitPriceBufferBps: BN;
|
|
1639
|
-
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[]
|
|
1639
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
1640
1640
|
owner: PublicKey;
|
|
1641
1641
|
stakeStats: {
|
|
1642
1642
|
pendingActivation: BN;
|
|
@@ -1992,7 +1992,7 @@ export declare class PerpetualsClient {
|
|
|
1992
1992
|
reservedAmount: BN;
|
|
1993
1993
|
minReserveUsd: BN;
|
|
1994
1994
|
limitPriceBufferBps: BN;
|
|
1995
|
-
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[]
|
|
1995
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
1996
1996
|
owner: PublicKey;
|
|
1997
1997
|
stakeStats: {
|
|
1998
1998
|
pendingActivation: BN;
|
|
@@ -2347,7 +2347,7 @@ export declare class PerpetualsClient {
|
|
|
2347
2347
|
reservedAmount: BN;
|
|
2348
2348
|
minReserveUsd: BN;
|
|
2349
2349
|
limitPriceBufferBps: BN;
|
|
2350
|
-
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[]
|
|
2350
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
2351
2351
|
owner: PublicKey;
|
|
2352
2352
|
stakeStats: {
|
|
2353
2353
|
pendingActivation: BN;
|
|
@@ -2702,7 +2702,7 @@ export declare class PerpetualsClient {
|
|
|
2702
2702
|
reservedAmount: BN;
|
|
2703
2703
|
minReserveUsd: BN;
|
|
2704
2704
|
limitPriceBufferBps: BN;
|
|
2705
|
-
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[]
|
|
2705
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
2706
2706
|
owner: PublicKey;
|
|
2707
2707
|
stakeStats: {
|
|
2708
2708
|
pendingActivation: BN;
|
|
@@ -3108,7 +3108,7 @@ export declare class PerpetualsClient {
|
|
|
3108
3108
|
reservedAmount: BN;
|
|
3109
3109
|
minReserveUsd: BN;
|
|
3110
3110
|
limitPriceBufferBps: BN;
|
|
3111
|
-
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[]
|
|
3111
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
3112
3112
|
owner: PublicKey;
|
|
3113
3113
|
stakeStats: {
|
|
3114
3114
|
pendingActivation: BN;
|
|
@@ -3463,7 +3463,7 @@ export declare class PerpetualsClient {
|
|
|
3463
3463
|
reservedAmount: BN;
|
|
3464
3464
|
minReserveUsd: BN;
|
|
3465
3465
|
limitPriceBufferBps: BN;
|
|
3466
|
-
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[]
|
|
3466
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
3467
3467
|
owner: PublicKey;
|
|
3468
3468
|
stakeStats: {
|
|
3469
3469
|
pendingActivation: BN;
|
|
@@ -3818,7 +3818,7 @@ export declare class PerpetualsClient {
|
|
|
3818
3818
|
reservedAmount: BN;
|
|
3819
3819
|
minReserveUsd: BN;
|
|
3820
3820
|
limitPriceBufferBps: BN;
|
|
3821
|
-
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[]
|
|
3821
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
3822
3822
|
owner: PublicKey;
|
|
3823
3823
|
stakeStats: {
|
|
3824
3824
|
pendingActivation: BN;
|
|
@@ -4173,7 +4173,7 @@ export declare class PerpetualsClient {
|
|
|
4173
4173
|
reservedAmount: BN;
|
|
4174
4174
|
minReserveUsd: BN;
|
|
4175
4175
|
limitPriceBufferBps: BN;
|
|
4176
|
-
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[]
|
|
4176
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
4177
4177
|
owner: PublicKey;
|
|
4178
4178
|
stakeStats: {
|
|
4179
4179
|
pendingActivation: BN;
|
|
@@ -4528,7 +4528,7 @@ export declare class PerpetualsClient {
|
|
|
4528
4528
|
reservedAmount: BN;
|
|
4529
4529
|
minReserveUsd: BN;
|
|
4530
4530
|
limitPriceBufferBps: BN;
|
|
4531
|
-
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[]
|
|
4531
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
4532
4532
|
owner: PublicKey;
|
|
4533
4533
|
stakeStats: {
|
|
4534
4534
|
pendingActivation: BN;
|
|
@@ -4912,15 +4912,15 @@ export declare class PerpetualsClient {
|
|
|
4912
4912
|
instructions: TransactionInstruction[];
|
|
4913
4913
|
additionalSigners: Signer[];
|
|
4914
4914
|
}>;
|
|
4915
|
-
addLiquidity: (payTokenSymbol: string, tokenAmountIn: BN, minLpAmountOut: BN, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any
|
|
4915
|
+
addLiquidity: (payTokenSymbol: string, tokenAmountIn: BN, minLpAmountOut: BN, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
|
4916
4916
|
instructions: TransactionInstruction[];
|
|
4917
4917
|
additionalSigners: Signer[];
|
|
4918
4918
|
}>;
|
|
4919
|
-
addLiquidityAndStake: (inputSymbol: string, amountIn: BN, minLpAmountOut: BN, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any, userPublicKey?: PublicKey | undefined
|
|
4919
|
+
addLiquidityAndStake: (inputSymbol: string, amountIn: BN, minLpAmountOut: BN, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any, userPublicKey?: PublicKey | undefined) => Promise<{
|
|
4920
4920
|
instructions: TransactionInstruction[];
|
|
4921
4921
|
additionalSigners: Signer[];
|
|
4922
4922
|
}>;
|
|
4923
|
-
removeLiquidity: (recieveTokenSymbol: string, liquidityAmountIn: BN, minTokenAmountOut: BN, poolConfig: PoolConfig, closeLpATA?: boolean, createUserATA?: boolean, closeUsersWSOLATA?: boolean, ephemeralSignerPubkey?: any, userPublicKey?: PublicKey | undefined
|
|
4923
|
+
removeLiquidity: (recieveTokenSymbol: string, liquidityAmountIn: BN, minTokenAmountOut: BN, poolConfig: PoolConfig, closeLpATA?: boolean, createUserATA?: boolean, closeUsersWSOLATA?: boolean, ephemeralSignerPubkey?: any, userPublicKey?: PublicKey | undefined) => Promise<{
|
|
4924
4924
|
instructions: TransactionInstruction[];
|
|
4925
4925
|
additionalSigners: Signer[];
|
|
4926
4926
|
}>;
|
|
@@ -4951,11 +4951,11 @@ export declare class PerpetualsClient {
|
|
|
4951
4951
|
instructions: TransactionInstruction[];
|
|
4952
4952
|
additionalSigners: Signer[];
|
|
4953
4953
|
}>;
|
|
4954
|
-
addCompoundingLiquidity: (amountIn: BN, minCompoundingAmountOut: BN, inTokenSymbol: string, rewardTokenMint: PublicKey, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any, userPublicKey?: PublicKey | undefined, enableHeapSizeIx?: boolean,
|
|
4954
|
+
addCompoundingLiquidity: (amountIn: BN, minCompoundingAmountOut: BN, inTokenSymbol: string, rewardTokenMint: PublicKey, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any, userPublicKey?: PublicKey | undefined, enableHeapSizeIx?: boolean, enableDebugLogs?: boolean) => Promise<{
|
|
4955
4955
|
instructions: TransactionInstruction[];
|
|
4956
4956
|
additionalSigners: Signer[];
|
|
4957
4957
|
}>;
|
|
4958
|
-
removeCompoundingLiquidity: (compoundingAmountIn: BN, minAmountOut: BN, outTokenSymbol: string, rewardTokenMint: PublicKey, poolConfig: PoolConfig, createUserATA?: boolean, ephemeralSignerPubkey?: any, userPublicKey?: PublicKey | undefined, enableHeapSizeIx?: boolean,
|
|
4958
|
+
removeCompoundingLiquidity: (compoundingAmountIn: BN, minAmountOut: BN, outTokenSymbol: string, rewardTokenMint: PublicKey, poolConfig: PoolConfig, createUserATA?: boolean, ephemeralSignerPubkey?: any, userPublicKey?: PublicKey | undefined, enableHeapSizeIx?: boolean, enableDebugLogs?: boolean) => Promise<{
|
|
4959
4959
|
instructions: TransactionInstruction[];
|
|
4960
4960
|
additionalSigners: Signer[];
|
|
4961
4961
|
}>;
|
|
@@ -5052,7 +5052,7 @@ export declare class PerpetualsClient {
|
|
|
5052
5052
|
signature: string;
|
|
5053
5053
|
versionedTransaction: VersionedTransaction;
|
|
5054
5054
|
}>;
|
|
5055
|
-
swap: (userInputTokenSymbol: string, userOutputTokenSymbol: string, amountIn: BN, minAmountOut: BN, poolConfig: PoolConfig, useFeesPool?: boolean, createUserATA?: boolean, unWrapSol?: boolean, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any
|
|
5055
|
+
swap: (userInputTokenSymbol: string, userOutputTokenSymbol: string, amountIn: BN, minAmountOut: BN, poolConfig: PoolConfig, useFeesPool?: boolean, createUserATA?: boolean, unWrapSol?: boolean, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
|
5056
5056
|
instructions: TransactionInstruction[];
|
|
5057
5057
|
additionalSigners: Signer[];
|
|
5058
5058
|
}>;
|
|
@@ -5152,11 +5152,11 @@ export declare class PerpetualsClient {
|
|
|
5152
5152
|
instructions: TransactionInstruction[];
|
|
5153
5153
|
additionalSigners: Signer[];
|
|
5154
5154
|
}>;
|
|
5155
|
-
createWhitelist: (isSwapFeeExempt: boolean, isDepositFeeExempt: boolean, isWithdrawalFeeExempt: boolean, owner: PublicKey) => Promise<{
|
|
5155
|
+
createWhitelist: (isSwapFeeExempt: boolean, isDepositFeeExempt: boolean, isWithdrawalFeeExempt: boolean, poolAddress: PublicKey, owner: PublicKey) => Promise<{
|
|
5156
5156
|
instructions: TransactionInstruction[];
|
|
5157
5157
|
additionalSigners: Signer[];
|
|
5158
5158
|
}>;
|
|
5159
|
-
setWhitelistConfig: (isSwapFeeExempt: boolean, isDepositFeeExempt: boolean, isWithdrawalFeeExempt: boolean, owner: PublicKey) => Promise<{
|
|
5159
|
+
setWhitelistConfig: (isSwapFeeExempt: boolean, isDepositFeeExempt: boolean, isWithdrawalFeeExempt: boolean, poolAddress: PublicKey, owner: PublicKey) => Promise<{
|
|
5160
5160
|
instructions: TransactionInstruction[];
|
|
5161
5161
|
additionalSigners: Signer[];
|
|
5162
5162
|
}>;
|
package/dist/PerpetualsClient.js
CHANGED
|
@@ -3639,11 +3639,10 @@ var PerpetualsClient = (function () {
|
|
|
3639
3639
|
for (var _i = 4; _i < arguments.length; _i++) {
|
|
3640
3640
|
args_1[_i - 4] = arguments[_i];
|
|
3641
3641
|
}
|
|
3642
|
-
return __awaiter(_this, __spreadArray([payTokenSymbol_1, tokenAmountIn_1, minLpAmountOut_1, poolConfig_1], args_1, true), void 0, function (payTokenSymbol, tokenAmountIn, minLpAmountOut, poolConfig, skipBalanceChecks, ephemeralSignerPubkey
|
|
3642
|
+
return __awaiter(_this, __spreadArray([payTokenSymbol_1, tokenAmountIn_1, minLpAmountOut_1, poolConfig_1], args_1, true), void 0, function (payTokenSymbol, tokenAmountIn, minLpAmountOut, poolConfig, skipBalanceChecks, ephemeralSignerPubkey) {
|
|
3643
3643
|
var publicKey, payTokenCustodyConfig, wrappedSolAccount, preInstructions, instructions, postInstructions, additionalSigners, payToken, userPayingTokenAccount, lpTokenAccount, custodyAccountMetas, custodyOracleAccountMetas, markets, _a, _b, custody, _c, _d, market, lamports, unWrappedSolBalance, _e, tokenAccountBalance, _f, whitelistPda, instruction, err_5;
|
|
3644
3644
|
if (skipBalanceChecks === void 0) { skipBalanceChecks = false; }
|
|
3645
3645
|
if (ephemeralSignerPubkey === void 0) { ephemeralSignerPubkey = undefined; }
|
|
3646
|
-
if (isWhitelistedUser === void 0) { isWhitelistedUser = false; }
|
|
3647
3646
|
return __generator(this, function (_g) {
|
|
3648
3647
|
switch (_g.label) {
|
|
3649
3648
|
case 0:
|
|
@@ -3738,13 +3737,31 @@ var PerpetualsClient = (function () {
|
|
|
3738
3737
|
}
|
|
3739
3738
|
_g.label = 8;
|
|
3740
3739
|
case 8:
|
|
3741
|
-
whitelistPda = this.findProgramAddress("whitelist", publicKey).publicKey;
|
|
3740
|
+
whitelistPda = this.findProgramAddress("whitelist", [publicKey]).publicKey;
|
|
3742
3741
|
return [4, this.program.methods
|
|
3743
3742
|
.addLiquidity({
|
|
3744
3743
|
amountIn: tokenAmountIn,
|
|
3745
3744
|
minLpAmountOut: minLpAmountOut
|
|
3746
3745
|
})
|
|
3747
|
-
.accounts(
|
|
3746
|
+
.accounts({
|
|
3747
|
+
owner: publicKey,
|
|
3748
|
+
fundingAccount: payTokenSymbol == 'SOL' ? (ephemeralSignerPubkey ? ephemeralSignerPubkey : wrappedSolAccount.publicKey) : userPayingTokenAccount,
|
|
3749
|
+
lpTokenAccount: lpTokenAccount,
|
|
3750
|
+
transferAuthority: poolConfig.transferAuthority,
|
|
3751
|
+
perpetuals: poolConfig.perpetuals,
|
|
3752
|
+
pool: poolConfig.poolAddress,
|
|
3753
|
+
custody: payTokenCustodyConfig.custodyAccount,
|
|
3754
|
+
custodyOracleAccount: this.useExtOracleAccount ? payTokenCustodyConfig.extOracleAccount : payTokenCustodyConfig.intOracleAccount,
|
|
3755
|
+
custodyTokenAccount: payTokenCustodyConfig.tokenAccount,
|
|
3756
|
+
lpTokenMint: poolConfig.stakedLpTokenMint,
|
|
3757
|
+
eventAuthority: this.eventAuthority.publicKey,
|
|
3758
|
+
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
3759
|
+
program: this.programId,
|
|
3760
|
+
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
3761
|
+
fundingMint: payTokenCustodyConfig.mintKey,
|
|
3762
|
+
fundingTokenProgram: payToken.isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
|
|
3763
|
+
whitelist: whitelistPda,
|
|
3764
|
+
})
|
|
3748
3765
|
.remainingAccounts(__spreadArray(__spreadArray(__spreadArray([], custodyAccountMetas, true), custodyOracleAccountMetas, true), markets, true))
|
|
3749
3766
|
.instruction()];
|
|
3750
3767
|
case 9:
|
|
@@ -3768,12 +3785,11 @@ var PerpetualsClient = (function () {
|
|
|
3768
3785
|
for (var _i = 4; _i < arguments.length; _i++) {
|
|
3769
3786
|
args_1[_i - 4] = arguments[_i];
|
|
3770
3787
|
}
|
|
3771
|
-
return __awaiter(_this, __spreadArray([inputSymbol_1, amountIn_1, minLpAmountOut_1, poolConfig_1], args_1, true), void 0, function (inputSymbol, amountIn, minLpAmountOut, poolConfig, skipBalanceChecks, ephemeralSignerPubkey, userPublicKey
|
|
3788
|
+
return __awaiter(_this, __spreadArray([inputSymbol_1, amountIn_1, minLpAmountOut_1, poolConfig_1], args_1, true), void 0, function (inputSymbol, amountIn, minLpAmountOut, poolConfig, skipBalanceChecks, ephemeralSignerPubkey, userPublicKey) {
|
|
3772
3789
|
var publicKey, wrappedSolAccount, preInstructions, instructions, postInstructions, additionalSigners, userInputTokenAccount, lpTokenMint, inputCustodyConfig, lpTokenAccount, inputToken, flpStakeAccount, poolStakedLpVault, lamports, unWrappedSolBalance, _a, tokenAccountBalance, _b, custodyAccountMetas, custodyOracleAccountMetas, markets, _c, _d, custody, _e, _f, market, whitelistPda, instruction;
|
|
3773
3790
|
if (skipBalanceChecks === void 0) { skipBalanceChecks = false; }
|
|
3774
3791
|
if (ephemeralSignerPubkey === void 0) { ephemeralSignerPubkey = undefined; }
|
|
3775
3792
|
if (userPublicKey === void 0) { userPublicKey = undefined; }
|
|
3776
|
-
if (isWhitelistedUser === void 0) { isWhitelistedUser = false; }
|
|
3777
3793
|
return __generator(this, function (_g) {
|
|
3778
3794
|
switch (_g.label) {
|
|
3779
3795
|
case 0:
|
|
@@ -3865,11 +3881,32 @@ var PerpetualsClient = (function () {
|
|
|
3865
3881
|
isWritable: false,
|
|
3866
3882
|
});
|
|
3867
3883
|
}
|
|
3868
|
-
whitelistPda = this.findProgramAddress("whitelist", publicKey).publicKey;
|
|
3884
|
+
whitelistPda = this.findProgramAddress("whitelist", [publicKey]).publicKey;
|
|
3869
3885
|
return [4, this.program.methods.addLiquidityAndStake({
|
|
3870
3886
|
amountIn: amountIn,
|
|
3871
3887
|
minLpAmountOut: minLpAmountOut,
|
|
3872
|
-
}).accounts(
|
|
3888
|
+
}).accounts({
|
|
3889
|
+
owner: publicKey,
|
|
3890
|
+
feePayer: publicKey,
|
|
3891
|
+
fundingAccount: inputSymbol == 'SOL' ? (ephemeralSignerPubkey ? ephemeralSignerPubkey : wrappedSolAccount.publicKey) : userInputTokenAccount,
|
|
3892
|
+
transferAuthority: poolConfig.transferAuthority,
|
|
3893
|
+
perpetuals: poolConfig.perpetuals,
|
|
3894
|
+
pool: poolConfig.poolAddress,
|
|
3895
|
+
custody: inputCustodyConfig.custodyAccount,
|
|
3896
|
+
custodyOracleAccount: this.useExtOracleAccount ? inputCustodyConfig.extOracleAccount : inputCustodyConfig.intOracleAccount,
|
|
3897
|
+
custodyTokenAccount: inputCustodyConfig.tokenAccount,
|
|
3898
|
+
lpTokenMint: lpTokenMint,
|
|
3899
|
+
flpStakeAccount: flpStakeAccount,
|
|
3900
|
+
poolStakedLpVault: poolStakedLpVault,
|
|
3901
|
+
systemProgram: web3_js_1.SystemProgram.programId,
|
|
3902
|
+
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
3903
|
+
eventAuthority: this.eventAuthority.publicKey,
|
|
3904
|
+
program: this.programId,
|
|
3905
|
+
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
3906
|
+
fundingMint: inputCustodyConfig.mintKey,
|
|
3907
|
+
fundingTokenProgram: inputToken.isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
|
|
3908
|
+
whitelist: whitelistPda,
|
|
3909
|
+
})
|
|
3873
3910
|
.remainingAccounts(__spreadArray(__spreadArray(__spreadArray([], custodyAccountMetas, true), custodyOracleAccountMetas, true), markets, true))
|
|
3874
3911
|
.instruction()];
|
|
3875
3912
|
case 8:
|
|
@@ -3888,14 +3925,13 @@ var PerpetualsClient = (function () {
|
|
|
3888
3925
|
for (var _i = 4; _i < arguments.length; _i++) {
|
|
3889
3926
|
args_1[_i - 4] = arguments[_i];
|
|
3890
3927
|
}
|
|
3891
|
-
return __awaiter(_this, __spreadArray([recieveTokenSymbol_1, liquidityAmountIn_1, minTokenAmountOut_1, poolConfig_1], args_1, true), void 0, function (recieveTokenSymbol, liquidityAmountIn, minTokenAmountOut, poolConfig, closeLpATA, createUserATA, closeUsersWSOLATA, ephemeralSignerPubkey, userPublicKey
|
|
3928
|
+
return __awaiter(_this, __spreadArray([recieveTokenSymbol_1, liquidityAmountIn_1, minTokenAmountOut_1, poolConfig_1], args_1, true), void 0, function (recieveTokenSymbol, liquidityAmountIn, minTokenAmountOut, poolConfig, closeLpATA, createUserATA, closeUsersWSOLATA, ephemeralSignerPubkey, userPublicKey) {
|
|
3892
3929
|
var recieveTokenCustodyConfig, publicKey, userReceivingTokenAccount, wrappedSolAccount, preInstructions, instructions, postInstructions, additionalSigners, recieveToken, stakedLpTokenAccount, custodyAccountMetas, custodyOracleAccountMetas, markets, _a, _b, custody, _c, _d, market, lamports, _e, whitelistPda, removeLiquidityTx, closeInx, closeWsolATAIns, err_6;
|
|
3893
3930
|
if (closeLpATA === void 0) { closeLpATA = false; }
|
|
3894
3931
|
if (createUserATA === void 0) { createUserATA = true; }
|
|
3895
3932
|
if (closeUsersWSOLATA === void 0) { closeUsersWSOLATA = false; }
|
|
3896
3933
|
if (ephemeralSignerPubkey === void 0) { ephemeralSignerPubkey = undefined; }
|
|
3897
3934
|
if (userPublicKey === void 0) { userPublicKey = undefined; }
|
|
3898
|
-
if (isWhitelistedUser === void 0) { isWhitelistedUser = false; }
|
|
3899
3935
|
return __generator(this, function (_f) {
|
|
3900
3936
|
switch (_f.label) {
|
|
3901
3937
|
case 0:
|
|
@@ -3971,13 +4007,31 @@ var PerpetualsClient = (function () {
|
|
|
3971
4007
|
}
|
|
3972
4008
|
_f.label = 5;
|
|
3973
4009
|
case 5:
|
|
3974
|
-
whitelistPda = this.findProgramAddress("whitelist", publicKey).publicKey;
|
|
4010
|
+
whitelistPda = this.findProgramAddress("whitelist", [publicKey]).publicKey;
|
|
3975
4011
|
return [4, this.program.methods
|
|
3976
4012
|
.removeLiquidity({
|
|
3977
4013
|
lpAmountIn: liquidityAmountIn,
|
|
3978
4014
|
minAmountOut: minTokenAmountOut
|
|
3979
4015
|
})
|
|
3980
|
-
.accounts(
|
|
4016
|
+
.accounts({
|
|
4017
|
+
owner: publicKey,
|
|
4018
|
+
receivingAccount: recieveTokenSymbol == 'SOL' ? (ephemeralSignerPubkey ? ephemeralSignerPubkey : wrappedSolAccount.publicKey) : userReceivingTokenAccount,
|
|
4019
|
+
lpTokenAccount: stakedLpTokenAccount,
|
|
4020
|
+
transferAuthority: poolConfig.transferAuthority,
|
|
4021
|
+
perpetuals: poolConfig.perpetuals,
|
|
4022
|
+
pool: poolConfig.poolAddress,
|
|
4023
|
+
custody: recieveTokenCustodyConfig.custodyAccount,
|
|
4024
|
+
custodyOracleAccount: this.useExtOracleAccount ? recieveTokenCustodyConfig.extOracleAccount : recieveTokenCustodyConfig.intOracleAccount,
|
|
4025
|
+
custodyTokenAccount: recieveTokenCustodyConfig.tokenAccount,
|
|
4026
|
+
lpTokenMint: poolConfig.stakedLpTokenMint,
|
|
4027
|
+
eventAuthority: this.eventAuthority.publicKey,
|
|
4028
|
+
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
4029
|
+
program: this.programId,
|
|
4030
|
+
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
4031
|
+
receivingMint: recieveTokenCustodyConfig.mintKey,
|
|
4032
|
+
receivingTokenProgram: recieveToken.isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
|
|
4033
|
+
whitelist: whitelistPda,
|
|
4034
|
+
})
|
|
3981
4035
|
.remainingAccounts(__spreadArray(__spreadArray(__spreadArray([], custodyAccountMetas, true), custodyOracleAccountMetas, true), markets, true))
|
|
3982
4036
|
.instruction()];
|
|
3983
4037
|
case 6:
|
|
@@ -4534,13 +4588,12 @@ var PerpetualsClient = (function () {
|
|
|
4534
4588
|
for (var _i = 5; _i < arguments.length; _i++) {
|
|
4535
4589
|
args_1[_i - 5] = arguments[_i];
|
|
4536
4590
|
}
|
|
4537
|
-
return __awaiter(_this, __spreadArray([amountIn_1, minCompoundingAmountOut_1, inTokenSymbol_1, rewardTokenMint_1, poolConfig_1], args_1, true), void 0, function (amountIn, minCompoundingAmountOut, inTokenSymbol, rewardTokenMint, poolConfig, skipBalanceChecks, ephemeralSignerPubkey, userPublicKey, enableHeapSizeIx,
|
|
4591
|
+
return __awaiter(_this, __spreadArray([amountIn_1, minCompoundingAmountOut_1, inTokenSymbol_1, rewardTokenMint_1, poolConfig_1], args_1, true), void 0, function (amountIn, minCompoundingAmountOut, inTokenSymbol, rewardTokenMint, poolConfig, skipBalanceChecks, ephemeralSignerPubkey, userPublicKey, enableHeapSizeIx, enableDebugLogs) {
|
|
4538
4592
|
var publicKey, preInstructions, instructions, additionalSigners, postInstructions, rewardCustody, inCustodyConfig, lpTokenMint, compoundingTokenMint, wrappedSolAccount, lpTokenAccount, compoundingTokenAccount, fundingAccount, custodyAccountMetas, custodyOracleAccountMetas, markets, _a, _b, custody, _c, _d, market, lamports, unWrappedSolBalance, _e, heapSizeIx, whitelistPda, addCompoundingLiquidity, err_16;
|
|
4539
4593
|
if (skipBalanceChecks === void 0) { skipBalanceChecks = false; }
|
|
4540
4594
|
if (ephemeralSignerPubkey === void 0) { ephemeralSignerPubkey = undefined; }
|
|
4541
4595
|
if (userPublicKey === void 0) { userPublicKey = undefined; }
|
|
4542
4596
|
if (enableHeapSizeIx === void 0) { enableHeapSizeIx = true; }
|
|
4543
|
-
if (isWhitelistedUser === void 0) { isWhitelistedUser = false; }
|
|
4544
4597
|
if (enableDebugLogs === void 0) { enableDebugLogs = false; }
|
|
4545
4598
|
return __generator(this, function (_f) {
|
|
4546
4599
|
switch (_f.label) {
|
|
@@ -4641,13 +4694,35 @@ var PerpetualsClient = (function () {
|
|
|
4641
4694
|
}
|
|
4642
4695
|
preInstructions.push(heapSizeIx);
|
|
4643
4696
|
}
|
|
4644
|
-
whitelistPda = this.findProgramAddress("whitelist", publicKey).publicKey;
|
|
4697
|
+
whitelistPda = this.findProgramAddress("whitelist", [publicKey]).publicKey;
|
|
4645
4698
|
return [4, this.program.methods
|
|
4646
4699
|
.addCompoundingLiquidity({
|
|
4647
4700
|
amountIn: amountIn,
|
|
4648
4701
|
minCompoundingAmountOut: minCompoundingAmountOut
|
|
4649
4702
|
})
|
|
4650
|
-
.accounts(
|
|
4703
|
+
.accounts({
|
|
4704
|
+
owner: publicKey,
|
|
4705
|
+
fundingAccount: inTokenSymbol == 'SOL' ? (ephemeralSignerPubkey ? ephemeralSignerPubkey : wrappedSolAccount.publicKey) : fundingAccount,
|
|
4706
|
+
compoundingTokenAccount: compoundingTokenAccount,
|
|
4707
|
+
poolCompoundingLpVault: poolConfig.compoundingLpVault,
|
|
4708
|
+
transferAuthority: poolConfig.transferAuthority,
|
|
4709
|
+
perpetuals: poolConfig.perpetuals,
|
|
4710
|
+
pool: poolConfig.poolAddress,
|
|
4711
|
+
inCustody: inCustodyConfig.custodyAccount,
|
|
4712
|
+
inCustodyOracleAccount: this.useExtOracleAccount ? inCustodyConfig.extOracleAccount : inCustodyConfig.intOracleAccount,
|
|
4713
|
+
inCustodyTokenAccount: inCustodyConfig.tokenAccount,
|
|
4714
|
+
rewardCustody: rewardCustody.custodyAccount,
|
|
4715
|
+
rewardCustodyOracleAccount: this.useExtOracleAccount ? rewardCustody.extOracleAccount : rewardCustody.intOracleAccount,
|
|
4716
|
+
lpTokenMint: lpTokenMint,
|
|
4717
|
+
compoundingTokenMint: compoundingTokenMint,
|
|
4718
|
+
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
4719
|
+
eventAuthority: this.eventAuthority.publicKey,
|
|
4720
|
+
program: this.program.programId,
|
|
4721
|
+
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
4722
|
+
fundingMint: inCustodyConfig.mintKey,
|
|
4723
|
+
fundingTokenProgram: poolConfig.getTokenFromSymbol(inTokenSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
|
|
4724
|
+
whitelist: whitelistPda,
|
|
4725
|
+
})
|
|
4651
4726
|
.remainingAccounts(__spreadArray(__spreadArray(__spreadArray([], custodyAccountMetas, true), custodyOracleAccountMetas, true), markets, true))
|
|
4652
4727
|
.instruction()];
|
|
4653
4728
|
case 8:
|
|
@@ -4671,13 +4746,12 @@ var PerpetualsClient = (function () {
|
|
|
4671
4746
|
for (var _i = 5; _i < arguments.length; _i++) {
|
|
4672
4747
|
args_1[_i - 5] = arguments[_i];
|
|
4673
4748
|
}
|
|
4674
|
-
return __awaiter(_this, __spreadArray([compoundingAmountIn_1, minAmountOut_1, outTokenSymbol_1, rewardTokenMint_1, poolConfig_1], args_1, true), void 0, function (compoundingAmountIn, minAmountOut, outTokenSymbol, rewardTokenMint, poolConfig, createUserATA, ephemeralSignerPubkey, userPublicKey, enableHeapSizeIx,
|
|
4749
|
+
return __awaiter(_this, __spreadArray([compoundingAmountIn_1, minAmountOut_1, outTokenSymbol_1, rewardTokenMint_1, poolConfig_1], args_1, true), void 0, function (compoundingAmountIn, minAmountOut, outTokenSymbol, rewardTokenMint, poolConfig, createUserATA, ephemeralSignerPubkey, userPublicKey, enableHeapSizeIx, enableDebugLogs) {
|
|
4675
4750
|
var publicKey, userReceivingTokenAccount, wrappedSolAccount, preInstructions, instructions, postInstructions, additionalSigners, rewardCustody, outCustodyConfig, lpTokenMint, compoundingTokenMint, lamports, _a, custodyAccountMetas, custodyOracleAccountMetas, markets, _b, _c, custody, _d, _e, market, compoundingTokenAccount, heapSizeIx, whitelistPda, removeCompoundingLiquidity, err_17;
|
|
4676
4751
|
if (createUserATA === void 0) { createUserATA = true; }
|
|
4677
4752
|
if (ephemeralSignerPubkey === void 0) { ephemeralSignerPubkey = undefined; }
|
|
4678
4753
|
if (userPublicKey === void 0) { userPublicKey = undefined; }
|
|
4679
4754
|
if (enableHeapSizeIx === void 0) { enableHeapSizeIx = true; }
|
|
4680
|
-
if (isWhitelistedUser === void 0) { isWhitelistedUser = false; }
|
|
4681
4755
|
if (enableDebugLogs === void 0) { enableDebugLogs = false; }
|
|
4682
4756
|
return __generator(this, function (_f) {
|
|
4683
4757
|
switch (_f.label) {
|
|
@@ -4762,13 +4836,35 @@ var PerpetualsClient = (function () {
|
|
|
4762
4836
|
}
|
|
4763
4837
|
preInstructions.push(heapSizeIx);
|
|
4764
4838
|
}
|
|
4765
|
-
whitelistPda = this.findProgramAddress("whitelist", publicKey).publicKey;
|
|
4839
|
+
whitelistPda = this.findProgramAddress("whitelist", [publicKey]).publicKey;
|
|
4766
4840
|
return [4, this.program.methods
|
|
4767
4841
|
.removeCompoundingLiquidity({
|
|
4768
4842
|
compoundingAmountIn: compoundingAmountIn,
|
|
4769
4843
|
minAmountOut: minAmountOut
|
|
4770
4844
|
})
|
|
4771
|
-
.accounts(
|
|
4845
|
+
.accounts({
|
|
4846
|
+
owner: publicKey,
|
|
4847
|
+
receivingAccount: outCustodyConfig.symbol == 'SOL' ? (ephemeralSignerPubkey ? ephemeralSignerPubkey : wrappedSolAccount.publicKey) : userReceivingTokenAccount,
|
|
4848
|
+
compoundingTokenAccount: compoundingTokenAccount,
|
|
4849
|
+
poolCompoundingLpVault: poolConfig.compoundingLpVault,
|
|
4850
|
+
transferAuthority: poolConfig.transferAuthority,
|
|
4851
|
+
perpetuals: poolConfig.perpetuals,
|
|
4852
|
+
pool: poolConfig.poolAddress,
|
|
4853
|
+
outCustody: outCustodyConfig.custodyAccount,
|
|
4854
|
+
outCustodyOracleAccount: this.useExtOracleAccount ? outCustodyConfig.extOracleAccount : outCustodyConfig.intOracleAccount,
|
|
4855
|
+
outCustodyTokenAccount: outCustodyConfig.tokenAccount,
|
|
4856
|
+
rewardCustody: rewardCustody.custodyAccount,
|
|
4857
|
+
rewardCustodyOracleAccount: this.useExtOracleAccount ? rewardCustody.extOracleAccount : rewardCustody.intOracleAccount,
|
|
4858
|
+
lpTokenMint: lpTokenMint,
|
|
4859
|
+
compoundingTokenMint: compoundingTokenMint,
|
|
4860
|
+
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
4861
|
+
eventAuthority: this.eventAuthority.publicKey,
|
|
4862
|
+
program: this.program.programId,
|
|
4863
|
+
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
4864
|
+
receivingMint: outCustodyConfig.mintKey,
|
|
4865
|
+
receivingTokenProgram: poolConfig.getTokenFromSymbol(outTokenSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
|
|
4866
|
+
whitelist: whitelistPda,
|
|
4867
|
+
})
|
|
4772
4868
|
.remainingAccounts(__spreadArray(__spreadArray(__spreadArray([], custodyAccountMetas, true), custodyOracleAccountMetas, true), markets, true))
|
|
4773
4869
|
.instruction()];
|
|
4774
4870
|
case 6:
|
|
@@ -6326,14 +6422,13 @@ var PerpetualsClient = (function () {
|
|
|
6326
6422
|
for (var _i = 5; _i < arguments.length; _i++) {
|
|
6327
6423
|
args_1[_i - 5] = arguments[_i];
|
|
6328
6424
|
}
|
|
6329
|
-
return __awaiter(_this, __spreadArray([userInputTokenSymbol_1, userOutputTokenSymbol_1, amountIn_1, minAmountOut_1, poolConfig_1], args_1, true), void 0, function (userInputTokenSymbol, userOutputTokenSymbol, amountIn, minAmountOut, poolConfig, useFeesPool, createUserATA, unWrapSol, skipBalanceChecks, ephemeralSignerPubkey
|
|
6425
|
+
return __awaiter(_this, __spreadArray([userInputTokenSymbol_1, userOutputTokenSymbol_1, amountIn_1, minAmountOut_1, poolConfig_1], args_1, true), void 0, function (userInputTokenSymbol, userOutputTokenSymbol, amountIn, minAmountOut, poolConfig, useFeesPool, createUserATA, unWrapSol, skipBalanceChecks, ephemeralSignerPubkey) {
|
|
6330
6426
|
var userInputCustodyConfig, userOutputCustodyConfig, publicKey, wrappedSolAccount, preInstructions, instructions, postInstructions, additionalSigners, userOutputTokenAccount, userInputTokenAccount, wsolAssociatedTokenAccount, wsolATAExist, unWrappedSolBalance, _a, wsolAssociatedTokenAccount, closeWsolATAIns, accCreationLamports, lamports, unWrappedSolBalance, _b, tokenAccountBalance, _c, lamports, _d, custodyAccountMetas, custodyOracleAccountMetas, _e, _f, custody, whitelistPda, params, inx, closeWsolATAIns, err_40;
|
|
6331
6427
|
if (useFeesPool === void 0) { useFeesPool = false; }
|
|
6332
6428
|
if (createUserATA === void 0) { createUserATA = true; }
|
|
6333
6429
|
if (unWrapSol === void 0) { unWrapSol = false; }
|
|
6334
6430
|
if (skipBalanceChecks === void 0) { skipBalanceChecks = false; }
|
|
6335
6431
|
if (ephemeralSignerPubkey === void 0) { ephemeralSignerPubkey = undefined; }
|
|
6336
|
-
if (isWhitelistedUser === void 0) { isWhitelistedUser = false; }
|
|
6337
6432
|
return __generator(this, function (_g) {
|
|
6338
6433
|
switch (_g.label) {
|
|
6339
6434
|
case 0:
|
|
@@ -6494,7 +6589,7 @@ var PerpetualsClient = (function () {
|
|
|
6494
6589
|
isWritable: false,
|
|
6495
6590
|
});
|
|
6496
6591
|
}
|
|
6497
|
-
whitelistPda = this.findProgramAddress("whitelist", publicKey).publicKey;
|
|
6592
|
+
whitelistPda = this.findProgramAddress("whitelist", [publicKey]).publicKey;
|
|
6498
6593
|
params = {
|
|
6499
6594
|
amountIn: amountIn,
|
|
6500
6595
|
minAmountOut: minAmountOut,
|
|
@@ -6502,7 +6597,28 @@ var PerpetualsClient = (function () {
|
|
|
6502
6597
|
};
|
|
6503
6598
|
return [4, this.program.methods
|
|
6504
6599
|
.swap(params)
|
|
6505
|
-
.accounts(
|
|
6600
|
+
.accounts({
|
|
6601
|
+
owner: publicKey,
|
|
6602
|
+
fundingAccount: userInputTokenSymbol == 'SOL' ? (ephemeralSignerPubkey ? ephemeralSignerPubkey : wrappedSolAccount.publicKey) : userInputTokenAccount,
|
|
6603
|
+
receivingAccount: userOutputTokenSymbol == 'SOL' ? (ephemeralSignerPubkey ? ephemeralSignerPubkey : wrappedSolAccount.publicKey) : userOutputTokenAccount,
|
|
6604
|
+
transferAuthority: poolConfig.transferAuthority,
|
|
6605
|
+
perpetuals: poolConfig.perpetuals,
|
|
6606
|
+
pool: poolConfig.poolAddress,
|
|
6607
|
+
receivingCustody: userInputCustodyConfig.custodyAccount,
|
|
6608
|
+
receivingCustodyOracleAccount: this.useExtOracleAccount ? userInputCustodyConfig.extOracleAccount : userInputCustodyConfig.intOracleAccount,
|
|
6609
|
+
receivingCustodyTokenAccount: userInputCustodyConfig.tokenAccount,
|
|
6610
|
+
dispensingCustody: userOutputCustodyConfig.custodyAccount,
|
|
6611
|
+
dispensingCustodyOracleAccount: this.useExtOracleAccount ? userOutputCustodyConfig.extOracleAccount : userOutputCustodyConfig.intOracleAccount,
|
|
6612
|
+
dispensingCustodyTokenAccount: userOutputCustodyConfig.tokenAccount,
|
|
6613
|
+
eventAuthority: this.eventAuthority.publicKey,
|
|
6614
|
+
program: this.programId,
|
|
6615
|
+
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
6616
|
+
fundingMint: userInputCustodyConfig.mintKey,
|
|
6617
|
+
fundingTokenProgram: poolConfig.getTokenFromSymbol(userInputTokenSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
|
|
6618
|
+
receivingMint: userOutputCustodyConfig.mintKey,
|
|
6619
|
+
receivingTokenProgram: poolConfig.getTokenFromSymbol(userOutputTokenSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
|
|
6620
|
+
whitelist: whitelistPda,
|
|
6621
|
+
})
|
|
6506
6622
|
.remainingAccounts(__spreadArray(__spreadArray([], custodyAccountMetas, true), custodyOracleAccountMetas, true))
|
|
6507
6623
|
.instruction()];
|
|
6508
6624
|
case 18:
|
|
@@ -7913,7 +8029,7 @@ var PerpetualsClient = (function () {
|
|
|
7913
8029
|
}
|
|
7914
8030
|
});
|
|
7915
8031
|
}); };
|
|
7916
|
-
this.createWhitelist = function (isSwapFeeExempt, isDepositFeeExempt, isWithdrawalFeeExempt, owner) { return __awaiter(_this, void 0, void 0, function () {
|
|
8032
|
+
this.createWhitelist = function (isSwapFeeExempt, isDepositFeeExempt, isWithdrawalFeeExempt, poolAddress, owner) { return __awaiter(_this, void 0, void 0, function () {
|
|
7917
8033
|
var publicKey, preInstructions, instructions, postInstructions, additionalSigners, whitelist, createWhitelistInstruction, err_65;
|
|
7918
8034
|
return __generator(this, function (_a) {
|
|
7919
8035
|
switch (_a.label) {
|
|
@@ -7931,7 +8047,8 @@ var PerpetualsClient = (function () {
|
|
|
7931
8047
|
.createWhitelist({
|
|
7932
8048
|
isSwapFeeExempt: isSwapFeeExempt,
|
|
7933
8049
|
isDepositFeeExempt: isDepositFeeExempt,
|
|
7934
|
-
isWithdrawalFeeExempt: isWithdrawalFeeExempt
|
|
8050
|
+
isWithdrawalFeeExempt: isWithdrawalFeeExempt,
|
|
8051
|
+
poolAddress: poolAddress,
|
|
7935
8052
|
})
|
|
7936
8053
|
.accounts({
|
|
7937
8054
|
admin: publicKey,
|
|
@@ -7956,7 +8073,7 @@ var PerpetualsClient = (function () {
|
|
|
7956
8073
|
}
|
|
7957
8074
|
});
|
|
7958
8075
|
}); };
|
|
7959
|
-
this.setWhitelistConfig = function (isSwapFeeExempt, isDepositFeeExempt, isWithdrawalFeeExempt, owner) { return __awaiter(_this, void 0, void 0, function () {
|
|
8076
|
+
this.setWhitelistConfig = function (isSwapFeeExempt, isDepositFeeExempt, isWithdrawalFeeExempt, poolAddress, owner) { return __awaiter(_this, void 0, void 0, function () {
|
|
7960
8077
|
var publicKey, preInstructions, instructions, postInstructions, additionalSigners, whitelist, setWhitelistConfigInstruction, err_66;
|
|
7961
8078
|
return __generator(this, function (_a) {
|
|
7962
8079
|
switch (_a.label) {
|
|
@@ -7974,7 +8091,8 @@ var PerpetualsClient = (function () {
|
|
|
7974
8091
|
.setWhitelistConfig({
|
|
7975
8092
|
isSwapFeeExempt: isSwapFeeExempt,
|
|
7976
8093
|
isDepositFeeExempt: isDepositFeeExempt,
|
|
7977
|
-
isWithdrawalFeeExempt: isWithdrawalFeeExempt
|
|
8094
|
+
isWithdrawalFeeExempt: isWithdrawalFeeExempt,
|
|
8095
|
+
poolAddress: poolAddress
|
|
7978
8096
|
})
|
|
7979
8097
|
.accounts({
|
|
7980
8098
|
admin: publicKey,
|