-
- All Implemented Interfaces:
-
java.lang.AutoCloseable,org.bitcoindevkit.CbfClientInterface,org.bitcoindevkit.Disposable
public class CbfClient implements Disposable, AutoCloseable, CbfClientInterface
A `CbfClient` handles wallet updates from a `CbfNode`.
-
-
Method Summary
Modifier and Type Method Description Unitdestroy()Unitclose()FeeRateaverageFeeRate(BlockHash blockhash)Fetch the average fee rate for a block by requesting it from a peer. Wtxidbroadcast(Transaction transaction)Broadcast a transaction to the network, erroring if the node has stopped running. Unitconnect(Peer peer)Add another `Peer` to attempt a connection with. BooleanisRunning()Check if the node is still running in the background. List<IpAddress>lookupHost(String hostname)Query a Bitcoin DNS seeder using the configured resolver. FeeRateminBroadcastFeerate()The minimum fee rate required to broadcast a transcation to all connected peers. InfonextInfo()Return the next available info message from a node. WarningnextWarning()Return the next available warning message from a node. Unitshutdown()Stop the `CbfNode`. Updateupdate()Return an `Update`. -
-
Method Detail
-
averageFeeRate
FeeRate averageFeeRate(BlockHash blockhash)
Fetch the average fee rate for a block by requesting it from a peer. Not recommend for resource-limited devices.
-
broadcast
Wtxid broadcast(Transaction transaction)
Broadcast a transaction to the network, erroring if the node has stopped running.
-
lookupHost
List<IpAddress> lookupHost(String hostname)
Query a Bitcoin DNS seeder using the configured resolver.
This is not a generic DNS implementation. Host names are prefixed with a
x849to filter for compact block filter nodes from the seeder. For exampledns.myseeder.comwill be queried asx849.dns.myseeder.com. This has no guarantee to return anyIpAddr.
-
minBroadcastFeerate
FeeRate minBroadcastFeerate()
The minimum fee rate required to broadcast a transcation to all connected peers.
-
nextInfo
Info nextInfo()
Return the next available info message from a node. If none is returned, the node has stopped.
-
nextWarning
Warning nextWarning()
Return the next available warning message from a node. If none is returned, the node has stopped.
-
-
-
-