A generic interface for broadcasting transactions

interface TxBroadcaster {
    broadcastTx(tx: `0x${string}`): Promise<Unsub>;
    supported(): Promise<boolean>;
}

Implemented by

Methods

  • Broadcast a transaction to the network

    Parameters

    • tx: `0x${string}`

    Returns Promise<Unsub>

    A function to stop broadcasting the transaction

  • Check if this broadcaster is supported, We should check this before broadcasting a transaction

    Returns Promise<boolean>