-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
TODO Location
sixty_nuts/wallet.py:824
Priority
🔴 High Priority - Core functionality that blocks essential features
Current Code
async def roll_over_proofs(
self,
*,
spent_proofs: list[ProofDict],
unspent_proofs: list[ProofDict],
deleted_event_ids: list[str],
) -> str:
"""Roll over unspent proofs after a partial spend and return new token id."""
# TODO: Implement roll over logic
return ""What needs to be done
- Implement the logic for NIP-60 proof rollovers when only some proofs from a token event are spent
- Create a new token event containing only the unspent proofs
- Mark the old token event as superseded using the
delfield - Return the new token event ID
- This is critical for proper state transitions and preventing double-spending
Implementation details
- Convert unspent proofs to NIP-60 format (base64 secrets)
- Create new token event with
delfield pointing to old event IDs - Publish to relays using EventManager
- Handle errors gracefully to prevent proof loss
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed