1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
//! The wallet's view of an asset.
//!
//! Wallet operations parameterise over [`WalletAsset`]. The server-side
//! asset crates (`webycash-asset-{webcash,rgb,voucher}`) carry the full
//! ledger surface; this trait captures only what flavor-agnostic wallet
//! ops need:
//!
//! 1. [`WalletAsset::Namespace`] — partition key for the asset's
//! storage compartment. Webcash collapses this to `()`; RGB and
//! Voucher carry `(ContractId, IssuerFp)`.
//! 2. [`WalletAsset::public_token_for_lookup`] — render a public-form
//! token for `/api/v1/health_check`. Recovery doesn't need to know
//! the asset's amount; the server returns it. Implementations
//! construct the wire string from a 32-byte derived secret hex and
//! the namespace.
//! 3. [`WalletAsset::extract_hash_from_response_key`] — parse the
//! SHA256 hash back out of a server response key. The server's
//! `/health_check` response keys mirror the input wire shape; the
//! hash is at a known offset that varies by asset.
//!
//! Re-exports [`ChainCode`] from [`webylib_hd`] so wallet ops can use
//! the canonical 4-chain enum without an extra import.
pub use crateChainCode;
/// Storage / wire partition for issued assets (RGB, Voucher).
///
/// Webcash collapses [`WalletAsset::Namespace`] to `()`. Every other
/// flavor uses this struct: a (`ContractId`, issuer PGP fingerprint)
/// pair — issuer-scoped ledger compartment.
/// The wallet's view of an asset family. See module docs.