@xitadel-fi/sdk 0.2.1 → 0.2.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/sdk/src/program.d.ts +30 -6
- package/dist/sdk/src/program.js +89 -7
- package/dist/target/idl/xitadel.json +120 -9
- package/dist/target/types/xitadel.d.ts +120 -9
- package/package.json +1 -1
|
@@ -63,7 +63,7 @@ export declare class XitadelProgram {
|
|
|
63
63
|
collateralTokenMint: PublicKey;
|
|
64
64
|
lttSupply: BN;
|
|
65
65
|
fundedLttSupply: BN;
|
|
66
|
-
|
|
66
|
+
reserved1: number[];
|
|
67
67
|
stableInterestAmount: BN;
|
|
68
68
|
tokenInterestAmount: BN;
|
|
69
69
|
fundingStartTs: BN;
|
|
@@ -273,7 +273,7 @@ export declare class XitadelProgram {
|
|
|
273
273
|
collateralTokenMint: PublicKey;
|
|
274
274
|
lttSupply: BN;
|
|
275
275
|
fundedLttSupply: BN;
|
|
276
|
-
|
|
276
|
+
reserved1: number[];
|
|
277
277
|
stableInterestAmount: BN;
|
|
278
278
|
tokenInterestAmount: BN;
|
|
279
279
|
fundingStartTs: BN;
|
|
@@ -387,9 +387,18 @@ export declare class XitadelProgram {
|
|
|
387
387
|
/**
|
|
388
388
|
* Update LTT status
|
|
389
389
|
* @param lttId The LTT ID
|
|
390
|
+
* @param signer The signer (e.g. keeper or caller)
|
|
391
|
+
* @param priceFeed Price feed (Switchboard or Chainlink)
|
|
392
|
+
* @param chainLinkProgram Chainlink program ID (required for account validation; use placeholder for Switchboard)
|
|
393
|
+
* @param signedReport Signed report bytes (empty buffer for Switchboard)
|
|
394
|
+
* @param verifierAccounts Chainlink verifier accounts (required by IDL; use placeholder pubkeys when not using Chainlink)
|
|
390
395
|
* @returns Transaction instruction for updating LTT status
|
|
391
396
|
*/
|
|
392
|
-
updateLTTStatus(lttId: PublicKey
|
|
397
|
+
updateLTTStatus(lttId: PublicKey, signer: PublicKey, priceFeed: PublicKey, chainLinkProgram: PublicKey, signedReport: Buffer | Uint8Array, verifierAccounts: {
|
|
398
|
+
verifier: PublicKey;
|
|
399
|
+
accessController: PublicKey;
|
|
400
|
+
config: PublicKey;
|
|
401
|
+
}): Promise<TransactionInstruction>;
|
|
393
402
|
/**
|
|
394
403
|
* Deactivate an LTT
|
|
395
404
|
* @param signer
|
|
@@ -414,6 +423,12 @@ export declare class XitadelProgram {
|
|
|
414
423
|
stableCoinAmount: BN;
|
|
415
424
|
cpAmmProgramId: PublicKey;
|
|
416
425
|
collateralTokenMint: PublicKey;
|
|
426
|
+
priceFeed: PublicKey;
|
|
427
|
+
chainlinkProgram: PublicKey;
|
|
428
|
+
verifierAccount: PublicKey;
|
|
429
|
+
accessController: PublicKey;
|
|
430
|
+
configAccount: PublicKey;
|
|
431
|
+
signedReport?: Buffer | number[];
|
|
417
432
|
}): Promise<{
|
|
418
433
|
activateLttIx: TransactionInstruction[];
|
|
419
434
|
createLookupTableIx: TransactionInstruction;
|
|
@@ -422,15 +437,24 @@ export declare class XitadelProgram {
|
|
|
422
437
|
}>;
|
|
423
438
|
/**
|
|
424
439
|
* Maturate an LTT
|
|
425
|
-
* @param signer
|
|
440
|
+
* @param signer Keeper/signer public key
|
|
426
441
|
* @param lttId The LTT ID
|
|
427
442
|
* @param positionNftMint The position NFT mint
|
|
443
|
+
* @param positionNftMintB The position NFT mint for pool B
|
|
428
444
|
* @param ammConfig The AMM config
|
|
445
|
+
* @param ammConfigB The AMM config for pool B
|
|
429
446
|
* @param cpAmmProgramId The CP AMM program ID
|
|
430
|
-
* @param
|
|
447
|
+
* @param priceFeed Price feed (Chainlink or Switchboard)
|
|
448
|
+
* @param chainLinkProgram Chainlink program ID (required by IDL; use placeholder when not using Chainlink)
|
|
449
|
+
* @param reportBuffer Signed report bytes (empty buffer when not using Chainlink)
|
|
450
|
+
* @param verifierAccounts Chainlink verifier accounts (use placeholder pubkeys when not using Chainlink)
|
|
431
451
|
* @returns Transaction instruction for maturing the LTT
|
|
432
452
|
*/
|
|
433
|
-
maturateLtt(signer: PublicKey, lttId: PublicKey, positionNftMint: PublicKey, positionNftMintB: PublicKey, ammConfig: PublicKey, ammConfigB: PublicKey, cpAmmProgramId: PublicKey
|
|
453
|
+
maturateLtt(signer: PublicKey, lttId: PublicKey, positionNftMint: PublicKey, positionNftMintB: PublicKey, ammConfig: PublicKey, ammConfigB: PublicKey, cpAmmProgramId: PublicKey, priceFeed: PublicKey, chainLinkProgram: PublicKey, reportBuffer: Buffer | Uint8Array, verifierAccounts: {
|
|
454
|
+
verifier: PublicKey;
|
|
455
|
+
accessController: PublicKey;
|
|
456
|
+
config: PublicKey;
|
|
457
|
+
}): Promise<TransactionInstruction>;
|
|
434
458
|
/**
|
|
435
459
|
* Stop liquidation
|
|
436
460
|
* @param lttId The LTT ID
|
package/dist/sdk/src/program.js
CHANGED
|
@@ -444,22 +444,34 @@ class XitadelProgram {
|
|
|
444
444
|
/**
|
|
445
445
|
* Update LTT status
|
|
446
446
|
* @param lttId The LTT ID
|
|
447
|
+
* @param signer The signer (e.g. keeper or caller)
|
|
448
|
+
* @param priceFeed Price feed (Switchboard or Chainlink)
|
|
449
|
+
* @param chainLinkProgram Chainlink program ID (required for account validation; use placeholder for Switchboard)
|
|
450
|
+
* @param signedReport Signed report bytes (empty buffer for Switchboard)
|
|
451
|
+
* @param verifierAccounts Chainlink verifier accounts (required by IDL; use placeholder pubkeys when not using Chainlink)
|
|
447
452
|
* @returns Transaction instruction for updating LTT status
|
|
448
453
|
*/
|
|
449
|
-
async updateLTTStatus(lttId) {
|
|
454
|
+
async updateLTTStatus(lttId, signer, priceFeed, chainLinkProgram, signedReport, verifierAccounts) {
|
|
450
455
|
const lttConfigPda = this.getLTTConfigPda(lttId);
|
|
451
456
|
const lttConfig = await this.program.account.lttConfiguration.fetch(lttConfigPda);
|
|
452
457
|
const fundingVaultAta = (0, spl_token_1.getAssociatedTokenAddressSync)(lttConfig.fundingTokenMint, lttConfigPda, true);
|
|
453
458
|
const collateralVaultAta = (0, spl_token_1.getAssociatedTokenAddressSync)(lttConfig.collateralTokenMint, lttConfigPda, true);
|
|
454
459
|
const configPda = this.getConfigPda();
|
|
455
460
|
return this.program.methods
|
|
456
|
-
.updateLttStatus()
|
|
461
|
+
.updateLttStatus(Buffer.from(signedReport))
|
|
457
462
|
.accountsPartial({
|
|
463
|
+
signer,
|
|
458
464
|
config: configPda,
|
|
459
465
|
lttConfiguration: lttConfigPda,
|
|
460
466
|
fundingVaultAta,
|
|
461
467
|
collateralVaultAta,
|
|
462
468
|
fundingTokenMint: lttConfig.fundingTokenMint,
|
|
469
|
+
collateralTokenMint: lttConfig.collateralTokenMint,
|
|
470
|
+
priceFeed,
|
|
471
|
+
chainlinkProgram: chainLinkProgram,
|
|
472
|
+
verifierAccount: verifierAccounts.verifier,
|
|
473
|
+
accessController: verifierAccounts.accessController,
|
|
474
|
+
configAccount: verifierAccounts.config,
|
|
463
475
|
systemProgram: web3_js_2.SystemProgram.programId,
|
|
464
476
|
})
|
|
465
477
|
.instruction();
|
|
@@ -526,6 +538,26 @@ class XitadelProgram {
|
|
|
526
538
|
if (positionNftAccountInfo == null) {
|
|
527
539
|
instructions.push((0, spl_token_1.createAssociatedTokenAccountInstruction)(signer, positionNftAccount, lpAuthority, positionNftMint, spl_token_1.TOKEN_2022_PROGRAM_ID));
|
|
528
540
|
}
|
|
541
|
+
// Pool B: when LTT has two pools, derive pool B accounts; otherwise use pool A accounts for _b slots
|
|
542
|
+
const positionNftMintB = lttConfig.positionNftMintB;
|
|
543
|
+
const hasPoolB = !positionNftMintB.equals(web3_js_2.SystemProgram.programId);
|
|
544
|
+
let positionNftAccountB = positionNftAccount;
|
|
545
|
+
let harvestVaultPositionNftAtaB = harvestVaultPositionNftAta;
|
|
546
|
+
if (hasPoolB) {
|
|
547
|
+
const [positionNftAccountBDerived] = web3_js_1.PublicKey.findProgramAddressSync([constants_1.POSITION_NFT_ACCOUNT_SEED, positionNftMintB.toBuffer()], cpAmmProgramId);
|
|
548
|
+
positionNftAccountB = positionNftAccountBDerived;
|
|
549
|
+
harvestVaultPositionNftAtaB = (0, spl_token_1.getAssociatedTokenAddressSync)(positionNftMintB, harvestVault, true, spl_token_1.TOKEN_2022_PROGRAM_ID);
|
|
550
|
+
let harvestVaultPositionNftAtaBInfo = null;
|
|
551
|
+
try {
|
|
552
|
+
harvestVaultPositionNftAtaBInfo = await this.program.provider.connection.getAccountInfo(harvestVaultPositionNftAtaB);
|
|
553
|
+
}
|
|
554
|
+
catch {
|
|
555
|
+
// Account doesn't exist
|
|
556
|
+
}
|
|
557
|
+
if (harvestVaultPositionNftAtaBInfo == null) {
|
|
558
|
+
instructions.push((0, spl_token_1.createAssociatedTokenAccountInstruction)(signer, harvestVaultPositionNftAtaB, harvestVault, positionNftMintB, spl_token_1.TOKEN_2022_PROGRAM_ID));
|
|
559
|
+
}
|
|
560
|
+
}
|
|
529
561
|
const configPda = this.getConfigPda();
|
|
530
562
|
// Add the main deactivate instruction
|
|
531
563
|
instructions.push(await this.program.methods
|
|
@@ -540,7 +572,10 @@ class XitadelProgram {
|
|
|
540
572
|
collateralVaultAta: (0, spl_token_1.getAssociatedTokenAddressSync)(lttConfig.collateralTokenMint, lttConfigPda, true),
|
|
541
573
|
positionNftMint,
|
|
542
574
|
positionNftAccount: positionNftAccount,
|
|
575
|
+
positionNftMintB,
|
|
576
|
+
positionNftAccountB,
|
|
543
577
|
harvestVaultPositionNftAta,
|
|
578
|
+
harvestVaultPositionNftAtaB,
|
|
544
579
|
harvestVaultFundingAta,
|
|
545
580
|
harvestVaultCollateralAta,
|
|
546
581
|
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
@@ -648,6 +683,12 @@ class XitadelProgram {
|
|
|
648
683
|
spl_token_1.ASSOCIATED_TOKEN_PROGRAM_ID,
|
|
649
684
|
web3_js_2.SystemProgram.programId,
|
|
650
685
|
collateralVaultAta,
|
|
686
|
+
params.collateralTokenMint,
|
|
687
|
+
params.priceFeed,
|
|
688
|
+
params.chainlinkProgram,
|
|
689
|
+
params.verifierAccount,
|
|
690
|
+
params.accessController,
|
|
691
|
+
params.configAccount,
|
|
651
692
|
spl_token_1.TOKEN_PROGRAM_ID,
|
|
652
693
|
spl_token_1.TOKEN_2022_PROGRAM_ID,
|
|
653
694
|
eventAuthority,
|
|
@@ -667,9 +708,11 @@ class XitadelProgram {
|
|
|
667
708
|
addresses: uniqueAddresses.slice(i, i + chunkSize),
|
|
668
709
|
}));
|
|
669
710
|
}
|
|
711
|
+
const signedReport = params.signedReport ?? Buffer.alloc(0);
|
|
712
|
+
const signedReportBuf = Buffer.isBuffer(signedReport) ? signedReport : Buffer.from(signedReport);
|
|
670
713
|
const configPda = this.getConfigPda();
|
|
671
714
|
instructions.push(await this.program.methods
|
|
672
|
-
.activateLtt()
|
|
715
|
+
.activateLtt(signedReportBuf)
|
|
673
716
|
.accountsPartial({
|
|
674
717
|
config: configPda,
|
|
675
718
|
signer: signer,
|
|
@@ -699,6 +742,12 @@ class XitadelProgram {
|
|
|
699
742
|
associatedTokenProgram: spl_token_1.ASSOCIATED_TOKEN_PROGRAM_ID,
|
|
700
743
|
systemProgram: web3_js_2.SystemProgram.programId,
|
|
701
744
|
collateralAta: collateralVaultAta,
|
|
745
|
+
collateralTokenMint: params.collateralTokenMint,
|
|
746
|
+
priceFeed: params.priceFeed,
|
|
747
|
+
chainlinkProgram: params.chainlinkProgram,
|
|
748
|
+
verifierAccount: params.verifierAccount,
|
|
749
|
+
accessController: params.accessController,
|
|
750
|
+
reportConfigAccount: params.configAccount,
|
|
702
751
|
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
703
752
|
tokenBProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
704
753
|
token2022Program: spl_token_1.TOKEN_2022_PROGRAM_ID,
|
|
@@ -716,15 +765,20 @@ class XitadelProgram {
|
|
|
716
765
|
}
|
|
717
766
|
/**
|
|
718
767
|
* Maturate an LTT
|
|
719
|
-
* @param signer
|
|
768
|
+
* @param signer Keeper/signer public key
|
|
720
769
|
* @param lttId The LTT ID
|
|
721
770
|
* @param positionNftMint The position NFT mint
|
|
771
|
+
* @param positionNftMintB The position NFT mint for pool B
|
|
722
772
|
* @param ammConfig The AMM config
|
|
773
|
+
* @param ammConfigB The AMM config for pool B
|
|
723
774
|
* @param cpAmmProgramId The CP AMM program ID
|
|
724
|
-
* @param
|
|
775
|
+
* @param priceFeed Price feed (Chainlink or Switchboard)
|
|
776
|
+
* @param chainLinkProgram Chainlink program ID (required by IDL; use placeholder when not using Chainlink)
|
|
777
|
+
* @param reportBuffer Signed report bytes (empty buffer when not using Chainlink)
|
|
778
|
+
* @param verifierAccounts Chainlink verifier accounts (use placeholder pubkeys when not using Chainlink)
|
|
725
779
|
* @returns Transaction instruction for maturing the LTT
|
|
726
780
|
*/
|
|
727
|
-
async maturateLtt(signer, lttId, positionNftMint, positionNftMintB, ammConfig, ammConfigB, cpAmmProgramId) {
|
|
781
|
+
async maturateLtt(signer, lttId, positionNftMint, positionNftMintB, ammConfig, ammConfigB, cpAmmProgramId, priceFeed, chainLinkProgram, reportBuffer, verifierAccounts) {
|
|
728
782
|
const lttConfigPda = this.getLTTConfigPda(lttId);
|
|
729
783
|
const lttConfig = await this.getLttConfig(lttId);
|
|
730
784
|
const lpAuthority = this.getLpAuthority();
|
|
@@ -757,7 +811,7 @@ class XitadelProgram {
|
|
|
757
811
|
const fundingVaultAta = (0, spl_token_1.getAssociatedTokenAddressSync)(lttConfig.fundingTokenMint, lttConfigPda, true);
|
|
758
812
|
const configPda = this.getConfigPda();
|
|
759
813
|
const maturateIx = await this.program.methods
|
|
760
|
-
.maturate()
|
|
814
|
+
.maturate(Buffer.from(reportBuffer))
|
|
761
815
|
.accountsPartial({
|
|
762
816
|
config: configPda,
|
|
763
817
|
signer,
|
|
@@ -770,6 +824,12 @@ class XitadelProgram {
|
|
|
770
824
|
positionB,
|
|
771
825
|
fundingVaultAta,
|
|
772
826
|
collateralVaultAta,
|
|
827
|
+
collateralTokenMint: lttConfig.collateralTokenMint,
|
|
828
|
+
priceFeed,
|
|
829
|
+
chainlinkProgram: chainLinkProgram,
|
|
830
|
+
verifierAccount: verifierAccounts.verifier,
|
|
831
|
+
accessController: verifierAccounts.accessController,
|
|
832
|
+
configAccount: verifierAccounts.config,
|
|
773
833
|
tokenAAccount: lttTokenAccount,
|
|
774
834
|
tokenBAccount: stableCoinTokenAccount,
|
|
775
835
|
tokenAVault: lttVault,
|
|
@@ -836,6 +896,15 @@ class XitadelProgram {
|
|
|
836
896
|
// Derive all ATAs
|
|
837
897
|
const harvestVaultPositionNftAta = (0, spl_token_1.getAssociatedTokenAddressSync)(positionNftMint, harvestVault, true, spl_token_1.TOKEN_2022_PROGRAM_ID);
|
|
838
898
|
const managerPositionNftAta = (0, spl_token_1.getAssociatedTokenAddressSync)(positionNftMint, manager, true, spl_token_1.TOKEN_2022_PROGRAM_ID);
|
|
899
|
+
// Pool B: when LTT has two pools use pool B ATAs; otherwise use pool A for _b slots
|
|
900
|
+
const positionNftMintB = lttConfig.positionNftMintB;
|
|
901
|
+
const hasPoolB = !positionNftMintB.equals(web3_js_2.SystemProgram.programId);
|
|
902
|
+
let harvestVaultPositionNftAtaB = harvestVaultPositionNftAta;
|
|
903
|
+
let managerPositionNftAtaB = managerPositionNftAta;
|
|
904
|
+
if (hasPoolB) {
|
|
905
|
+
harvestVaultPositionNftAtaB = (0, spl_token_1.getAssociatedTokenAddressSync)(positionNftMintB, harvestVault, true, spl_token_1.TOKEN_2022_PROGRAM_ID);
|
|
906
|
+
managerPositionNftAtaB = (0, spl_token_1.getAssociatedTokenAddressSync)(positionNftMintB, manager, true, spl_token_1.TOKEN_2022_PROGRAM_ID);
|
|
907
|
+
}
|
|
839
908
|
const harvestVaultFundingAta = (0, spl_token_1.getAssociatedTokenAddressSync)(lttConfig.fundingTokenMint, harvestVault, true, spl_token_1.TOKEN_PROGRAM_ID);
|
|
840
909
|
const harvestVaultCollateralAta = (0, spl_token_1.getAssociatedTokenAddressSync)(lttConfig.collateralTokenMint, harvestVault, true, spl_token_1.TOKEN_PROGRAM_ID);
|
|
841
910
|
const managerFundingAta = (0, spl_token_1.getAssociatedTokenAddressSync)(lttConfig.fundingTokenMint, manager, true, spl_token_1.TOKEN_PROGRAM_ID);
|
|
@@ -853,6 +922,16 @@ class XitadelProgram {
|
|
|
853
922
|
if (!managerPositionNftAtaInfo) {
|
|
854
923
|
instructions.push((0, spl_token_1.createAssociatedTokenAccountInstruction)(manager, managerPositionNftAta, manager, positionNftMint, spl_token_1.TOKEN_2022_PROGRAM_ID));
|
|
855
924
|
}
|
|
925
|
+
if (hasPoolB) {
|
|
926
|
+
const managerPositionNftAtaBInfo = await connection.getAccountInfo(managerPositionNftAtaB);
|
|
927
|
+
if (!managerPositionNftAtaBInfo) {
|
|
928
|
+
instructions.push((0, spl_token_1.createAssociatedTokenAccountInstruction)(manager, managerPositionNftAtaB, manager, positionNftMintB, spl_token_1.TOKEN_2022_PROGRAM_ID));
|
|
929
|
+
}
|
|
930
|
+
const harvestVaultPositionNftAtaBInfo = await connection.getAccountInfo(harvestVaultPositionNftAtaB);
|
|
931
|
+
if (!harvestVaultPositionNftAtaBInfo) {
|
|
932
|
+
instructions.push((0, spl_token_1.createAssociatedTokenAccountInstruction)(manager, harvestVaultPositionNftAtaB, harvestVault, positionNftMintB, spl_token_1.TOKEN_2022_PROGRAM_ID));
|
|
933
|
+
}
|
|
934
|
+
}
|
|
856
935
|
const harvestVaultFundingAtaInfo = await connection.getAccountInfo(harvestVaultFundingAta);
|
|
857
936
|
if (!harvestVaultFundingAtaInfo) {
|
|
858
937
|
instructions.push((0, spl_token_1.createAssociatedTokenAccountInstruction)(manager, harvestVaultFundingAta, harvestVault, lttConfig.fundingTokenMint, spl_token_1.TOKEN_PROGRAM_ID));
|
|
@@ -876,6 +955,9 @@ class XitadelProgram {
|
|
|
876
955
|
positionNftMint,
|
|
877
956
|
harvestVaultPositionNftAta,
|
|
878
957
|
managerPositionNftAta,
|
|
958
|
+
positionNftMintB,
|
|
959
|
+
harvestVaultPositionNftAtaB,
|
|
960
|
+
managerPositionNftAtaB,
|
|
879
961
|
harvestVaultFundingAta,
|
|
880
962
|
managerFundingAta,
|
|
881
963
|
managerCollateralAta,
|
|
@@ -427,6 +427,13 @@
|
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
429
|
},
|
|
430
|
+
{
|
|
431
|
+
"name": "collateral_token_mint",
|
|
432
|
+
"writable": true
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"name": "report_config_account"
|
|
436
|
+
},
|
|
430
437
|
{
|
|
431
438
|
"name": "pool_config"
|
|
432
439
|
},
|
|
@@ -445,6 +452,18 @@
|
|
|
445
452
|
"name": "pool_authority",
|
|
446
453
|
"writable": true
|
|
447
454
|
},
|
|
455
|
+
{
|
|
456
|
+
"name": "price_feed"
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
"name": "chainlink_program"
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
"name": "verifier_account"
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
"name": "access_controller"
|
|
466
|
+
},
|
|
448
467
|
{
|
|
449
468
|
"name": "event_authority",
|
|
450
469
|
"writable": true
|
|
@@ -489,7 +508,12 @@
|
|
|
489
508
|
"address": "SysvarRent111111111111111111111111111111111"
|
|
490
509
|
}
|
|
491
510
|
],
|
|
492
|
-
"args": [
|
|
511
|
+
"args": [
|
|
512
|
+
{
|
|
513
|
+
"name": "signed_report",
|
|
514
|
+
"type": "bytes"
|
|
515
|
+
}
|
|
516
|
+
]
|
|
493
517
|
},
|
|
494
518
|
{
|
|
495
519
|
"name": "claim_fees",
|
|
@@ -1436,6 +1460,17 @@
|
|
|
1436
1460
|
],
|
|
1437
1461
|
"writable": true
|
|
1438
1462
|
},
|
|
1463
|
+
{
|
|
1464
|
+
"name": "position_nft_mint_b",
|
|
1465
|
+
"writable": true
|
|
1466
|
+
},
|
|
1467
|
+
{
|
|
1468
|
+
"name": "position_nft_account_b",
|
|
1469
|
+
"docs": [
|
|
1470
|
+
"The position NFT token account for pool B owned by LP authority (pass same as position_nft_account if single pool)"
|
|
1471
|
+
],
|
|
1472
|
+
"writable": true
|
|
1473
|
+
},
|
|
1439
1474
|
{
|
|
1440
1475
|
"name": "harvest_vault_position_nft_ata",
|
|
1441
1476
|
"docs": [
|
|
@@ -1443,6 +1478,13 @@
|
|
|
1443
1478
|
],
|
|
1444
1479
|
"writable": true
|
|
1445
1480
|
},
|
|
1481
|
+
{
|
|
1482
|
+
"name": "harvest_vault_position_nft_ata_b",
|
|
1483
|
+
"docs": [
|
|
1484
|
+
"The harvest vault's position NFT token account for pool B (pass same as harvest_vault_position_nft_ata if single pool)"
|
|
1485
|
+
],
|
|
1486
|
+
"writable": true
|
|
1487
|
+
},
|
|
1446
1488
|
{
|
|
1447
1489
|
"name": "harvest_vault_funding_ata",
|
|
1448
1490
|
"docs": [
|
|
@@ -2617,6 +2659,24 @@
|
|
|
2617
2659
|
"name": "manager_position_nft_ata",
|
|
2618
2660
|
"writable": true
|
|
2619
2661
|
},
|
|
2662
|
+
{
|
|
2663
|
+
"name": "position_nft_mint_b",
|
|
2664
|
+
"writable": true
|
|
2665
|
+
},
|
|
2666
|
+
{
|
|
2667
|
+
"name": "harvest_vault_position_nft_ata_b",
|
|
2668
|
+
"docs": [
|
|
2669
|
+
"Harvest vault's position NFT ATA for pool B (pass same as harvest_vault_position_nft_ata if single pool)"
|
|
2670
|
+
],
|
|
2671
|
+
"writable": true
|
|
2672
|
+
},
|
|
2673
|
+
{
|
|
2674
|
+
"name": "manager_position_nft_ata_b",
|
|
2675
|
+
"docs": [
|
|
2676
|
+
"Manager's position NFT ATA for pool B (pass same as manager_position_nft_ata if single pool)"
|
|
2677
|
+
],
|
|
2678
|
+
"writable": true
|
|
2679
|
+
},
|
|
2620
2680
|
{
|
|
2621
2681
|
"name": "harvest_vault_funding_ata",
|
|
2622
2682
|
"writable": true,
|
|
@@ -3520,6 +3580,24 @@
|
|
|
3520
3580
|
}
|
|
3521
3581
|
}
|
|
3522
3582
|
},
|
|
3583
|
+
{
|
|
3584
|
+
"name": "collateral_token_mint"
|
|
3585
|
+
},
|
|
3586
|
+
{
|
|
3587
|
+
"name": "price_feed"
|
|
3588
|
+
},
|
|
3589
|
+
{
|
|
3590
|
+
"name": "chainlink_program"
|
|
3591
|
+
},
|
|
3592
|
+
{
|
|
3593
|
+
"name": "verifier_account"
|
|
3594
|
+
},
|
|
3595
|
+
{
|
|
3596
|
+
"name": "access_controller"
|
|
3597
|
+
},
|
|
3598
|
+
{
|
|
3599
|
+
"name": "config_account"
|
|
3600
|
+
},
|
|
3523
3601
|
{
|
|
3524
3602
|
"name": "token_a_account",
|
|
3525
3603
|
"docs": [
|
|
@@ -3616,7 +3694,12 @@
|
|
|
3616
3694
|
"address": "cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG"
|
|
3617
3695
|
}
|
|
3618
3696
|
],
|
|
3619
|
-
"args": [
|
|
3697
|
+
"args": [
|
|
3698
|
+
{
|
|
3699
|
+
"name": "signed_report",
|
|
3700
|
+
"type": "bytes"
|
|
3701
|
+
}
|
|
3702
|
+
]
|
|
3620
3703
|
},
|
|
3621
3704
|
{
|
|
3622
3705
|
"name": "redeem",
|
|
@@ -4673,6 +4756,10 @@
|
|
|
4673
4756
|
104
|
|
4674
4757
|
],
|
|
4675
4758
|
"accounts": [
|
|
4759
|
+
{
|
|
4760
|
+
"name": "signer",
|
|
4761
|
+
"signer": true
|
|
4762
|
+
},
|
|
4676
4763
|
{
|
|
4677
4764
|
"name": "config",
|
|
4678
4765
|
"pda": {
|
|
@@ -4905,12 +4992,35 @@
|
|
|
4905
4992
|
"name": "funding_token_mint",
|
|
4906
4993
|
"writable": true
|
|
4907
4994
|
},
|
|
4995
|
+
{
|
|
4996
|
+
"name": "collateral_token_mint"
|
|
4997
|
+
},
|
|
4998
|
+
{
|
|
4999
|
+
"name": "price_feed"
|
|
5000
|
+
},
|
|
5001
|
+
{
|
|
5002
|
+
"name": "chainlink_program"
|
|
5003
|
+
},
|
|
5004
|
+
{
|
|
5005
|
+
"name": "verifier_account"
|
|
5006
|
+
},
|
|
5007
|
+
{
|
|
5008
|
+
"name": "access_controller"
|
|
5009
|
+
},
|
|
5010
|
+
{
|
|
5011
|
+
"name": "config_account"
|
|
5012
|
+
},
|
|
4908
5013
|
{
|
|
4909
5014
|
"name": "system_program",
|
|
4910
5015
|
"address": "11111111111111111111111111111111"
|
|
4911
5016
|
}
|
|
4912
5017
|
],
|
|
4913
|
-
"args": [
|
|
5018
|
+
"args": [
|
|
5019
|
+
{
|
|
5020
|
+
"name": "signed_report",
|
|
5021
|
+
"type": "bytes"
|
|
5022
|
+
}
|
|
5023
|
+
]
|
|
4914
5024
|
},
|
|
4915
5025
|
{
|
|
4916
5026
|
"name": "withdraw_collateral",
|
|
@@ -5975,8 +6085,13 @@
|
|
|
5975
6085
|
"type": "u64"
|
|
5976
6086
|
},
|
|
5977
6087
|
{
|
|
5978
|
-
"name": "
|
|
5979
|
-
"type":
|
|
6088
|
+
"name": "reserved_1",
|
|
6089
|
+
"type": {
|
|
6090
|
+
"array": [
|
|
6091
|
+
"u8",
|
|
6092
|
+
8
|
|
6093
|
+
]
|
|
6094
|
+
}
|
|
5980
6095
|
},
|
|
5981
6096
|
{
|
|
5982
6097
|
"name": "stable_interest_amount",
|
|
@@ -6102,10 +6217,6 @@
|
|
|
6102
6217
|
"name": "max_allowed_ltv_pct",
|
|
6103
6218
|
"type": "u64"
|
|
6104
6219
|
},
|
|
6105
|
-
{
|
|
6106
|
-
"name": "collateral_amount",
|
|
6107
|
-
"type": "u64"
|
|
6108
|
-
},
|
|
6109
6220
|
{
|
|
6110
6221
|
"name": "issuer",
|
|
6111
6222
|
"type": "pubkey"
|
|
@@ -433,6 +433,13 @@ export type Xitadel = {
|
|
|
433
433
|
};
|
|
434
434
|
};
|
|
435
435
|
},
|
|
436
|
+
{
|
|
437
|
+
"name": "collateralTokenMint";
|
|
438
|
+
"writable": true;
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
"name": "reportConfigAccount";
|
|
442
|
+
},
|
|
436
443
|
{
|
|
437
444
|
"name": "poolConfig";
|
|
438
445
|
},
|
|
@@ -451,6 +458,18 @@ export type Xitadel = {
|
|
|
451
458
|
"name": "poolAuthority";
|
|
452
459
|
"writable": true;
|
|
453
460
|
},
|
|
461
|
+
{
|
|
462
|
+
"name": "priceFeed";
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
"name": "chainlinkProgram";
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
"name": "verifierAccount";
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
"name": "accessController";
|
|
472
|
+
},
|
|
454
473
|
{
|
|
455
474
|
"name": "eventAuthority";
|
|
456
475
|
"writable": true;
|
|
@@ -495,7 +514,12 @@ export type Xitadel = {
|
|
|
495
514
|
"address": "SysvarRent111111111111111111111111111111111";
|
|
496
515
|
}
|
|
497
516
|
];
|
|
498
|
-
"args": [
|
|
517
|
+
"args": [
|
|
518
|
+
{
|
|
519
|
+
"name": "signedReport";
|
|
520
|
+
"type": "bytes";
|
|
521
|
+
}
|
|
522
|
+
];
|
|
499
523
|
},
|
|
500
524
|
{
|
|
501
525
|
"name": "claimFees";
|
|
@@ -1442,6 +1466,17 @@ export type Xitadel = {
|
|
|
1442
1466
|
];
|
|
1443
1467
|
"writable": true;
|
|
1444
1468
|
},
|
|
1469
|
+
{
|
|
1470
|
+
"name": "positionNftMintB";
|
|
1471
|
+
"writable": true;
|
|
1472
|
+
},
|
|
1473
|
+
{
|
|
1474
|
+
"name": "positionNftAccountB";
|
|
1475
|
+
"docs": [
|
|
1476
|
+
"The position NFT token account for pool B owned by LP authority (pass same as position_nft_account if single pool)"
|
|
1477
|
+
];
|
|
1478
|
+
"writable": true;
|
|
1479
|
+
},
|
|
1445
1480
|
{
|
|
1446
1481
|
"name": "harvestVaultPositionNftAta";
|
|
1447
1482
|
"docs": [
|
|
@@ -1449,6 +1484,13 @@ export type Xitadel = {
|
|
|
1449
1484
|
];
|
|
1450
1485
|
"writable": true;
|
|
1451
1486
|
},
|
|
1487
|
+
{
|
|
1488
|
+
"name": "harvestVaultPositionNftAtaB";
|
|
1489
|
+
"docs": [
|
|
1490
|
+
"The harvest vault's position NFT token account for pool B (pass same as harvest_vault_position_nft_ata if single pool)"
|
|
1491
|
+
];
|
|
1492
|
+
"writable": true;
|
|
1493
|
+
},
|
|
1452
1494
|
{
|
|
1453
1495
|
"name": "harvestVaultFundingAta";
|
|
1454
1496
|
"docs": [
|
|
@@ -2623,6 +2665,24 @@ export type Xitadel = {
|
|
|
2623
2665
|
"name": "managerPositionNftAta";
|
|
2624
2666
|
"writable": true;
|
|
2625
2667
|
},
|
|
2668
|
+
{
|
|
2669
|
+
"name": "positionNftMintB";
|
|
2670
|
+
"writable": true;
|
|
2671
|
+
},
|
|
2672
|
+
{
|
|
2673
|
+
"name": "harvestVaultPositionNftAtaB";
|
|
2674
|
+
"docs": [
|
|
2675
|
+
"Harvest vault's position NFT ATA for pool B (pass same as harvest_vault_position_nft_ata if single pool)"
|
|
2676
|
+
];
|
|
2677
|
+
"writable": true;
|
|
2678
|
+
},
|
|
2679
|
+
{
|
|
2680
|
+
"name": "managerPositionNftAtaB";
|
|
2681
|
+
"docs": [
|
|
2682
|
+
"Manager's position NFT ATA for pool B (pass same as manager_position_nft_ata if single pool)"
|
|
2683
|
+
];
|
|
2684
|
+
"writable": true;
|
|
2685
|
+
},
|
|
2626
2686
|
{
|
|
2627
2687
|
"name": "harvestVaultFundingAta";
|
|
2628
2688
|
"writable": true;
|
|
@@ -3526,6 +3586,24 @@ export type Xitadel = {
|
|
|
3526
3586
|
};
|
|
3527
3587
|
};
|
|
3528
3588
|
},
|
|
3589
|
+
{
|
|
3590
|
+
"name": "collateralTokenMint";
|
|
3591
|
+
},
|
|
3592
|
+
{
|
|
3593
|
+
"name": "priceFeed";
|
|
3594
|
+
},
|
|
3595
|
+
{
|
|
3596
|
+
"name": "chainlinkProgram";
|
|
3597
|
+
},
|
|
3598
|
+
{
|
|
3599
|
+
"name": "verifierAccount";
|
|
3600
|
+
},
|
|
3601
|
+
{
|
|
3602
|
+
"name": "accessController";
|
|
3603
|
+
},
|
|
3604
|
+
{
|
|
3605
|
+
"name": "configAccount";
|
|
3606
|
+
},
|
|
3529
3607
|
{
|
|
3530
3608
|
"name": "tokenAAccount";
|
|
3531
3609
|
"docs": [
|
|
@@ -3622,7 +3700,12 @@ export type Xitadel = {
|
|
|
3622
3700
|
"address": "cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG";
|
|
3623
3701
|
}
|
|
3624
3702
|
];
|
|
3625
|
-
"args": [
|
|
3703
|
+
"args": [
|
|
3704
|
+
{
|
|
3705
|
+
"name": "signedReport";
|
|
3706
|
+
"type": "bytes";
|
|
3707
|
+
}
|
|
3708
|
+
];
|
|
3626
3709
|
},
|
|
3627
3710
|
{
|
|
3628
3711
|
"name": "redeem";
|
|
@@ -4679,6 +4762,10 @@ export type Xitadel = {
|
|
|
4679
4762
|
104
|
|
4680
4763
|
];
|
|
4681
4764
|
"accounts": [
|
|
4765
|
+
{
|
|
4766
|
+
"name": "signer";
|
|
4767
|
+
"signer": true;
|
|
4768
|
+
},
|
|
4682
4769
|
{
|
|
4683
4770
|
"name": "config";
|
|
4684
4771
|
"pda": {
|
|
@@ -4911,12 +4998,35 @@ export type Xitadel = {
|
|
|
4911
4998
|
"name": "fundingTokenMint";
|
|
4912
4999
|
"writable": true;
|
|
4913
5000
|
},
|
|
5001
|
+
{
|
|
5002
|
+
"name": "collateralTokenMint";
|
|
5003
|
+
},
|
|
5004
|
+
{
|
|
5005
|
+
"name": "priceFeed";
|
|
5006
|
+
},
|
|
5007
|
+
{
|
|
5008
|
+
"name": "chainlinkProgram";
|
|
5009
|
+
},
|
|
5010
|
+
{
|
|
5011
|
+
"name": "verifierAccount";
|
|
5012
|
+
},
|
|
5013
|
+
{
|
|
5014
|
+
"name": "accessController";
|
|
5015
|
+
},
|
|
5016
|
+
{
|
|
5017
|
+
"name": "configAccount";
|
|
5018
|
+
},
|
|
4914
5019
|
{
|
|
4915
5020
|
"name": "systemProgram";
|
|
4916
5021
|
"address": "11111111111111111111111111111111";
|
|
4917
5022
|
}
|
|
4918
5023
|
];
|
|
4919
|
-
"args": [
|
|
5024
|
+
"args": [
|
|
5025
|
+
{
|
|
5026
|
+
"name": "signedReport";
|
|
5027
|
+
"type": "bytes";
|
|
5028
|
+
}
|
|
5029
|
+
];
|
|
4920
5030
|
},
|
|
4921
5031
|
{
|
|
4922
5032
|
"name": "withdrawCollateral";
|
|
@@ -5981,8 +6091,13 @@ export type Xitadel = {
|
|
|
5981
6091
|
"type": "u64";
|
|
5982
6092
|
},
|
|
5983
6093
|
{
|
|
5984
|
-
"name": "
|
|
5985
|
-
"type":
|
|
6094
|
+
"name": "reserved1";
|
|
6095
|
+
"type": {
|
|
6096
|
+
"array": [
|
|
6097
|
+
"u8",
|
|
6098
|
+
8
|
|
6099
|
+
];
|
|
6100
|
+
};
|
|
5986
6101
|
},
|
|
5987
6102
|
{
|
|
5988
6103
|
"name": "stableInterestAmount";
|
|
@@ -6108,10 +6223,6 @@ export type Xitadel = {
|
|
|
6108
6223
|
"name": "maxAllowedLtvPct";
|
|
6109
6224
|
"type": "u64";
|
|
6110
6225
|
},
|
|
6111
|
-
{
|
|
6112
|
-
"name": "collateralAmount";
|
|
6113
|
-
"type": "u64";
|
|
6114
|
-
},
|
|
6115
6226
|
{
|
|
6116
6227
|
"name": "issuer";
|
|
6117
6228
|
"type": "pubkey";
|