ElectrumClient

Wrapper around an electrum_client::ElectrumApi which includes an internal in-memory transaction cache to avoid re-fetching already downloaded transactions.

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.

constructor(url: String, socks5: String? = null)

Creates a new bdk client from a electrum_client::ElectrumApi Optional: Set the proxy of the builder

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Subscribes to notifications for new block headers, by sending a blockchain.headers.subscribe call.

Link copied to clipboard
open override fun close()
Link copied to clipboard
open override fun destroy()
Link copied to clipboard
open override fun estimateFee(number: ULong): Double

Estimates the fee required in bitcoin per kilobyte to confirm a transaction in number blocks.

Link copied to clipboard
open override fun fullScan(request: FullScanRequest, stopGap: ULong, batchSize: ULong, fetchPrevTxouts: Boolean): Update

Full scan the keychain scripts specified with the blockchain (via an Electrum client) and returns updates for bdk_chain data structures.

Link copied to clipboard
open override fun ping()

Pings the server.

Link copied to clipboard
open override fun serverFeatures(): ServerFeaturesRes

Returns the capabilities of the server.

Link copied to clipboard
open override fun sync(request: SyncRequest, batchSize: ULong, fetchPrevTxouts: Boolean): Update

Sync a set of scripts with the blockchain (via an Electrum client) for the data specified and returns updates for bdk_chain data structures.

Link copied to clipboard
open override fun transactionBroadcast(tx: Transaction): String

Broadcasts a transaction to the network.

Link copied to clipboard
fun uniffiClonePointer(): Pointer