import { BlockHash } from '@dedot/codecs'; import { NamedEvent } from './types.js'; export interface TransactionValidated extends NamedEvent { event: 'validated'; } export interface TransactionBlock { hash: Hash; index: number; } export interface TransactionBestChainBlockIncluded extends NamedEvent { event: 'bestChainBlockIncluded'; block: TransactionBlock | null; } export interface TransactionFinalized extends NamedEvent { event: 'finalized'; block: TransactionBlock; } export interface TransactionError extends NamedEvent { event: 'error'; error: string; } export interface TransactionInvalid extends NamedEvent { event: 'invalid'; error: string; } export interface TransactionDropped extends NamedEvent { event: 'dropped'; error: string; } export type TransactionWatchEvent = TransactionValidated | TransactionBestChainBlockIncluded | TransactionFinalized | TransactionError | TransactionInvalid | TransactionDropped;