@lavarage/sdk 7.5.7 → 7.5.9
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/.DS_Store +0 -0
- package/dist/index.d.mts +148 -2
- package/dist/index.d.ts +148 -2
- package/dist/index.js +355 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +355 -6
- package/dist/index.mjs.map +1 -1
- package/docs/.nojekyll +1 -0
- package/docs/assets/hierarchy.js +1 -0
- package/docs/assets/highlight.css +92 -0
- package/docs/assets/icons.js +18 -0
- package/docs/assets/icons.svg +1 -0
- package/docs/assets/main.js +60 -0
- package/docs/assets/navigation.js +1 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1633 -0
- package/docs/functions/borrowV1.html +1 -0
- package/docs/functions/borrowV2.html +1 -0
- package/docs/functions/closePositionEvm.html +9 -0
- package/docs/functions/closeTradeV1.html +17 -0
- package/docs/functions/closeTradeV2.html +18 -0
- package/docs/functions/createTpDelegate.html +17 -0
- package/docs/functions/getActiveLoanCountEvm.html +8 -0
- package/docs/functions/getActiveLoansBatchEvm.html +10 -0
- package/docs/functions/getAllPositions.html +17 -0
- package/docs/functions/getAvailableExposureEvm.html +9 -0
- package/docs/functions/getClosedPositions.html +7 -0
- package/docs/functions/getClosedPositionsEvm.html +9 -0
- package/docs/functions/getCollateralExposureEvm.html +9 -0
- package/docs/functions/getCollateralInfoEvm.html +9 -0
- package/docs/functions/getDelegateAccounts.html +13 -0
- package/docs/functions/getLiquidatedPositions.html +13 -0
- package/docs/functions/getLiquidatedPositionsEvm.html +9 -0
- package/docs/functions/getLoanEvm.html +9 -0
- package/docs/functions/getLoansByBorrowerEvm.html +9 -0
- package/docs/functions/getOffers.html +7 -0
- package/docs/functions/getOffersEvm.html +9 -0
- package/docs/functions/getOpenPositions.html +11 -0
- package/docs/functions/getOpeningFeeEvm.html +8 -0
- package/docs/functions/getPda.html +8 -0
- package/docs/functions/getPositionAccountPDA.html +9 -0
- package/docs/functions/getPositionsEvm.html +8 -0
- package/docs/functions/getProfitFeeEvm.html +8 -0
- package/docs/functions/getTokenBalanceEvm.html +8 -0
- package/docs/functions/getUserLoansEvm.html +9 -0
- package/docs/functions/lending.addToWithdrawalAccessList.html +1 -0
- package/docs/functions/lending.createOffer.html +15 -0
- package/docs/functions/lending.depositFunds.html +17 -0
- package/docs/functions/lending.getNodeWalletPDA.html +9 -0
- package/docs/functions/lending.getTradingPoolPDA.html +9 -0
- package/docs/functions/lending.getWithdrawalAccessList.html +1 -0
- package/docs/functions/lending.getWithdrawalAccessListPDA.html +1 -0
- package/docs/functions/lending.removeFromWithdrawalAccessList.html +1 -0
- package/docs/functions/lending.updateInterestRate.html +13 -0
- package/docs/functions/lending.updateMaxBorrow.html +13 -0
- package/docs/functions/lending.updateMaxExposure.html +13 -0
- package/docs/functions/lending.updateOffer.html +19 -0
- package/docs/functions/lending.withdrawFunds.html +20 -0
- package/docs/functions/lending.withdrawFundsV1.html +16 -0
- package/docs/functions/lending.withdrawFundsV2.html +19 -0
- package/docs/functions/liquidatePositionEvm.html +6 -0
- package/docs/functions/mergePositionV2.html +13 -0
- package/docs/functions/modifyTpDelegate.html +17 -0
- package/docs/functions/openPositionEvm.html +9 -0
- package/docs/functions/openTradeV1.html +26 -0
- package/docs/functions/openTradeV2.html +29 -0
- package/docs/functions/partialRepayV1.html +10 -0
- package/docs/functions/partialRepayV2.html +10 -0
- package/docs/functions/removeTpDelegate.html +13 -0
- package/docs/functions/splitPositionV2.html +13 -0
- package/docs/functions/updateMaxLendPerTokenBatchEvm.html +9 -0
- package/docs/hierarchy.html +1 -0
- package/docs/index.html +3 -0
- package/docs/modules/IDLV2.html +2 -0
- package/docs/modules/lending.html +1 -0
- package/docs/modules.html +4 -0
- package/docs/types/IDLV2.Lavarage.html +8 -0
- package/docs/types/Lavarage.html +8 -0
- package/docs/variables/IDL.html +1 -0
- package/docs/variables/IDLV2.IDL.html +1 -0
- package/idl/lavarage.ts +126 -0
- package/idl/lavaragev2.ts +166 -0
- package/index.ts +437 -176
- package/package.json +2 -2
package/.DS_Store
ADDED
|
Binary file
|
package/dist/index.d.mts
CHANGED
|
@@ -692,6 +692,69 @@ type Lavarage$1 = {
|
|
|
692
692
|
}
|
|
693
693
|
];
|
|
694
694
|
},
|
|
695
|
+
{
|
|
696
|
+
"name": "tradingCloseRepaySolWithReferral";
|
|
697
|
+
"accounts": [
|
|
698
|
+
{
|
|
699
|
+
"name": "positionAccount";
|
|
700
|
+
"isMut": true;
|
|
701
|
+
"isSigner": false;
|
|
702
|
+
},
|
|
703
|
+
{
|
|
704
|
+
"name": "trader";
|
|
705
|
+
"isMut": true;
|
|
706
|
+
"isSigner": true;
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
"name": "tradingPool";
|
|
710
|
+
"isMut": true;
|
|
711
|
+
"isSigner": false;
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
"name": "nodeWallet";
|
|
715
|
+
"isMut": true;
|
|
716
|
+
"isSigner": false;
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
"name": "systemProgram";
|
|
720
|
+
"isMut": false;
|
|
721
|
+
"isSigner": false;
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
"name": "clock";
|
|
725
|
+
"isMut": false;
|
|
726
|
+
"isSigner": false;
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
"name": "randomAccountAsId";
|
|
730
|
+
"isMut": false;
|
|
731
|
+
"isSigner": false;
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
"name": "feeReceipient";
|
|
735
|
+
"isMut": true;
|
|
736
|
+
"isSigner": false;
|
|
737
|
+
}
|
|
738
|
+
];
|
|
739
|
+
"args": [
|
|
740
|
+
{
|
|
741
|
+
"name": "closingPositionSize";
|
|
742
|
+
"type": "u64";
|
|
743
|
+
},
|
|
744
|
+
{
|
|
745
|
+
"name": "closeType";
|
|
746
|
+
"type": "u64";
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
"name": "discountBps";
|
|
750
|
+
"type": "u64";
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
"name": "referralBps";
|
|
754
|
+
"type": "u64";
|
|
755
|
+
}
|
|
756
|
+
];
|
|
757
|
+
},
|
|
695
758
|
{
|
|
696
759
|
"name": "tradingClosePartialRepaySol";
|
|
697
760
|
"accounts": [
|
|
@@ -2371,6 +2434,89 @@ type Lavarage = {
|
|
|
2371
2434
|
}
|
|
2372
2435
|
];
|
|
2373
2436
|
},
|
|
2437
|
+
{
|
|
2438
|
+
"name": "tradingCloseRepaySolWithReferral";
|
|
2439
|
+
"accounts": [
|
|
2440
|
+
{
|
|
2441
|
+
"name": "positionAccount";
|
|
2442
|
+
"isMut": true;
|
|
2443
|
+
"isSigner": false;
|
|
2444
|
+
},
|
|
2445
|
+
{
|
|
2446
|
+
"name": "trader";
|
|
2447
|
+
"isMut": true;
|
|
2448
|
+
"isSigner": true;
|
|
2449
|
+
},
|
|
2450
|
+
{
|
|
2451
|
+
"name": "tradingPool";
|
|
2452
|
+
"isMut": true;
|
|
2453
|
+
"isSigner": false;
|
|
2454
|
+
},
|
|
2455
|
+
{
|
|
2456
|
+
"name": "nodeWallet";
|
|
2457
|
+
"isMut": true;
|
|
2458
|
+
"isSigner": false;
|
|
2459
|
+
},
|
|
2460
|
+
{
|
|
2461
|
+
"name": "systemProgram";
|
|
2462
|
+
"isMut": false;
|
|
2463
|
+
"isSigner": false;
|
|
2464
|
+
},
|
|
2465
|
+
{
|
|
2466
|
+
"name": "clock";
|
|
2467
|
+
"isMut": false;
|
|
2468
|
+
"isSigner": false;
|
|
2469
|
+
},
|
|
2470
|
+
{
|
|
2471
|
+
"name": "randomAccountAsId";
|
|
2472
|
+
"isMut": false;
|
|
2473
|
+
"isSigner": false;
|
|
2474
|
+
},
|
|
2475
|
+
{
|
|
2476
|
+
"name": "mint";
|
|
2477
|
+
"isMut": false;
|
|
2478
|
+
"isSigner": false;
|
|
2479
|
+
},
|
|
2480
|
+
{
|
|
2481
|
+
"name": "fromTokenAccount";
|
|
2482
|
+
"isMut": true;
|
|
2483
|
+
"isSigner": false;
|
|
2484
|
+
},
|
|
2485
|
+
{
|
|
2486
|
+
"name": "toTokenAccount";
|
|
2487
|
+
"isMut": true;
|
|
2488
|
+
"isSigner": false;
|
|
2489
|
+
},
|
|
2490
|
+
{
|
|
2491
|
+
"name": "feeTokenAccount";
|
|
2492
|
+
"isMut": true;
|
|
2493
|
+
"isSigner": false;
|
|
2494
|
+
},
|
|
2495
|
+
{
|
|
2496
|
+
"name": "tokenProgram";
|
|
2497
|
+
"isMut": false;
|
|
2498
|
+
"isSigner": false;
|
|
2499
|
+
}
|
|
2500
|
+
];
|
|
2501
|
+
"args": [
|
|
2502
|
+
{
|
|
2503
|
+
"name": "closingPositionSize";
|
|
2504
|
+
"type": "u64";
|
|
2505
|
+
},
|
|
2506
|
+
{
|
|
2507
|
+
"name": "closeType";
|
|
2508
|
+
"type": "u64";
|
|
2509
|
+
},
|
|
2510
|
+
{
|
|
2511
|
+
"name": "discountBps";
|
|
2512
|
+
"type": "u64";
|
|
2513
|
+
},
|
|
2514
|
+
{
|
|
2515
|
+
"name": "referralBps";
|
|
2516
|
+
"type": "u64";
|
|
2517
|
+
}
|
|
2518
|
+
];
|
|
2519
|
+
},
|
|
2374
2520
|
{
|
|
2375
2521
|
"name": "tradingPartialRepaySol";
|
|
2376
2522
|
"accounts": [
|
|
@@ -5041,7 +5187,7 @@ declare const closeTradeV1: (lavarageProgram: Program<Lavarage$1>, position: Pro
|
|
|
5041
5187
|
tokenLedgerInstruction?: Record<string, unknown>;
|
|
5042
5188
|
};
|
|
5043
5189
|
quoteResponse: any;
|
|
5044
|
-
}, partnerFeeRecipient?: PublicKey, partnerFeeMarkup?: number, computeBudgetMicroLamports?: number, platformFeeRecipient?: PublicKey, splitTransactions?: boolean) => Promise<VersionedTransaction | VersionedTransaction[]>;
|
|
5190
|
+
}, partnerFeeRecipient?: PublicKey, partnerFeeMarkup?: number, computeBudgetMicroLamports?: number, platformFeeRecipient?: PublicKey, splitTransactions?: boolean, discountBps?: number, referralBps?: number) => Promise<VersionedTransaction | VersionedTransaction[]>;
|
|
5045
5191
|
/**
|
|
5046
5192
|
* Closes a trading position on Lavarage V2
|
|
5047
5193
|
*
|
|
@@ -5096,7 +5242,7 @@ declare const closeTradeV2: (lavarageProgram: Program<Lavarage>, position: Progr
|
|
|
5096
5242
|
tokenLedgerInstruction?: Record<string, unknown>;
|
|
5097
5243
|
};
|
|
5098
5244
|
quoteResponse: any;
|
|
5099
|
-
}, quoteToken: PublicKey, partnerFeeRecipient?: PublicKey, partnerFeeMarkup?: number, computeBudgetMicroLamports?: number, platformFeeRecipient?: PublicKey, splitTransactions?: boolean) => Promise<VersionedTransaction | VersionedTransaction[]>;
|
|
5245
|
+
}, quoteToken: PublicKey, partnerFeeRecipient?: PublicKey, partnerFeeMarkup?: number, computeBudgetMicroLamports?: number, platformFeeRecipient?: PublicKey, splitTransactions?: boolean, discountBps?: number, referralBps?: number) => Promise<VersionedTransaction | VersionedTransaction[]>;
|
|
5100
5246
|
/**
|
|
5101
5247
|
* Retrieves delegate accounts for automated position management
|
|
5102
5248
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -692,6 +692,69 @@ type Lavarage$1 = {
|
|
|
692
692
|
}
|
|
693
693
|
];
|
|
694
694
|
},
|
|
695
|
+
{
|
|
696
|
+
"name": "tradingCloseRepaySolWithReferral";
|
|
697
|
+
"accounts": [
|
|
698
|
+
{
|
|
699
|
+
"name": "positionAccount";
|
|
700
|
+
"isMut": true;
|
|
701
|
+
"isSigner": false;
|
|
702
|
+
},
|
|
703
|
+
{
|
|
704
|
+
"name": "trader";
|
|
705
|
+
"isMut": true;
|
|
706
|
+
"isSigner": true;
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
"name": "tradingPool";
|
|
710
|
+
"isMut": true;
|
|
711
|
+
"isSigner": false;
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
"name": "nodeWallet";
|
|
715
|
+
"isMut": true;
|
|
716
|
+
"isSigner": false;
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
"name": "systemProgram";
|
|
720
|
+
"isMut": false;
|
|
721
|
+
"isSigner": false;
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
"name": "clock";
|
|
725
|
+
"isMut": false;
|
|
726
|
+
"isSigner": false;
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
"name": "randomAccountAsId";
|
|
730
|
+
"isMut": false;
|
|
731
|
+
"isSigner": false;
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
"name": "feeReceipient";
|
|
735
|
+
"isMut": true;
|
|
736
|
+
"isSigner": false;
|
|
737
|
+
}
|
|
738
|
+
];
|
|
739
|
+
"args": [
|
|
740
|
+
{
|
|
741
|
+
"name": "closingPositionSize";
|
|
742
|
+
"type": "u64";
|
|
743
|
+
},
|
|
744
|
+
{
|
|
745
|
+
"name": "closeType";
|
|
746
|
+
"type": "u64";
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
"name": "discountBps";
|
|
750
|
+
"type": "u64";
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
"name": "referralBps";
|
|
754
|
+
"type": "u64";
|
|
755
|
+
}
|
|
756
|
+
];
|
|
757
|
+
},
|
|
695
758
|
{
|
|
696
759
|
"name": "tradingClosePartialRepaySol";
|
|
697
760
|
"accounts": [
|
|
@@ -2371,6 +2434,89 @@ type Lavarage = {
|
|
|
2371
2434
|
}
|
|
2372
2435
|
];
|
|
2373
2436
|
},
|
|
2437
|
+
{
|
|
2438
|
+
"name": "tradingCloseRepaySolWithReferral";
|
|
2439
|
+
"accounts": [
|
|
2440
|
+
{
|
|
2441
|
+
"name": "positionAccount";
|
|
2442
|
+
"isMut": true;
|
|
2443
|
+
"isSigner": false;
|
|
2444
|
+
},
|
|
2445
|
+
{
|
|
2446
|
+
"name": "trader";
|
|
2447
|
+
"isMut": true;
|
|
2448
|
+
"isSigner": true;
|
|
2449
|
+
},
|
|
2450
|
+
{
|
|
2451
|
+
"name": "tradingPool";
|
|
2452
|
+
"isMut": true;
|
|
2453
|
+
"isSigner": false;
|
|
2454
|
+
},
|
|
2455
|
+
{
|
|
2456
|
+
"name": "nodeWallet";
|
|
2457
|
+
"isMut": true;
|
|
2458
|
+
"isSigner": false;
|
|
2459
|
+
},
|
|
2460
|
+
{
|
|
2461
|
+
"name": "systemProgram";
|
|
2462
|
+
"isMut": false;
|
|
2463
|
+
"isSigner": false;
|
|
2464
|
+
},
|
|
2465
|
+
{
|
|
2466
|
+
"name": "clock";
|
|
2467
|
+
"isMut": false;
|
|
2468
|
+
"isSigner": false;
|
|
2469
|
+
},
|
|
2470
|
+
{
|
|
2471
|
+
"name": "randomAccountAsId";
|
|
2472
|
+
"isMut": false;
|
|
2473
|
+
"isSigner": false;
|
|
2474
|
+
},
|
|
2475
|
+
{
|
|
2476
|
+
"name": "mint";
|
|
2477
|
+
"isMut": false;
|
|
2478
|
+
"isSigner": false;
|
|
2479
|
+
},
|
|
2480
|
+
{
|
|
2481
|
+
"name": "fromTokenAccount";
|
|
2482
|
+
"isMut": true;
|
|
2483
|
+
"isSigner": false;
|
|
2484
|
+
},
|
|
2485
|
+
{
|
|
2486
|
+
"name": "toTokenAccount";
|
|
2487
|
+
"isMut": true;
|
|
2488
|
+
"isSigner": false;
|
|
2489
|
+
},
|
|
2490
|
+
{
|
|
2491
|
+
"name": "feeTokenAccount";
|
|
2492
|
+
"isMut": true;
|
|
2493
|
+
"isSigner": false;
|
|
2494
|
+
},
|
|
2495
|
+
{
|
|
2496
|
+
"name": "tokenProgram";
|
|
2497
|
+
"isMut": false;
|
|
2498
|
+
"isSigner": false;
|
|
2499
|
+
}
|
|
2500
|
+
];
|
|
2501
|
+
"args": [
|
|
2502
|
+
{
|
|
2503
|
+
"name": "closingPositionSize";
|
|
2504
|
+
"type": "u64";
|
|
2505
|
+
},
|
|
2506
|
+
{
|
|
2507
|
+
"name": "closeType";
|
|
2508
|
+
"type": "u64";
|
|
2509
|
+
},
|
|
2510
|
+
{
|
|
2511
|
+
"name": "discountBps";
|
|
2512
|
+
"type": "u64";
|
|
2513
|
+
},
|
|
2514
|
+
{
|
|
2515
|
+
"name": "referralBps";
|
|
2516
|
+
"type": "u64";
|
|
2517
|
+
}
|
|
2518
|
+
];
|
|
2519
|
+
},
|
|
2374
2520
|
{
|
|
2375
2521
|
"name": "tradingPartialRepaySol";
|
|
2376
2522
|
"accounts": [
|
|
@@ -5041,7 +5187,7 @@ declare const closeTradeV1: (lavarageProgram: Program<Lavarage$1>, position: Pro
|
|
|
5041
5187
|
tokenLedgerInstruction?: Record<string, unknown>;
|
|
5042
5188
|
};
|
|
5043
5189
|
quoteResponse: any;
|
|
5044
|
-
}, partnerFeeRecipient?: PublicKey, partnerFeeMarkup?: number, computeBudgetMicroLamports?: number, platformFeeRecipient?: PublicKey, splitTransactions?: boolean) => Promise<VersionedTransaction | VersionedTransaction[]>;
|
|
5190
|
+
}, partnerFeeRecipient?: PublicKey, partnerFeeMarkup?: number, computeBudgetMicroLamports?: number, platformFeeRecipient?: PublicKey, splitTransactions?: boolean, discountBps?: number, referralBps?: number) => Promise<VersionedTransaction | VersionedTransaction[]>;
|
|
5045
5191
|
/**
|
|
5046
5192
|
* Closes a trading position on Lavarage V2
|
|
5047
5193
|
*
|
|
@@ -5096,7 +5242,7 @@ declare const closeTradeV2: (lavarageProgram: Program<Lavarage>, position: Progr
|
|
|
5096
5242
|
tokenLedgerInstruction?: Record<string, unknown>;
|
|
5097
5243
|
};
|
|
5098
5244
|
quoteResponse: any;
|
|
5099
|
-
}, quoteToken: PublicKey, partnerFeeRecipient?: PublicKey, partnerFeeMarkup?: number, computeBudgetMicroLamports?: number, platformFeeRecipient?: PublicKey, splitTransactions?: boolean) => Promise<VersionedTransaction | VersionedTransaction[]>;
|
|
5245
|
+
}, quoteToken: PublicKey, partnerFeeRecipient?: PublicKey, partnerFeeMarkup?: number, computeBudgetMicroLamports?: number, platformFeeRecipient?: PublicKey, splitTransactions?: boolean, discountBps?: number, referralBps?: number) => Promise<VersionedTransaction | VersionedTransaction[]>;
|
|
5100
5246
|
/**
|
|
5101
5247
|
* Retrieves delegate accounts for automated position management
|
|
5102
5248
|
*
|