import * as Knex from "knex"; import Augur from "augur.js"; import BigNumber from "bignumber.js"; import { GenericCallback, SortLimit } from "../../types"; import { Address, MarketsRowWithTime, OutcomesRow, UIMarketInfo, UIOutcomeInfo, UIStakeInfo, DisputeTokensRowWithTokenState, UIDisputeTokenInfo, Payout, PayoutRow, NormalizedPayout, TradingHistoryRow } from "../../types"; import * as t from "io-ts"; import { TradingHistoryParams } from "./get-trading-history"; export interface Dictionary { [key: string]: any; } export declare function queryModifierDB(query: Knex.QueryBuilder, defaultSortBy: string, defaultSortOrder: string, sortLimitParams: Partial): Promise>; export declare function queryModifier(db: Knex, query: Knex.QueryBuilder, defaultSortBy: string, defaultSortOrder: string, sortLimitParams: Partial): Promise>; export declare function reshapeOutcomesRowToUIOutcomeInfo(outcomesRow: OutcomesRow): UIOutcomeInfo; export declare function reshapeMarketsRowToUIMarketInfo(row: MarketsRowWithTime, outcomesInfo: Array>, winningPayoutRow: PayoutRow | null, totalInitialREPStake: BigNumber): UIMarketInfo; export declare function reshapeDisputeTokensRowToUIDisputeTokenInfo(disputeTokenRow: DisputeTokensRowWithTokenState): UIDisputeTokenInfo; export declare function getMarketsWithReportingState(db: Knex, selectColumns?: Array): Knex.QueryBuilder; export declare function normalizePayouts(payoutRow: Payout): NormalizedPayout; export declare function normalizedPayoutsToFixed(payout: NormalizedPayout): NormalizedPayout; export declare function uiStakeInfoToFixed(stakeInfo: UIStakeInfo): UIStakeInfo; export declare function marketPassesInitialREPFilter(endTime: number, totalInitialREPStake: BigNumber): boolean; export declare function queryTradingHistoryParams(db: Knex, params: t.TypeOf): Promise; export declare function blockNumberForTimestampQuery(db: Knex, timestamp: number, prefix: string): Knex.QueryBuilder; export declare function queryTradingHistory(db: Knex | Knex.Transaction, universe: Address | null | undefined, account: Address | null | undefined, marketId: Address | null | undefined | Array
, outcome: number | null | undefined, orderType: string | null | undefined, earliestCreationTime: number | null | undefined, latestCreationTime: number | null | undefined, sortBy: string | null | undefined, isSortDescending: boolean | null | undefined, limit: number | null | undefined, offset: number | null | undefined, ignoreSelfTrades: boolean | null | undefined, callback: GenericCallback>): void; export declare function groupByAndSum(rows: Array, groupFields: Array, sumFields: Array): Array; export declare function sumBy(rows: Array, ...sumFields: Array): Pick; export declare function getCashAddress(augur: Augur): string; export declare function batchAndCombine(lookupIds: Array, dataFetch: (chunkLookupIds: Array) => Promise>): Promise;