import { MongoBound } from '../models/base'; import { CoinEvent } from '../models/events'; import { IEVMTransaction } from '../providers/chain-state/evm/types'; import { ExternalApiStream } from '../providers/chain-state/external/streams/apiStream'; import { ChainId, ChainNetwork } from './ChainNetwork'; import { StreamAddressUtxosParams, StreamTransactionParams } from './namespaces/ChainStateProvider'; export interface IAddressSubscription { id?: string; status?: string; }; export interface IExternalProvider { getBlockNumberByDate(params: { date: Date | string } & ChainId): Promise; getTransaction(params: StreamTransactionParams & ChainId): Promise|undefined>; streamAddressTransactions(params: StreamAddressUtxosParams & ChainId): Promise; // These may be moralis-specific. Once we add another provider, // we'll need to see how they do subscriptions (might not be webhook-based) createAddressSubscription(params: ChainNetwork & ChainId): Promise; getAddressSubscriptions(): Promise; deleteAddressSubscription(params: { sub: IAddressSubscription }): Promise; updateAddressSubscription(params: { sub: IAddressSubscription, addressesToAdd?: string[], addressesToRemove?: string[], status?: string }): Promise; webhookToCoinEvents(params: { webhook: any, tipHeight: number } & ChainNetwork): CoinEvent[]; };