Expand description
Native mempool.space REST client (provenance-upgrade Phase 3). Concrete
solid_pod_rs::mrc20::MempoolLookup + the verify-side
solid_pod_rs::provenance::BlockAnchorer. Server-side only (builds a
reqwest::Client); wasm consumers implement the trait over fetch.
Native mempool.space REST client — the read-side of block-trail anchors.
[MempoolHttpClient] is the server-side concrete implementation of the
pure solid_pod_rs::mrc20::MempoolLookup trait. It speaks the
mempool.space-style REST API over the reqwest client the crate already
pulls in for the CORS proxy and webhook delivery:
| Method | Path | Returns |
|---|---|---|
| GET | {base}/api/address/{addr}/utxo | Vec<Utxo> |
| GET | {base}/api/tx/{txid} | TxInfo |
The wire shapes (status: {confirmed, block_height} nested objects) are
deserialised into local *Wire structs and flattened into the crate’s
transport-free [Utxo]/[TxInfo] value types, so the pure verification
surface never learns the mempool.space schema.
§wasm boundary
This module is native-only (it builds a reqwest::Client). It mirrors
the JSS verifyMrc20Anchor mempool round-trip (mrc20.js:315-327,
token.js:176-187) and is the production [MempoolLookup] the
/pay/.deposit MRC20 path and /pay/.address derivation use. wasm
consumers implement [MempoolLookup] over fetch instead and never
compile this file.
§Configuration
The base URL is read from JSS_PAY_MEMPOOL_URL (JSS mempoolUrl
parity), defaulting to the testnet4 explorer
https://mempool.space/testnet4. The reqwest json feature is not
enabled crate-wide, so responses are read as text and parsed with
serde_json (matching the proxy handler’s manual-parse style).
Structs§
- Mempool
Block Anchorer - A
BlockAnchorerimplementing both sides over a transport that can look up UTXOs (MempoolLookup) and broadcast transactions (MempoolBroadcast). Generic over that transport so a fixture drives it in tests andMempoolHttpClientdrives it in production — without changing the logic. - Mempool
Http Client - A
MempoolLookupbacked by the mempool.space REST API overreqwest.
Constants§
- DEFAULT_
MEMPOOL_ URL - Default base URL — the mempool.space testnet4 explorer. Matches the
JSS default (
pay.js:243,mrc20.js:282). - MEMPOOL_
URL_ ENV - Environment variable selecting the mempool REST base URL (JSS parity).