Get the address string for a script output, if decodable.
Submit a package of raw transactions atomically via Fulcrum's
blockchain.transaction.broadcast_package method, the on-the-wire
equivalent of bitcoind's submitpackage RPC.
Required for TRUC (BIP 431) 1P1C relay where the parent has zero (or below-minfee) fee and depends on the child to pay for both via CPFP — sequential broadcast cannot work in that case because the parent would be rejected from the mempool on its own.
Topologically sorted raw transactions; child must be the last element. Currently must be a 1P1C pair (length 2). Parents may not depend on each other.
The child transaction id (the last entry in the array),
computed locally — broadcast_package itself returns
{success, errors} rather than a txid.
If the server does not implement broadcast_package (e.g.
ElectrumX, or older Fulcrum, or Fulcrum backed by bitcoind
< v28.0.0). Callers must surface this clearly to users —
this method does NOT silently fall back to sequential
broadcasts because doing so would let TRUC packages fail
in subtle ways.
Returns the current chain tip and keeps it fresh via a single
server-side subscription. Subsequent calls return the cached tip
(updated by background notifications) without round-tripping to the
server. Previously each call issued blockchain.headers.subscribe as
a regular request, leaving a stale subscription on the server every
time — under polling that adds up. ws-electrumx-client deduplicates
subscribe() by method+params, so registering once is enough.
WebSocket-based Electrum chain source using ws-electrumx-client. Provides low-level methods for the Electrum protocol.
Example