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
del field
- 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
del field pointing to old event IDs
- Publish to relays using EventManager
- Handle errors gracefully to prevent proof loss
TODO Location
sixty_nuts/wallet.py:824Priority
🔴 High Priority - Core functionality that blocks essential features
Current Code
What needs to be done
delfieldImplementation details
delfield pointing to old event IDs