import { EthApi } from "@joincivil/ethapi"; import { DecodedLogEntry, DecodedLogEntryEvent, TxHash, EthAddress } from "@joincivil/typescript-types"; import { Observable } from "rxjs"; import { CivilTransactionReceipt, TwoStepEthTransaction } from "../../types"; import { OwnableContract } from "../interfaces/ownable"; import { Contract as IContract } from "../interfaces/contract"; import { EventLog as EventData, TransactionReceipt, Log, TransactionConfig } from "web3-core"; import { Contract } from "web3-eth-contract"; export interface EventOptions { filter?: {}; fromBlock?: number; toBlock?: number | "latest" | "pending" | "genesis" | undefined; topics?: any[]; } export declare function findEvent(tx: TransactionReceipt, eventName: string): T | undefined; export declare function findEventOrThrow(tx: TransactionReceipt, eventName: string): T; export declare function findEvents(tx: TransactionReceipt, eventName: string): T[]; export declare function isContract(what: any): what is T; export declare function isOwnableContract(contract: IContract | OwnableContract): contract is OwnableContract; export declare function isDecodedLog(what: Log | EventData): what is DecodedLogEntry; export declare type TypedEventFilter = { [P in keyof T]?: T[P] | Array; }; export declare type DecodedFilterCallback = (err: Error, result: L) => void; export interface DecodedFilterResult { get(callback: (err: Error, logs: L[]) => void): void; watch(callback: DecodedFilterCallback): void; stopWatching(callback?: () => void): void; } export declare type EventFunction> = (paramFilters?: TypedEventFilter, filterObject?: EventOptions, callback?: DecodedFilterCallback) => DecodedFilterResult; export declare function streamifyEvent>(instance: Contract, eventName: string): (paramFilters?: TypedEventFilter, filterObject?: EventOptions) => Observable; export declare function isTxData(data: any): data is TransactionConfig; export declare function createTwoStepTransaction(ethApi: EthApi, txHash: TxHash, transform: (receipt: CivilTransactionReceipt) => Promise | T): TwoStepEthTransaction; export declare function createTwoStepSimple(ethApi: EthApi, txHash: TxHash): TwoStepEthTransaction; export declare function isEthAddress(what: any): what is EthAddress; export declare function isAddressMultisigWallet(ethApi: EthApi, address: EthAddress): Promise;