import Big from "big.js"; import { ContractName } from "../../contracts"; import { Channel, ChannelEventSource } from "../../internal"; import type { PerpetualProtocol } from "../PerpetualProtocol"; import { NonSettlementCollateralToken } from "./NonSettlementCollateralToken"; import { SettlementToken } from "./SettlementToken"; declare type WalletEventName = "allowanceListUpdated" | "balanceListUpdated" | "balanceEthUpdated" | "collateralTokenPriceListUpdated" | "updatedWalletDataAll" | "updateError"; declare class Wallet extends Channel { private readonly _perp; readonly account: string; private readonly _contractVault; private readonly _contractReader; private readonly _settlementToken; private readonly _collateralTokenList; private _cache; constructor(_perp: PerpetualProtocol, account: string); get settlementToken(): SettlementToken; get collateralTokenList(): (NonSettlementCollateralToken | SettlementToken)[]; getAllowanceList({ cache }?: { cache?: boolean | undefined; }): Promise; getBalanceList({ cache }?: { cache?: boolean | undefined; }): Promise; getBalanceEth({ cache }?: { cache?: boolean | undefined; }): Promise; getCollateralTokenPriceList({ cache }?: { cache?: boolean | undefined; }): Promise; approve(token: NonSettlementCollateralToken | SettlementToken, amount?: Big): Promise<{ transaction: import("ethers").ContractTransaction; metadata: { contractName: ContractName; contractFunctionName: keyof import("ethers").Contract; args: unknown[]; txPayload: { from?: string | undefined; to?: string | undefined; inputData?: string | undefined; } | { from: string; to: string; value: import("ethers").BigNumber | undefined; inputData: string; }; }; gasLimit: string; }>; protected _getEventSourceMap(): { allowanceListUpdated: ChannelEventSource; balanceListUpdated: ChannelEventSource; balanceEthUpdated: ChannelEventSource; collateralTokenPriceListUpdated: ChannelEventSource; updatedWalletDataAll: ChannelEventSource; }; private _fetchUpdateData; private _fetch; private _createFetchAndEmitAllowanceListUpdated; private _createFetchAndEmitBalanceListUpdated; private _createFetchAndEmitBalanceEthUpdated; private _createFetchAndEmitCollateralTokenPriceListUpdated; protected getWalletDataAll(): Promise; getWalletDataAllCollateralInfo(): Promise; } export { Wallet }; export declare type WalletDataAll = { [key: string]: { allowance: Big; balance: Big; price: number; }; }; export declare type WalletDataAllCollateralInfo = { [key: string]: { symbol: string; name: string; weight: number; depositCap?: Big; depositedAmount: Big; }; };