CbfClient

A `CbfClient` handles wallet updates from a `CbfNode`.

Constructors

Link copied to clipboard
constructor(pointer: Pointer)
constructor(noPointer: NoPointer)

This constructor can be used to instantiate a fake object. Only used for tests. Any attempt to actually use an object constructed this way will fail as there is no connected Rust object.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open suspend override fun addRevealedScripts(wallet: Wallet)

Add scripts for the node to watch for as they are revealed. Typically used after creating a transaction or revealing a receive address.

Link copied to clipboard
open suspend override fun broadcast(transaction: Transaction)

Broadcast a transaction to the network, erroring if the node has stopped running.

Link copied to clipboard
open override fun close()
Link copied to clipboard
open override fun destroy()
Link copied to clipboard
open suspend override fun isRunning(): Boolean

Check if the node is still running in the background.

Link copied to clipboard
open suspend override fun minBroadcastFeerate(): FeeRate

The minimum fee rate required to broadcast a transcation to all connected peers.

Link copied to clipboard
open suspend override fun nextLog(): Log

Return the next available log message from a node. If none is returned, the node has stopped.

Link copied to clipboard
open suspend override fun nextWarning(): Warning

Return the next available warning message from a node. If none is returned, the node has stopped.

Link copied to clipboard
open suspend override fun shutdown()

Stop the `CbfNode`. Errors if the node is already stopped.

Link copied to clipboard
fun uniffiClonePointer(): Pointer
Link copied to clipboard
open suspend override fun update(): Update?

Return an `Update`. This is method returns once the node syncs to the rest of the network or a new block has been gossiped.