Expand description
PolkadotNodeClient — subxt-backed implementation of NodeClient.
Wraps subxt::OnlineClient<SubstrateConfig> and speaks the Substrate
submission RPC. Constructs an unsigned extrinsic for
midnight.send_mn_transaction(Vec<u8>) and translates subxt’s
subxt::tx::TransactionStatus stream into our wallet-level
crate::SubmissionEvent / crate::NodeClientError types via
crate::status::SubmissionOutcome::from_status.
§Transport
ws://127.0.0.1:9944 in the local dev harness. wss://... for TLS. The
client uses subxt::OnlineClient::from_insecure_url for ws:// and
http:// URLs (subxt rejects non-TLS URLs via its default entry point);
this is correct behavior for localhost integration tests.
§Block-height attribution
subxt’s TransactionStatus::InBestBlock / InFinalizedBlock variants
carry a block hash but not a number. We resolve the number with an extra
at_block(hash) call per event — one round trip per block-level status.
The alternative (leaving height as Option) would make the
crate::SubmissionEvent shape lossy; correctness wins.
Structs§
- Polkadot
Node Client - subxt-backed Midnight node client.