import { Commitment, Nullifier, RailgunTransactionV2, RailgunTransactionV3 } from './formatted-types'; import { Chain } from './engine-types'; import { POIsPerList, TXIDVersion } from './poi-types'; export declare enum EngineEvent { WalletDecryptBalancesComplete = "decrypted-balances", ContractNullifierReceived = "nullified", UTXOMerkletreeHistoryScanUpdate = "utxo-merkletree-history-scan-update", TXIDMerkletreeHistoryScanUpdate = "txid-merkletree-history-scan-update", POIProofUpdate = "POIProofUpdate", UTXOScanDecryptBalancesComplete = "UTXOScanDecryptBalancesComplete" } export type QuickSyncEvents = (txidVersion: TXIDVersion, chain: Chain, startingBlock: number) => Promise; export type EventsCommitmentListener = (txidVersion: TXIDVersion, events: CommitmentEvent[]) => Promise; export type EventsNullifierListener = (txidVersion: TXIDVersion, nullifiers: Nullifier[]) => Promise; export type EventsUnshieldListener = (txidVersion: TXIDVersion, unshields: UnshieldStoredEvent[]) => Promise; export type EventsRailgunTransactionListenerV3 = (txidVersion: TXIDVersion, railgunTransaction: RailgunTransactionV3[]) => Promise; export type QuickSyncRailgunTransactionsV2 = (chain: Chain, latestGraphID: Optional) => Promise; export type GetLatestValidatedRailgunTxid = (txidVersion: TXIDVersion, chain: Chain) => Promise<{ txidIndex: Optional; merkleroot: Optional; }>; export type CommitmentEvent = { txid: string; treeNumber: number; startPosition: number; commitments: Commitment[]; blockNumber: number; }; export type UnshieldStoredEvent = { txid: string; timestamp: Optional; toAddress: string; tokenType: number; tokenAddress: string; tokenSubID: string; amount: string; fee: string; blockNumber: number; eventLogIndex: Optional; railgunTxid: Optional; poisPerList: Optional; }; export type AccumulatedEvents = { commitmentEvents: CommitmentEvent[]; unshieldEvents: UnshieldStoredEvent[]; nullifierEvents: Nullifier[]; railgunTransactionEvents?: RailgunTransactionV3[]; }; export type WalletScannedEventData = { txidVersion: TXIDVersion; chain: Chain; }; export type UTXOScanDecryptBalancesCompleteEventData = { txidVersion: TXIDVersion; chain: Chain; walletIdFilter: Optional; }; export type MerkletreeHistoryScanEventData = { txidVersion: TXIDVersion; chain: Chain; progress?: number; scanStatus: MerkletreeScanStatus; }; export declare enum MerkletreeScanStatus { Started = "Started", Updated = "Updated", Complete = "Complete", Incomplete = "Incomplete" } export declare enum POIProofEventStatus { LoadingNextBatch = "LoadingNextBatch", InProgress = "InProgress", Error = "Error", AllProofsCompleted = "AllProofsCompleted" } export type POICurrentProofEventData = { status: POIProofEventStatus; txidVersion: TXIDVersion; chain: Chain; progress: number; listKey: string; txid: string; railgunTxid: string; index: number; totalCount: number; errorMsg: Optional; };