Expand description

Send a Bitcoin Transaction to a node via Peer-to-Peer protocol

Supports sending via clearnet with a SocketAddr or via tor using a SocketAddr or onion address with the IntoTargetAddr trait.

Under the hood it creates a connection to the node and performs the version handshake. Then it sends an inv message with the txid or wtxid and waits for a getdata message. After transmitting a tx message with the full transaction it disconnects. Note that if the receiving node already has the transaction it will not respond with a a getdata message, in which case the sending function will timeout and disconnect.

Structs

  • Config options for sending

Enums

Traits

  • A trait for objects that can be converted to TargetAddr.

Functions

  • Connects to a node at address over clearnet and attempts to send it tx, optionally taking config to specify configuration options
  • Connects to a node at address over tor and attempts to send it tx, optionally taking config to specify configuration options