Skip to main content

Module status

Module status 

Source
Expand description

Pure translation from Substrate tx-pool statuses to wallet-level events and errors.

The Substrate transaction pool reports ten discrete statuses (see polkadot-sdk/.../transaction-pool/api/src/lib.rs). The TS node-client’s #handleSubmissionResult (PolkadotNodeClient.ts:178-277) collapses those into three streamable events (Submitted/InBlock/Finalized) and four terminal errors (Usurped/Dropped/Invalid/FinalityTimeout).

This module encodes that collapse as a pure function so it can be tested without a live node — the adapter layer only has to translate subxt’s native status type into TxStatus and call SubmissionOutcome::from_status.

Enums§

SubmissionOutcome
Result of translating a single TxStatus against a running submission.
TxStatus
Runtime-agnostic mirror of a Substrate transaction-pool status.