flash-sdk 2.12.1 → 2.12.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/PerpetualsClient.d.ts +4 -4
- package/dist/PerpetualsClient.js +66 -147
- package/dist/idl/perp_composability.d.ts +0 -119
- package/dist/idl/perp_composability.js +0 -119
- package/dist/idl/perpetuals.d.ts +323 -0
- package/dist/idl/perpetuals.js +323 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +2 -0
- package/package.json +1 -1
@@ -2427,10 +2427,6 @@ export declare class PerpetualsClient {
|
|
2427
2427
|
instructions: TransactionInstruction[];
|
2428
2428
|
additionalSigners: Signer[];
|
2429
2429
|
}>;
|
2430
|
-
addLiquidityAndStakeComposibility: (inputSymbol: string, amountIn: BN, minLpAmountOut: BN, poolConfig: PoolConfig, skipBalanceChecks?: boolean) => Promise<{
|
2431
|
-
instructions: TransactionInstruction[];
|
2432
|
-
additionalSigners: Signer[];
|
2433
|
-
}>;
|
2434
2430
|
removeLiquidity: (recieveTokenSymbol: string, liquidityAmountIn: BN, minTokenAmountOut: BN, poolConfig: PoolConfig, closeLpATA?: boolean, createUserATA?: boolean, closeUsersWSOLATA?: boolean) => Promise<{
|
2435
2431
|
instructions: TransactionInstruction[];
|
2436
2432
|
additionalSigners: Signer[];
|
@@ -2539,6 +2535,10 @@ export declare class PerpetualsClient {
|
|
2539
2535
|
instructions: TransactionInstruction[];
|
2540
2536
|
additionalSigners: Signer[];
|
2541
2537
|
}>;
|
2538
|
+
renameFlp: (flag: BN, lpTokenName: string, lpTokenSymbol: string, lpTokenUri: string, poolConfig: PoolConfig) => Promise<{
|
2539
|
+
instructions: TransactionInstruction[];
|
2540
|
+
additionalSigners: Signer[];
|
2541
|
+
}>;
|
2542
2542
|
initRewardDistribution: (rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
2543
2543
|
instructions: TransactionInstruction[];
|
2544
2544
|
additionalSigners: Signer[];
|
package/dist/PerpetualsClient.js
CHANGED
@@ -3381,138 +3381,6 @@ var PerpetualsClient = (function () {
|
|
3381
3381
|
});
|
3382
3382
|
});
|
3383
3383
|
};
|
3384
|
-
this.addLiquidityAndStakeComposibility = function (inputSymbol, amountIn, minLpAmountOut, poolConfig, skipBalanceChecks) {
|
3385
|
-
if (skipBalanceChecks === void 0) { skipBalanceChecks = false; }
|
3386
|
-
return __awaiter(_this, void 0, void 0, function () {
|
3387
|
-
var publicKey, wrappedSolAccount, preInstructions, instructions, postInstructions, additionalSigners, userInputTokenAccount, stakedLpTokenMint, inputCustodyConfig, lpTokenAccount, flpStakeAccount, poolStakedLpVault, accCreationLamports, lamports, unWrappedSolBalance, _a, tokenAccountBalance, _b, custodyAccountMetas, custodyOracleAccountMetas, markets, _i, _c, custody, _d, _e, market, instruction;
|
3388
|
-
return __generator(this, function (_f) {
|
3389
|
-
switch (_f.label) {
|
3390
|
-
case 0:
|
3391
|
-
publicKey = this.provider.wallet.publicKey;
|
3392
|
-
preInstructions = [];
|
3393
|
-
instructions = [];
|
3394
|
-
postInstructions = [];
|
3395
|
-
additionalSigners = [];
|
3396
|
-
stakedLpTokenMint = poolConfig.stakedLpTokenMint;
|
3397
|
-
inputCustodyConfig = poolConfig.custodies.find(function (i) { return i.mintKey.equals(poolConfig.getTokenFromSymbol(inputSymbol).mintKey); });
|
3398
|
-
return [4, (0, spl_token_1.getAssociatedTokenAddress)(stakedLpTokenMint, publicKey)];
|
3399
|
-
case 1:
|
3400
|
-
lpTokenAccount = _f.sent();
|
3401
|
-
flpStakeAccount = web3_js_1.PublicKey.findProgramAddressSync([Buffer.from("stake"), publicKey.toBuffer(), poolConfig.poolAddress.toBuffer()], this.programId)[0];
|
3402
|
-
poolStakedLpVault = web3_js_1.PublicKey.findProgramAddressSync([Buffer.from("staked_lp_token_account"), poolConfig.poolAddress.toBuffer(), stakedLpTokenMint.toBuffer()], this.programId)[0];
|
3403
|
-
if (!(inputSymbol == 'SOL')) return [3, 5];
|
3404
|
-
console.log("inputSymbol === SOL", inputSymbol);
|
3405
|
-
wrappedSolAccount = new web3_js_1.Keypair();
|
3406
|
-
return [4, (0, spl_token_1.getMinimumBalanceForRentExemptAccount)(this.provider.connection)];
|
3407
|
-
case 2:
|
3408
|
-
accCreationLamports = (_f.sent());
|
3409
|
-
console.log("accCreationLamports:", accCreationLamports);
|
3410
|
-
lamports = amountIn.add(new anchor_1.BN(accCreationLamports));
|
3411
|
-
console.log("lamports:", lamports.toNumber());
|
3412
|
-
_a = anchor_1.BN.bind;
|
3413
|
-
return [4, this.provider.connection.getBalance(publicKey)];
|
3414
|
-
case 3:
|
3415
|
-
unWrappedSolBalance = new (_a.apply(anchor_1.BN, [void 0, _f.sent()]))();
|
3416
|
-
if (unWrappedSolBalance.lt(lamports)) {
|
3417
|
-
throw "Insufficient SOL Funds";
|
3418
|
-
}
|
3419
|
-
return [4, (0, utils_1.checkIfAccountExists)(lpTokenAccount, this.provider.connection)];
|
3420
|
-
case 4:
|
3421
|
-
if (!(_f.sent())) {
|
3422
|
-
instructions.push((0, spl_token_1.createAssociatedTokenAccountInstruction)(publicKey, lpTokenAccount, publicKey, poolConfig.stakedLpTokenMint));
|
3423
|
-
}
|
3424
|
-
preInstructions = [
|
3425
|
-
web3_js_1.SystemProgram.createAccount({
|
3426
|
-
fromPubkey: publicKey,
|
3427
|
-
newAccountPubkey: wrappedSolAccount.publicKey,
|
3428
|
-
lamports: lamports.toNumber(),
|
3429
|
-
space: 165,
|
3430
|
-
programId: spl_token_1.TOKEN_PROGRAM_ID,
|
3431
|
-
}),
|
3432
|
-
(0, spl_token_1.createInitializeAccount3Instruction)(wrappedSolAccount.publicKey, spl_token_1.NATIVE_MINT, publicKey),
|
3433
|
-
];
|
3434
|
-
postInstructions = [
|
3435
|
-
(0, spl_token_1.createCloseAccountInstruction)(wrappedSolAccount.publicKey, publicKey, publicKey),
|
3436
|
-
];
|
3437
|
-
additionalSigners.push(wrappedSolAccount);
|
3438
|
-
return [3, 8];
|
3439
|
-
case 5:
|
3440
|
-
userInputTokenAccount = (0, spl_token_1.getAssociatedTokenAddressSync)(inputCustodyConfig.mintKey, publicKey, true);
|
3441
|
-
return [4, (0, utils_1.checkIfAccountExists)(userInputTokenAccount, this.provider.connection)];
|
3442
|
-
case 6:
|
3443
|
-
if (!(_f.sent())) {
|
3444
|
-
throw "Insufficient Funds , token Account doesn't exist";
|
3445
|
-
}
|
3446
|
-
if (!!skipBalanceChecks) return [3, 8];
|
3447
|
-
_b = anchor_1.BN.bind;
|
3448
|
-
return [4, this.provider.connection.getTokenAccountBalance(userInputTokenAccount)];
|
3449
|
-
case 7:
|
3450
|
-
tokenAccountBalance = new (_b.apply(anchor_1.BN, [void 0, (_f.sent()).value.amount]))();
|
3451
|
-
if (tokenAccountBalance.lt(amountIn)) {
|
3452
|
-
throw "Insufficient Funds need more ".concat(amountIn.sub(tokenAccountBalance), " tokens");
|
3453
|
-
}
|
3454
|
-
_f.label = 8;
|
3455
|
-
case 8:
|
3456
|
-
custodyAccountMetas = [];
|
3457
|
-
custodyOracleAccountMetas = [];
|
3458
|
-
markets = [];
|
3459
|
-
for (_i = 0, _c = poolConfig.custodies; _i < _c.length; _i++) {
|
3460
|
-
custody = _c[_i];
|
3461
|
-
custodyAccountMetas.push({
|
3462
|
-
pubkey: custody.custodyAccount,
|
3463
|
-
isSigner: false,
|
3464
|
-
isWritable: false,
|
3465
|
-
});
|
3466
|
-
custodyOracleAccountMetas.push({
|
3467
|
-
pubkey: this.useExtOracleAccount ? custody.extOracleAccount : custody.intOracleAccount,
|
3468
|
-
isSigner: false,
|
3469
|
-
isWritable: false,
|
3470
|
-
});
|
3471
|
-
}
|
3472
|
-
for (_d = 0, _e = poolConfig.markets; _d < _e.length; _d++) {
|
3473
|
-
market = _e[_d];
|
3474
|
-
markets.push({
|
3475
|
-
pubkey: market.marketAccount,
|
3476
|
-
isSigner: false,
|
3477
|
-
isWritable: false,
|
3478
|
-
});
|
3479
|
-
}
|
3480
|
-
return [4, this.programPerpComposability.methods.addLiquidityAndStake({
|
3481
|
-
amountIn: amountIn,
|
3482
|
-
minLpAmountOut: minLpAmountOut,
|
3483
|
-
}).accounts({
|
3484
|
-
perpProgram: this.programId,
|
3485
|
-
owner: publicKey,
|
3486
|
-
feePayer: publicKey,
|
3487
|
-
fundingAccount: inputSymbol == 'SOL' ? wrappedSolAccount.publicKey : userInputTokenAccount,
|
3488
|
-
lpTokenAccount: lpTokenAccount,
|
3489
|
-
transferAuthority: poolConfig.transferAuthority,
|
3490
|
-
perpetuals: poolConfig.perpetuals,
|
3491
|
-
pool: poolConfig.poolAddress,
|
3492
|
-
custody: inputCustodyConfig.custodyAccount,
|
3493
|
-
custodyOracleAccount: this.useExtOracleAccount ? inputCustodyConfig.extOracleAccount : inputCustodyConfig.intOracleAccount,
|
3494
|
-
custodyTokenAccount: inputCustodyConfig.tokenAccount,
|
3495
|
-
lpTokenMint: stakedLpTokenMint,
|
3496
|
-
flpStakeAccount: flpStakeAccount,
|
3497
|
-
poolStakedLpVault: poolStakedLpVault,
|
3498
|
-
systemProgram: web3_js_1.SystemProgram.programId,
|
3499
|
-
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
3500
|
-
eventAuthority: this.eventAuthority.publicKey,
|
3501
|
-
ixSysvar: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY
|
3502
|
-
})
|
3503
|
-
.remainingAccounts(__spreadArray(__spreadArray(__spreadArray([], custodyAccountMetas, true), custodyOracleAccountMetas, true), markets, true))
|
3504
|
-
.instruction()];
|
3505
|
-
case 9:
|
3506
|
-
instruction = _f.sent();
|
3507
|
-
instructions.push(instruction);
|
3508
|
-
return [2, {
|
3509
|
-
instructions: __spreadArray(__spreadArray(__spreadArray([], preInstructions, true), instructions, true), postInstructions, true),
|
3510
|
-
additionalSigners: additionalSigners
|
3511
|
-
}];
|
3512
|
-
}
|
3513
|
-
});
|
3514
|
-
});
|
3515
|
-
};
|
3516
3384
|
this.removeLiquidity = function (recieveTokenSymbol, liquidityAmountIn, minTokenAmountOut, poolConfig, closeLpATA, createUserATA, closeUsersWSOLATA) {
|
3517
3385
|
if (closeLpATA === void 0) { closeLpATA = false; }
|
3518
3386
|
if (createUserATA === void 0) { createUserATA = true; }
|
@@ -3984,6 +3852,7 @@ var PerpetualsClient = (function () {
|
|
3984
3852
|
systemProgram: web3_js_1.SystemProgram.programId,
|
3985
3853
|
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
3986
3854
|
eventAuthority: this.eventAuthority.publicKey,
|
3855
|
+
program: this.programId
|
3987
3856
|
})
|
3988
3857
|
.instruction()];
|
3989
3858
|
case 3:
|
@@ -4216,6 +4085,7 @@ var PerpetualsClient = (function () {
|
|
4216
4085
|
systemProgram: web3_js_1.SystemProgram.programId,
|
4217
4086
|
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
4218
4087
|
eventAuthority: this.eventAuthority.publicKey,
|
4088
|
+
program: this.programId
|
4219
4089
|
})
|
4220
4090
|
.instruction()];
|
4221
4091
|
case 2:
|
@@ -5443,8 +5313,57 @@ var PerpetualsClient = (function () {
|
|
5443
5313
|
});
|
5444
5314
|
});
|
5445
5315
|
};
|
5316
|
+
this.renameFlp = function (flag, lpTokenName, lpTokenSymbol, lpTokenUri, poolConfig) { return __awaiter(_this, void 0, void 0, function () {
|
5317
|
+
var publicKey, instructions, additionalSigners, lpTokenMint, lpMetadataAccount, renameFlp, err_34;
|
5318
|
+
return __generator(this, function (_a) {
|
5319
|
+
switch (_a.label) {
|
5320
|
+
case 0:
|
5321
|
+
publicKey = this.provider.wallet.publicKey;
|
5322
|
+
instructions = [];
|
5323
|
+
additionalSigners = [];
|
5324
|
+
lpTokenMint = poolConfig.stakedLpTokenMint;
|
5325
|
+
lpMetadataAccount = web3_js_1.PublicKey.findProgramAddressSync([Buffer.from("metadata"), constants_1.METAPLEX_PROGRAM_ID.toBuffer(), lpTokenMint.toBuffer()], constants_1.METAPLEX_PROGRAM_ID)[0];
|
5326
|
+
_a.label = 1;
|
5327
|
+
case 1:
|
5328
|
+
_a.trys.push([1, 3, , 4]);
|
5329
|
+
return [4, this.program.methods
|
5330
|
+
.renameFlp({
|
5331
|
+
flag: flag,
|
5332
|
+
lpTokenName: lpTokenName,
|
5333
|
+
lpTokenSymbol: lpTokenSymbol,
|
5334
|
+
lpTokenUri: lpTokenUri,
|
5335
|
+
})
|
5336
|
+
.accounts({
|
5337
|
+
admin: publicKey,
|
5338
|
+
multisig: this.multisig.publicKey,
|
5339
|
+
transferAuthority: poolConfig.transferAuthority,
|
5340
|
+
perpetuals: poolConfig.perpetuals,
|
5341
|
+
pool: poolConfig.poolAddress,
|
5342
|
+
lpTokenMint: lpTokenMint,
|
5343
|
+
lpMetadataAccount: lpMetadataAccount,
|
5344
|
+
systemProgram: web3_js_1.SystemProgram.programId,
|
5345
|
+
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
5346
|
+
metadataProgram: constants_1.METAPLEX_PROGRAM_ID,
|
5347
|
+
rent: web3_js_1.SYSVAR_RENT_PUBKEY
|
5348
|
+
})
|
5349
|
+
.instruction()];
|
5350
|
+
case 2:
|
5351
|
+
renameFlp = _a.sent();
|
5352
|
+
instructions.push(renameFlp);
|
5353
|
+
return [3, 4];
|
5354
|
+
case 3:
|
5355
|
+
err_34 = _a.sent();
|
5356
|
+
console.log("perpClient renameFlp error:: ", err_34);
|
5357
|
+
return [3, 4];
|
5358
|
+
case 4: return [2, {
|
5359
|
+
instructions: __spreadArray([], instructions, true),
|
5360
|
+
additionalSigners: additionalSigners
|
5361
|
+
}];
|
5362
|
+
}
|
5363
|
+
});
|
5364
|
+
}); };
|
5446
5365
|
this.initRewardDistribution = function (rewardSymbol, poolConfig) { return __awaiter(_this, void 0, void 0, function () {
|
5447
|
-
var publicKey, rewardMint, instructions, additionalSigners, fbNftProgramData, rewardVault, rewardTokenAccount, transferAuthority, initRewardVault,
|
5366
|
+
var publicKey, rewardMint, instructions, additionalSigners, fbNftProgramData, rewardVault, rewardTokenAccount, transferAuthority, initRewardVault, err_35;
|
5448
5367
|
return __generator(this, function (_a) {
|
5449
5368
|
switch (_a.label) {
|
5450
5369
|
case 0:
|
@@ -5478,9 +5397,9 @@ var PerpetualsClient = (function () {
|
|
5478
5397
|
instructions.push(initRewardVault);
|
5479
5398
|
return [3, 4];
|
5480
5399
|
case 3:
|
5481
|
-
|
5482
|
-
console.log("rewardDistribution InitRewardVault error:: ",
|
5483
|
-
throw
|
5400
|
+
err_35 = _a.sent();
|
5401
|
+
console.log("rewardDistribution InitRewardVault error:: ", err_35);
|
5402
|
+
throw err_35;
|
5484
5403
|
case 4: return [2, {
|
5485
5404
|
instructions: __spreadArray([], instructions, true),
|
5486
5405
|
additionalSigners: additionalSigners
|
@@ -5489,7 +5408,7 @@ var PerpetualsClient = (function () {
|
|
5489
5408
|
});
|
5490
5409
|
}); };
|
5491
5410
|
this.updateCounterReward = function () { return __awaiter(_this, void 0, void 0, function () {
|
5492
|
-
var publicKey, instructions, additionalSigners, rewardVault, updateCounter,
|
5411
|
+
var publicKey, instructions, additionalSigners, rewardVault, updateCounter, err_36;
|
5493
5412
|
return __generator(this, function (_a) {
|
5494
5413
|
switch (_a.label) {
|
5495
5414
|
case 0:
|
@@ -5512,9 +5431,9 @@ var PerpetualsClient = (function () {
|
|
5512
5431
|
instructions.push(updateCounter);
|
5513
5432
|
return [3, 4];
|
5514
5433
|
case 3:
|
5515
|
-
|
5516
|
-
console.log("rewardDistribution updateCounter error:: ",
|
5517
|
-
throw
|
5434
|
+
err_36 = _a.sent();
|
5435
|
+
console.log("rewardDistribution updateCounter error:: ", err_36);
|
5436
|
+
throw err_36;
|
5518
5437
|
case 4: return [2, {
|
5519
5438
|
instructions: __spreadArray([], instructions, true),
|
5520
5439
|
additionalSigners: additionalSigners
|
@@ -5523,7 +5442,7 @@ var PerpetualsClient = (function () {
|
|
5523
5442
|
});
|
5524
5443
|
}); };
|
5525
5444
|
this.rewardDistribution = function (counter, owner, rewardAmount, rewardSymbol, poolConfig) { return __awaiter(_this, void 0, void 0, function () {
|
5526
|
-
var publicKey, rewardCustodyMint, instructions, additionalSigners, fundingAccount, rewardVault, rewardTokenAccount, rewardRecord, distributeReward,
|
5445
|
+
var publicKey, rewardCustodyMint, instructions, additionalSigners, fundingAccount, rewardVault, rewardTokenAccount, rewardRecord, distributeReward, err_37;
|
5527
5446
|
return __generator(this, function (_a) {
|
5528
5447
|
switch (_a.label) {
|
5529
5448
|
case 0:
|
@@ -5564,9 +5483,9 @@ var PerpetualsClient = (function () {
|
|
5564
5483
|
instructions.push(distributeReward);
|
5565
5484
|
return [3, 5];
|
5566
5485
|
case 4:
|
5567
|
-
|
5568
|
-
console.log("rewardDistribution distributeReward error:: ",
|
5569
|
-
throw
|
5486
|
+
err_37 = _a.sent();
|
5487
|
+
console.log("rewardDistribution distributeReward error:: ", err_37);
|
5488
|
+
throw err_37;
|
5570
5489
|
case 5: return [2, {
|
5571
5490
|
instructions: __spreadArray([], instructions, true),
|
5572
5491
|
additionalSigners: additionalSigners
|
@@ -5577,7 +5496,7 @@ var PerpetualsClient = (function () {
|
|
5577
5496
|
this.collectReward = function (counter, owner, rewardSymbol, poolConfig, createUserATA) {
|
5578
5497
|
if (createUserATA === void 0) { createUserATA = true; }
|
5579
5498
|
return __awaiter(_this, void 0, void 0, function () {
|
5580
|
-
var publicKey, rewardCustodyMint, instructions, additionalSigners, receivingTokenAccount, _a, rewardVault, rewardTokenAccount, rewardRecord, transferAuthority, collectNftReward,
|
5499
|
+
var publicKey, rewardCustodyMint, instructions, additionalSigners, receivingTokenAccount, _a, rewardVault, rewardTokenAccount, rewardRecord, transferAuthority, collectNftReward, err_38;
|
5581
5500
|
return __generator(this, function (_b) {
|
5582
5501
|
switch (_b.label) {
|
5583
5502
|
case 0:
|
@@ -5625,8 +5544,8 @@ var PerpetualsClient = (function () {
|
|
5625
5544
|
instructions.push(collectNftReward);
|
5626
5545
|
return [3, 7];
|
5627
5546
|
case 6:
|
5628
|
-
|
5629
|
-
throw
|
5547
|
+
err_38 = _b.sent();
|
5548
|
+
throw err_38;
|
5630
5549
|
case 7: return [2, {
|
5631
5550
|
instructions: __spreadArray([], instructions, true),
|
5632
5551
|
additionalSigners: additionalSigners
|
@@ -624,109 +624,6 @@ export type PerpComposability = {
|
|
624
624
|
}
|
625
625
|
];
|
626
626
|
"args": [];
|
627
|
-
},
|
628
|
-
{
|
629
|
-
"name": "addLiquidityAndStake";
|
630
|
-
"accounts": [
|
631
|
-
{
|
632
|
-
"name": "perpProgram";
|
633
|
-
"isMut": false;
|
634
|
-
"isSigner": false;
|
635
|
-
},
|
636
|
-
{
|
637
|
-
"name": "owner";
|
638
|
-
"isMut": false;
|
639
|
-
"isSigner": true;
|
640
|
-
},
|
641
|
-
{
|
642
|
-
"name": "feePayer";
|
643
|
-
"isMut": true;
|
644
|
-
"isSigner": true;
|
645
|
-
},
|
646
|
-
{
|
647
|
-
"name": "fundingAccount";
|
648
|
-
"isMut": true;
|
649
|
-
"isSigner": false;
|
650
|
-
},
|
651
|
-
{
|
652
|
-
"name": "lpTokenAccount";
|
653
|
-
"isMut": true;
|
654
|
-
"isSigner": false;
|
655
|
-
},
|
656
|
-
{
|
657
|
-
"name": "transferAuthority";
|
658
|
-
"isMut": false;
|
659
|
-
"isSigner": false;
|
660
|
-
},
|
661
|
-
{
|
662
|
-
"name": "perpetuals";
|
663
|
-
"isMut": false;
|
664
|
-
"isSigner": false;
|
665
|
-
},
|
666
|
-
{
|
667
|
-
"name": "pool";
|
668
|
-
"isMut": true;
|
669
|
-
"isSigner": false;
|
670
|
-
},
|
671
|
-
{
|
672
|
-
"name": "custody";
|
673
|
-
"isMut": true;
|
674
|
-
"isSigner": false;
|
675
|
-
},
|
676
|
-
{
|
677
|
-
"name": "custodyOracleAccount";
|
678
|
-
"isMut": false;
|
679
|
-
"isSigner": false;
|
680
|
-
},
|
681
|
-
{
|
682
|
-
"name": "custodyTokenAccount";
|
683
|
-
"isMut": true;
|
684
|
-
"isSigner": false;
|
685
|
-
},
|
686
|
-
{
|
687
|
-
"name": "lpTokenMint";
|
688
|
-
"isMut": true;
|
689
|
-
"isSigner": false;
|
690
|
-
},
|
691
|
-
{
|
692
|
-
"name": "flpStakeAccount";
|
693
|
-
"isMut": true;
|
694
|
-
"isSigner": false;
|
695
|
-
},
|
696
|
-
{
|
697
|
-
"name": "poolStakedLpVault";
|
698
|
-
"isMut": true;
|
699
|
-
"isSigner": false;
|
700
|
-
},
|
701
|
-
{
|
702
|
-
"name": "systemProgram";
|
703
|
-
"isMut": false;
|
704
|
-
"isSigner": false;
|
705
|
-
},
|
706
|
-
{
|
707
|
-
"name": "tokenProgram";
|
708
|
-
"isMut": false;
|
709
|
-
"isSigner": false;
|
710
|
-
},
|
711
|
-
{
|
712
|
-
"name": "eventAuthority";
|
713
|
-
"isMut": false;
|
714
|
-
"isSigner": false;
|
715
|
-
},
|
716
|
-
{
|
717
|
-
"name": "ixSysvar";
|
718
|
-
"isMut": false;
|
719
|
-
"isSigner": false;
|
720
|
-
}
|
721
|
-
];
|
722
|
-
"args": [
|
723
|
-
{
|
724
|
-
"name": "params";
|
725
|
-
"type": {
|
726
|
-
"defined": "AddLiquidityAndStakeParams";
|
727
|
-
};
|
728
|
-
}
|
729
|
-
];
|
730
627
|
}
|
731
628
|
];
|
732
629
|
"types": [
|
@@ -841,22 +738,6 @@ export type PerpComposability = {
|
|
841
738
|
"fields": [];
|
842
739
|
};
|
843
740
|
},
|
844
|
-
{
|
845
|
-
"name": "AddLiquidityAndStakeParams";
|
846
|
-
"type": {
|
847
|
-
"kind": "struct";
|
848
|
-
"fields": [
|
849
|
-
{
|
850
|
-
"name": "amountIn";
|
851
|
-
"type": "u64";
|
852
|
-
},
|
853
|
-
{
|
854
|
-
"name": "minLpAmountOut";
|
855
|
-
"type": "u64";
|
856
|
-
}
|
857
|
-
];
|
858
|
-
};
|
859
|
-
},
|
860
741
|
{
|
861
742
|
"name": "Privilege";
|
862
743
|
"type": {
|
@@ -627,109 +627,6 @@ exports.IDL = {
|
|
627
627
|
}
|
628
628
|
],
|
629
629
|
"args": []
|
630
|
-
},
|
631
|
-
{
|
632
|
-
"name": "addLiquidityAndStake",
|
633
|
-
"accounts": [
|
634
|
-
{
|
635
|
-
"name": "perpProgram",
|
636
|
-
"isMut": false,
|
637
|
-
"isSigner": false
|
638
|
-
},
|
639
|
-
{
|
640
|
-
"name": "owner",
|
641
|
-
"isMut": false,
|
642
|
-
"isSigner": true
|
643
|
-
},
|
644
|
-
{
|
645
|
-
"name": "feePayer",
|
646
|
-
"isMut": true,
|
647
|
-
"isSigner": true
|
648
|
-
},
|
649
|
-
{
|
650
|
-
"name": "fundingAccount",
|
651
|
-
"isMut": true,
|
652
|
-
"isSigner": false
|
653
|
-
},
|
654
|
-
{
|
655
|
-
"name": "lpTokenAccount",
|
656
|
-
"isMut": true,
|
657
|
-
"isSigner": false
|
658
|
-
},
|
659
|
-
{
|
660
|
-
"name": "transferAuthority",
|
661
|
-
"isMut": false,
|
662
|
-
"isSigner": false
|
663
|
-
},
|
664
|
-
{
|
665
|
-
"name": "perpetuals",
|
666
|
-
"isMut": false,
|
667
|
-
"isSigner": false
|
668
|
-
},
|
669
|
-
{
|
670
|
-
"name": "pool",
|
671
|
-
"isMut": true,
|
672
|
-
"isSigner": false
|
673
|
-
},
|
674
|
-
{
|
675
|
-
"name": "custody",
|
676
|
-
"isMut": true,
|
677
|
-
"isSigner": false
|
678
|
-
},
|
679
|
-
{
|
680
|
-
"name": "custodyOracleAccount",
|
681
|
-
"isMut": false,
|
682
|
-
"isSigner": false
|
683
|
-
},
|
684
|
-
{
|
685
|
-
"name": "custodyTokenAccount",
|
686
|
-
"isMut": true,
|
687
|
-
"isSigner": false
|
688
|
-
},
|
689
|
-
{
|
690
|
-
"name": "lpTokenMint",
|
691
|
-
"isMut": true,
|
692
|
-
"isSigner": false
|
693
|
-
},
|
694
|
-
{
|
695
|
-
"name": "flpStakeAccount",
|
696
|
-
"isMut": true,
|
697
|
-
"isSigner": false
|
698
|
-
},
|
699
|
-
{
|
700
|
-
"name": "poolStakedLpVault",
|
701
|
-
"isMut": true,
|
702
|
-
"isSigner": false
|
703
|
-
},
|
704
|
-
{
|
705
|
-
"name": "systemProgram",
|
706
|
-
"isMut": false,
|
707
|
-
"isSigner": false
|
708
|
-
},
|
709
|
-
{
|
710
|
-
"name": "tokenProgram",
|
711
|
-
"isMut": false,
|
712
|
-
"isSigner": false
|
713
|
-
},
|
714
|
-
{
|
715
|
-
"name": "eventAuthority",
|
716
|
-
"isMut": false,
|
717
|
-
"isSigner": false
|
718
|
-
},
|
719
|
-
{
|
720
|
-
"name": "ixSysvar",
|
721
|
-
"isMut": false,
|
722
|
-
"isSigner": false
|
723
|
-
}
|
724
|
-
],
|
725
|
-
"args": [
|
726
|
-
{
|
727
|
-
"name": "params",
|
728
|
-
"type": {
|
729
|
-
"defined": "AddLiquidityAndStakeParams"
|
730
|
-
}
|
731
|
-
}
|
732
|
-
]
|
733
630
|
}
|
734
631
|
],
|
735
632
|
"types": [
|
@@ -844,22 +741,6 @@ exports.IDL = {
|
|
844
741
|
"fields": []
|
845
742
|
}
|
846
743
|
},
|
847
|
-
{
|
848
|
-
"name": "AddLiquidityAndStakeParams",
|
849
|
-
"type": {
|
850
|
-
"kind": "struct",
|
851
|
-
"fields": [
|
852
|
-
{
|
853
|
-
"name": "amountIn",
|
854
|
-
"type": "u64"
|
855
|
-
},
|
856
|
-
{
|
857
|
-
"name": "minLpAmountOut",
|
858
|
-
"type": "u64"
|
859
|
-
}
|
860
|
-
]
|
861
|
-
}
|
862
|
-
},
|
863
744
|
{
|
864
745
|
"name": "Privilege",
|
865
746
|
"type": {
|