Expand description
decdn fetch — the standalone client-side paid pull of a single
content-addressed blob over cdn/client/v1 (issues #391, #940).
The paying sibling of super::probe::ProbeArgs: a one-shot client command
that dials a node by explicit --node-id/--addr/--relay-url (or
auto-discovers one, #936) and pays per-MB from the caller’s own
PaymentPool deposit. The pool is auto-opened and reused: fetch
looks up the caller’s live pool in its persistent buyer-pool store, resuming
its per-(signer, provider) lane watermark for the chosen provider; if none
exists it opens (and funds) one on-chain and records it. One pool fans out
to every provider the caller pays (ADR 003) — there is no per-provider open.
The on-chain coordinates (RPC, contract addresses, chain id, keystore, data
dir) resolve flag > [blockchain]/[identity] config > default, so a
configured client runs decdn fetch --node-id … --addr … --provider-address … --hash … -o … with no chain flags. Fields are kept as String/Option
(mirroring super::probe::ProbeArgs); the cli binary parses addresses
and merges the config.
The network/chain/target/limit flags live in ClientFetchArgs, shared
(via #[command(flatten)]) with decdn bundle pull (#391) so both client
commands resolve their coordinates and select a node identically.
Structs§
- Client
Fetch Args - The network, chain, target, and per-blob-limit flags shared by the paid
client commands (
decdn fetchanddecdn bundle pull, #391). Flattened into each command’s args so the resolution (flag > config > default) and node-selection logic have one definition. - Fetch
Args - Arguments for
decdn fetch— one blob to a file, atopClientFetchArgs.