A powerful extension for LNbits that enables Taproot Assets functionality, allowing you to issue, manage, and transfer Bitcoin-native digital assets using the Taproot Assets Protocol.
- Asset Management: List and view all Taproot Assets in your node
- Send/Receive: Create and pay Taproot Asset invoices
- Channel Support: View Lightning channels with Taproot Assets
- Balance Tracking: Monitor asset balances across all channels
- Real-time Updates: WebSocket support for live balance and transaction updates
- LNbits instance
- Access to a Taproot Assets daemon (tapd) either:
- Integrated within Lightning Terminal (litd) (recommended - bundles LND, Loop, Pool, Faraday, and Taproot Assets)
- Running as a standalone service
- Clone this extension into your LNbits extensions directory:
cd /path/to/lnbits/lnbits/extensions git clone https://github.com/echennells/taproot_assets.git - Install Required gRPC Protocol Files (see below)
- Configure the connection settings (see Configuration section)
- Restart LNbits
For Docker deployments: See mutinynet-litd-lnbits for a complete Docker Compose configuration example with Lightning Terminal and LNbits.
This extension requires gRPC protocol buffer files for communication with LND and Taproot Assets daemon. These files are provided as compressed archives in the extension directory.
Why these files are needed: The gRPC files that ship with LNbits core don't include Taproot Assets support. These archives contain the updated protocol buffers with full Taproot Assets functionality.
Method 1: Extract to LNbits wallets directory
# Navigate to your LNbits root directory
cd /path/to/lnbits
# Extract LND gRPC files (if not already present)
tar -xzf lnbits/extensions/taproot_assets/lnd_grpc_files.tar.gz
# Extract Taproot Assets gRPC files
tar -xzf lnbits/extensions/taproot_assets/tapd_grpc_files.tar.gzMethod 2: For Docker deployments Add extraction commands to your Dockerfile or entrypoint script:
# Extract gRPC files during container build
RUN tar -xzf /app/lnbits/extensions/taproot_assets/lnd_grpc_files.tar.gz -C /app/
RUN tar -xzf /app/lnbits/extensions/taproot_assets/tapd_grpc_files.tar.gz -C /app/What these files provide:
lnd_grpc_files.tar.gz: Contains LND protocol buffers (lightning_pb2.py, invoices_pb2.py, router_pb2.py, etc.)tapd_grpc_files.tar.gz: Contains Taproot Assets protocol buffers (taprootassets_pb2.py, assetwallet_pb2.py, rfq_pb2.py, etc.)
These files enable the extension to communicate with:
- LND via gRPC (for Lightning network operations)
- Taproot Assets daemon via gRPC (for asset operations)
- RFQ (Request for Quote) services for asset trading
- Asset wallet operations for advanced asset management
The extension supports two connection modes:
If you're running litd with integrated tapd and LNbits is configured to use gRPC:
docker-compose.yml:
environment:
- LNBITS_BACKEND_WALLET_CLASS=LndGrpcWallet
- LND_GRPC_ENDPOINT=lit
- LND_GRPC_PORT=10009
- LND_GRPC_CERT=/root/.lnd/tls.cert
- LND_GRPC_MACAROON=/root/.lnd/data/chain/bitcoin/mainnet/admin.macaroonNote: Integrated mode requires a macaroon with both LND and tapd permissions. If you encounter permission errors, use standalone mode instead.
For separate tapd instances or when LNbits uses REST:
Option A: Environment Variables
environment:
# LNbits config (can be REST or gRPC)
- LNBITS_BACKEND_WALLET_CLASS=LndRestWallet
- LND_REST_ENDPOINT=https://lit:8080
- LND_REST_CERT=/root/.lnd/tls.cert
- LND_REST_MACAROON=/root/.lnd/data/chain/bitcoin/mainnet/admin.macaroon
# Taproot Assets config
- TAPD_HOST=lit:10009
- TAPD_TLS_CERT_PATH=/root/.lnd/tls.cert
- TAPD_MACAROON_PATH=/root/.tapd/data/mainnet/admin.macaroonOption B: Configuration File
- Copy
taproot_assets.conf.exampletotaproot_assets.conf - Update the settings with your paths and credentials
- The config file takes precedence over environment variables
Docker paths:
- TLS cert:
/root/.lnd/tls.cert - LND macaroon:
/root/.lnd/data/chain/bitcoin/mainnet/admin.macaroon - tapd macaroon:
/root/.tapd/data/mainnet/admin.macaroon
Local paths:
- TLS cert:
/home/[user]/.lnd/tls.cert - LND macaroon:
/home/[user]/.lnd/data/chain/bitcoin/mainnet/admin.macaroon - tapd macaroon:
/home/[user]/.tapd/data/mainnet/admin.macaroon
┌─────────────┐ ┌─────────────┐
│ LNbits │ │ litd │
│ │ REST │ │
│ Wallet ───┼────────►│ :8080 (LND) │
│ │ │ │
└─────────────┘ │ │
│ │
┌─────────────┐ │ │
│ Taproot │ gRPC │ │
│ Extension ─┼────────►│ :10009 │
│ │ │ (LND+tapd) │
└─────────────┘ └─────────────┘
- In integrated mode: The LND macaroon doesn't have tapd permissions
- Solution: Use standalone mode with separate tapd credentials
- Check that file paths are correct for your environment (Docker vs local)
- Ensure the tapd/lnd services are running and accessible
- Check LNbits logs:
docker logs [lnbits-container] - Verify all required services are running
- Ensure credentials have proper permissions
- Make sure you've extracted the gRPC protocol buffer files (see Installing gRPC Protocol Files)
- The
lnd_grpc_files.tar.gzandtapd_grpc_files.tar.gzmust be extracted to the LNbits root directory - These files provide the Python protocol buffer definitions needed for gRPC communication
GET /taproot_assets/api/v1/taproot/listassets- List all assetsGET /taproot_assets/api/v1/taproot/asset-balances- Get asset balancesPOST /taproot_assets/api/v1/taproot/createinvoice- Create asset invoicePOST /taproot_assets/api/v1/taproot/payinvoice- Pay asset invoiceGET /taproot_assets/api/v1/taproot/payments- List paymentsGET /taproot_assets/api/v1/taproot/invoices- List invoices
Real-time updates are available via WebSocket connections:
- Balance updates:
/api/v1/ws/taproot-assets-balances-[user-id] - Payment updates:
/api/v1/ws/taproot-assets-payments-[user-id] - Invoice updates:
/api/v1/ws/taproot-assets-invoices-[user-id]
taproot_assets/
├── __init__.py # Extension initialization
├── config.json # Extension metadata
├── views.py # Web routes
├── views_api.py # API endpoints
├── models.py # Data models
├── tapd/ # Taproot daemon integration
│ ├── taproot_node.py # Node connection management
│ ├── taproot_assets.py # Asset operations
│ └── ... # Other tapd modules
└── static/ # Frontend assets
MIT license