Skip to content

Conversation

@pruks-dev
Copy link

@pruks-dev pruks-dev commented Oct 30, 2025

This pull request introduces initial support for Taproot Assets by implementing a new funding source: the TapRestWallet. This wallet backend interacts with a Lightning Terminal Daemon (like litd via a REST interface) to enable the mint to handle Taproot Asset on the Lightning Network.

Key Changes and Implementation Details

  • Adds cashu/lightning/taprest.py, which contains the TapRestWallet class, providing a LightningBackend interface for Taproot Assets operations (specifically targeting litd's REST API).

  • Unit Support: Temporarily uses Unit.thb as a placeholder for a generic "Taproot Asset Unit" in the backend implementation, which will likely need to be generalized/abstracted in future iterations.

  • Adds a new configuration section TapRestFundingSource to cashu/core/settings.py and the respective variables to .env.example.

  • New Environment Variables: Introduces settings for connecting to the Taproot Assets service: MINT_TAP_REST_ENDPOINT, MINT_TAP_REST_CERT, MINT_TAP_REST_CERT_VERIFY

  • Authentication Macaroons: MINT_TAP_REST_LND_MACAROON (for LND/Lightning operations) and MINT_TAP_REST_TAP_MACAROON (for Taproot Assets operations).

  • Asset Identifiers: MINT_TAP_REST_ASSET_ID (the ID of the asset this mint will handle) and MINT_TAP_REST_PEER_PUBKEY.

  • Minor adjustments to cashu/core/base.py to allow the use of Unit.thb in amount calculations, supporting the chosen unit for the Taproot Asset.

@pruks-dev pruks-dev changed the title Taproot asset backend feat: taproot asset backend Oct 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants