Skip to content

TODO: Handle change in melt() method #21

@shroominic

Description

@shroominic

TODO Location

sixty_nuts/wallet.py:656

Priority

🔴 High Priority - Required for complete Lightning payments

Current Code

# Handle any change returned from the mint
change_proofs: list[ProofDict] = []
if "change" in melt_resp and melt_resp["change"]:
    # TODO: handle change
    # Convert BlindedSignatures to ProofDict format
    # This would require unblinding logic, but for now we'll skip change handling

What needs to be done

  • Implement proper change handling when melting tokens for Lightning payments
  • Unbind the BlindedSignatures returned by the mint
  • Convert them to ProofDict format
  • Store the change proofs in the wallet

Implementation steps

  1. Extract BlindedSignatures from melt response
  2. Use the original blinding factors to unblind signatures
  3. Create ProofDict objects with correct format
  4. Call store_proofs() to persist the change

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions