The BroadcastedTransaction interface represents the result of broadcasting a transaction. It includes the success status, transaction result or error message, and the number of peers that received the transaction.
BroadcastedTransaction
Overview
The full source code is available on GitHub at IWeb3ProviderTypes.ts.
Import
import { BroadcastedTransaction } from '@btc-vision/transaction';Interface
Signature
interface BroadcastedTransaction {
readonly success: boolean;
readonly result?: string;
readonly error?: string;
readonly peers?: number;
}Description
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| success | boolean | Yes | Whether the transaction was successfully broadcasted. |
| result | string | No | The result of the broadcasted transaction. |
| error | string | No | The error message if the transaction was not successfully broadcasted. |
| peers | number | No | The number of peers that the transaction was broadcasted to. |