BtcClient class abstract

Bitcoin support: balance, unspent outputs, fee estimates and broadcast against an esplora-compatible API. PSBT assembly is a BtcService method; sendBitcoin is assembled per platform (sign, finalize) and broadcast through this domain. Implemented by BtcClientImpl; hosts can substitute this interface in tests.

Implementers

Constructors

BtcClient()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

availableNetworks() → List<BtcNetwork>
Returns network providers built from dashboard metadata and host configuration.
broadcastTransaction(String signedTransactionHex, [BtcNetwork? network]) → Future<String>
Broadcasts a signed transaction and returns its transaction ID.
buildPsbt(String fromAddress, String recipientAddress, int amountInSatoshis, [BtcFeePriority? priority, BtcNetwork? network]) → Future<String>
Builds an unsigned P2WPKH PSBT (base64) sending amountInSatoshis from fromAddress to recipientAddress. Selects inputs largest first and prices the fee at the given priority (null means medium). Does not sign or broadcast; pass the result to signPsbt. Taproot senders are rejected. If the node returns no fee estimates, a flat 1000 satoshi fee applies.
configureNetworks(List<BtcNetwork> networks) → void
Sets host REST endpoints. The first host network remains the default. Dashboard networks are resolved when used.
getBalance(String address, [BtcNetwork? network]) → Future<String>
Returns the confirmed balance in satoshis.
getFeeEstimates([BtcNetwork? network]) → Future<List<BtcFeeEstimate>>
Returns fee rates by confirmation target, in satoshis per virtual byte.
getUtxos(String address, [BtcNetwork? network]) → Future<List<BtcUtxo>>
Returns the unspent outputs for an address.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
publicKeyForAddress(String address) → String
Public key from the credential's walletAdditionalAddresses, used to construct a PSBT.
signPsbt(String fromAddress, String unsignedPsbt) → Future<String>
Signs all owned PSBT inputs without input-index or sighash restrictions. Returns the partially signed PSBT.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited