BalanceProgress
Granular progress updates during the balance+submit pipeline.
DApp developers receive these through TransactionBalancer.balanceAndSubmit's onProgress callback, or through ContractCallStage.BalancingDetail in MidnightContract.call's progress callback.
Usage in a ViewModel:
contract.call("post", message) { stage ->
when (stage) {
is ContractCallStage.BalancingDetail -> when (stage.progress) {
is BalanceProgress.SyncingDust -> showStatus("Syncing dust wallet...")
is BalanceProgress.SyncingDustProgress -> showProgress(
stage.progress.eventsProcessed, stage.progress.totalEvents
)
is BalanceProgress.ProvingDust -> showStatus("Proving dust payment...")
is BalanceProgress.Submitting -> showStatus("Submitting to blockchain...")
is BalanceProgress.WaitingFinalization -> showStatus("Waiting for finalization...")
is BalanceProgress.RetryingDustSync -> showStatus("Retrying dust sync...")
}
// ... handle other stages
}
}Inheritors
Types
Generating ZK proof for dust fee payment.
Spent-dust recovery (node error 195 = InputNotInUtxos): a dust UTXO the wallet picked was already spent on-chain — the indexer's event stream hadn't reflected our own earlier fee spend yet. The wallet records it, re-selects a different dust UTXO, and retries. (This is not error 115, which is an InvalidProof — an unrelated failure mode.)
Error 170 recovery: re-syncing dust from genesis and retrying.
Balanced transaction submitted to the blockchain node.
Initial dust wallet sync starting (first call per session is slow).
Dust sync streaming progress — use for progress bars.
Transaction is in a block, waiting for finalization.