|
1 | | -//! # dig-account |
2 | | -//! |
3 | | -//! The DIG Network **user Account** — the fat, strictly-logical (zero-UI, headless-testable) |
4 | | -//! encapsulation of everything an account can do. |
5 | | -//! |
6 | | -//! An **Account** is one master seed plus one or more **Profiles** (exactly one default). A |
7 | | -//! **Profile** is a DID + dig-store + SMT-of-profile-info (dig-social-profile's `IdentityProfile`), |
8 | | -//! minted and signed with the account seed's key at that profile index. |
9 | | -//! |
10 | | -//! This crate owns the object model, the unlock policy + keystore crypto, the in-process |
11 | | -//! identity+money signer, per-profile key/DEK derivation, the DID+dig-store mint, and all wallet |
12 | | -//! ops. It NEVER draws UI or drives an OS auth ceremony — the host harness (dig-app) injects a |
13 | | -//! UI/auth provider that this crate calls back through for unlock and spend-confirm ceremonies. |
14 | | -//! |
15 | | -//! ## Custody split (the harness seam) |
16 | | -//! |
17 | | -//! dig-account is headless: it owns the account STATE machine + the crypto, but it never collects a |
18 | | -//! password, renders a spend prompt, or drives an OS auth ceremony. The host harness (dig-app) |
19 | | -//! implements [`AuthProvider`](auth::provider::AuthProvider) and injects it; dig-account calls back |
20 | | -//! through that seam for every unlock and every spend confirmation. The private key never leaves the |
21 | | -//! crate; the UI never sees a seed. |
22 | | -//! |
23 | | -//! See `SPEC.md` for the normative contract. |
24 | | -//! |
25 | | -//! ## Phase 1 status |
26 | | -//! |
27 | | -//! This is the PUBLIC TYPE SURFACE cut: the object model, keystore (`store`), unlock policy |
28 | | -//! (`auth::policy`), per-profile key/DEK derivation, and the money path (`wallet` — the canonical |
29 | | -//! `WalletKey` + the concrete [`MoneySigner`](wallet::money_signer::LocalMoneySigner) over |
30 | | -//! `dig-wallet-backend`'s `LocalSigner`, with the structured [`SpendSummary`](wallet::summary::SpendSummary)) |
31 | | -//! carry real, tested implementations. The identity-signer and mint modules still expose their FINAL |
32 | | -//! public signatures with `todo!()` bodies, filled in a later phase. |
33 | | -
|
34 | | -// Phase 1 stubs: several modules expose final signatures with `todo!()`/`unimplemented!()` bodies. |
35 | | -#![allow(clippy::todo)] |
36 | | - |
37 | | -pub mod auth; |
38 | | -pub mod error; |
39 | | -pub mod id; |
40 | | -pub mod keys; |
41 | | -pub mod model; |
42 | | -pub mod profile_mint; |
43 | | -pub mod session; |
44 | | -pub mod signer; |
45 | | -pub mod store; |
46 | | -pub mod unlocked; |
47 | | -pub mod wallet; |
48 | | - |
49 | | -pub use auth::factors::AuthFactors; |
50 | | -pub use auth::policy::{AllOf, AuthPolicy, PasswordOnlyPolicy, UnlockError, UnlockGate}; |
51 | | -pub use auth::provider::{AuthProvider, SpendConfirmRequest, SpendDecision, UnlockRequest}; |
52 | | -pub use auth::second_factor::SecondFactor; |
53 | | -pub use error::{AccountError, Result}; |
54 | | -pub use id::{AccountId, ProfileIx}; |
55 | | -pub use keys::dek::profile_dek; |
56 | | -pub use keys::wallet_key::WalletKey; |
57 | | -pub use model::{Account, AccountRecord, Profile}; |
58 | | -pub use profile_mint::ProfileMinter; |
59 | | -pub use session::AccountSession; |
60 | | -pub use signer::ProfileSigner; |
61 | | -pub use store::{AccountStore, AccountStoreError}; |
62 | | -pub use unlocked::UnlockedAccount; |
63 | | -pub use wallet::authorizer::{SpendAuthorizer, WalletOps}; |
64 | | -pub use wallet::autosend::{AutoSendPolicy, OpClassLimits, SpendOpClass, DEFAULT_PERIOD_SECONDS}; |
65 | | -pub use wallet::clock::{Clock, FixedClock, SystemClock}; |
66 | | -pub use wallet::enforcer::PolicyAuthorizer; |
67 | | -pub use wallet::money_signer::{LocalMoneySigner, MoneySigner}; |
68 | | -pub use wallet::policy::{CustodyPolicy, HotWallet, Vault}; |
69 | | -pub use wallet::summary::{SpendRecipient, SpendSummary, SpendTier}; |
70 | | -pub use wallet::vault_move::VaultMove; |
| 1 | +//! # dig-account |
| 2 | +//! |
| 3 | +//! The DIG Network **user Account** — the fat, strictly-logical (zero-UI, headless-testable) |
| 4 | +//! encapsulation of everything an account can do. |
| 5 | +//! |
| 6 | +//! An **Account** is one master seed plus one or more **Profiles** (exactly one default). A |
| 7 | +//! **Profile** is a DID + dig-store + SMT-of-profile-info (dig-social-profile's `IdentityProfile`), |
| 8 | +//! minted and signed with the account seed's key at that profile index. |
| 9 | +//! |
| 10 | +//! This crate owns the object model, the unlock policy + keystore crypto, the in-process |
| 11 | +//! identity+money signer, per-profile key/DEK derivation, the DID+dig-store mint, and all wallet |
| 12 | +//! ops. It NEVER draws UI or drives an OS auth ceremony — the host harness (dig-app) injects a |
| 13 | +//! UI/auth provider that this crate calls back through for unlock and spend-confirm ceremonies. |
| 14 | +//! |
| 15 | +//! ## Custody split (the harness seam) |
| 16 | +//! |
| 17 | +//! dig-account is headless: it owns the account STATE machine + the crypto, but it never collects a |
| 18 | +//! password, renders a spend prompt, or drives an OS auth ceremony. The host harness (dig-app) |
| 19 | +//! implements [`AuthProvider`](auth::provider::AuthProvider) and injects it; dig-account calls back |
| 20 | +//! through that seam for every unlock and every spend confirmation. The private key never leaves the |
| 21 | +//! crate; the UI never sees a seed. |
| 22 | +//! |
| 23 | +//! See `SPEC.md` for the normative contract. |
| 24 | +//! |
| 25 | +//! ## Phase 1 status |
| 26 | +//! |
| 27 | +//! This is the PUBLIC TYPE SURFACE cut: the object model, keystore (`store`), unlock policy |
| 28 | +//! (`auth::policy`), per-profile key/DEK derivation, and the money path (`wallet` — the canonical |
| 29 | +//! `WalletKey` + the concrete [`MoneySigner`](wallet::money_signer::LocalMoneySigner) over |
| 30 | +//! `dig-wallet-backend`'s `LocalSigner`, with the structured [`SpendSummary`](wallet::summary::SpendSummary)) |
| 31 | +//! carry real, tested implementations. The identity-signer and mint modules still expose their FINAL |
| 32 | +//! public signatures with `todo!()` bodies, filled in a later phase. |
| 33 | +
|
| 34 | +// Phase 1 stubs: several modules expose final signatures with `todo!()`/`unimplemented!()` bodies. |
| 35 | +#![allow(clippy::todo)] |
| 36 | + |
| 37 | +pub mod auth; |
| 38 | +pub mod error; |
| 39 | +pub mod id; |
| 40 | +pub mod keys; |
| 41 | +pub mod model; |
| 42 | +pub mod profile_mint; |
| 43 | +pub mod session; |
| 44 | +pub mod signer; |
| 45 | +pub mod store; |
| 46 | +pub mod unlocked; |
| 47 | +pub mod wallet; |
| 48 | + |
| 49 | +pub use auth::factors::AuthFactors; |
| 50 | +pub use auth::policy::{AllOf, AuthPolicy, PasswordOnlyPolicy, UnlockError, UnlockGate}; |
| 51 | +pub use auth::provider::{AuthProvider, SpendConfirmRequest, SpendDecision, UnlockRequest}; |
| 52 | +pub use auth::second_factor::SecondFactor; |
| 53 | +pub use error::{AccountError, Result}; |
| 54 | +pub use id::{AccountId, ProfileIx}; |
| 55 | +pub use keys::dek::profile_dek; |
| 56 | +pub use keys::wallet_key::WalletKey; |
| 57 | +pub use model::{Account, AccountRecord, Profile}; |
| 58 | +pub use profile_mint::ProfileMinter; |
| 59 | +pub use session::AccountSession; |
| 60 | +pub use signer::ProfileSigner; |
| 61 | +pub use store::{AccountStore, AccountStoreError}; |
| 62 | +pub use unlocked::UnlockedAccount; |
| 63 | +pub use wallet::approval::{PendingApproval, SpendApproval, SpendRuling}; |
| 64 | +pub use wallet::authorizer::WalletOps; |
| 65 | +pub use wallet::autosend::{AutoSendPolicy, OpClassLimits, SpendOpClass, DEFAULT_PERIOD_SECONDS}; |
| 66 | +pub use wallet::clock::{Clock, FixedClock, SystemClock}; |
| 67 | +pub use wallet::enforcer::PolicyAuthorizer; |
| 68 | +pub use wallet::money_signer::{LocalMoneySigner, MoneySigner}; |
| 69 | +pub use wallet::policy::{CustodyPolicy, HotWallet, Vault}; |
| 70 | +pub use wallet::summary::{SpendRecipient, SpendSummary, SpendTier}; |
| 71 | +pub use wallet::vault_move::VaultMove; |
0 commit comments