urma-chain
Chain observations and transaction validation for URMA readers.
crates.io · API reference · Source · URMA
Use urma-chain to describe where a transaction was observed, decode transaction data and apply chain-specific validation. It provides the chain vocabulary used by publication and indexing components.
Get started
API guide
| Entry point | Use it for |
|---|---|
observation |
Chain identities, block references, placement and observation trust. |
transaction |
Bounded transaction decoding. |
decode |
Decoding URMA records from transaction envelopes. |
validation |
Chain and proof-of-work validation helpers. |
pow |
Header proof of work per chain (scrypt for Litecoin, sha256d for Bitcoin), Core retarget rules and chainwork. |
Chain::params() carries the peer-to-peer magic, default port, DNS seeds, proof-of-work limit and retarget schedule for each supported chain. pow::expected_bits reproduces Litecoin Core's GetNextWorkRequired, including the 2016-block lookback, the testnet minimum-difficulty rules and 256-bit wraparound of the intermediate product. Header validation is light-client validation: it proves work and continuity, not transaction consensus.
Where it fits
Connect these types to a transport through urma-runtime, or use them when building a reader for urma-wire. See the Chain API for supported networks.
Boundaries
An observation records its trust source. A provider claim and an observation from a validating node are not interchangeable, and a transaction in a mempool is not a confirmed inclusion.
License
0BSD. Part of the URMA workspace, maintained by Cristian Zmole. Project contact.