TransactionSubmitter
Orchestrates transaction submission and confirmation for Midnight blockchain.
Process (WebSocket-based - the correct way):
Serialize signed transaction (SCALE codec)
Prove transaction via proof server
Seal proven transaction
Submit via WebSocket and wait for finalization from NODE
Mark UTXOs as SPENT only after node confirms finalization
Return result
Why WebSocket instead of Indexer:
Indexer can lag behind the node (causes race conditions)
WebSocket gives us real-time confirmation directly from the node
This matches the Midnight SDK's implementation exactly
Dust Fee Payment: Use submitWithFees() to automatically build and pay dust fees.
Constructors
Types
Functional interface for resolving network-aware clients. Injected by the Hilt module; creates fresh clients for the currently-selected network.
Clients bound to a specific network, identified by networkId. The networkId is used for cache-invalidation: when the user switches networks in Settings, the next resolveClients call detects the name change and creates fresh HTTP clients.
Result of transaction submission.
Properties
Functions
Submit a signed transaction and wait for finalization.
Submit transaction without waiting for confirmation (fire-and-forget).
Submit a pre-built unproven transaction (e.g., from ZswapTransferBuilder).
Submit transaction WITH automatic dust fee payment.