Skip to content

Expose reserve_proofs and record_transaction on Wallet for externally-constructed sends #1906

@Forte11Cuba

Description

@Forte11Cuba

WalletDatabase provides reserve_proofs, update_proofs_state, and add_transaction, but these are not exposed on Wallet. The reverse Wallet::unreserve_proofs is public (crates/cdk/src/wallet/proofs.rs:64-69). Consumers can return proofs to Unspent through the public API but cannot put them into PendingSpent, and cannot record a Transaction for a send not produced by confirm_send.

Offline send: sender selects proofs locally, hands a Token to the receiver out-of-band (NFC/QR), reclaims later if unclaimed. Steps 1, 3, 5 have public APIs. Step 2 (mark proofs PendingSpent) and recording the send as a Transaction do not, forcing consumers to reach into wallet.localstore or write raw SQL, and to maintain a parallel transaction store on the app side.

SendKind::OfflineExact / OfflineTolerance address a different concern skipping the mint round-trip within a saga not externally-constructed tokens.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions