feat: accept caller-managed trusted Cashu wallets #15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/2-caller-trusted-wallets"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Applications can now pass their existing
Arc<cdk::Wallet>handles throughEngineOptions::with_trusted_walletsandEngine::open_with_options. Trusted receive, trusted-mint settlement, balance, payout and recovery all use the supplied wallets.Engine::openkeeps the existing managed-wallet default.Routing is explicit by each wallet's mint URL. Opening rejects duplicate mints and non-sat units; unconfigured trusted mints fail instead of creating another wallet. Supplied wallets retain their own database, seed and configuration. Satsettle persists its coordination/receive-evidence journals but creates no replacement seed or wallet database for those mints, and refuses to silently substitute a supplied wallet into an existing managed-wallet directory.
The API docs and README require the same durable wallet state and routes on restart, coordinated backups, and exclusive wallet mutation/recovery for the Engine lifetime. An Arc is not a cross-Engine or external-CDK lock. Untrusted source wallets remain separate and are addressed by #3.
Validation: formatting, Clippy, documentation and all 53 tests pass in the x86_64 Linux Nix checks. Existing lost-receive-response, uncertain-payout and lost trusted-mint issuance regressions now run with both managed and caller-supplied wallets across restarts. Tests also check absence of replacement wallet files, wrong units/duplicate routes/unconfigured destinations, and isolation of balances across two trusted mints. aarch64 was not checked.
Stacked on #14; this diff contains the issue #2 wallet ownership change.
Closes #2.