Crate bitcoin_send_tx_p2p
source ·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
.