import { Near, WalletConnection, Account, keyStores } from "near-api-js"; import { Market } from './types'; interface FluxProvider { connected: Boolean; indexNodeUrl: string; network: string; near: Near | null; keyStore: keyStores.BrowserLocalStorageKeyStore | keyStores.UnencryptedFileSystemKeyStore | keyStores.InMemoryKeyStore; protocolContract: any; tokenContract: any; walletConnection: WalletConnection | null; account: Account | null; connect(protocolContractId: string, tokenContractId: string, accountId?: string, nearInstance?: Near, walletInstance?: WalletConnection, customNodeUrl?: string): void; signIn(): void; oneClickTxSignIn(): void; signOut(): void; getAccountId(): string; isSignedIn(): boolean; setAllowance(escrowAccountId: string, allowance: string): void; getTotalSupply(): Promise; getBalance(ownerId: string): Promise; getAllowance(ownerId: string, escrowAccountId: string): Promise; createBinaryMarket(description: string, extraInfo: string, categories: Array, endTime: number, marketCreationFee: number, affiliateFeePercentage: number): Promise; createCategoricalMarket(description: string, extraInfo: string, outcomes: number, outcomeTags: Array, categories: Array, endTime: number, marketCreationFee: number): Promise; createMarket(description: string, extraInfo: string, outcomes: number, outcomeTags: Array, categories: Array, endTime: number, marketCreationFee: number, affiliateFeePercentage: number): Promise; getClaimable(marketId: number, accountId: string | undefined): Promise; placeOrder(marketId: number, outcome: number, shares: string, price: number): Promise; cancelOrder(marketId: number, outcome: number, orderId: number, price: number): Promise; dynamicMarketSell(marketId: number, outcome: number, shares: string, minPrice: number): Promise; resolute(marketId: number, winningOutcome: number, stake: string): Promise; dispute(marketId: number, winningOutcome: number, stake: string): Promise; withdrawDisputeStake(marketId: number, disputeRound: number, outcome: number): Promise; finalize(marketId: number, winningOutcome: number | null): Promise; claimEarnings(marketId: number, accountId: string): Promise; getMarkets(filter: any, limit: number, offset: number): Promise>; getResolutingMarkets(filter: any, limit: number, offset: number): Promise>; getLastFilledPrices(filter: any, limit: number, offset: number): Promise; getMarket(marketId: number): Promise; getLastFilledPricesForMarket(marketId: number): Promise; getMarketPrices(marketId: number): Promise; getAvgPricesOnDate(marketId: number, date: string): Promise; getOpenOrdersForUserForMarket(marketId: number, accountId: string): Promise; getShareBalanceForUserForMarket(marketId: number, accountId: string): Promise; getPriceHistory(marketId: number, startDate: number, endDate: number, dateMetrics: Array): Promise; getOrderbook(marketId: number): Promise; getAffiliateEarnings(accountId: string): Promise; getOpenOrders(accountId: string): Promise; getOrderHistory(accountId: string): Promise; getFinalizedParticipatedMarkets(accountId: string): Promise; getResolutionState(filter: any, limit: number, offset: number): Promise; getTradeEarnings(marketId: number, accountId: string): Promise; fetchState(endPoint: string, args: any): Promise; } declare class FluxProvider implements FluxProvider { constructor(network?: string, indexNodeUrl?: string, keyStore?: keyStores.BrowserLocalStorageKeyStore | keyStores.UnencryptedFileSystemKeyStore | keyStores.InMemoryKeyStore); } export default FluxProvider;