@lavarage/sdk 6.8.2 → 6.8.4

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/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Program, ProgramAccount, BN } from '@coral-xyz/anchor';
2
- import { PublicKey, Keypair, VersionedTransaction } from '@solana/web3.js';
2
+ import { PublicKey, VersionedTransaction, Keypair } from '@solana/web3.js';
3
3
  import { Provider, BigNumberish, ContractTransaction } from 'ethers';
4
4
 
5
5
  type Lavarage$1 = {
@@ -2852,6 +2852,77 @@ declare const updateMaxLendPerTokenBatchEvm: (provider: Provider, tokenHolderCon
2852
2852
  gasPrice?: string | number;
2853
2853
  }) => Promise<ContractTransaction>;
2854
2854
 
2855
+ declare function getNodeWalletPDA(operatorPublicKey: PublicKey, mintPublicKey: PublicKey, programId: PublicKey): PublicKey;
2856
+ declare function getTradingPoolPDA(poolOwnerPublicKey: PublicKey, tokenPublicKey: PublicKey, programId: PublicKey): PublicKey;
2857
+ declare function depositFunds(lavarageProgram: Program<Lavarage$1>, params: {
2858
+ nodeWallet: PublicKey;
2859
+ mint?: string;
2860
+ funder: PublicKey;
2861
+ amount: number;
2862
+ }): Promise<VersionedTransaction>;
2863
+ declare function withdrawFundsV1(lavarageProgram: Program<Lavarage$1>, params: {
2864
+ nodeWallet: PublicKey;
2865
+ funder: PublicKey;
2866
+ amount: number;
2867
+ }): Promise<VersionedTransaction>;
2868
+ declare function withdrawFundsV2(lavarageProgram: Program<Lavarage>, params: {
2869
+ nodeWallet: PublicKey;
2870
+ funder: PublicKey;
2871
+ mint: string;
2872
+ amount: number;
2873
+ fromTokenAccount?: PublicKey;
2874
+ toTokenAccount?: PublicKey;
2875
+ }): Promise<VersionedTransaction>;
2876
+ declare function withdrawFunds(lavarageProgram: Program<Lavarage$1> | Program<Lavarage>, params: {
2877
+ nodeWallet: PublicKey;
2878
+ funder: PublicKey;
2879
+ amount: number;
2880
+ mint?: string;
2881
+ fromTokenAccount?: PublicKey;
2882
+ toTokenAccount?: PublicKey;
2883
+ }): Promise<VersionedTransaction>;
2884
+ declare function createOffer(lavarageProgram: Program<Lavarage$1> | Program<Lavarage>, params: {
2885
+ tradingPool: PublicKey;
2886
+ poolOwner: PublicKey;
2887
+ mint?: string;
2888
+ interestRate: number;
2889
+ maxExposure: number;
2890
+ }): Promise<VersionedTransaction>;
2891
+ declare function updateMaxExposure(lavarageProgram: Program<Lavarage$1> | Program<Lavarage>, params: {
2892
+ tradingPool: PublicKey;
2893
+ nodeWallet: string;
2894
+ poolOwner: PublicKey;
2895
+ maxExposure: number;
2896
+ }): Promise<VersionedTransaction>;
2897
+ declare function updateInterestRate(lavarageProgram: Program<Lavarage$1> | Program<Lavarage>, params: {
2898
+ tradingPool: PublicKey;
2899
+ nodeWallet: string;
2900
+ poolOwner: PublicKey;
2901
+ interestRate: number;
2902
+ }): Promise<VersionedTransaction>;
2903
+ declare function updateOffer(lavarageProgram: Program<Lavarage$1> | Program<Lavarage>, params: {
2904
+ tradingPool: PublicKey;
2905
+ poolOwner: PublicKey;
2906
+ nodeWallet: string;
2907
+ mint: string;
2908
+ interestRate: number;
2909
+ maxExposure: number;
2910
+ }): Promise<VersionedTransaction>;
2911
+
2912
+ declare const lending_createOffer: typeof createOffer;
2913
+ declare const lending_depositFunds: typeof depositFunds;
2914
+ declare const lending_getNodeWalletPDA: typeof getNodeWalletPDA;
2915
+ declare const lending_getTradingPoolPDA: typeof getTradingPoolPDA;
2916
+ declare const lending_updateInterestRate: typeof updateInterestRate;
2917
+ declare const lending_updateMaxExposure: typeof updateMaxExposure;
2918
+ declare const lending_updateOffer: typeof updateOffer;
2919
+ declare const lending_withdrawFunds: typeof withdrawFunds;
2920
+ declare const lending_withdrawFundsV1: typeof withdrawFundsV1;
2921
+ declare const lending_withdrawFundsV2: typeof withdrawFundsV2;
2922
+ declare namespace lending {
2923
+ export { lending_createOffer as createOffer, lending_depositFunds as depositFunds, lending_getNodeWalletPDA as getNodeWalletPDA, lending_getTradingPoolPDA as getTradingPoolPDA, lending_updateInterestRate as updateInterestRate, lending_updateMaxExposure as updateMaxExposure, lending_updateOffer as updateOffer, lending_withdrawFunds as withdrawFunds, lending_withdrawFundsV1 as withdrawFundsV1, lending_withdrawFundsV2 as withdrawFundsV2 };
2924
+ }
2925
+
2855
2926
  declare function getPda(seed: Buffer | Buffer[], programId: PublicKey): PublicKey;
