feat: accept atomic payment storage backends #17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/1-payment-storage"
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 supply
Arc<dyn PaymentStore>throughEngineOptions::with_store. All coordination journals, including Cashu receipt evidence and L402 keys, use that backend.Engine::openretains the existing redb layout, and CDK wallet storage remains separately configurable.The public operations preserve atomic receipt ownership, capture decisions, immutable settlement state and uncertain payouts. A reusable
storage-contract-testssuite exercises concurrent decisions, lost acknowledgments and reopen recovery. Embedded writes retain their ordering guard after caller cancellation. Documentation explains how application reservations can share a capture-decision transaction without treating network effects as transactional or enabling concurrent Engine ownership.Validation: 57 unit, public API and documentation tests; formatting and Clippy; standalone contract-feature compilation;
nix flake check path:. -L. Public API tests place coordination storage outside the Engine directory, recover Cashu and Lightning state, and verify no fallback redb files are created.Closes #1.
Stacked on #16; this PR contains the storage-interface commit only.