import { SignatureLike } from '@ethersproject/bytes'; import { BigNumberish, BytesLike } from 'ethers'; import { tEthereumAddress } from '../commons/types'; import { MarketplaceIdMap } from '../commons/utils'; export type LPSupplyParamsType = { user: tEthereumAddress; reserve: tEthereumAddress; amount: string; onBehalfOf?: tEthereumAddress; referralCode?: string; }; export type LPSupplyERC721ParamsType = { user: tEthereumAddress; reserve: tEthereumAddress; token_ids: string[]; onBehalfOf?: tEthereumAddress; referralCode?: string; }; export type LPWithdrawParamsType = { user: tEthereumAddress; reserve: tEthereumAddress; amount: string; onBehalfOf?: tEthereumAddress; aTokenAddress?: tEthereumAddress; }; export type LPWithdrawERC721ParamsType = { user: tEthereumAddress; reserve: tEthereumAddress; token_ids: string[]; onBehalfOf?: tEthereumAddress; xTokenAddress?: tEthereumAddress; }; export type LPBorrowParamsType = { user: tEthereumAddress; reserve: tEthereumAddress; amount: string; debtTokenAddress?: tEthereumAddress; onBehalfOf?: tEthereumAddress; referralCode?: string; }; export type LPRepayParamsType = { user: tEthereumAddress; reserve: tEthereumAddress; amount: string; onBehalfOf?: tEthereumAddress; }; export type LPSetUsageAsCollateral = { user: tEthereumAddress; reserve: tEthereumAddress; usageAsCollateral: boolean; }; export type LPSetERC721UsageAsCollateral = { user: tEthereumAddress; reserve: tEthereumAddress; tokenIds: number[]; usageAsCollateral: boolean; }; export type LPLiquidationCall = { liquidator: tEthereumAddress; liquidatedUser: tEthereumAddress; debtReserve: tEthereumAddress; collateralReserve: tEthereumAddress; purchaseAmount: string; getAToken?: boolean; liquidateAll?: boolean; }; export type LPERC721LiquidationCall = { liquidator: tEthereumAddress; liquidatedUser: tEthereumAddress; debtReserve: tEthereumAddress; collateralReserve: tEthereumAddress; collateralTokenId: number; purchaseAmount: string; getNToken?: boolean; liquidateAll?: boolean; }; export type LPFlashClaim = { user: tEthereumAddress; receiver: tEthereumAddress; nftAssets: tEthereumAddress[]; tokenIds: number[][]; airdropContractAddr: tEthereumAddress; airdropTokenTypes: number[]; airdropTokenAddrs: tEthereumAddress[]; airdropTokenIds: number[]; airdropEncodedData: BytesLike; }; export type LPBuyWithCredit = { marketProtocolAddr: tEthereumAddress; marketPlaceType: keyof typeof MarketplaceIdMap; marketProtocolData: { parameters: { offerer: string; zone: string; offer: Array<{ itemType: BigNumberish; token: string; identifierOrCriteria: BigNumberish; startAmount: BigNumberish; endAmount: BigNumberish; }>; consideration: Array<{ itemType: BigNumberish; token: string; identifierOrCriteria: BigNumberish; startAmount: BigNumberish; endAmount: BigNumberish; recipient: string; }>; orderType: BigNumberish; startTime: BigNumberish; endTime: BigNumberish; zoneHash: BytesLike; salt: BigNumberish; conduitKey: BytesLike; totalOriginalConsiderationItems: BigNumberish; }; numerator: BigNumberish; denominator: BigNumberish; signature: BytesLike; extraData: BytesLike; }; onBehalfOf: tEthereumAddress; buyNowAmount: string; payLaterAmount: string; isNToken?: boolean; }; export type LPBatchBuyWithCredit = { marketProtocolAddrs: tEthereumAddress[]; marketPlaceTypes: Array; marketProtocolData: Array<{ parameters: { offerer: string; zone: string; offer: Array<{ itemType: BigNumberish; token: string; identifierOrCriteria: BigNumberish; startAmount: BigNumberish; endAmount: BigNumberish; }>; consideration: Array<{ itemType: BigNumberish; token: string; identifierOrCriteria: BigNumberish; startAmount: BigNumberish; endAmount: BigNumberish; recipient: string; }>; orderType: BigNumberish; startTime: BigNumberish; endTime: BigNumberish; zoneHash: BytesLike; salt: BigNumberish; conduitKey: BytesLike; totalOriginalConsiderationItems: BigNumberish; }; numerator: BigNumberish; denominator: BigNumberish; signature: BytesLike; extraData: BytesLike; }>; onBehalfOf: tEthereumAddress; buyNowAmount: string; payLaterAmount: string[]; }; export type LPAcceptBidWithCredit = { marketProtocolAddr: tEthereumAddress; orderProtocolData: { parameters: { offerer: string; zone: string; offer: Array<{ itemType: BigNumberish; token: string; identifierOrCriteria: BigNumberish; startAmount: BigNumberish; endAmount: BigNumberish; }>; consideration: Array<{ itemType: BigNumberish; token: string; identifierOrCriteria: BigNumberish; startAmount: BigNumberish; endAmount: BigNumberish; recipient: string; }>; orderType: BigNumberish; startTime: BigNumberish; endTime: BigNumberish; zoneHash: BytesLike; salt: BigNumberish; conduitKey: BytesLike; totalOriginalConsiderationItems: BigNumberish; }; numerator: BigNumberish; denominator: BigNumberish; signature: BytesLike; extraData: BytesLike; }; acceptProtocolData: { parameters: { offerer: string; zone: string; offer: Array<{ itemType: BigNumberish; token: string; identifierOrCriteria: BigNumberish; startAmount: BigNumberish; endAmount: BigNumberish; }>; consideration: Array<{ itemType: BigNumberish; token: string; identifierOrCriteria: BigNumberish; startAmount: BigNumberish; endAmount: BigNumberish; recipient: string; }>; orderType: BigNumberish; startTime: BigNumberish; endTime: BigNumberish; zoneHash: BytesLike; salt: BigNumberish; conduitKey: BytesLike; totalOriginalConsiderationItems: BigNumberish; }; numerator: BigNumberish; denominator: BigNumberish; signature: BytesLike; extraData: BytesLike; }; creditData: { token: string; amount: BigNumberish; orderId: BytesLike; v: BigNumberish; r: BytesLike; s: BytesLike; }; onBehalfOf: tEthereumAddress; isCollectionBid: boolean; nftId: string; }; export type LPFlashLiquidation = { user: tEthereumAddress; collateralAsset: tEthereumAddress; borrowedAsset: tEthereumAddress; debtTokenCover: string; liquidateAll: boolean; initiator: tEthereumAddress; useEthPath?: boolean; }; export type LPSupplyWithPermitType = { user: tEthereumAddress; reserve: tEthereumAddress; onBehalfOf?: tEthereumAddress; amount: string; signature: SignatureLike; referralCode?: string; deadline: string; }; export type LPRepayWithPermitParamsType = { user: tEthereumAddress; reserve: tEthereumAddress; amount: string; onBehalfOf?: tEthereumAddress; signature: SignatureLike; deadline: string; }; export type LPSignERC20ApprovalType = { user: tEthereumAddress; reserve: tEthereumAddress; amount: string; deadline: string; }; export type LPSetUserEModeType = { user: string; categoryId: number; }; export type LPRepayWithPTokensType = { user: string; reserve: string; amount: string; }; export type LPAuction = { user: tEthereumAddress; from: tEthereumAddress; collateralAsset: string; collateralTokenId: number; }; export type LPLiquidationERC721 = LPAuction & { liquidationAmount: string; receiveNToken: boolean; };