flash-sdk 11.11.4 → 11.11.5-alpha.0
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/MarketAccount.d.ts +2 -2
- package/dist/OraclePrice.d.ts +0 -1
- package/dist/OrderAccount.d.ts +0 -1
- package/dist/PerpetualsClient.d.ts +245 -4396
- package/dist/PerpetualsClient.js +107 -187
- package/dist/PoolAccount.d.ts +0 -1
- package/dist/PoolConfig.json +6 -6
- package/dist/PoolDataClient.d.ts +0 -1
- package/dist/PositionAccount.d.ts +0 -1
- package/dist/TokenStakeAccount.d.ts +0 -1
- package/dist/TokenVaultAccount.d.ts +0 -1
- package/dist/ViewHelper.js +8 -5
- package/dist/backupOracle.js +4 -4
- package/dist/constants/index.d.ts +0 -1
- package/dist/idl/perpetuals.d.ts +26232 -13443
- package/dist/idl/perpetuals.js +0 -18151
- package/dist/idl/perpetuals.json +30940 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/generated.d.ts +2272 -0
- package/dist/types/generated.js +2 -0
- package/dist/types/index.d.ts +46 -157
- package/dist/types/index.js +35 -20
- package/dist/utils/IdlCoder.d.ts +3 -2
- package/dist/utils/IdlCoder.js +21 -9
- package/dist/utils/alt.js +5 -6
- package/dist/utils/anchorCpiEvents.d.ts +1 -2
- package/dist/utils/anchorCpiEvents.js +14 -10
- package/dist/utils/index.js +6 -6
- package/dist/utils/rpc.js +9 -9
- package/package.json +3 -2
package/dist/PerpetualsClient.js
CHANGED
|
@@ -20,8 +20,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
20
20
|
});
|
|
21
21
|
};
|
|
22
22
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
-
return g =
|
|
23
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
24
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
25
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
26
|
function step(op) {
|
|
27
27
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -68,7 +68,7 @@ var bs58_1 = require("bs58");
|
|
|
68
68
|
var PositionAccount_1 = require("./PositionAccount");
|
|
69
69
|
var types_1 = require("./types");
|
|
70
70
|
var OraclePrice_1 = require("./OraclePrice");
|
|
71
|
-
var
|
|
71
|
+
var perpetuals_json_1 = __importDefault(require("./idl/perpetuals.json"));
|
|
72
72
|
var rpc_1 = require("./utils/rpc");
|
|
73
73
|
var utils_1 = require("./utils");
|
|
74
74
|
var constants_1 = require("./constants");
|
|
@@ -262,11 +262,6 @@ var PerpetualsClient = (function () {
|
|
|
262
262
|
tokenMint,
|
|
263
263
|
]).publicKey;
|
|
264
264
|
};
|
|
265
|
-
this.getTradingAccount = function (tradingAccount) { return __awaiter(_this, void 0, void 0, function () {
|
|
266
|
-
return __generator(this, function (_a) {
|
|
267
|
-
return [2, this.program.account.trading.fetch(tradingAccount)];
|
|
268
|
-
});
|
|
269
|
-
}); };
|
|
270
265
|
this.getPosition = function (postionKey) { return __awaiter(_this, void 0, void 0, function () {
|
|
271
266
|
return __generator(this, function (_a) {
|
|
272
267
|
return [2, this.program.account.position.fetch(postionKey)];
|
|
@@ -285,7 +280,7 @@ var PerpetualsClient = (function () {
|
|
|
285
280
|
_a.trys.push([1, 3, , 4]);
|
|
286
281
|
return [4, this.program.methods
|
|
287
282
|
.getPositionData({})
|
|
288
|
-
.
|
|
283
|
+
.accountsPartial({
|
|
289
284
|
perpetuals: this.perpetuals.publicKey,
|
|
290
285
|
pool: poolConfig.poolAddress,
|
|
291
286
|
position: position.publicKey,
|
|
@@ -390,7 +385,7 @@ var PerpetualsClient = (function () {
|
|
|
390
385
|
return __generator(this, function (_a) {
|
|
391
386
|
switch (_a.label) {
|
|
392
387
|
case 0:
|
|
393
|
-
data = (0, bs58_1.encode)(
|
|
388
|
+
data = (0, bs58_1.encode)(new Uint8Array(marketKey.toBuffer()));
|
|
394
389
|
return [4, this.program.account.position.all([
|
|
395
390
|
{
|
|
396
391
|
memcmp: { bytes: data, offset: 40 }
|
|
@@ -407,7 +402,7 @@ var PerpetualsClient = (function () {
|
|
|
407
402
|
return __generator(this, function (_a) {
|
|
408
403
|
switch (_a.label) {
|
|
409
404
|
case 0:
|
|
410
|
-
data = (0, bs58_1.encode)(
|
|
405
|
+
data = (0, bs58_1.encode)(new Uint8Array(marketKey.toBuffer()));
|
|
411
406
|
return [4, this.program.account.position.all([
|
|
412
407
|
{
|
|
413
408
|
memcmp: { bytes: data, offset: 40 }
|
|
@@ -450,7 +445,7 @@ var PerpetualsClient = (function () {
|
|
|
450
445
|
collateralCustodyConfig = poolConfig.custodies.find(function (f) { return f.mintKey.equals(collateralMint); });
|
|
451
446
|
return [4, this.program.methods
|
|
452
447
|
.liquidate({})
|
|
453
|
-
.
|
|
448
|
+
.accountsPartial({
|
|
454
449
|
signer: this.provider.wallet.publicKey,
|
|
455
450
|
perpetuals: this.perpetuals.publicKey,
|
|
456
451
|
pool: poolConfig.poolAddress,
|
|
@@ -460,7 +455,6 @@ var PerpetualsClient = (function () {
|
|
|
460
455
|
targetOracleAccount: this.useExtOracleAccount ? targetCustodyConfig.extOracleAccount : targetCustodyConfig.intOracleAccount,
|
|
461
456
|
collateralCustody: collateralCustodyConfig.custodyAccount,
|
|
462
457
|
collateralOracleAccount: this.useExtOracleAccount ? collateralCustodyConfig.extOracleAccount : collateralCustodyConfig.intOracleAccount,
|
|
463
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
464
458
|
program: this.program.programId,
|
|
465
459
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY
|
|
466
460
|
})
|
|
@@ -2011,7 +2005,7 @@ var PerpetualsClient = (function () {
|
|
|
2011
2005
|
}
|
|
2012
2006
|
return [4, this.program.methods
|
|
2013
2007
|
.getLpTokenPrice({})
|
|
2014
|
-
.
|
|
2008
|
+
.accountsPartial({
|
|
2015
2009
|
perpetuals: POOL_CONFIG.perpetuals,
|
|
2016
2010
|
pool: poolKey,
|
|
2017
2011
|
lpTokenMint: POOL_CONFIG.stakedLpTokenMint,
|
|
@@ -2033,7 +2027,7 @@ var PerpetualsClient = (function () {
|
|
|
2033
2027
|
return [4, this.viewHelper.simulateTransaction(transaction, addressLookupTables)];
|
|
2034
2028
|
case 4:
|
|
2035
2029
|
result = _e.sent();
|
|
2036
|
-
index =
|
|
2030
|
+
index = perpetuals_json_1.default.instructions.findIndex(function (f) { return f.name === 'getLpTokenPrice'; });
|
|
2037
2031
|
res = this.viewHelper.decodeLogs(result, index, 'getLpTokenPrice');
|
|
2038
2032
|
return [2, res.toString()];
|
|
2039
2033
|
}
|
|
@@ -2074,7 +2068,7 @@ var PerpetualsClient = (function () {
|
|
|
2074
2068
|
}
|
|
2075
2069
|
return [4, this.program.methods
|
|
2076
2070
|
.getAssetsUnderManagement({})
|
|
2077
|
-
.
|
|
2071
|
+
.accountsPartial({
|
|
2078
2072
|
perpetuals: POOL_CONFIG.perpetuals,
|
|
2079
2073
|
pool: poolKey,
|
|
2080
2074
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
@@ -2140,7 +2134,7 @@ var PerpetualsClient = (function () {
|
|
|
2140
2134
|
.getAddLiquidityAmountAndFee({
|
|
2141
2135
|
amountIn: amount,
|
|
2142
2136
|
})
|
|
2143
|
-
.
|
|
2137
|
+
.accountsPartial({
|
|
2144
2138
|
perpetuals: POOL_CONFIG.perpetuals,
|
|
2145
2139
|
pool: poolKey,
|
|
2146
2140
|
custody: depositCustodyKey,
|
|
@@ -2174,7 +2168,7 @@ var PerpetualsClient = (function () {
|
|
|
2174
2168
|
error: 'Simulation failed: ' + JSON.stringify(result.value.err),
|
|
2175
2169
|
}];
|
|
2176
2170
|
}
|
|
2177
|
-
index =
|
|
2171
|
+
index = perpetuals_json_1.default.instructions.findIndex(function (f) { return f.name === 'getAddLiquidityAmountAndFee'; });
|
|
2178
2172
|
res = this.viewHelper.decodeLogs(result, index, 'getAddLiquidityAmountAndFee');
|
|
2179
2173
|
return [2, {
|
|
2180
2174
|
amount: res.amount,
|
|
@@ -2235,7 +2229,7 @@ var PerpetualsClient = (function () {
|
|
|
2235
2229
|
.getRemoveLiquidityAmountAndFee({
|
|
2236
2230
|
lpAmountIn: amount,
|
|
2237
2231
|
})
|
|
2238
|
-
.
|
|
2232
|
+
.accountsPartial({
|
|
2239
2233
|
perpetuals: POOL_CONFIG.perpetuals,
|
|
2240
2234
|
pool: poolKey,
|
|
2241
2235
|
custody: removeTokenCustodyKey,
|
|
@@ -2261,7 +2255,7 @@ var PerpetualsClient = (function () {
|
|
|
2261
2255
|
return [4, this.viewHelper.simulateTransaction(transaction, addressLookupTables, userPublicKey)];
|
|
2262
2256
|
case 5:
|
|
2263
2257
|
result = _f.sent();
|
|
2264
|
-
index =
|
|
2258
|
+
index = perpetuals_json_1.default.instructions.findIndex(function (f) { return f.name === 'getRemoveLiquidityAmountAndFee'; });
|
|
2265
2259
|
if (result.value.err) {
|
|
2266
2260
|
console.error('error Simulation failed:', result);
|
|
2267
2261
|
return [2, {
|
|
@@ -2318,7 +2312,7 @@ var PerpetualsClient = (function () {
|
|
|
2318
2312
|
backUpOracleInstruction = _e.sent();
|
|
2319
2313
|
return [4, this.program.methods
|
|
2320
2314
|
.getCompoundingTokenPrice({})
|
|
2321
|
-
.
|
|
2315
|
+
.accountsPartial({
|
|
2322
2316
|
perpetuals: POOL_CONFIG.perpetuals,
|
|
2323
2317
|
pool: poolKey,
|
|
2324
2318
|
lpTokenMint: POOL_CONFIG.stakedLpTokenMint,
|
|
@@ -2337,7 +2331,7 @@ var PerpetualsClient = (function () {
|
|
|
2337
2331
|
return [4, this.viewHelper.simulateTransaction(transaction, addressLookupTables)];
|
|
2338
2332
|
case 4:
|
|
2339
2333
|
result = _e.sent();
|
|
2340
|
-
index =
|
|
2334
|
+
index = perpetuals_json_1.default.instructions.findIndex(function (f) { return f.name === 'getCompoundingTokenPrice'; });
|
|
2341
2335
|
res = this.viewHelper.decodeLogs(result, index, 'getCompoundingTokenPrice');
|
|
2342
2336
|
return [2, res.toString()];
|
|
2343
2337
|
}
|
|
@@ -2395,7 +2389,7 @@ var PerpetualsClient = (function () {
|
|
|
2395
2389
|
.getAddCompoundingLiquidityAmountAndFee({
|
|
2396
2390
|
amountIn: amount,
|
|
2397
2391
|
})
|
|
2398
|
-
.
|
|
2392
|
+
.accountsPartial({
|
|
2399
2393
|
perpetuals: POOL_CONFIG.perpetuals,
|
|
2400
2394
|
pool: poolKey,
|
|
2401
2395
|
inCustody: depositCustodyKey,
|
|
@@ -2424,7 +2418,7 @@ var PerpetualsClient = (function () {
|
|
|
2424
2418
|
case 4: return [4, this.viewHelper.simulateTransaction(transaction, addressLookupTables, userPublicKey)];
|
|
2425
2419
|
case 5:
|
|
2426
2420
|
result = _f.sent();
|
|
2427
|
-
index =
|
|
2421
|
+
index = perpetuals_json_1.default.instructions.findIndex(function (f) { return f.name === 'getAddCompoundingLiquidityAmountAndFee'; });
|
|
2428
2422
|
res = this.viewHelper.decodeLogs(result, index, 'getAddCompoundingLiquidityAmountAndFee');
|
|
2429
2423
|
return [2, {
|
|
2430
2424
|
amount: res.amount,
|
|
@@ -2486,7 +2480,7 @@ var PerpetualsClient = (function () {
|
|
|
2486
2480
|
.getRemoveCompoundingLiquidityAmountAndFee({
|
|
2487
2481
|
compoundingAmountIn: amount,
|
|
2488
2482
|
})
|
|
2489
|
-
.
|
|
2483
|
+
.accountsPartial({
|
|
2490
2484
|
perpetuals: POOL_CONFIG.perpetuals,
|
|
2491
2485
|
pool: poolKey,
|
|
2492
2486
|
outCustody: removeTokenCustodyKey,
|
|
@@ -2515,7 +2509,7 @@ var PerpetualsClient = (function () {
|
|
|
2515
2509
|
return [4, this.viewHelper.simulateTransaction(transaction, addressLookupTables, userPublicKey)];
|
|
2516
2510
|
case 5:
|
|
2517
2511
|
result = _f.sent();
|
|
2518
|
-
index =
|
|
2512
|
+
index = perpetuals_json_1.default.instructions.findIndex(function (f) { return f.name === 'getRemoveCompoundingLiquidityAmountAndFee'; });
|
|
2519
2513
|
if (result.value.err) {
|
|
2520
2514
|
return [2, {
|
|
2521
2515
|
amount: new anchor_1.BN(0),
|
|
@@ -2548,7 +2542,7 @@ var PerpetualsClient = (function () {
|
|
|
2548
2542
|
collateralCustodyConfig = poolConfig.custodies.find(function (f) { return f.custodyAccount.equals(marketConfig_1.collateralCustody); });
|
|
2549
2543
|
return [4, this.program.methods
|
|
2550
2544
|
.getLiquidationPrice({})
|
|
2551
|
-
.
|
|
2545
|
+
.accountsPartial({
|
|
2552
2546
|
perpetuals: this.perpetuals.publicKey,
|
|
2553
2547
|
pool: poolConfig.poolAddress,
|
|
2554
2548
|
position: positionAccountKey,
|
|
@@ -2582,7 +2576,7 @@ var PerpetualsClient = (function () {
|
|
|
2582
2576
|
collateralCustodyConfig = poolConfig.custodies.find(function (f) { return f.mintKey.equals(collateralMint); });
|
|
2583
2577
|
return [4, this.program.methods
|
|
2584
2578
|
.getLiquidationState({})
|
|
2585
|
-
.
|
|
2579
|
+
.accountsPartial({
|
|
2586
2580
|
perpetuals: this.perpetuals.publicKey,
|
|
2587
2581
|
pool: poolConfig.poolAddress,
|
|
2588
2582
|
position: positionAccount,
|
|
@@ -2632,7 +2626,7 @@ var PerpetualsClient = (function () {
|
|
|
2632
2626
|
}
|
|
2633
2627
|
return [4, this.program.methods
|
|
2634
2628
|
.getCompoundingTokenData({})
|
|
2635
|
-
.
|
|
2629
|
+
.accountsPartial({
|
|
2636
2630
|
perpetuals: this.perpetuals.publicKey,
|
|
2637
2631
|
pool: poolConfig.poolAddress,
|
|
2638
2632
|
lpTokenMint: poolConfig.stakedLpTokenMint,
|
|
@@ -2679,7 +2673,7 @@ var PerpetualsClient = (function () {
|
|
|
2679
2673
|
}
|
|
2680
2674
|
return [4, this.program.methods
|
|
2681
2675
|
.getLpTokenPrice({})
|
|
2682
|
-
.
|
|
2676
|
+
.accountsPartial({
|
|
2683
2677
|
perpetuals: this.perpetuals.publicKey,
|
|
2684
2678
|
pool: poolConfig.poolAddress,
|
|
2685
2679
|
lpTokenMint: poolConfig.stakedLpTokenMint,
|
|
@@ -2775,7 +2769,7 @@ var PerpetualsClient = (function () {
|
|
|
2775
2769
|
};
|
|
2776
2770
|
return [4, this.program.methods
|
|
2777
2771
|
.openPosition(params)
|
|
2778
|
-
.
|
|
2772
|
+
.accountsPartial({
|
|
2779
2773
|
owner: publicKey,
|
|
2780
2774
|
feePayer: publicKey,
|
|
2781
2775
|
fundingAccount: collateralSymbol == 'SOL' ? (ephemeralSignerPubkey ? ephemeralSignerPubkey : wrappedSolAccount.publicKey) : userCollateralTokenAccount,
|
|
@@ -2790,8 +2784,6 @@ var PerpetualsClient = (function () {
|
|
|
2790
2784
|
collateralCustodyTokenAccount: collateralCustodyConfig.tokenAccount,
|
|
2791
2785
|
systemProgram: web3_js_1.SystemProgram.programId,
|
|
2792
2786
|
fundingTokenProgram: poolConfig.getTokenFromSymbol(collateralSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
|
|
2793
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
2794
|
-
program: this.programId,
|
|
2795
2787
|
transferAuthority: this.authority.publicKey,
|
|
2796
2788
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
2797
2789
|
fundingMint: collateralCustodyConfig.mintKey
|
|
@@ -2876,7 +2868,7 @@ var PerpetualsClient = (function () {
|
|
|
2876
2868
|
priceWithSlippage: priceWithSlippage,
|
|
2877
2869
|
privilege: privilege
|
|
2878
2870
|
})
|
|
2879
|
-
.
|
|
2871
|
+
.accountsPartial({
|
|
2880
2872
|
feePayer: publicKey,
|
|
2881
2873
|
owner: publicKey,
|
|
2882
2874
|
receivingAccount: collateralSymbol == 'SOL' ? (ephemeralSignerPubkey ? ephemeralSignerPubkey : wrappedSolAccount.publicKey) : userReceivingTokenAccount,
|
|
@@ -2891,7 +2883,6 @@ var PerpetualsClient = (function () {
|
|
|
2891
2883
|
collateralOracleAccount: this.useExtOracleAccount ? collateralCustodyConfig.extOracleAccount : collateralCustodyConfig.intOracleAccount,
|
|
2892
2884
|
collateralCustodyTokenAccount: collateralCustodyConfig.tokenAccount,
|
|
2893
2885
|
eventAuthority: this.eventAuthority.publicKey,
|
|
2894
|
-
program: this.programId,
|
|
2895
2886
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
2896
2887
|
collateralMint: collateralCustodyConfig.mintKey,
|
|
2897
2888
|
collateralTokenProgram: poolConfig.getTokenFromSymbol(collateralSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID
|
|
@@ -3028,7 +3019,7 @@ var PerpetualsClient = (function () {
|
|
|
3028
3019
|
sizeAmount: sizeAmount,
|
|
3029
3020
|
privilege: privilege
|
|
3030
3021
|
})
|
|
3031
|
-
.
|
|
3022
|
+
.accountsPartial({
|
|
3032
3023
|
owner: publicKey,
|
|
3033
3024
|
feePayer: publicKey,
|
|
3034
3025
|
fundingAccount: userInputTokenSymbol == 'SOL' ? (ephemeralSignerPubkey ? ephemeralSignerPubkey : wrappedSolAccount.publicKey) : userInputTokenAccount,
|
|
@@ -3047,7 +3038,6 @@ var PerpetualsClient = (function () {
|
|
|
3047
3038
|
collateralCustodyTokenAccount: collateralCustodyConfig.tokenAccount,
|
|
3048
3039
|
systemProgram: web3_js_1.SystemProgram.programId,
|
|
3049
3040
|
eventAuthority: this.eventAuthority.publicKey,
|
|
3050
|
-
program: this.programId,
|
|
3051
3041
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
3052
3042
|
fundingMint: userInputCustodyConfig.mintKey,
|
|
3053
3043
|
fundingTokenProgram: poolConfig.getTokenFromSymbol(userInputTokenSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
|
|
@@ -3154,7 +3144,7 @@ var PerpetualsClient = (function () {
|
|
|
3154
3144
|
priceWithSlippage: priceWithSlippage,
|
|
3155
3145
|
privilege: privilege
|
|
3156
3146
|
})
|
|
3157
|
-
.
|
|
3147
|
+
.accountsPartial({
|
|
3158
3148
|
owner: publicKey,
|
|
3159
3149
|
feePayer: publicKey,
|
|
3160
3150
|
receivingAccount: userOutputTokenSymbol == 'SOL' ? (ephemeralSignerPubkey ? ephemeralSignerPubkey : wrappedSolAccount.publicKey) : userReceivingTokenAccount,
|
|
@@ -3172,8 +3162,6 @@ var PerpetualsClient = (function () {
|
|
|
3172
3162
|
dispensingCustody: userOutputCustodyConfig.custodyAccount,
|
|
3173
3163
|
dispensingOracleAccount: this.useExtOracleAccount ? userOutputCustodyConfig.extOracleAccount : userOutputCustodyConfig.intOracleAccount,
|
|
3174
3164
|
dispensingCustodyTokenAccount: userOutputCustodyConfig.tokenAccount,
|
|
3175
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
3176
|
-
program: this.programId,
|
|
3177
3165
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
3178
3166
|
receivingMint: userOutputCustodyConfig.mintKey,
|
|
3179
3167
|
receivingTokenProgram: userOutputToken.isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
|
|
@@ -3271,7 +3259,7 @@ var PerpetualsClient = (function () {
|
|
|
3271
3259
|
_c.label = 6;
|
|
3272
3260
|
case 6: return [4, this.program.methods.addCollateral({
|
|
3273
3261
|
collateralDelta: collateralWithFee
|
|
3274
|
-
}).
|
|
3262
|
+
}).accountsPartial({
|
|
3275
3263
|
owner: publicKey,
|
|
3276
3264
|
position: positionPubKey,
|
|
3277
3265
|
market: marketAccount,
|
|
@@ -3283,9 +3271,7 @@ var PerpetualsClient = (function () {
|
|
|
3283
3271
|
collateralCustody: collateralCustodyConfig.custodyAccount,
|
|
3284
3272
|
collateralOracleAccount: this.useExtOracleAccount ? collateralCustodyConfig.extOracleAccount : collateralCustodyConfig.intOracleAccount,
|
|
3285
3273
|
collateralCustodyTokenAccount: collateralCustodyConfig.tokenAccount,
|
|
3286
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
3287
3274
|
fundingTokenProgram: poolConfig.getTokenFromSymbol(collateralSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
|
|
3288
|
-
program: this.programId,
|
|
3289
3275
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
3290
3276
|
fundingMint: collateralCustodyConfig.mintKey
|
|
3291
3277
|
})
|
|
@@ -3385,7 +3371,7 @@ var PerpetualsClient = (function () {
|
|
|
3385
3371
|
marketAccount = poolConfig.getMarketPk(targetCustodyConfig.custodyAccount, collateralCustodyConfig.custodyAccount, side);
|
|
3386
3372
|
return [4, this.program.methods.swapAndAddCollateral({
|
|
3387
3373
|
amountIn: amountIn,
|
|
3388
|
-
}).
|
|
3374
|
+
}).accountsPartial({
|
|
3389
3375
|
owner: publicKey,
|
|
3390
3376
|
feePayer: publicKey,
|
|
3391
3377
|
fundingAccount: inputSymbol == 'SOL' ? (ephemeralSignerPubkey ? ephemeralSignerPubkey : wrappedSolAccount.publicKey) : userInputTokenAccount,
|
|
@@ -3402,9 +3388,7 @@ var PerpetualsClient = (function () {
|
|
|
3402
3388
|
collateralCustody: collateralCustodyConfig.custodyAccount,
|
|
3403
3389
|
collateralOracleAccount: this.useExtOracleAccount ? collateralCustodyConfig.extOracleAccount : collateralCustodyConfig.intOracleAccount,
|
|
3404
3390
|
collateralCustodyTokenAccount: collateralCustodyConfig.tokenAccount,
|
|
3405
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
3406
3391
|
fundingTokenProgram: poolConfig.getTokenFromSymbol(inputSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
|
|
3407
|
-
program: this.programId,
|
|
3408
3392
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
3409
3393
|
fundingMint: poolConfig.getTokenFromSymbol(inputSymbol).mintKey,
|
|
3410
3394
|
})
|
|
@@ -3491,7 +3475,7 @@ var PerpetualsClient = (function () {
|
|
|
3491
3475
|
.removeCollateral({
|
|
3492
3476
|
collateralDeltaUsd: collateralDeltaUsd,
|
|
3493
3477
|
})
|
|
3494
|
-
.
|
|
3478
|
+
.accountsPartial({
|
|
3495
3479
|
owner: publicKey,
|
|
3496
3480
|
receivingAccount: collateralSymbol == 'SOL' ? (ephemeralSignerPubkey ? ephemeralSignerPubkey : wrappedSolAccount.publicKey) : userReceivingTokenAccount,
|
|
3497
3481
|
transferAuthority: poolConfig.transferAuthority,
|
|
@@ -3506,7 +3490,6 @@ var PerpetualsClient = (function () {
|
|
|
3506
3490
|
collateralCustodyTokenAccount: collateralCustodyConfig.tokenAccount,
|
|
3507
3491
|
eventAuthority: this.eventAuthority.publicKey,
|
|
3508
3492
|
receivingTokenProgram: poolConfig.getTokenFromSymbol(collateralSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
|
|
3509
|
-
program: this.programId,
|
|
3510
3493
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
3511
3494
|
receivingMint: collateralCustodyConfig.mintKey
|
|
3512
3495
|
})
|
|
@@ -3595,7 +3578,7 @@ var PerpetualsClient = (function () {
|
|
|
3595
3578
|
.removeCollateralAndSwap({
|
|
3596
3579
|
collateralDeltaUsd: collateralDeltaUsd,
|
|
3597
3580
|
})
|
|
3598
|
-
.
|
|
3581
|
+
.accountsPartial({
|
|
3599
3582
|
owner: publicKey,
|
|
3600
3583
|
feePayer: publicKey,
|
|
3601
3584
|
receivingAccount: outputSymbol == 'SOL' ? (ephemeralSignerPubkey ? ephemeralSignerPubkey : wrappedSolAccount.publicKey) : userReceivingTokenAccount,
|
|
@@ -3613,8 +3596,6 @@ var PerpetualsClient = (function () {
|
|
|
3613
3596
|
dispensingCustody: outputCustodyConfig.custodyAccount,
|
|
3614
3597
|
dispensingOracleAccount: this.useExtOracleAccount ? outputCustodyConfig.extOracleAccount : outputCustodyConfig.intOracleAccount,
|
|
3615
3598
|
dispensingCustodyTokenAccount: outputCustodyConfig.tokenAccount,
|
|
3616
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
3617
|
-
program: this.programId,
|
|
3618
3599
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
3619
3600
|
receivingMint: outputCustodyConfig.mintKey,
|
|
3620
3601
|
receivingTokenProgram: poolConfig.getTokenFromSymbol(outputSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
|
|
@@ -3666,7 +3647,7 @@ var PerpetualsClient = (function () {
|
|
|
3666
3647
|
sizeDelta: sizeDelta,
|
|
3667
3648
|
privilege: privilege
|
|
3668
3649
|
})
|
|
3669
|
-
.
|
|
3650
|
+
.accountsPartial({
|
|
3670
3651
|
owner: publicKey,
|
|
3671
3652
|
transferAuthority: poolConfig.transferAuthority,
|
|
3672
3653
|
perpetuals: poolConfig.perpetuals,
|
|
@@ -3680,7 +3661,6 @@ var PerpetualsClient = (function () {
|
|
|
3680
3661
|
collateralCustodyTokenAccount: collateralCustodyConfig.tokenAccount,
|
|
3681
3662
|
collateralTokenProgram: poolConfig.getTokenFromSymbol(collateralSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
|
|
3682
3663
|
eventAuthority: this.eventAuthority.publicKey,
|
|
3683
|
-
program: this.programId,
|
|
3684
3664
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
3685
3665
|
collateralMint: collateralCustodyConfig.mintKey
|
|
3686
3666
|
})
|
|
@@ -3730,7 +3710,7 @@ var PerpetualsClient = (function () {
|
|
|
3730
3710
|
sizeDelta: sizeDelta,
|
|
3731
3711
|
privilege: privilege
|
|
3732
3712
|
})
|
|
3733
|
-
.
|
|
3713
|
+
.accountsPartial({
|
|
3734
3714
|
owner: publicKey,
|
|
3735
3715
|
transferAuthority: poolConfig.transferAuthority,
|
|
3736
3716
|
perpetuals: poolConfig.perpetuals,
|
|
@@ -3744,7 +3724,6 @@ var PerpetualsClient = (function () {
|
|
|
3744
3724
|
collateralCustodyTokenAccount: collateralCustodyConfig.tokenAccount,
|
|
3745
3725
|
collateralTokenProgram: poolConfig.getTokenFromSymbol(collateralSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
|
|
3746
3726
|
eventAuthority: this.eventAuthority.publicKey,
|
|
3747
|
-
program: this.programId,
|
|
3748
3727
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
3749
3728
|
collateralMint: collateralCustodyConfig.mintKey
|
|
3750
3729
|
})
|
|
@@ -3876,7 +3855,7 @@ var PerpetualsClient = (function () {
|
|
|
3876
3855
|
amountIn: tokenAmountIn,
|
|
3877
3856
|
minLpAmountOut: minLpAmountOut
|
|
3878
3857
|
})
|
|
3879
|
-
.
|
|
3858
|
+
.accountsPartial({
|
|
3880
3859
|
owner: publicKey,
|
|
3881
3860
|
fundingAccount: payTokenSymbol == 'SOL' ? (ephemeralSignerPubkey ? ephemeralSignerPubkey : wrappedSolAccount.publicKey) : userPayingTokenAccount,
|
|
3882
3861
|
lpTokenAccount: lpTokenAccount,
|
|
@@ -3889,7 +3868,6 @@ var PerpetualsClient = (function () {
|
|
|
3889
3868
|
lpTokenMint: poolConfig.stakedLpTokenMint,
|
|
3890
3869
|
eventAuthority: this.eventAuthority.publicKey,
|
|
3891
3870
|
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
3892
|
-
program: this.programId,
|
|
3893
3871
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
3894
3872
|
fundingMint: payTokenCustodyConfig.mintKey,
|
|
3895
3873
|
fundingTokenProgram: payToken.isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
|
|
@@ -4023,7 +4001,7 @@ var PerpetualsClient = (function () {
|
|
|
4023
4001
|
return [4, this.program.methods.addLiquidityAndStake({
|
|
4024
4002
|
amountIn: amountIn,
|
|
4025
4003
|
minLpAmountOut: minLpAmountOut,
|
|
4026
|
-
}).
|
|
4004
|
+
}).accountsPartial({
|
|
4027
4005
|
owner: publicKey,
|
|
4028
4006
|
feePayer: publicKey,
|
|
4029
4007
|
fundingAccount: inputSymbol == 'SOL' ? (ephemeralSignerPubkey ? ephemeralSignerPubkey : wrappedSolAccount.publicKey) : userInputTokenAccount,
|
|
@@ -4038,8 +4016,6 @@ var PerpetualsClient = (function () {
|
|
|
4038
4016
|
poolStakedLpVault: poolStakedLpVault,
|
|
4039
4017
|
systemProgram: web3_js_1.SystemProgram.programId,
|
|
4040
4018
|
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
4041
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
4042
|
-
program: this.programId,
|
|
4043
4019
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
4044
4020
|
fundingMint: inputCustodyConfig.mintKey,
|
|
4045
4021
|
fundingTokenProgram: inputToken.isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
|
|
@@ -4156,7 +4132,7 @@ var PerpetualsClient = (function () {
|
|
|
4156
4132
|
lpAmountIn: liquidityAmountIn,
|
|
4157
4133
|
minAmountOut: minTokenAmountOut
|
|
4158
4134
|
})
|
|
4159
|
-
.
|
|
4135
|
+
.accountsPartial({
|
|
4160
4136
|
owner: publicKey,
|
|
4161
4137
|
receivingAccount: recieveTokenSymbol == 'SOL' ? (ephemeralSignerPubkey ? ephemeralSignerPubkey : wrappedSolAccount.publicKey) : userReceivingTokenAccount,
|
|
4162
4138
|
lpTokenAccount: stakedLpTokenAccount,
|
|
@@ -4169,7 +4145,6 @@ var PerpetualsClient = (function () {
|
|
|
4169
4145
|
lpTokenMint: poolConfig.stakedLpTokenMint,
|
|
4170
4146
|
eventAuthority: this.eventAuthority.publicKey,
|
|
4171
4147
|
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
4172
|
-
program: this.programId,
|
|
4173
4148
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
4174
4149
|
receivingMint: recieveTokenCustodyConfig.mintKey,
|
|
4175
4150
|
receivingTokenProgram: recieveToken.isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
|
|
@@ -4215,7 +4190,7 @@ var PerpetualsClient = (function () {
|
|
|
4215
4190
|
_a.trys.push([1, 3, , 4]);
|
|
4216
4191
|
return [4, this.program.methods
|
|
4217
4192
|
.createReferral({})
|
|
4218
|
-
.
|
|
4193
|
+
.accountsPartial({
|
|
4219
4194
|
owner: publicKey,
|
|
4220
4195
|
feePayer: publicKey,
|
|
4221
4196
|
referralAccount: nftReferralAccount,
|
|
@@ -4260,7 +4235,7 @@ var PerpetualsClient = (function () {
|
|
|
4260
4235
|
.depositStake({
|
|
4261
4236
|
depositAmount: depositAmount
|
|
4262
4237
|
})
|
|
4263
|
-
.
|
|
4238
|
+
.accountsPartial({
|
|
4264
4239
|
owner: owner,
|
|
4265
4240
|
feePayer: feePayer,
|
|
4266
4241
|
fundingLpTokenAccount: userLpTokenAccount,
|
|
@@ -4271,8 +4246,6 @@ var PerpetualsClient = (function () {
|
|
|
4271
4246
|
poolStakedLpVault: poolStakedLpVault,
|
|
4272
4247
|
systemProgram: web3_js_1.SystemProgram.programId,
|
|
4273
4248
|
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
4274
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
4275
|
-
program: this.programId,
|
|
4276
4249
|
lpTokenMint: poolConfig.stakedLpTokenMint,
|
|
4277
4250
|
})
|
|
4278
4251
|
.instruction()];
|
|
@@ -4325,12 +4298,11 @@ var PerpetualsClient = (function () {
|
|
|
4325
4298
|
}
|
|
4326
4299
|
return [4, this.program.methods
|
|
4327
4300
|
.refreshStake({})
|
|
4328
|
-
.
|
|
4301
|
+
.accountsPartial({
|
|
4329
4302
|
perpetuals: this.perpetuals.publicKey,
|
|
4330
4303
|
pool: pool,
|
|
4331
4304
|
rewardCustody: rewardCustodyConfig.custodyAccount,
|
|
4332
4305
|
feeDistributionTokenAccount: feeDistributionTokenAccount,
|
|
4333
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
4334
4306
|
program: this.program.programId,
|
|
4335
4307
|
})
|
|
4336
4308
|
.remainingAccounts(__spreadArray(__spreadArray([], custodyAccountMetas, true), flpStakeAccountMetas, true))
|
|
@@ -4386,12 +4358,11 @@ var PerpetualsClient = (function () {
|
|
|
4386
4358
|
});
|
|
4387
4359
|
return [4, this.program.methods
|
|
4388
4360
|
.refreshStake({})
|
|
4389
|
-
.
|
|
4361
|
+
.accountsPartial({
|
|
4390
4362
|
perpetuals: this.perpetuals.publicKey,
|
|
4391
4363
|
pool: pool,
|
|
4392
4364
|
rewardCustody: rewardCustodyConfig.custodyAccount,
|
|
4393
4365
|
feeDistributionTokenAccount: feeDistributionTokenAccount,
|
|
4394
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
4395
4366
|
program: this.program.programId,
|
|
4396
4367
|
})
|
|
4397
4368
|
.remainingAccounts(__spreadArray(__spreadArray([], custodyAccountMetas, true), stakeAccountMetas, true))
|
|
@@ -4450,13 +4421,12 @@ var PerpetualsClient = (function () {
|
|
|
4450
4421
|
.unstakeInstant({
|
|
4451
4422
|
unstakeAmount: unstakeAmount
|
|
4452
4423
|
})
|
|
4453
|
-
.
|
|
4424
|
+
.accountsPartial({
|
|
4454
4425
|
owner: publicKey,
|
|
4455
4426
|
perpetuals: this.perpetuals.publicKey,
|
|
4456
4427
|
pool: pool,
|
|
4457
4428
|
flpStakeAccount: flpStakeAccount,
|
|
4458
4429
|
rewardCustody: rewardCustodyConfig.custodyAccount,
|
|
4459
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
4460
4430
|
program: this.program.programId,
|
|
4461
4431
|
})
|
|
4462
4432
|
.remainingAccounts(__spreadArray([], tokenStakeAccounts, true))
|
|
@@ -4511,7 +4481,7 @@ var PerpetualsClient = (function () {
|
|
|
4511
4481
|
.setFeeShare({
|
|
4512
4482
|
feeShareBps: new anchor_1.BN(7000)
|
|
4513
4483
|
})
|
|
4514
|
-
.
|
|
4484
|
+
.accountsPartial({
|
|
4515
4485
|
admin: publicKey,
|
|
4516
4486
|
multisig: this.multisig.publicKey,
|
|
4517
4487
|
pool: pool,
|
|
@@ -4548,14 +4518,13 @@ var PerpetualsClient = (function () {
|
|
|
4548
4518
|
.unstakeRequest({
|
|
4549
4519
|
unstakeAmount: unstakeAmount
|
|
4550
4520
|
})
|
|
4551
|
-
.
|
|
4521
|
+
.accountsPartial({
|
|
4552
4522
|
owner: publicKey,
|
|
4553
4523
|
perpetuals: this.perpetuals.publicKey,
|
|
4554
4524
|
pool: pool,
|
|
4555
4525
|
flpStakeAccount: flpStakeAccount,
|
|
4556
4526
|
systemProgram: web3_js_1.SystemProgram.programId,
|
|
4557
4527
|
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
4558
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
4559
4528
|
program: this.programId
|
|
4560
4529
|
})
|
|
4561
4530
|
.instruction()];
|
|
@@ -4616,7 +4585,7 @@ var PerpetualsClient = (function () {
|
|
|
4616
4585
|
pendingActivation: pendingActivation,
|
|
4617
4586
|
deactivated: deactivated
|
|
4618
4587
|
})
|
|
4619
|
-
.
|
|
4588
|
+
.accountsPartial({
|
|
4620
4589
|
owner: publicKey,
|
|
4621
4590
|
receivingLpTokenAccount: userLpTokenAccount,
|
|
4622
4591
|
transferAuthority: poolConfig.transferAuthority,
|
|
@@ -4626,7 +4595,6 @@ var PerpetualsClient = (function () {
|
|
|
4626
4595
|
poolStakedLpVault: poolStakedLpVault,
|
|
4627
4596
|
systemProgram: web3_js_1.SystemProgram.programId,
|
|
4628
4597
|
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
4629
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
4630
4598
|
program: this.program.programId,
|
|
4631
4599
|
lpMint: poolConfig.stakedLpTokenMint,
|
|
4632
4600
|
})
|
|
@@ -4691,7 +4659,7 @@ var PerpetualsClient = (function () {
|
|
|
4691
4659
|
}
|
|
4692
4660
|
return [4, this.program.methods
|
|
4693
4661
|
.collectStakeFees({})
|
|
4694
|
-
.
|
|
4662
|
+
.accountsPartial({
|
|
4695
4663
|
owner: publicKey,
|
|
4696
4664
|
receivingTokenAccount: receivingTokenAccount,
|
|
4697
4665
|
transferAuthority: poolConfig.transferAuthority,
|
|
@@ -4703,7 +4671,6 @@ var PerpetualsClient = (function () {
|
|
|
4703
4671
|
program: this.program.programId,
|
|
4704
4672
|
systemProgram: web3_js_1.SystemProgram.programId,
|
|
4705
4673
|
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
4706
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
4707
4674
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
4708
4675
|
receivingMint: rewardCustodyMint,
|
|
4709
4676
|
})
|
|
@@ -4844,7 +4811,7 @@ var PerpetualsClient = (function () {
|
|
|
4844
4811
|
amountIn: amountIn,
|
|
4845
4812
|
minCompoundingAmountOut: minCompoundingAmountOut
|
|
4846
4813
|
})
|
|
4847
|
-
.
|
|
4814
|
+
.accountsPartial({
|
|
4848
4815
|
owner: publicKey,
|
|
4849
4816
|
fundingAccount: inTokenSymbol == 'SOL' ? (ephemeralSignerPubkey ? ephemeralSignerPubkey : wrappedSolAccount.publicKey) : fundingAccount,
|
|
4850
4817
|
compoundingTokenAccount: compoundingTokenAccount,
|
|
@@ -4860,7 +4827,6 @@ var PerpetualsClient = (function () {
|
|
|
4860
4827
|
lpTokenMint: lpTokenMint,
|
|
4861
4828
|
compoundingTokenMint: compoundingTokenMint,
|
|
4862
4829
|
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
4863
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
4864
4830
|
program: this.program.programId,
|
|
4865
4831
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
4866
4832
|
fundingMint: inCustodyConfig.mintKey,
|
|
@@ -4987,7 +4953,7 @@ var PerpetualsClient = (function () {
|
|
|
4987
4953
|
compoundingAmountIn: compoundingAmountIn,
|
|
4988
4954
|
minAmountOut: minAmountOut
|
|
4989
4955
|
})
|
|
4990
|
-
.
|
|
4956
|
+
.accountsPartial({
|
|
4991
4957
|
owner: publicKey,
|
|
4992
4958
|
receivingAccount: outCustodyConfig.symbol == 'SOL' ? (ephemeralSignerPubkey ? ephemeralSignerPubkey : wrappedSolAccount.publicKey) : userReceivingTokenAccount,
|
|
4993
4959
|
compoundingTokenAccount: compoundingTokenAccount,
|
|
@@ -5003,7 +4969,6 @@ var PerpetualsClient = (function () {
|
|
|
5003
4969
|
lpTokenMint: lpTokenMint,
|
|
5004
4970
|
compoundingTokenMint: compoundingTokenMint,
|
|
5005
4971
|
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
5006
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
5007
4972
|
program: this.program.programId,
|
|
5008
4973
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
5009
4974
|
receivingMint: outCustodyConfig.mintKey,
|
|
@@ -5106,7 +5071,7 @@ var PerpetualsClient = (function () {
|
|
|
5106
5071
|
.migrateStake({
|
|
5107
5072
|
amount: amount
|
|
5108
5073
|
})
|
|
5109
|
-
.
|
|
5074
|
+
.accountsPartial({
|
|
5110
5075
|
owner: publicKey,
|
|
5111
5076
|
compoundingTokenAccount: compoudingTokenAccount,
|
|
5112
5077
|
transferAuthority: poolConfig.transferAuthority,
|
|
@@ -5120,7 +5085,6 @@ var PerpetualsClient = (function () {
|
|
|
5120
5085
|
lpTokenMint: lpTokenMint,
|
|
5121
5086
|
compoundingTokenMint: compoundingTokenMint,
|
|
5122
5087
|
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
5123
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
5124
5088
|
program: this.program.programId,
|
|
5125
5089
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY
|
|
5126
5090
|
})
|
|
@@ -5189,7 +5153,7 @@ var PerpetualsClient = (function () {
|
|
|
5189
5153
|
.migrateFlp({
|
|
5190
5154
|
compoundingTokenAmount: amount
|
|
5191
5155
|
})
|
|
5192
|
-
.
|
|
5156
|
+
.accountsPartial({
|
|
5193
5157
|
owner: publicKey,
|
|
5194
5158
|
compoundingTokenAccount: compoudingTokenAccount,
|
|
5195
5159
|
transferAuthority: poolConfig.transferAuthority,
|
|
@@ -5204,7 +5168,6 @@ var PerpetualsClient = (function () {
|
|
|
5204
5168
|
compoundingTokenMint: compoundingTokenMint,
|
|
5205
5169
|
systemProgram: web3_js_1.SystemProgram.programId,
|
|
5206
5170
|
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
5207
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
5208
5171
|
program: this.program.programId,
|
|
5209
5172
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY
|
|
5210
5173
|
})
|
|
@@ -5269,7 +5232,7 @@ var PerpetualsClient = (function () {
|
|
|
5269
5232
|
_e.trys.push([1, 3, , 4]);
|
|
5270
5233
|
return [4, this.program.methods
|
|
5271
5234
|
.compoundFees({})
|
|
5272
|
-
.
|
|
5235
|
+
.accountsPartial({
|
|
5273
5236
|
poolCompoundingLpVault: poolConfig.compoundingLpVault,
|
|
5274
5237
|
transferAuthority: poolConfig.transferAuthority,
|
|
5275
5238
|
perpetuals: poolConfig.perpetuals,
|
|
@@ -5278,7 +5241,6 @@ var PerpetualsClient = (function () {
|
|
|
5278
5241
|
rewardCustodyOracleAccount: this.useExtOracleAccount ? rewardCustody.extOracleAccount : rewardCustody.intOracleAccount,
|
|
5279
5242
|
lpTokenMint: lpTokenMint,
|
|
5280
5243
|
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
5281
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
5282
5244
|
program: this.program.programId,
|
|
5283
5245
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY
|
|
5284
5246
|
})
|
|
@@ -5323,7 +5285,7 @@ var PerpetualsClient = (function () {
|
|
|
5323
5285
|
.depositTokenStake({
|
|
5324
5286
|
depositAmount: depositAmount
|
|
5325
5287
|
})
|
|
5326
|
-
.
|
|
5288
|
+
.accountsPartial({
|
|
5327
5289
|
owner: owner,
|
|
5328
5290
|
feePayer: feePayer,
|
|
5329
5291
|
fundingTokenAccount: userTokenAccount,
|
|
@@ -5333,8 +5295,6 @@ var PerpetualsClient = (function () {
|
|
|
5333
5295
|
tokenStakeAccount: tokenStakeAccount,
|
|
5334
5296
|
systemProgram: web3_js_1.SystemProgram.programId,
|
|
5335
5297
|
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
5336
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
5337
|
-
program: this.programId,
|
|
5338
5298
|
tokenMint: poolConfig.tokenMint,
|
|
5339
5299
|
})
|
|
5340
5300
|
.instruction()];
|
|
@@ -5370,11 +5330,10 @@ var PerpetualsClient = (function () {
|
|
|
5370
5330
|
.unstakeTokenRequest({
|
|
5371
5331
|
unstakeAmount: unstakeAmount
|
|
5372
5332
|
})
|
|
5373
|
-
.
|
|
5333
|
+
.accountsPartial({
|
|
5374
5334
|
owner: owner,
|
|
5375
5335
|
tokenVault: poolConfig.tokenVault,
|
|
5376
5336
|
tokenStakeAccount: tokenStakeAccount,
|
|
5377
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
5378
5337
|
program: this.programId
|
|
5379
5338
|
})
|
|
5380
5339
|
.instruction()];
|
|
@@ -5416,7 +5375,7 @@ var PerpetualsClient = (function () {
|
|
|
5416
5375
|
.unstakeTokenInstant({
|
|
5417
5376
|
unstakeAmount: unstakeAmount
|
|
5418
5377
|
})
|
|
5419
|
-
.
|
|
5378
|
+
.accountsPartial({
|
|
5420
5379
|
owner: owner,
|
|
5421
5380
|
receivingTokenAccount: userTokenAccount,
|
|
5422
5381
|
perpetuals: poolConfig.perpetuals,
|
|
@@ -5425,8 +5384,6 @@ var PerpetualsClient = (function () {
|
|
|
5425
5384
|
tokenVaultTokenAccount: poolConfig.tokenVaultTokenAccount,
|
|
5426
5385
|
tokenStakeAccount: tokenStakeAccount,
|
|
5427
5386
|
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
5428
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
5429
|
-
program: this.programId,
|
|
5430
5387
|
tokenMint: poolConfig.tokenMint,
|
|
5431
5388
|
})
|
|
5432
5389
|
.instruction()];
|
|
@@ -5468,7 +5425,7 @@ var PerpetualsClient = (function () {
|
|
|
5468
5425
|
.withdrawToken({
|
|
5469
5426
|
withdrawRequestId: withdrawRequestId
|
|
5470
5427
|
})
|
|
5471
|
-
.
|
|
5428
|
+
.accountsPartial({
|
|
5472
5429
|
owner: owner,
|
|
5473
5430
|
receivingTokenAccount: userTokenAccount,
|
|
5474
5431
|
perpetuals: this.perpetuals.publicKey,
|
|
@@ -5477,8 +5434,6 @@ var PerpetualsClient = (function () {
|
|
|
5477
5434
|
tokenVaultTokenAccount: poolConfig.tokenVaultTokenAccount,
|
|
5478
5435
|
tokenStakeAccount: tokenStakeAccount,
|
|
5479
5436
|
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
5480
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
5481
|
-
program: this.programId,
|
|
5482
5437
|
tokenMint: poolConfig.tokenMint,
|
|
5483
5438
|
})
|
|
5484
5439
|
.instruction()];
|
|
@@ -5514,11 +5469,10 @@ var PerpetualsClient = (function () {
|
|
|
5514
5469
|
.cancelUnstakeTokenRequest({
|
|
5515
5470
|
withdrawRequestId: withdrawRequestId
|
|
5516
5471
|
})
|
|
5517
|
-
.
|
|
5472
|
+
.accountsPartial({
|
|
5518
5473
|
owner: owner,
|
|
5519
5474
|
tokenVault: poolConfig.tokenVault,
|
|
5520
5475
|
tokenStakeAccount: tokenStakeAccount,
|
|
5521
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
5522
5476
|
program: this.programId
|
|
5523
5477
|
})
|
|
5524
5478
|
.instruction()];
|
|
@@ -5570,7 +5524,7 @@ var PerpetualsClient = (function () {
|
|
|
5570
5524
|
}
|
|
5571
5525
|
return [4, this.program.methods
|
|
5572
5526
|
.collectTokenReward({})
|
|
5573
|
-
.
|
|
5527
|
+
.accountsPartial({
|
|
5574
5528
|
owner: owner,
|
|
5575
5529
|
receivingTokenAccount: userTokenAccount,
|
|
5576
5530
|
perpetuals: this.perpetuals.publicKey,
|
|
@@ -5579,8 +5533,6 @@ var PerpetualsClient = (function () {
|
|
|
5579
5533
|
tokenVaultTokenAccount: poolConfig.tokenVaultTokenAccount,
|
|
5580
5534
|
tokenStakeAccount: tokenStakeAccount,
|
|
5581
5535
|
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
5582
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
5583
|
-
program: this.programId,
|
|
5584
5536
|
tokenMint: poolConfig.tokenMint,
|
|
5585
5537
|
})
|
|
5586
5538
|
.instruction()];
|
|
@@ -5634,7 +5586,7 @@ var PerpetualsClient = (function () {
|
|
|
5634
5586
|
}
|
|
5635
5587
|
return [4, this.program.methods
|
|
5636
5588
|
.collectRevenue({})
|
|
5637
|
-
.
|
|
5589
|
+
.accountsPartial({
|
|
5638
5590
|
owner: owner,
|
|
5639
5591
|
receivingRevenueAccount: userTokenAccount,
|
|
5640
5592
|
perpetuals: this.perpetuals.publicKey,
|
|
@@ -5643,8 +5595,6 @@ var PerpetualsClient = (function () {
|
|
|
5643
5595
|
revenueTokenAccount: poolConfig.revenueTokenAccount,
|
|
5644
5596
|
tokenStakeAccount: tokenStakeAccount,
|
|
5645
5597
|
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
5646
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
5647
|
-
program: this.programId,
|
|
5648
5598
|
receivingTokenMint: rewardCustodyMint,
|
|
5649
5599
|
})
|
|
5650
5600
|
.instruction()];
|
|
@@ -5698,7 +5648,7 @@ var PerpetualsClient = (function () {
|
|
|
5698
5648
|
}
|
|
5699
5649
|
return [4, this.program.methods
|
|
5700
5650
|
.collectRebate()
|
|
5701
|
-
.
|
|
5651
|
+
.accountsPartial({
|
|
5702
5652
|
owner: owner,
|
|
5703
5653
|
receivingTokenAccount: userTokenAccount,
|
|
5704
5654
|
perpetuals: this.perpetuals.publicKey,
|
|
@@ -5707,8 +5657,6 @@ var PerpetualsClient = (function () {
|
|
|
5707
5657
|
rebateTokenAccount: poolConfig.rebateTokenAccount,
|
|
5708
5658
|
tokenStakeAccount: tokenStakeAccount,
|
|
5709
5659
|
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
5710
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
5711
|
-
program: this.programId,
|
|
5712
5660
|
receivingTokenMint: rebateMint,
|
|
5713
5661
|
})
|
|
5714
5662
|
.instruction()];
|
|
@@ -5744,7 +5692,7 @@ var PerpetualsClient = (function () {
|
|
|
5744
5692
|
rebateMint = poolConfig.getTokenFromSymbol(rebateSymbol).mintKey;
|
|
5745
5693
|
return [4, this.program.methods
|
|
5746
5694
|
.settleRebates()
|
|
5747
|
-
.
|
|
5695
|
+
.accountsPartial({
|
|
5748
5696
|
transferAuthority: poolConfig.transferAuthority,
|
|
5749
5697
|
perpetuals: this.perpetuals.publicKey,
|
|
5750
5698
|
pool: poolConfig.poolAddress,
|
|
@@ -5755,8 +5703,6 @@ var PerpetualsClient = (function () {
|
|
|
5755
5703
|
rebateTokenAccount: poolConfig.rebateTokenAccount,
|
|
5756
5704
|
tokenMint: rebateMint,
|
|
5757
5705
|
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
5758
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
5759
|
-
program: this.programId,
|
|
5760
5706
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY
|
|
5761
5707
|
})
|
|
5762
5708
|
.instruction()];
|
|
@@ -5859,7 +5805,7 @@ var PerpetualsClient = (function () {
|
|
|
5859
5805
|
stopLossPrice: stopLossPrice,
|
|
5860
5806
|
takeProfitPrice: takeProfitPrice
|
|
5861
5807
|
})
|
|
5862
|
-
.
|
|
5808
|
+
.accountsPartial({
|
|
5863
5809
|
owner: publicKey,
|
|
5864
5810
|
feePayer: publicKey,
|
|
5865
5811
|
fundingAccount: reserveSymbol == 'SOL' ? wrappedSolAccount.publicKey : userReserveTokenAccount,
|
|
@@ -5876,8 +5822,6 @@ var PerpetualsClient = (function () {
|
|
|
5876
5822
|
receiveCustody: receiveCustodyConfig.custodyAccount,
|
|
5877
5823
|
systemProgram: web3_js_1.SystemProgram.programId,
|
|
5878
5824
|
fundingTokenProgram: poolConfig.getTokenFromSymbol(reserveSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
|
|
5879
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
5880
|
-
program: this.programId,
|
|
5881
5825
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
5882
5826
|
fundingMint: reserveCustodyConfig.mintKey,
|
|
5883
5827
|
})
|
|
@@ -5967,7 +5911,7 @@ var PerpetualsClient = (function () {
|
|
|
5967
5911
|
stopLossPrice: stopLossPrice,
|
|
5968
5912
|
takeProfitPrice: takeProfitPrice
|
|
5969
5913
|
})
|
|
5970
|
-
.
|
|
5914
|
+
.accountsPartial({
|
|
5971
5915
|
owner: publicKey,
|
|
5972
5916
|
feePayer: publicKey,
|
|
5973
5917
|
receivingAccount: reserveSymbol == 'SOL' ? (ephemeralSignerPubkey ? ephemeralSignerPubkey : wrappedSolAccount.publicKey) : userReceivingTokenAccount,
|
|
@@ -5984,8 +5928,6 @@ var PerpetualsClient = (function () {
|
|
|
5984
5928
|
reserveCustodyTokenAccount: reserveCustodyConfig.tokenAccount,
|
|
5985
5929
|
receiveCustody: receiveCustodyConfig.custodyAccount,
|
|
5986
5930
|
receivingTokenProgram: poolConfig.getTokenFromSymbol(reserveSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
|
|
5987
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
5988
|
-
program: this.programId,
|
|
5989
5931
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
5990
5932
|
receivingMint: poolConfig.getTokenFromSymbol(reserveSymbol).mintKey
|
|
5991
5933
|
})
|
|
@@ -6036,7 +5978,7 @@ var PerpetualsClient = (function () {
|
|
|
6036
5978
|
orderId: orderId,
|
|
6037
5979
|
privilege: privilege
|
|
6038
5980
|
})
|
|
6039
|
-
.
|
|
5981
|
+
.accountsPartial({
|
|
6040
5982
|
positionOwner: userPubkey,
|
|
6041
5983
|
feePayer: publicKey,
|
|
6042
5984
|
transferAuthority: poolConfig.transferAuthority,
|
|
@@ -6052,8 +5994,6 @@ var PerpetualsClient = (function () {
|
|
|
6052
5994
|
collateralCustodyTokenAccount: collateralCustodyConfig.tokenAccount,
|
|
6053
5995
|
systemProgram: web3_js_1.SystemProgram.programId,
|
|
6054
5996
|
collateralTokenProgram: poolConfig.getTokenFromSymbol(collateralSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
|
|
6055
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
6056
|
-
program: this.programId,
|
|
6057
5997
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
6058
5998
|
collateralMint: collateralCustodyConfig.mintKey,
|
|
6059
5999
|
})
|
|
@@ -6106,7 +6046,7 @@ var PerpetualsClient = (function () {
|
|
|
6106
6046
|
orderId: orderId,
|
|
6107
6047
|
privilege: privilege
|
|
6108
6048
|
})
|
|
6109
|
-
.
|
|
6049
|
+
.accountsPartial({
|
|
6110
6050
|
positionOwner: userPubkey,
|
|
6111
6051
|
feePayer: publicKey,
|
|
6112
6052
|
transferAuthority: poolConfig.transferAuthority,
|
|
@@ -6124,8 +6064,6 @@ var PerpetualsClient = (function () {
|
|
|
6124
6064
|
collateralCustodyTokenAccount: collateralCustodyConfig.tokenAccount,
|
|
6125
6065
|
systemProgram: web3_js_1.SystemProgram.programId,
|
|
6126
6066
|
collateralTokenProgram: poolConfig.getTokenFromSymbol(collateralSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
|
|
6127
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
6128
|
-
program: this.programId,
|
|
6129
6067
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
6130
6068
|
collateralMint: collateralCustodyConfig.mintKey,
|
|
6131
6069
|
})
|
|
@@ -6172,7 +6110,7 @@ var PerpetualsClient = (function () {
|
|
|
6172
6110
|
deltaSizeAmount: deltaSizeAmount,
|
|
6173
6111
|
isStopLoss: isStopLoss
|
|
6174
6112
|
})
|
|
6175
|
-
.
|
|
6113
|
+
.accountsPartial({
|
|
6176
6114
|
owner: publicKey,
|
|
6177
6115
|
feePayer: publicKey,
|
|
6178
6116
|
perpetuals: poolConfig.perpetuals,
|
|
@@ -6186,8 +6124,6 @@ var PerpetualsClient = (function () {
|
|
|
6186
6124
|
collateralOracleAccount: this.useExtOracleAccount ? collateralCustodyConfig.extOracleAccount : collateralCustodyConfig.intOracleAccount,
|
|
6187
6125
|
receiveCustody: receivingCustodyConfig.custodyAccount,
|
|
6188
6126
|
systemProgram: web3_js_1.SystemProgram.programId,
|
|
6189
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
6190
|
-
program: this.programId,
|
|
6191
6127
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY
|
|
6192
6128
|
})
|
|
6193
6129
|
.instruction()];
|
|
@@ -6232,7 +6168,7 @@ var PerpetualsClient = (function () {
|
|
|
6232
6168
|
deltaSizeAmount: deltaSizeAmount,
|
|
6233
6169
|
isStopLoss: isStopLoss
|
|
6234
6170
|
})
|
|
6235
|
-
.
|
|
6171
|
+
.accountsPartial({
|
|
6236
6172
|
owner: publicKey,
|
|
6237
6173
|
perpetuals: poolConfig.perpetuals,
|
|
6238
6174
|
pool: poolConfig.poolAddress,
|
|
@@ -6244,8 +6180,6 @@ var PerpetualsClient = (function () {
|
|
|
6244
6180
|
collateralCustody: collateralCustodyConfig.custodyAccount,
|
|
6245
6181
|
collateralOracleAccount: this.useExtOracleAccount ? collateralCustodyConfig.extOracleAccount : collateralCustodyConfig.intOracleAccount,
|
|
6246
6182
|
receiveCustody: receivingCustodyConfig.custodyAccount,
|
|
6247
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
6248
|
-
program: this.programId,
|
|
6249
6183
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY
|
|
6250
6184
|
})
|
|
6251
6185
|
.instruction()];
|
|
@@ -6286,11 +6220,9 @@ var PerpetualsClient = (function () {
|
|
|
6286
6220
|
orderId: orderId,
|
|
6287
6221
|
isStopLoss: isStopLoss
|
|
6288
6222
|
})
|
|
6289
|
-
.
|
|
6223
|
+
.accountsPartial({
|
|
6290
6224
|
owner: publicKey,
|
|
6291
6225
|
order: orderAccount,
|
|
6292
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
6293
|
-
program: this.programId,
|
|
6294
6226
|
})
|
|
6295
6227
|
.instruction()];
|
|
6296
6228
|
case 2:
|
|
@@ -6328,11 +6260,9 @@ var PerpetualsClient = (function () {
|
|
|
6328
6260
|
positionAccount = poolConfig.getPositionFromMarketPk(publicKey, marketAccount);
|
|
6329
6261
|
return [4, this.program.methods
|
|
6330
6262
|
.cancelAllTriggerOrders()
|
|
6331
|
-
.
|
|
6263
|
+
.accountsPartial({
|
|
6332
6264
|
position: positionAccount,
|
|
6333
6265
|
order: orderAccount,
|
|
6334
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
6335
|
-
program: this.programId,
|
|
6336
6266
|
})
|
|
6337
6267
|
.instruction()];
|
|
6338
6268
|
case 2:
|
|
@@ -6428,7 +6358,7 @@ var PerpetualsClient = (function () {
|
|
|
6428
6358
|
orderId: orderId,
|
|
6429
6359
|
privilege: privilege
|
|
6430
6360
|
})
|
|
6431
|
-
.
|
|
6361
|
+
.accountsPartial({
|
|
6432
6362
|
positionOwner: owner,
|
|
6433
6363
|
feePayer: payerPubkey,
|
|
6434
6364
|
receivingAccount: userReceivingTokenAccount,
|
|
@@ -6447,8 +6377,6 @@ var PerpetualsClient = (function () {
|
|
|
6447
6377
|
dispensingCustody: receivingCustodyConfig.custodyAccount,
|
|
6448
6378
|
dispensingOracleAccount: this.useExtOracleAccount ? receivingCustodyConfig.extOracleAccount : receivingCustodyConfig.intOracleAccount,
|
|
6449
6379
|
dispensingCustodyTokenAccount: receivingCustodyConfig.tokenAccount,
|
|
6450
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
6451
|
-
program: this.programId,
|
|
6452
6380
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
6453
6381
|
receivingMint: receivingCustodyConfig.mintKey,
|
|
6454
6382
|
receivingTokenProgram: receivingToken.isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
|
|
@@ -6522,7 +6450,7 @@ var PerpetualsClient = (function () {
|
|
|
6522
6450
|
orderId: orderId,
|
|
6523
6451
|
privilege: privilege
|
|
6524
6452
|
})
|
|
6525
|
-
.
|
|
6453
|
+
.accountsPartial({
|
|
6526
6454
|
feePayer: payerPubkey,
|
|
6527
6455
|
positionOwner: owner,
|
|
6528
6456
|
receivingAccount: userReceivingTokenAccount,
|
|
@@ -6538,8 +6466,6 @@ var PerpetualsClient = (function () {
|
|
|
6538
6466
|
collateralOracleAccount: this.useExtOracleAccount ? collateralCustodyConfig.extOracleAccount : collateralCustodyConfig.intOracleAccount,
|
|
6539
6467
|
collateralCustodyTokenAccount: collateralCustodyConfig.tokenAccount,
|
|
6540
6468
|
receivingTokenProgram: poolConfig.getTokenFromSymbol(collateralSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
|
|
6541
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
6542
|
-
program: this.programId,
|
|
6543
6469
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
6544
6470
|
receivingMint: collateralCustodyConfig.mintKey
|
|
6545
6471
|
})
|
|
@@ -6747,7 +6673,7 @@ var PerpetualsClient = (function () {
|
|
|
6747
6673
|
};
|
|
6748
6674
|
return [4, this.program.methods
|
|
6749
6675
|
.swap(params)
|
|
6750
|
-
.
|
|
6676
|
+
.accountsPartial({
|
|
6751
6677
|
owner: publicKey,
|
|
6752
6678
|
fundingAccount: userInputTokenSymbol == 'SOL' ? (ephemeralSignerPubkey ? ephemeralSignerPubkey : wrappedSolAccount.publicKey) : userInputTokenAccount,
|
|
6753
6679
|
receivingAccount: userOutputTokenSymbol == 'SOL' ? (ephemeralSignerPubkey ? ephemeralSignerPubkey : wrappedSolAccount.publicKey) : userOutputTokenAccount,
|
|
@@ -6761,7 +6687,6 @@ var PerpetualsClient = (function () {
|
|
|
6761
6687
|
dispensingCustodyOracleAccount: this.useExtOracleAccount ? userOutputCustodyConfig.extOracleAccount : userOutputCustodyConfig.intOracleAccount,
|
|
6762
6688
|
dispensingCustodyTokenAccount: userOutputCustodyConfig.tokenAccount,
|
|
6763
6689
|
eventAuthority: this.eventAuthority.publicKey,
|
|
6764
|
-
program: this.programId,
|
|
6765
6690
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
6766
6691
|
fundingMint: userInputCustodyConfig.mintKey,
|
|
6767
6692
|
fundingTokenProgram: poolConfig.getTokenFromSymbol(userInputTokenSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID,
|
|
@@ -6829,15 +6754,13 @@ var PerpetualsClient = (function () {
|
|
|
6829
6754
|
params = {};
|
|
6830
6755
|
return [4, this.program.methods
|
|
6831
6756
|
.swapFeeInternal(params)
|
|
6832
|
-
.
|
|
6757
|
+
.accountsPartial({
|
|
6833
6758
|
owner: publicKey,
|
|
6834
6759
|
perpetuals: poolConfig.perpetuals,
|
|
6835
6760
|
pool: poolConfig.poolAddress,
|
|
6836
6761
|
rewardCustody: rewardCustody.custodyAccount,
|
|
6837
6762
|
rewardCustodyOracleAccount: this.useExtOracleAccount ? rewardCustody.extOracleAccount : rewardCustody.intOracleAccount,
|
|
6838
6763
|
rewardCustodyTokenAccount: rewardCustody.tokenAccount,
|
|
6839
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
6840
|
-
program: this.programId,
|
|
6841
6764
|
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY
|
|
6842
6765
|
})
|
|
6843
6766
|
.remainingAccounts(__spreadArray(__spreadArray([], custodyAccountMetas, true), custodyOracleAccountMetas, true))
|
|
@@ -6893,7 +6816,7 @@ var PerpetualsClient = (function () {
|
|
|
6893
6816
|
}
|
|
6894
6817
|
return [4, this.program.methods
|
|
6895
6818
|
.setLpTokenPrice({})
|
|
6896
|
-
.
|
|
6819
|
+
.accountsPartial({
|
|
6897
6820
|
perpetuals: poolConfig.perpetuals,
|
|
6898
6821
|
pool: poolConfig.poolAddress,
|
|
6899
6822
|
lpTokenMint: poolConfig.stakedLpTokenMint,
|
|
@@ -6933,7 +6856,7 @@ var PerpetualsClient = (function () {
|
|
|
6933
6856
|
}
|
|
6934
6857
|
return [4, this.program.methods
|
|
6935
6858
|
.init(config)
|
|
6936
|
-
.
|
|
6859
|
+
.accountsPartial({
|
|
6937
6860
|
upgradeAuthority: this.provider.wallet.publicKey,
|
|
6938
6861
|
multisig: this.multisig.publicKey,
|
|
6939
6862
|
transferAuthority: this.authority.publicKey,
|
|
@@ -6976,7 +6899,7 @@ var PerpetualsClient = (function () {
|
|
|
6976
6899
|
.setAdminSigners({
|
|
6977
6900
|
minSignatures: minSignatures,
|
|
6978
6901
|
})
|
|
6979
|
-
.
|
|
6902
|
+
.accountsPartial({
|
|
6980
6903
|
admin: this.admin,
|
|
6981
6904
|
multisig: this.multisig.publicKey,
|
|
6982
6905
|
})
|
|
@@ -7013,7 +6936,7 @@ var PerpetualsClient = (function () {
|
|
|
7013
6936
|
maxLpPriceUsd: maxLpPriceUsd,
|
|
7014
6937
|
thresholdUsd: thresholdUsd
|
|
7015
6938
|
})
|
|
7016
|
-
.
|
|
6939
|
+
.accountsPartial({
|
|
7017
6940
|
admin: this.provider.wallet.publicKey,
|
|
7018
6941
|
multisig: this.multisig.publicKey,
|
|
7019
6942
|
transferAuthority: this.authority.publicKey,
|
|
@@ -7040,7 +6963,7 @@ var PerpetualsClient = (function () {
|
|
|
7040
6963
|
switch (_a.label) {
|
|
7041
6964
|
case 0: return [4, this.program.methods
|
|
7042
6965
|
.removePool({})
|
|
7043
|
-
.
|
|
6966
|
+
.accountsPartial({
|
|
7044
6967
|
admin: this.admin,
|
|
7045
6968
|
multisig: this.multisig.publicKey,
|
|
7046
6969
|
transferAuthority: this.authority.publicKey,
|
|
@@ -7081,7 +7004,7 @@ var PerpetualsClient = (function () {
|
|
|
7081
7004
|
minReserveUsd: minReserveUsd,
|
|
7082
7005
|
limitPriceBufferBps: limitPriceBufferBps
|
|
7083
7006
|
})
|
|
7084
|
-
.
|
|
7007
|
+
.accountsPartial({
|
|
7085
7008
|
admin: this.admin,
|
|
7086
7009
|
multisig: this.multisig.publicKey,
|
|
7087
7010
|
transferAuthority: this.authority.publicKey,
|
|
@@ -7125,7 +7048,7 @@ var PerpetualsClient = (function () {
|
|
|
7125
7048
|
borrowRate: borrowRate,
|
|
7126
7049
|
ratios: ratios,
|
|
7127
7050
|
})
|
|
7128
|
-
.
|
|
7051
|
+
.accountsPartial({
|
|
7129
7052
|
admin: this.admin,
|
|
7130
7053
|
multisig: this.multisig.publicKey,
|
|
7131
7054
|
transferAuthority: this.authority.publicKey,
|
|
@@ -7159,7 +7082,7 @@ var PerpetualsClient = (function () {
|
|
|
7159
7082
|
userReceivingTokenAccount = (0, spl_token_1.getAssociatedTokenAddressSync)(tokenMint, this.admin, true);
|
|
7160
7083
|
return [4, this.program.methods
|
|
7161
7084
|
.removeCustody({ ratios: ratios })
|
|
7162
|
-
.
|
|
7085
|
+
.accountsPartial({
|
|
7163
7086
|
admin: this.admin,
|
|
7164
7087
|
receivingAccount: userReceivingTokenAccount,
|
|
7165
7088
|
multisig: this.multisig.publicKey,
|
|
@@ -7202,7 +7125,7 @@ var PerpetualsClient = (function () {
|
|
|
7202
7125
|
_a.trys.push([2, 4, , 5]);
|
|
7203
7126
|
return [4, this.program.methods
|
|
7204
7127
|
.withdrawFees({})
|
|
7205
|
-
.
|
|
7128
|
+
.accountsPartial({
|
|
7206
7129
|
admin: publicKey,
|
|
7207
7130
|
multisig: this.multisig.publicKey,
|
|
7208
7131
|
transferAuthority: this.authority.publicKey,
|
|
@@ -7243,7 +7166,7 @@ var PerpetualsClient = (function () {
|
|
|
7243
7166
|
_a.trys.push([1, 3, , 4]);
|
|
7244
7167
|
return [4, this.program.methods
|
|
7245
7168
|
.moveProtocolFees()
|
|
7246
|
-
.
|
|
7169
|
+
.accountsPartial({
|
|
7247
7170
|
transferAuthority: this.authority.publicKey,
|
|
7248
7171
|
perpetuals: this.perpetuals.publicKey,
|
|
7249
7172
|
tokenVault: poolConfig.tokenVault,
|
|
@@ -7254,7 +7177,6 @@ var PerpetualsClient = (function () {
|
|
|
7254
7177
|
protocolVault: poolConfig.protocolVault,
|
|
7255
7178
|
protocolTokenAccount: poolConfig.protocolTokenAccount,
|
|
7256
7179
|
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
7257
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
7258
7180
|
program: this.program.programId,
|
|
7259
7181
|
tokenMint: rewardCustodyConfig.mintKey,
|
|
7260
7182
|
})
|
|
@@ -7285,7 +7207,7 @@ var PerpetualsClient = (function () {
|
|
|
7285
7207
|
.setProtocolFeeShare({
|
|
7286
7208
|
feeShareBps: feeShareBps
|
|
7287
7209
|
})
|
|
7288
|
-
.
|
|
7210
|
+
.accountsPartial({
|
|
7289
7211
|
admin: publicKey,
|
|
7290
7212
|
multisig: this.multisig.publicKey,
|
|
7291
7213
|
protocolVault: poolConfig.protocolVault,
|
|
@@ -7319,7 +7241,7 @@ var PerpetualsClient = (function () {
|
|
|
7319
7241
|
.setPermissions({
|
|
7320
7242
|
permissions: permissions,
|
|
7321
7243
|
})
|
|
7322
|
-
.
|
|
7244
|
+
.accountsPartial({
|
|
7323
7245
|
admin: publicKey,
|
|
7324
7246
|
multisig: this.multisig.publicKey,
|
|
7325
7247
|
perpetuals: this.perpetuals.publicKey
|
|
@@ -7378,7 +7300,7 @@ var PerpetualsClient = (function () {
|
|
|
7378
7300
|
_g.trys.push([1, 4, , 5]);
|
|
7379
7301
|
_e = (_d = this.program.methods
|
|
7380
7302
|
.reimburse({ amountIn: amountIn }))
|
|
7381
|
-
.
|
|
7303
|
+
.accountsPartial;
|
|
7382
7304
|
_f = {
|
|
7383
7305
|
admin: this.provider.wallet.publicKey,
|
|
7384
7306
|
multisig: poolConfig.multisig
|
|
@@ -7432,7 +7354,7 @@ var PerpetualsClient = (function () {
|
|
|
7432
7354
|
ema: ema,
|
|
7433
7355
|
publishTime: publishTime,
|
|
7434
7356
|
})
|
|
7435
|
-
.
|
|
7357
|
+
.accountsPartial({
|
|
7436
7358
|
authority: poolConfig.backupOracle,
|
|
7437
7359
|
perpetuals: poolConfig.perpetuals,
|
|
7438
7360
|
pool: poolConfig.poolAddress,
|
|
@@ -7494,7 +7416,7 @@ var PerpetualsClient = (function () {
|
|
|
7494
7416
|
useCurrentTime: useCurrentTime,
|
|
7495
7417
|
prices: tokenInternalPrices
|
|
7496
7418
|
})
|
|
7497
|
-
.
|
|
7419
|
+
.accountsPartial({
|
|
7498
7420
|
authority: POOL_CONFIGS[0].backupOracle,
|
|
7499
7421
|
})
|
|
7500
7422
|
.remainingAccounts(__spreadArray([], accountMetas, true))
|
|
@@ -7545,7 +7467,7 @@ var PerpetualsClient = (function () {
|
|
|
7545
7467
|
.setInternalEmaPrice({
|
|
7546
7468
|
prices: tokenInternalEmaPrices
|
|
7547
7469
|
})
|
|
7548
|
-
.
|
|
7470
|
+
.accountsPartial({
|
|
7549
7471
|
authority: POOL_CONFIGS[0].backupOracle,
|
|
7550
7472
|
})
|
|
7551
7473
|
.remainingAccounts(__spreadArray([], accountMetas, true))
|
|
@@ -7579,10 +7501,9 @@ var PerpetualsClient = (function () {
|
|
|
7579
7501
|
.setPositionPriceImpact({
|
|
7580
7502
|
priceImpactUsd: priceImpactUsd,
|
|
7581
7503
|
})
|
|
7582
|
-
.
|
|
7504
|
+
.accountsPartial({
|
|
7583
7505
|
authority: penaltyAuthority,
|
|
7584
7506
|
position: positionPubkey,
|
|
7585
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
7586
7507
|
program: this.program.programId,
|
|
7587
7508
|
})
|
|
7588
7509
|
.instruction()];
|
|
@@ -7621,7 +7542,7 @@ var PerpetualsClient = (function () {
|
|
|
7621
7542
|
lpTokenSymbol: lpTokenSymbol,
|
|
7622
7543
|
lpTokenUri: lpTokenUri,
|
|
7623
7544
|
})
|
|
7624
|
-
.
|
|
7545
|
+
.accountsPartial({
|
|
7625
7546
|
admin: publicKey,
|
|
7626
7547
|
multisig: this.multisig.publicKey,
|
|
7627
7548
|
transferAuthority: poolConfig.transferAuthority,
|
|
@@ -7670,7 +7591,7 @@ var PerpetualsClient = (function () {
|
|
|
7670
7591
|
.initStaking({
|
|
7671
7592
|
stakingFeeShareBps: stakingFeeShareBps
|
|
7672
7593
|
})
|
|
7673
|
-
.
|
|
7594
|
+
.accountsPartial({
|
|
7674
7595
|
admin: publicKey,
|
|
7675
7596
|
multisig: this.multisig.publicKey,
|
|
7676
7597
|
transferAuthority: poolConfig.transferAuthority,
|
|
@@ -7723,7 +7644,7 @@ var PerpetualsClient = (function () {
|
|
|
7723
7644
|
metadataSymbol: metadataSymbol,
|
|
7724
7645
|
metadataUri: metadataUri
|
|
7725
7646
|
})
|
|
7726
|
-
.
|
|
7647
|
+
.accountsPartial({
|
|
7727
7648
|
admin: publicKey,
|
|
7728
7649
|
multisig: this.multisig.publicKey,
|
|
7729
7650
|
transferAuthority: poolConfig.transferAuthority,
|
|
@@ -7777,7 +7698,7 @@ var PerpetualsClient = (function () {
|
|
|
7777
7698
|
withdrawInstantFee: withdrawInstantFee,
|
|
7778
7699
|
stakeLevel: stakeLevel,
|
|
7779
7700
|
})
|
|
7780
|
-
.
|
|
7701
|
+
.accountsPartial({
|
|
7781
7702
|
admin: publicKey,
|
|
7782
7703
|
multisig: this.multisig.publicKey,
|
|
7783
7704
|
perpetuals: this.perpetuals.publicKey,
|
|
@@ -7826,7 +7747,7 @@ var PerpetualsClient = (function () {
|
|
|
7826
7747
|
withdrawInstantFee: withdrawInstantFee,
|
|
7827
7748
|
stakeLevel: stakeLevel,
|
|
7828
7749
|
})
|
|
7829
|
-
.
|
|
7750
|
+
.accountsPartial({
|
|
7830
7751
|
admin: publicKey,
|
|
7831
7752
|
multisig: this.multisig.publicKey,
|
|
7832
7753
|
tokenVault: poolConfig.tokenVault,
|
|
@@ -7871,7 +7792,7 @@ var PerpetualsClient = (function () {
|
|
|
7871
7792
|
}
|
|
7872
7793
|
return [4, this.program.methods
|
|
7873
7794
|
.withdrawInstantFees({})
|
|
7874
|
-
.
|
|
7795
|
+
.accountsPartial({
|
|
7875
7796
|
admin: publicKey,
|
|
7876
7797
|
multisig: this.multisig.publicKey,
|
|
7877
7798
|
perpetuals: this.perpetuals.publicKey,
|
|
@@ -7921,7 +7842,7 @@ var PerpetualsClient = (function () {
|
|
|
7921
7842
|
}
|
|
7922
7843
|
return [4, this.program.methods
|
|
7923
7844
|
.withdrawUnclaimedTokens({})
|
|
7924
|
-
.
|
|
7845
|
+
.accountsPartial({
|
|
7925
7846
|
admin: publicKey,
|
|
7926
7847
|
multisig: this.multisig.publicKey,
|
|
7927
7848
|
perpetuals: this.perpetuals.publicKey,
|
|
@@ -7966,7 +7887,7 @@ var PerpetualsClient = (function () {
|
|
|
7966
7887
|
.initRevenueTokenAccount({
|
|
7967
7888
|
feeShareBps: feeShareBps
|
|
7968
7889
|
})
|
|
7969
|
-
.
|
|
7890
|
+
.accountsPartial({
|
|
7970
7891
|
admin: publicKey,
|
|
7971
7892
|
multisig: this.multisig.publicKey,
|
|
7972
7893
|
perpetuals: this.perpetuals.publicKey,
|
|
@@ -8014,7 +7935,7 @@ var PerpetualsClient = (function () {
|
|
|
8014
7935
|
.initRebateVault({
|
|
8015
7936
|
allowRebatePayout: allowRebatePayout
|
|
8016
7937
|
})
|
|
8017
|
-
.
|
|
7938
|
+
.accountsPartial({
|
|
8018
7939
|
admin: publicKey,
|
|
8019
7940
|
multisig: this.multisig.publicKey,
|
|
8020
7941
|
transferAuthority: poolConfig.transferAuthority,
|
|
@@ -8063,7 +7984,7 @@ var PerpetualsClient = (function () {
|
|
|
8063
7984
|
amount: amount,
|
|
8064
7985
|
epochCount: epochCount,
|
|
8065
7986
|
})
|
|
8066
|
-
.
|
|
7987
|
+
.accountsPartial({
|
|
8067
7988
|
admin: publicKey,
|
|
8068
7989
|
multisig: this.multisig.publicKey,
|
|
8069
7990
|
perpetuals: this.perpetuals.publicKey,
|
|
@@ -8072,8 +7993,6 @@ var PerpetualsClient = (function () {
|
|
|
8072
7993
|
tokenVault: poolConfig.tokenVault,
|
|
8073
7994
|
tokenVaultTokenAccount: poolConfig.tokenVaultTokenAccount,
|
|
8074
7995
|
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
8075
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
8076
|
-
program: this.programId,
|
|
8077
7996
|
tokenMint: poolConfig.tokenMint,
|
|
8078
7997
|
})
|
|
8079
7998
|
.instruction()];
|
|
@@ -8110,7 +8029,7 @@ var PerpetualsClient = (function () {
|
|
|
8110
8029
|
.setTokenStakeLevel({
|
|
8111
8030
|
level: stakeLevel,
|
|
8112
8031
|
})
|
|
8113
|
-
.
|
|
8032
|
+
.accountsPartial({
|
|
8114
8033
|
admin: publicKey,
|
|
8115
8034
|
multisig: this.multisig.publicKey,
|
|
8116
8035
|
tokenStakeAccount: tokenStakeAccount,
|
|
@@ -8150,12 +8069,11 @@ var PerpetualsClient = (function () {
|
|
|
8150
8069
|
amount: amount,
|
|
8151
8070
|
epochCount: epochCount,
|
|
8152
8071
|
})
|
|
8153
|
-
.
|
|
8072
|
+
.accountsPartial({
|
|
8154
8073
|
admin: publicKey,
|
|
8155
8074
|
multisig: this.multisig.publicKey,
|
|
8156
8075
|
tokenVault: poolConfig.tokenVault,
|
|
8157
8076
|
tokenStakeAccount: tokenStakeAccount,
|
|
8158
|
-
eventAuthority: this.eventAuthority.publicKey,
|
|
8159
8077
|
program: this.programId
|
|
8160
8078
|
})
|
|
8161
8079
|
.instruction()];
|
|
@@ -8191,7 +8109,7 @@ var PerpetualsClient = (function () {
|
|
|
8191
8109
|
.resizeInternalOracle({
|
|
8192
8110
|
extOracle: extOracle
|
|
8193
8111
|
})
|
|
8194
|
-
.
|
|
8112
|
+
.accountsPartial({
|
|
8195
8113
|
admin: publicKey,
|
|
8196
8114
|
multisig: this.multisig.publicKey,
|
|
8197
8115
|
custodyTokenMint: tokenMint,
|
|
@@ -8235,7 +8153,7 @@ var PerpetualsClient = (function () {
|
|
|
8235
8153
|
isWithdrawalFeeExempt: isWithdrawalFeeExempt,
|
|
8236
8154
|
poolAddress: poolAddress,
|
|
8237
8155
|
})
|
|
8238
|
-
.
|
|
8156
|
+
.accountsPartial({
|
|
8239
8157
|
admin: publicKey,
|
|
8240
8158
|
multisig: this.multisig.publicKey,
|
|
8241
8159
|
owner: owner,
|
|
@@ -8279,7 +8197,7 @@ var PerpetualsClient = (function () {
|
|
|
8279
8197
|
isWithdrawalFeeExempt: isWithdrawalFeeExempt,
|
|
8280
8198
|
poolAddress: poolAddress
|
|
8281
8199
|
})
|
|
8282
|
-
.
|
|
8200
|
+
.accountsPartial({
|
|
8283
8201
|
admin: publicKey,
|
|
8284
8202
|
multisig: this.multisig.publicKey,
|
|
8285
8203
|
owner: owner,
|
|
@@ -8304,7 +8222,9 @@ var PerpetualsClient = (function () {
|
|
|
8304
8222
|
}); };
|
|
8305
8223
|
this.provider = provider;
|
|
8306
8224
|
(0, anchor_1.setProvider)(provider);
|
|
8307
|
-
this.program = new anchor_1.Program(
|
|
8225
|
+
this.program = new anchor_1.Program(perpetuals_json_1.default, {
|
|
8226
|
+
connection: provider.connection,
|
|
8227
|
+
});
|
|
8308
8228
|
this.programId = programId;
|
|
8309
8229
|
this.admin = this.provider.wallet.publicKey;
|
|
8310
8230
|
this.multisig = this.findProgramAddress("multisig");
|