TransactionBalancer
interface TransactionBalancer
Abstracts the wallet operations needed to finalize a proven transaction: adding dust fee inputs (balancing) and submitting to the blockchain.
Two implementations exist:
DAppConnectorClient: delegates to an external wallet process via WebSocket JSON-RPC
MidnightWallet(in sdk:midnight-sdk): handles everything on-device
MidnightContract.call uses this interface so the contract pipeline is agnostic to whether the wallet is local or remote.
Inheritors
Functions
Link copied to clipboard
open suspend fun balanceAndSubmit(provenTxHex: String, onProgress: suspend (BalanceProgress) -> Unit? = null)
Balance and submit a proven transaction in one operation.
Link copied to clipboard
Balance a proven transaction by adding dust fee inputs.
Link copied to clipboard
Submit a balanced transaction to the blockchain.