Broadcast a single transaction or a TRUC (BIP 431) 1P1C package atomically.
Server requirements for 1P1C packages: the backing Electrum
server must implement blockchain.transaction.broadcast_package
(Fulcrum ≥ 1.10) and be backed by bitcoind ≥ v28.0.0. ElectrumX
does not implement this method. There is no fallback to
sequential parent-then-child broadcast: TRUC packages typically
have a zero-fee parent and would be rejected from the mempool on
their own, so a fallback would silently fail in subtle ways.
Callers receiving a "method not found" error here should route
through a different provider for that submission.
One transaction (single broadcast) or two topologically-sorted transactions (parent first, child last) for 1P1C package relay.
The broadcast txid (or the child txid for 1P1C packages).
Close the underlying WebSocket connection.
Fetch the current chain tip.
Current chain height, block time, and block hash
Fetch spendable onchain outputs for an address.
Bitcoin address to query
Spendable onchain outputs for the address
Fetch transactions associated with an address.
Bitcoin address to query
Transactions involving the address
Watch a set of addresses and invoke the callback when transactions are observed.
Addresses to monitor
Callback invoked when matching transactions are seen
Stop function that cancels the watch
Electrum-based implementation of the OnchainProvider interface. Replaces esplora polling with electrum subscriptions where possible.
Example