import { BigNumber, ethers } from "ethers"; import { ExpiringMultiPartyEthers, LongShortPairEthers } from "@uma/contracts-node"; import { AssetClassConfig, EmpState } from "../types/assets.t"; declare class Asset { #private; /** * @notice Connects an instance of the Asset. * @param config - Ethers Asset configuration. * @returns The Asset instance. */ static connect({ signer, multicallProvider, assets, assetIdentifier, }: AssetClassConfig): Asset; /** * @notice Get expiring multi party (EMP) state. * @returns A promise with the info of the metapool contract. */ getEmpState(): Promise; /** * @notice Get Long Short Pair (LSP) state. * @returns A promise with the info of the metapool contract. */ getLSPState(): Promise<{ expirationTimestamp: BigNumber; collateralToken: string; priceIdentifier: string; pairName: string; longToken: string; shortToken: string; collateralPerPair: BigNumber; timerAddress: string; } | undefined>; /** * @notice Fetch the position of an asset in relation to the connected user address. * @returns A promise with the user position. */ getPosition(): Promise<([[BigNumber] & { rawValue: BigNumber; }, BigNumber, [BigNumber] & { rawValue: BigNumber; }, [BigNumber] & { rawValue: BigNumber; }, BigNumber] & { tokensOutstanding: [BigNumber] & { rawValue: BigNumber; }; withdrawalRequestPassTimestamp: BigNumber; withdrawalRequestAmount: [BigNumber] & { rawValue: BigNumber; }; rawCollateral: [BigNumber] & { rawValue: BigNumber; }; transferPositionRequestPassTimestamp: BigNumber; }) | undefined>; /** * @notice Get the current user asset position collateral ratio (CR). * @returns A promise with the user asset CR. */ getPositionCR(): Promise; /** * ------------------------------------------------------------------------------ * @notice The following are helper methods that don't directly call the contract * ------------------------------------------------------------------------------ */ /** * @notice Fetch all the positions of an address. * @returns A promise with an object that contains all positions of an address. */ getPositions(): Promise<{ [x: string]: ethers.BigNumber | undefined; } | undefined>; /** * @notice Get asset global collateral ratio (GCR). * @returns A promise with the GCR. */ getGCR(): Promise; /** * @notice Gets the contract * @returns Contract of type ExpiringMultiPartyEthers or LongShortPairEthers. */ getContract(): LongShortPairEthers | ExpiringMultiPartyEthers; /** * @notice Initializes the Asset instance. * @param config - Ethers Asset configuration. */ private init; } export default Asset;