import type { AssetsAdditionalInterest, LoanChange, LoanManagerUserLoan, LoanTypeInfo, UserLoanInfo, UserPoints } from "../../chains/evm/hub/types/loan.js"; import type { OraclePrice, OraclePrices } from "../../chains/evm/hub/types/oracle.js"; import type { PoolInfo } from "../../chains/evm/hub/types/pool.js"; import type { ActiveEpochsInfo } from "../../chains/evm/hub/types/rewards-v2.js"; import type { TokenRateLimit } from "../../chains/evm/spoke/types/pool.js"; import type { FolksChainId } from "../../common/types/chain.js"; import type { AccountId, LoanId, LoanName, LoanTypeId, Nonce } from "../../common/types/lending.js"; import type { MessageAdapters } from "../../common/types/message.js"; import type { PrepareBorrowCall, PrepareCreateLoanAndDepositCall, PrepareCreateLoanCall, PrepareDepositCall, PrepareLiquidateCall, PrepareRepayCall, PrepareRepayWithCollateralCall, PrepareSwitchBorrowTypeCall, PrepareUpdateUserPointsInLoansCall, PrepareWithdrawCall } from "../../common/types/module.js"; import type { FolksTokenId } from "../../common/types/token.js"; import type { Dnum } from "dnum"; export declare const prepare: { createLoan(accountId: AccountId, nonce: Nonce, loanTypeId: LoanTypeId, loanName: LoanName, adapters: MessageAdapters): Promise; deleteLoan(accountId: AccountId, loanId: LoanId, adapters: MessageAdapters): Promise; createLoanAndDeposit(accountId: AccountId, nonce: Nonce, loanTypeId: LoanTypeId, loanName: LoanName, folksTokenId: FolksTokenId, amount: bigint, adapters: MessageAdapters): Promise<{ msgValue: bigint; gasLimit: bigint; messageParams: import("../../common/types/message.js").MessageParams; spokeTokenData: import("../../common/types/token.js").SpokeTokenData; }>; deposit(accountId: AccountId, loanId: LoanId, loanTypeId: LoanTypeId, folksTokenId: FolksTokenId, amount: bigint, adapters: MessageAdapters): Promise; withdraw(accountId: AccountId, loanId: LoanId, folksTokenId: FolksTokenId, amount: bigint, isFAmount: boolean, receiverFolksChainId: FolksChainId, adapters: MessageAdapters): Promise; borrow(accountId: AccountId, loanId: LoanId, folksTokenId: FolksTokenId, amount: bigint, maxStableRate: bigint, receiverFolksChainId: FolksChainId, adapters: MessageAdapters): Promise; repay(accountId: AccountId, loanId: LoanId, loanTypeId: LoanTypeId, folksTokenId: FolksTokenId, amount: bigint, maxOverRepayment: bigint, adapters: MessageAdapters): Promise; repayWithCollateral(accountId: AccountId, loanId: LoanId, folksTokenId: FolksTokenId, amount: bigint, adapters: MessageAdapters): Promise; switchBorrowType(accountId: AccountId, loanId: LoanId, folksTokenId: FolksTokenId, maxStableRate: bigint, adapters: MessageAdapters): Promise; liquidate(accountId: AccountId, liquidatorLoanId: LoanId, violatorLoanId: LoanId, folksTokenIdToLiq: FolksTokenId, folksTokenIdToSeize: FolksTokenId, repayingAmount: bigint, minSeizedAmount: bigint): Promise; updateUserPointsInLoans(loanIds: Array): Promise; }; export declare const write: { createLoan(accountId: AccountId, nonce: Nonce, loanTypeId: LoanTypeId, loanName: LoanName, prepareCall: PrepareCreateLoanCall): Promise<`0x${string}`>; deleteLoan(accountId: AccountId, loanId: LoanId, prepareCall: PrepareCreateLoanCall): Promise<`0x${string}`>; createLoanAndDeposit(accountId: AccountId, nonce: Nonce, loanTypeId: LoanTypeId, loanName: LoanName, amount: bigint, includeApproval: boolean, prepareCall: PrepareCreateLoanAndDepositCall): Promise<`0x${string}`>; deposit(accountId: AccountId, loanId: LoanId, amount: bigint, includeApproval: boolean, prepareCall: PrepareDepositCall): Promise<`0x${string}`>; withdraw(accountId: AccountId, loanId: LoanId, folksTokenId: FolksTokenId, amount: bigint, isFAmount: boolean, receiverFolksChainId: FolksChainId, prepareCall: PrepareWithdrawCall): Promise<`0x${string}`>; borrow(accountId: AccountId, loanId: LoanId, folksTokenId: FolksTokenId, amount: bigint, maxStableRate: bigint, receiverFolksChainId: FolksChainId, prepareCall: PrepareBorrowCall): Promise<`0x${string}`>; repay(accountId: AccountId, loanId: LoanId, amount: bigint, maxOverRepayment: bigint, includeApproval: boolean, prepareCall: PrepareRepayCall): Promise<`0x${string}`>; repayWithCollateral(accountId: AccountId, loanId: LoanId, folksTokenId: FolksTokenId, amount: bigint, prepareCall: PrepareRepayWithCollateralCall): Promise<`0x${string}`>; switchBorrowType(accountId: AccountId, loanId: LoanId, folksTokenId: FolksTokenId, maxStableRate: bigint, prepareCall: PrepareSwitchBorrowTypeCall): Promise<`0x${string}`>; liquidate(accountId: AccountId, prepareCall: PrepareLiquidateCall): Promise<`0x${string}`>; updateUserPointsInLoans(loanIds: Array, prepareCall: PrepareUpdateUserPointsInLoansCall): Promise<`0x${string}`>; }; export declare const read: { rateLimit(folksTokenId: FolksTokenId, folksChainId: FolksChainId): Promise; loanTypeInfo(loanTypeId: LoanTypeId): Promise; userLoansIds(accountId: AccountId, loanTypeIdsFilter?: Array): Promise>>; userLoans(loanIds: Array, throwErrorOnInactiveLoan?: boolean): Promise>; userPoints(accountId: AccountId, loanIds: Array, loanTypesInfo: Partial>): Promise; }; export declare const util: { userLoansInfo(userLoansMap: Map, poolsInfo: Partial>, loanTypesInfo: Partial>, oraclePrices: OraclePrices, activeEpochsInfo?: ActiveEpochsInfo, additionalInterests?: AssetsAdditionalInterest): Record; emptyLoanForSimulate(accountId: AccountId, loanTypeId: LoanTypeId): LoanManagerUserLoan; simulateLoanChanges(loan: LoanManagerUserLoan, changes: Array): LoanManagerUserLoan; maxReduceCollateralForBorrowUtilisationRatio(loan: UserLoanInfo, reduceFolksTokenId: FolksTokenId, depositInterestIndex: Dnum, targetBorrowUtilisationRatio: Dnum): bigint; maxBorrowForBorrowUtilisationRatio(loan: UserLoanInfo, borrowFactor: Dnum, oraclePrice: OraclePrice, targetBorrowUtilisationRatio: Dnum): bigint; };