2856
2927
  declare function getPositionAccountPDA(lavarageProgram: Program<Lavarage$1> | Program<Lavarage>, offer: ProgramAccount, seed: PublicKey): PublicKey;
2857
2928
 
@@ -3053,4 +3124,4 @@ declare const mergePositionV2: (lavarageProgram: Program<Lavarage>, position1: P
3053
3124
  collateralType: PublicKey;
3054
3125
  }>, quoteToken: PublicKey) => Promise<VersionedTransaction>;
3055
3126
 
3056
- export { IDL$1 as IDL, lavaragev2 as IDLV2, type Lavarage$1 as Lavarage, closePositionEvm, closeTradeV1, closeTradeV2, createTpDelegate, getActiveLoanCountEvm, getActiveLoansBatchEvm, getAllPositions, getAvailableExposureEvm, getClosedPositions, getClosedPositionsEvm, getCollateralExposureEvm, getCollateralInfoEvm, getDelegateAccounts, getLiquidatedPositions, getLiquidatedPositionsEvm, getLoanEvm, getLoansByBorrowerEvm, getOffers, getOffersEvm, getOpenPositions, getOpeningFeeEvm, getPda, getPositionAccountPDA, getPositionsEvm, getProfitFeeEvm, getTokenBalanceEvm, getUserLoansEvm, mergePositionV2, modifyTpDelegate, openPositionEvm, openTradeV1, openTradeV2, partialRepayV1, partialRepayV2, removeTpDelegate, splitPositionV2, updateMaxLendPerTokenBatchEvm };
3127
+ export { IDL$1 as IDL, lavaragev2 as IDLV2, type Lavarage$1 as Lavarage, closePositionEvm, closeTradeV1, closeTradeV2, createTpDelegate, getActiveLoanCountEvm, getActiveLoansBatchEvm, getAllPositions, getAvailableExposureEvm, getClosedPositions, getClosedPositionsEvm, getCollateralExposureEvm, getCollateralInfoEvm, getDelegateAccounts, getLiquidatedPositions, getLiquidatedPositionsEvm, getLoanEvm, getLoansByBorrowerEvm, getOffers, getOffersEvm, getOpenPositions, getOpeningFeeEvm, getPda, getPositionAccountPDA, getPositionsEvm, getProfitFeeEvm, getTokenBalanceEvm, getUserLoansEvm, lending, mergePositionV2, modifyTpDelegate, openPositionEvm, openTradeV1, openTradeV2, partialRepayV1, partialRepayV2, removeTpDelegate, splitPositionV2, updateMaxLendPerTokenBatchEvm };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Program, ProgramAccount, BN } from '@coral-xyz/anchor';
2
- import { PublicKey, Keypair, VersionedTransaction } from '@solana/web3.js';
2
+ import { PublicKey, VersionedTransaction, Keypair } from '@solana/web3.js';
3
3
  import { Provider, BigNumberish, ContractTransaction } from 'ethers';
