Skip to content

Class BSV::MCP::Tools::BroadcastP2pkh

Inherits: MCP::Tool

Builds, signs, and broadcasts a simple P2PKH payment transaction.

Fetches UTXOs for the sender's address, constructs a transaction with one payment output and one change output, signs all inputs with the provided private key, and submits to ARC in Extended Format (EF/BRC-30).

This is the most complex MCP tool: it orchestrates WIF → PrivateKey → PublicKey → address → UTXO fetch → tx build → sign → broadcast.

Constants

DUST_THRESHOLD

Minimum output value to avoid dust rejection.

Public Class Methods

call(wif:, to_address:, satoshis:, network: = nil, server_context: = nil)

Not documented.