Skip to main content

Module pool

Module pool 

Source
Expand description

decdn pool — client-side payment-pool lifecycle commands.

Sibling of super::fetch: where fetch opens/reuses the caller’s own PaymentPool deposit and pays for delivery from it, the pool subcommands manage that deposit directly. list/status is a read-only dump of the tracked buyer pools and their per-lane voucher watermark; open escrows a fresh deposit (openPool); top-up adds funds to a pool the caller owns; close starts the on-chain grace-window close (closePool); reclaim refunds the residual once that window has elapsed (reclaim, callable by anyone); assign issues an owner-signed spending capability delegating a bounded spend on the pool to a delegate signer key, printing the dcap1: token to hand off. Each of top-up/close/reclaim/assign names its target pool explicitly via --pool — there is no implicit per-provider lookup, because one pool fans out to every provider the owner pays (ADR 003). close and reclaim also accept --all, which enumerates every pool this keystore owns on-chain (getPools) and acts on each eligible one. list --all enumerates the same set read-only, which is the only way to see a pool the local store has lost.

These commands own the client’s buyer store, buyer-pools.redb. A decdn-node daemon keeps its own buyer pools in buyer.redb in its data dir; the two files share a table format and nothing else. A data dir holding any of the daemon’s stores — not just buyer.redb, which is the file a reset loses — is a node’s. Pointed at one, list reports the node’s pools over the admin RPC while the daemon runs, because redb’s lock leaves no disk path to that file; with the daemon stopped the lock is gone, so list reads the same buyer.redb directly and labels the listing as a disk read. The commands that would escrow into a store the node never reads — open, top-up, and the chain-enumerating close --all / reclaim --all — refuse. close --pool and reclaim --pool still run, and say plainly that the daemon’s own record was left untouched.

Structs§

PoolArgs
decdn pool <subcommand>.
PoolAssignArgs
decdn pool assign flags.
PoolChainArgs
Shared chain + store coordinates for decdn pool subcommands.
PoolCloseArgs
decdn pool close flags.
PoolListArgs
decdn pool list / status flags.
PoolOpenArgs
decdn pool open flags.
PoolReclaimArgs
decdn pool reclaim flags.
PoolTopUpArgs
decdn pool top-up flags.

Enums§

PoolCommand
Client-side payment-pool lifecycle operations.