4
4
 
5
5
  type Lavarage$1 = {
@@ -2852,6 +2852,77 @@ declare const updateMaxLendPerTokenBatchEvm: (provider: Provider, tokenHolderCon
2852
2852
  gasPrice?: string | number;
2853
2853
  }) => Promise<ContractTransaction>;
2854
2854
 
2855
+ declare function getNodeWalletPDA(operatorPublicKey: PublicKey, mintPublicKey: PublicKey, programId: PublicKey): PublicKey;
2856
+ declare function getTradingPoolPDA(poolOwnerPublicKey: PublicKey, tokenPublicKey: PublicKey, programId: PublicKey): PublicKey;
2857
+ declare function depositFunds(lavarageProgram: Program<Lavarage$1>, params: {
2858
+ nodeWallet: PublicKey;
2859
+ mint?: string;
2860
+ funder: PublicKey;
2861
+ amount: number;
2862
+ }): Promise<VersionedTransaction>;
2863
+ declare function withdrawFundsV1(lavarageProgram: Program<Lavarage$1>, params: {
2864
+ nodeWallet: PublicKey;
2865
+ funder: PublicKey;
2866
+ amount: number;
2867
+ }): Promise<VersionedTransaction>;
2868
+ declare function withdrawFundsV2(lavarageProgram: Program<Lavarage>, params: {
2869
+ nodeWallet: PublicKey;
2870
+ funder: PublicKey;
2871
+ mint: string;
2872
+ amount: number;
2873
+ fromTokenAccount?: PublicKey;
2874
+ toTokenAccount?: PublicKey;
2875
+ }): Promise<VersionedTransaction>;
2876
+ declare function withdrawFunds(lavarageProgram: Program<Lavarage$1> | Program<Lavarage>, params: {
2877
+ nodeWallet: PublicKey;
2878
+ funder: PublicKey;
2879
+ amount: number;
2880
+ mint?: string;
2881
+ fromTokenAccount?: PublicKey;
2882
+ toTokenAccount?: PublicKey;
2883
+ }): Promise<VersionedTransaction>;
2884
+ declare function createOffer(lavarageProgram: Program<Lavarage$1> | Program<Lavarage>, params: {
2885
+ tradingPool: PublicKey;
2886
+ poolOwner: PublicKey;
2887
+ mint?: string;
2888
+ interestRate: number;
2889
+ maxExposure: number;
2890
+ }): Promise<VersionedTransaction>;
2891
+ declare function updateMaxExposure(lavarageProgram: Program<Lavarage$1> | Program<Lavarage>, params: {
2892
+ tradingPool: PublicKey;
2893
+ nodeWallet: string;
2894
+ poolOwner: PublicKey;
2895
+ maxExposure: number;
2896
+ }): Promise<VersionedTransaction>;
2897
+ declare function updateInterestRate(lavarageProgram: Program<Lavarage$1> | Program<Lavarage>, params: {
2898
+ tradingPool: PublicKey;
2899
+ nodeWallet: string;
2900
+ poolOwner: PublicKey;
2901
+ interestRate: number;
2902
+ }): Promise<VersionedTransaction>;
2903
+ declare function updateOffer(lavarageProgram: Program<Lavarage$1> | Program<Lavarage>, params: {
2904
+ tradingPool: PublicKey;
2905
+ poolOwner: PublicKey;
2906
+ nodeWallet: string;
2907
+ mint: string;
2908
+ interestRate: number;
2909
+ maxExposure: number;
2910
+ }): Promise<VersionedTransaction>;
2911
+
2912
+ declare const lending_createOffer: typeof createOffer;
2913
+ declare const lending_depositFunds: typeof depositFunds;
2914
+ declare const lending_getNodeWalletPDA: typeof getNodeWalletPDA;
2915
+ declare const lending_getTradingPoolPDA: typeof getTradingPoolPDA;
2916
+ declare const lending_updateInterestRate: typeof updateInterestRate;
2917
+ declare const lending_updateMaxExposure: typeof updateMaxExposure;
2918
+ declare const lending_updateOffer: typeof updateOffer;
2919
+ declare const lending_withdrawFunds: typeof withdrawFunds;
2920
+ declare const lending_withdrawFundsV1: typeof withdrawFundsV1;
2921
+ declare const lending_withdrawFundsV2: typeof withdrawFundsV2;
2922
+ declare namespace lending {
2923
+ export { lending_createOffer as createOffer, lending_depositFunds as depositFunds, lending_getNodeWalletPDA as getNodeWalletPDA, lending_getTradingPoolPDA as getTradingPoolPDA, lending_updateInterestRate as updateInterestRate, lending_updateMaxExposure as updateMaxExposure, lending_updateOffer as updateOffer, lending_withdrawFunds as withdrawFunds, lending_withdrawFundsV1 as withdrawFundsV1, lending_withdrawFundsV2 as withdrawFundsV2 };
2924
+ }
2925
+
2855
2926
  declare function getPda(seed: Buffer | Buffer[], programId: PublicKey): PublicKey;
