Skip to content

TODO: Store pending tokens for recovery #24

@shroominic

Description

@shroominic

TODO Location

sixty_nuts/wallet.py:736

Priority

🟡 Medium Priority - Improves reliability

Current Code

# Mark the consumed input proofs as spent (not the output proofs!)
# This creates proper NIP-60 state transitions with rollover events
await self._mark_proofs_as_spent(consumed_proofs)

# Note: Spending history is now created automatically in _mark_proofs_as_spent
# TODO: store pending token somewhere to check on status and potentially undo

What needs to be done

  • Store created tokens temporarily before they're claimed by recipient
  • Enable status checking and potential recovery/undo
  • Implement timeout mechanism for unclaimed tokens

Approach

  1. Store token + metadata in local cache/file
  2. Track creation timestamp and expiry
  3. Provide API to check token status
  4. Implement recovery for expired tokens

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions