import { BigNumber, providers } from 'ethers'; import BaseService from '../commons/BaseService'; import { eEthereumTxType, EthereumTransactionTypeExtended, tEthereumAddress, transactionType } from '../commons/types'; import { ERC20_2612Interface } from '../erc20-2612'; import { IERC20ServiceInterface } from '../erc20-contract'; import { IERC721ServiceInterface } from '../erc721-contract'; import { WETHGatewayInterface } from '../wethgateway-contract'; import { WPunkGatewayInterface } from '../wpunkgateway-contract'; import { LPAcceptBidWithCredit, LPAuction, LPBatchBuyWithCredit, LPBorrowParamsType, LPBuyWithCredit, LPERC721LiquidationCall, LPFlashClaim, LPLiquidationCall, LPLiquidationERC721, LPRepayParamsType, LPRepayWithPermitParamsType, LPRepayWithPTokensType, LPSetERC721UsageAsCollateral, LPSetUsageAsCollateral, LPSignERC20ApprovalType, LPSupplyERC721ParamsType, LPSupplyParamsType, LPSupplyWithPermitType, LPWithdrawERC721ParamsType, LPWithdrawParamsType } from './lendingPoolTypes'; import { ApeCoinStaking, DataTypes, IPool } from './typechain/IPool'; import ApeCompoundStrategyStruct = DataTypes.ApeCompoundStrategyStruct; export declare type BatchEventResultMap = Record; export declare type BatchEventResultCallback = (resultMap: BatchEventResultMap, finished: boolean) => void; export interface PoolInterface { supply: (args: LPSupplyParamsType) => Promise; supplyERC721: (args: LPSupplyERC721ParamsType) => Promise; signERC20Approval: (args: LPSignERC20ApprovalType) => Promise; supplyWithPermit: (args: LPSupplyWithPermitType) => Promise; withdraw: (args: LPWithdrawParamsType) => Promise; withdrawERC721: (args: LPWithdrawERC721ParamsType) => Promise; borrow: (args: LPBorrowParamsType) => Promise; repay: (args: LPRepayParamsType) => Promise; repayWithPermit: (args: LPRepayWithPermitParamsType) => Promise; setUsageAsCollateral: (args: LPSetUsageAsCollateral) => Promise; setUserUseERC721AsCollateral: (args: LPSetERC721UsageAsCollateral) => Promise; flashClaim: (args: LPFlashClaim) => Promise; buyWithCredit: (args: LPBuyWithCredit) => Promise; batchBuyWithCredit: (args: LPBatchBuyWithCredit) => Promise; startAuction: (args: LPAuction) => Promise; endAuction: (args: LPAuction) => Promise; liquidationERC721: (args: LPLiquidationERC721) => Promise; } export declare type LendingPoolMarketConfigV3 = { POOL: tEthereumAddress; WETH_GATEWAY?: tEthereumAddress; CrytoPunkAddress?: tEthereumAddress; WpunkGatewayAddress?: tEthereumAddress; }; export declare type FulfillmentComponent = { orderIndex: number; itemIndex: number; }; export declare type Fulfillment = { offerComponents: FulfillmentComponent[]; considerationComponents: FulfillmentComponent[]; }; export declare class Pool extends BaseService implements PoolInterface { readonly erc20Service: IERC20ServiceInterface; readonly erc721Service: IERC721ServiceInterface; readonly poolAddress: string; readonly crytoPunkAddress: string; readonly wethGatewayService: WETHGatewayInterface; readonly wpunkGatewayService: WPunkGatewayInterface; readonly erc20_2612Service: ERC20_2612Interface; constructor(provider: providers.Provider, lendingPoolConfig?: LendingPoolMarketConfigV3); supply({ user, reserve, amount, onBehalfOf, referralCode }: LPSupplyParamsType): Promise; supplyERC721({ user, reserve, token_ids, onBehalfOf, referralCode, }: LPSupplyERC721ParamsType): Promise; signERC20Approval({ user, reserve, amount, deadline }: LPSignERC20ApprovalType): Promise; supplyWithPermit({ user, reserve, onBehalfOf, amount, referralCode, signature, deadline, }: LPSupplyWithPermitType): Promise; withdraw({ user, reserve, amount, onBehalfOf, aTokenAddress }: LPWithdrawParamsType): Promise; withdrawERC721({ user, reserve, token_ids, onBehalfOf, xTokenAddress, }: LPWithdrawERC721ParamsType): Promise; borrow({ user, reserve, amount, debtTokenAddress, onBehalfOf, referralCode, }: LPBorrowParamsType): Promise; repay({ user, reserve, amount, onBehalfOf }: LPRepayParamsType): Promise; repayWithPTokens({ user, amount, reserve }: LPRepayWithPTokensType): Promise; repayWithPermit({ user, reserve, amount, onBehalfOf, signature, deadline, }: LPRepayWithPermitParamsType): Promise; setUsageAsCollateral({ user, reserve, usageAsCollateral }: LPSetUsageAsCollateral): Promise; setUserUseERC721AsCollateral({ user, reserve, tokenIds, usageAsCollateral, }: LPSetERC721UsageAsCollateral): Promise; liquidationCall({ liquidator, liquidatedUser, debtReserve, collateralReserve, purchaseAmount, getAToken, liquidateAll, }: LPLiquidationCall): Promise; liquidationERC721Call({ liquidator, liquidatedUser, debtReserve, collateralReserve, collateralTokenId, purchaseAmount, getNToken, liquidateAll, }: LPERC721LiquidationCall): Promise; flashClaim({ user, receiver, nftAssets, tokenIds, airdropContractAddr, airdropTokenTypes, airdropTokenAddrs, airdropTokenIds, airdropEncodedData, }: LPFlashClaim): Promise; getUserAccountData({ user }: { user: string; }): Promise<[BigNumber, BigNumber, BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { totalCollateralBase: BigNumber; totalDebtBase: BigNumber; availableBorrowsBase: BigNumber; currentLiquidationThreshold: BigNumber; ltv: BigNumber; healthFactor: BigNumber; erc721HealthFactor: BigNumber; }>; buyWithCredit({ marketProtocolAddr, marketPlaceType, marketProtocolData, onBehalfOf, buyNowAmount, payLaterAmount, }: LPBuyWithCredit): Promise; batchBuyWithCredit({ marketProtocolAddrs, marketPlaceTypes, marketProtocolData, onBehalfOf, buyNowAmount, payLaterAmount, }: LPBatchBuyWithCredit): Promise; acceptBidWithCredit({ orderProtocolData, acceptProtocolData, marketProtocolAddr, creditData, onBehalfOf, isCollectionBid, nftId, }: LPAcceptBidWithCredit): Promise; startAuction({ user, collateralAsset, collateralTokenId, from }: LPAuction): Promise; endAuction({ user, collateralAsset, collateralTokenId, from }: LPAuction): Promise; setAuctionValidityTime({ user, from }: { user: tEthereumAddress; from: tEthereumAddress; }): Promise; liquidationERC721({ from, user, collateralAsset, collateralTokenId, liquidationAmount, receiveNToken, }: LPLiquidationERC721): Promise; getUserConfiguration({ user }: { user: tEthereumAddress; }): Promise; getAuctionData({ asset, tokenId, }: { asset: string; tokenId: string; }): Promise; decreaseLiquidity({ asset, tokenId, liquidityDecrease, amount0Min, amount1Min, onBehalfOf, receiveETHAsWETH, }: { asset: string; tokenId: string; liquidityDecrease: string; amount0Min: string; amount1Min: string; onBehalfOf: string; receiveETHAsWETH: boolean; }): EthereumTransactionTypeExtended; depositApeCoin({ address, apeCoinAddress, tokenId, borrowAmount, cashAmount, bakcTokenId, bakcBorrowAmount, bakcCashAmount, user, }: { address: string; apeCoinAddress: string; tokenId: number; borrowAmount: number; cashAmount: number; bakcTokenId?: number; bakcBorrowAmount?: number; bakcCashAmount?: number; user: string; }): EthereumTransactionTypeExtended; withdrawApeCoin(address: string, nfts: ApeCoinStaking.SingleNftStruct[], user: string): EthereumTransactionTypeExtended; claimApecoin(address: string, tokenIds: number[], user: string): { tx: () => Promise; txType: eEthereumTxType; gas: import("../commons/types").GasResponse; }; unstakeApePositionAndRepay(address: string, tokenId: number, user: string): { tx: () => Promise; txType: eEthereumTxType; gas: import("../commons/types").GasResponse; }; withdrawBAKC(address: string, user: string, bakcPaired: { mainTokenId: number; bakcTokenId: number; amount: number; isUncommit: boolean; }): { tx: () => Promise; txType: eEthereumTxType; gas: import("../commons/types").GasResponse; }; claimBAKC(address: string, user: string, bakcPaired: Array<{ mainTokenId: number; bakcTokenId: number; }>): { tx: () => Promise; txType: eEthereumTxType; gas: import("../commons/types").GasResponse; }; getUserApeCompoundStrategy(user: string): Promise; /** * * @param strategy * { * ty: 0; * swapTokenOut: 0 ; * uint256 swapPercent: 0.6 * 10000; * } */ setApeCompoundStrategy(strategy: ApeCompoundStrategyStruct, user: string): { tx: () => Promise; txType: eEthereumTxType; gas: import("../commons/types").GasResponse; }; movePositionFromBendDAO(loanIds: string[], user: string): { tx: () => Promise; txType: eEthereumTxType; gas: import("../commons/types").GasResponse; }; getReserveData(asset: string): Promise; initiateBlurExchangeRequest(blurBuyWithCreditRequestStructs: DataTypes.BlurBuyWithCreditRequestStruct[], user: string): Promise<{ tx: () => Promise; txType: eEthereumTxType; gas: import("../commons/types").GasResponse; }>; listenBlurExchangeRequestResultEvent(list: Array<{ collection: string; tokenId: number; }>, callback: BatchEventResultCallback): void; getReserveDataInBatch(assets: string[]): Promise; initiateAcceptBlurBidsRequest(requests: DataTypes.AcceptBlurBidsRequestStruct[], user: string): { tx: () => Promise; txType: eEthereumTxType; gas: import("../commons/types").GasResponse; }; fulfillAcceptBlurBidsRequest(requests: DataTypes.AcceptBlurBidsRequestStruct[], user: string): { tx: () => Promise; txType: eEthereumTxType; gas: import("../commons/types").GasResponse; }; rejectAcceptBlurBidsRequest(requests: DataTypes.AcceptBlurBidsRequestStruct[], user: string): { tx: () => Promise; txType: eEthereumTxType; gas: import("../commons/types").GasResponse; }; getAcceptBlurBidsRequestStatus(request: DataTypes.AcceptBlurBidsRequestStruct): Promise; } //# sourceMappingURL=index.d.ts.map