2856
2927
  declare function getPositionAccountPDA(lavarageProgram: Program<Lavarage$1> | Program<Lavarage>, offer: ProgramAccount, seed: PublicKey): PublicKey;
2857
2928
 
@@ -3053,4 +3124,4 @@ declare const mergePositionV2: (lavarageProgram: Program<Lavarage>, position1: P
3053
3124
  collateralType: PublicKey;
3054
3125
  }>, quoteToken: PublicKey) => Promise<VersionedTransaction>;
3055
3126
 
3056
- export { IDL$1 as IDL, lavaragev2 as IDLV2, type Lavarage$1 as Lavarage, closePositionEvm, closeTradeV1, closeTradeV2, createTpDelegate, getActiveLoanCountEvm, getActiveLoansBatchEvm, getAllPositions, getAvailableExposureEvm, getClosedPositions, getClosedPositionsEvm, getCollateralExposureEvm, getCollateralInfoEvm, getDelegateAccounts, getLiquidatedPositions, getLiquidatedPositionsEvm, getLoanEvm, getLoansByBorrowerEvm, getOffers, getOffersEvm, getOpenPositions, getOpeningFeeEvm, getPda, getPositionAccountPDA, getPositionsEvm, getProfitFeeEvm, getTokenBalanceEvm, getUserLoansEvm, mergePositionV2, modifyTpDelegate, openPositionEvm, openTradeV1, openTradeV2, partialRepayV1, partialRepayV2, removeTpDelegate, splitPositionV2, updateMaxLendPerTokenBatchEvm };
3127
+ export { IDL$1 as IDL, lavaragev2 as IDLV2, type Lavarage$1 as Lavarage, closePositionEvm, closeTradeV1, closeTradeV2, createTpDelegate, getActiveLoanCountEvm, getActiveLoansBatchEvm, getAllPositions, getAvailableExposureEvm, getClosedPositions, getClosedPositionsEvm, getCollateralExposureEvm, getCollateralInfoEvm, getDelegateAccounts, getLiquidatedPositions, getLiquidatedPositionsEvm, getLoanEvm, getLoansByBorrowerEvm, getOffers, getOffersEvm, getOpenPositions, getOpeningFeeEvm, getPda, getPositionAccountPDA, getPositionsEvm, getProfitFeeEvm, getTokenBalanceEvm, getUserLoansEvm, lending, mergePositionV2, modifyTpDelegate, openPositionEvm, openTradeV1, openTradeV2, partialRepayV1, partialRepayV2, removeTpDelegate, splitPositionV2, updateMaxLendPerTokenBatchEvm };