sendRawTransaction
Sends a raw Bitcoin transaction using the mempool.space API. This is useful when you have a fully constructed and signed raw transaction that you want to broadcast to the network.Usage
Parameters
| Parameter | Type | Description |
|---|---|---|
rawTransaction | string | The raw transaction in hexadecimal format |
walletAccount | BitcoinWalletAccount | The wallet account (used to determine network) |
client | DynamicClient (optional) | The Dynamic client instance. Only required when using multiple clients. |
Returns
Promise<{ transactionId: string }> - A promise that resolves to an object containing the transaction ID.
Errors
| Error | Description |
|---|---|
SendBitcoinRawTransactionError | Thrown if the transaction broadcast fails |
Related functions
- sendBitcoin - Send a simple Bitcoin transaction
- signPsbt - Sign a PSBT