cashuThis is what you use for Bitcoin payments. Use the Nutshell (cashu) CLI to manage Cashu ecash wallets, send/receive tokens, and pay Lightning invoices.
Install via ClawdBot CLI:
clawdbot install a1denvalu3/cashuNutshell is a command-line wallet for Cashu, an ecash protocol for Bitcoin. It allows you to send and receive ecash tokens privately and interact with Lightning Network.
This skill requires the cashu CLI. Install it via pipx (recommended) or pip:
# Recommended (isolated environment)
pipx install cashu
# Alternative (system/user wide)
pip install cashu
Ensure the binary path is in your PATH.
The CLI requires two environment variables to function correctly:
CASHU_DIR: Directory for wallet data (typically ~/.cashu).MINT_URL (or MINT_HOST): The URL of the Cashu mint you want to use.Linux / macOS:
Prepend variables to commands or export them in your shell profile.
# Per-command
CASHU_DIR=~/.cashu MINT_URL=https://mint.example.com cashu balance
# Persistent (add to ~/.bashrc or ~/.zshrc)
export CASHU_DIR=~/.cashu
export MINT_URL=https://mint.example.com
Windows (PowerShell):
$env:CASHU_DIR = "$HOME\.cashu"
$env:MINT_URL = "https://mint.example.com"
cashu balance
All examples below assume CASHU_DIR and MINT_URL are set. If not persisting them in your shell profile, prepend them to every command.
Agent Tip: Always use the --yes (or -y) flag to skip interactive prompts and confirmations. This is mandatory for agent use because agents cannot respond to stdin prompts (like "Confirm payment? [y/N]"); omitting it will cause the command to hang and time out.
# Check wallet balance
CASHU_DIR=~/.cashu MINT_URL=<url> cashu --yes balance
# Check pending tokens
CASHU_DIR=~/.cashu MINT_URL=<url> cashu --yes pending
# Get wallet info
CASHU_DIR=~/.cashu MINT_URL=<url> cashu --yes info
# List wallets
CASHU_DIR=~/.cashu MINT_URL=<url> cashu --yes wallets
Send Cashu tokens (ecash):
# Send amount (generates a token string to share)
CASHU_DIR=~/.cashu MINT_URL=<url> cashu --yes send <amount>
# Example: CASHU_DIR=~/.cashu MINT_URL=https://8333.space:3338 cashu --yes send 100
Receive Cashu tokens:
# Receive a token string
CASHU_DIR=~/.cashu MINT_URL=<url> cashu --yes receive <token_string>
Pay a Lightning Invoice (melt):
# Pay an invoice
CASHU_DIR=~/.cashu MINT_URL=<url> cashu --yes pay <bolt11_invoice>
Pay a Lightning Address (LNURL):
# Pay an LNURL/Lightning Address (automatically resolves the invoice)
CASHU_DIR=~/.cashu MINT_URL=<url> cashu --yes pay <user@domain.com> <amount_sats>
# Example: CASHU_DIR=~/.cashu MINT_URL=<url> cashu --yes pay user@npubx.cash 100
Create a Lightning Invoice (mint):
# Create an invoice to receive funds into the wallet
CASHU_DIR=~/.cashu MINT_URL=<url> cashu --yes invoice <amount>
Manage your Nostr Lightning Address (e.g., user@npubx.cash) to receive payments.
# Create (or display) your static Lightning Address
CASHU_DIR=~/.cashu MINT_URL=<url> cashu --yes lnurl create
# Check for pending payments sent to your address
CASHU_DIR=~/.cashu MINT_URL=<url> cashu --yes lnurl check
# Mint (claim) the pending payments
CASHU_DIR=~/.cashu MINT_URL=<url> cashu --yes lnurl mint
Cashu-enabled APIs may return a 402 Payment Required error with a payment request in the X-Cashu header. This is common for metered APIs or paid endpoints.
The flow:
X-Cashu: creqA... header, extract the payment requestcashu decode cashu --yes pay X-Cashu headerMint compatibility: Payment requests may encode specific mints from which ecash is accepted. If you try to pay with a wallet backed by a mint not in the allowed list, it will error. Use cashu decode to see which mints are accepted before attempting payment.
Example:
# 1. Initial request (returns 402)
curl -s -i https://api.example.com/data
# Response includes:
# HTTP/1.1 402 Payment Required
# X-Cashu: creqA1...
# 2. Pay the payment request
CASHU_DIR=~/.cashu MINT_URL=<url> cashu --yes pay "creqA1..."
# Returns a token like: cashuA...
# 3. Retry with token
curl -s -H "X-Cashu: cashuA..." https://api.example.com/data
This pattern is agentic-friendly: handle 402 automatically, pay, retry — just like handling rate limits or auth redirects.
# Burn spent tokens
CASHU_DIR=~/.cashu MINT_URL=<url> cashu --yes burn
# View all invoices
CASHU_DIR=~/.cashu MINT_URL=<url> cashu --yes invoices
Nutshell uses a .env file inside CASHU_DIR for additional configuration.
If MINT_URL is not provided, it may default to a public test mint or fail. Always specify your trusted mint.
cashuA... (V3) or cashuB... (V4).cashu info).Open issues or contribute at https://github.com/cashubtc/nutshell
Generated Feb 24, 2026
Content creators use Cashu to sell articles, videos, or downloads via Lightning invoices or Cashu tokens. Users pay instantly without accounts, enabling frictionless access to premium content while maintaining privacy. This is ideal for blogs, newsletters, or media platforms requiring small, frequent transactions.
Developers integrate Cashu into APIs to charge per request using the 402 Payment Required pattern. Clients automatically handle payments via agents, allowing for scalable metered billing without traditional subscriptions. This suits data services, AI tools, or cloud computing platforms needing granular pricing.
Social media platforms or live streaming services enable users to send tips via Cashu tokens or Lightning addresses. Recipients receive funds directly into their wallets, bypassing intermediaries and reducing fees. This supports creators, influencers, or community-driven projects in real-time.
Event organizers issue Cashu tokens as digital tickets that can be transferred or redeemed at entry. Payments are made via Lightning invoices, and tokens are verified on-site without complex infrastructure. This provides a secure, low-cost solution for conferences, concerts, or workshops.
Individuals use Cashu to send ecash tokens internationally via simple token strings, leveraging Bitcoin's global network for fast, low-fee transfers. This bypasses traditional banking systems, offering privacy and accessibility for migrant workers or families needing efficient money movement.
Platforms charge a small percentage or fixed fee on each Cashu transaction processed through their service, such as mint operators or payment gateways. Revenue scales with usage, incentivizing high-volume adoption while covering operational costs. This model is common for infrastructure providers in the Bitcoin ecosystem.
Businesses offer subscription plans that include integrated Cashu payments for add-ons or overages, like API calls or premium features. Subscribers benefit from seamless micropayments within the service, driving upsells and retention. Revenue combines recurring subscriptions with incremental payment flows.
Companies license Cashu technology to embed ecash wallets into their apps, customizing the interface for specific industries like gaming or e-commerce. Revenue comes from licensing fees, support contracts, or revenue-sharing on transactions. This model enables rapid deployment of Bitcoin payments without in-house development.
💬 Integration Tip
Always set the --yes flag in commands to avoid interactive prompts, and ensure MINT_URL is configured for reliable mint compatibility, especially when handling 402 payment patterns.
Connect Claude to Clawdbot instantly and keep it connected 24/7. Run after setup to link your subscription, then auto-refreshes tokens forever.
ERC-8004 Trustless Agents - Register, discover, and build reputation for AI agents on Ethereum. Use when registering agents on-chain, querying agent registries, giving/receiving reputation feedback, or interacting with the AI agent trust layer.
Autonomous crypto trading on Base via Bankr. Use for trading tokens, monitoring launches, executing strategies, or managing a trading portfolio. Triggers on "trade", "buy", "sell", "launch", "snipe", "profit", "PnL", "portfolio balance", or any crypto trading task on Base.
Deploy ERC20 tokens on Base using Clanker SDK. Create tokens with built-in Uniswap V4 liquidity pools. Supports Base mainnet and Sepolia testnet. Requires PRIVATE_KEY in config.
Query DeFi portfolio data across 50+ chains via Zapper's GraphQL API. Use when the user wants to check wallet balances, DeFi positions, NFT holdings, token prices, or transaction history. Supports Base, Ethereum, Polygon, Arbitrum, Optimism, and more. Requires ZAPPER_API_KEY.
Interact with Solana blockchain via Helius APIs. Create/manage wallets, check balances (SOL + tokens), send transactions, swap tokens via Jupiter, and monitor addresses. Use for any Solana blockchain operation, crypto wallet management, token transfers, DeFi swaps, or portfolio tracking.