@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.
Files changed (84) hide show
  1. package/.DS_Store +0 -0
  2. package/dist/index.d.mts +148 -2
  3. package/dist/index.d.ts +148 -2
  4. package/dist/index.js +355 -6
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.mjs +355 -6
  7. package/dist/index.mjs.map +1 -1
  8. package/docs/.nojekyll +1 -0
  9. package/docs/assets/hierarchy.js +1 -0
  10. package/docs/assets/highlight.css +92 -0
  11. package/docs/assets/icons.js +18 -0
  12. package/docs/assets/icons.svg +1 -0
  13. package/docs/assets/main.js +60 -0
  14. package/docs/assets/navigation.js +1 -0
  15. package/docs/assets/search.js +1 -0
  16. package/docs/assets/style.css +1633 -0
  17. package/docs/functions/borrowV1.html +1 -0
  18. package/docs/functions/borrowV2.html +1 -0
  19. package/docs/functions/closePositionEvm.html +9 -0
  20. package/docs/functions/closeTradeV1.html +17 -0
  21. package/docs/functions/closeTradeV2.html +18 -0
  22. package/docs/functions/createTpDelegate.html +17 -0
  23. package/docs/functions/getActiveLoanCountEvm.html +8 -0
  24. package/docs/functions/getActiveLoansBatchEvm.html +10 -0
  25. package/docs/functions/getAllPositions.html +17 -0
  26. package/docs/functions/getAvailableExposureEvm.html +9 -0
  27. package/docs/functions/getClosedPositions.html +7 -0
  28. package/docs/functions/getClosedPositionsEvm.html +9 -0
  29. package/docs/functions/getCollateralExposureEvm.html +9 -0
  30. package/docs/functions/getCollateralInfoEvm.html +9 -0
  31. package/docs/functions/getDelegateAccounts.html +13 -0
  32. package/docs/functions/getLiquidatedPositions.html +13 -0
  33. package/docs/functions/getLiquidatedPositionsEvm.html +9 -0
  34. package/docs/functions/getLoanEvm.html +9 -0
  35. package/docs/functions/getLoansByBorrowerEvm.html +9 -0
  36. package/docs/functions/getOffers.html +7 -0
  37. package/docs/functions/getOffersEvm.html +9 -0
  38. package/docs/functions/getOpenPositions.html +11 -0
  39. package/docs/functions/getOpeningFeeEvm.html +8 -0
  40. package/docs/functions/getPda.html +8 -0
  41. package/docs/functions/getPositionAccountPDA.html +9 -0
  42. package/docs/functions/getPositionsEvm.html +8 -0
  43. package/docs/functions/getProfitFeeEvm.html +8 -0
  44. package/docs/functions/getTokenBalanceEvm.html +8 -0
  45. package/docs/functions/getUserLoansEvm.html +9 -0
  46. package/docs/functions/lending.addToWithdrawalAccessList.html +1 -0
  47. package/docs/functions/lending.createOffer.html +15 -0
  48. package/docs/functions/lending.depositFunds.html +17 -0
  49. package/docs/functions/lending.getNodeWalletPDA.html +9 -0
  50. package/docs/functions/lending.getTradingPoolPDA.html +9 -0
  51. package/docs/functions/lending.getWithdrawalAccessList.html +1 -0
  52. package/docs/functions/lending.getWithdrawalAccessListPDA.html +1 -0
  53. package/docs/functions/lending.removeFromWithdrawalAccessList.html +1 -0
  54. package/docs/functions/lending.updateInterestRate.html +13 -0
  55. package/docs/functions/lending.updateMaxBorrow.html +13 -0
  56. package/docs/functions/lending.updateMaxExposure.html +13 -0
  57. package/docs/functions/lending.updateOffer.html +19 -0
  58. package/docs/functions/lending.withdrawFunds.html +20 -0
  59. package/docs/functions/lending.withdrawFundsV1.html +16 -0
  60. package/docs/functions/lending.withdrawFundsV2.html +19 -0
  61. package/docs/functions/liquidatePositionEvm.html +6 -0
  62. package/docs/functions/mergePositionV2.html +13 -0
  63. package/docs/functions/modifyTpDelegate.html +17 -0
  64. package/docs/functions/openPositionEvm.html +9 -0
  65. package/docs/functions/openTradeV1.html +26 -0
  66. package/docs/functions/openTradeV2.html +29 -0
  67. package/docs/functions/partialRepayV1.html +10 -0
  68. package/docs/functions/partialRepayV2.html +10 -0
  69. package/docs/functions/removeTpDelegate.html +13 -0
  70. package/docs/functions/splitPositionV2.html +13 -0
  71. package/docs/functions/updateMaxLendPerTokenBatchEvm.html +9 -0
  72. package/docs/hierarchy.html +1 -0
  73. package/docs/index.html +3 -0
  74. package/docs/modules/IDLV2.html +2 -0
  75. package/docs/modules/lending.html +1 -0
  76. package/docs/modules.html +4 -0
  77. package/docs/types/IDLV2.Lavarage.html +8 -0
  78. package/docs/types/Lavarage.html +8 -0
  79. package/docs/variables/IDL.html +1 -0
  80. package/docs/variables/IDLV2.IDL.html +1 -0
  81. package/idl/lavarage.ts +126 -0
  82. package/idl/lavaragev2.ts +166 -0
  83. package/index.ts +437 -176
  84. 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
  *