Skip to main content

Module server_client

Module server_client 

Source
Expand description

Minimal asset-agnostic HTTP client for the webycash-server family.

Every flavor (Webcash, RGB Fungible, RGB Collectible, Voucher) speaks the same wire protocol — /api/v1/replace, /health_check, /burn, /mining_report, /issue — only the token wire format differs. This crate ships ONE Client; the wallet crates (wallet-webcash, wallet-rgb, wallet-voucher) wrap it in flavor-specific verbs (pay, transfer, insert).

The Client is sync over reqwest::blocking by default for straightforward CLI integration; an async surface lives behind the async feature.

Structs§

Client
Minimal asset-agnostic HTTP client. One instance per server URL; methods correspond 1:1 to the server’s endpoint set.
HtlcLockEntry
One entry in the htlc_locks array — pair an output index with the lock parameters the server should stamp.
HtlcLockRequest
Wallet-side counterpart to webycash-asset-rgb::htlc::LockRequest. Carries a delta from server-now (never an absolute timestamp) — see docs/referee-zkp-based-swap.md §8.
HtlcWitness
Wallet-side counterpart to webycash-asset-rgb::htlc::HtlcWitness.
HtlcWitnessEntry
One entry in the htlc_witnesses array — pair an input index with its claim-or-refund witness.

Enums§

ClientError
Failure modes when talking to a webycash-server flavor.

Type Aliases§

ClientResult
Convenience alias used across the wallet crates for results from any Client method.