Cashu wallet

Manage Bitcoin and Cashu ecash through a command-line interface, enabling private transactions via Lightning and ecash tokens.

24 stars
Complexity: easy

About this skill

The Cashu wallet is a privacy-focused command-line interface (CLI) application designed for managing Bitcoin and Cashu ecash. It facilitates instant payments via the Lightning Network and supports private, token-based transactions using Cashu ecash. Users can connect to multiple 'mints' to diversify their holdings across different currencies (like sats, USD, EUR, depending on the mint's capabilities) and manage their transaction history. This skill is particularly useful for users who prioritize privacy and desire a lightweight, programmatic way to interact with their Bitcoin and ecash funds. It allows an AI agent to programmatically execute financial tasks, such as sending or receiving payments, checking balances, and managing mint connections, without requiring a graphical user interface. Its core functionality revolves around the exchange of Bitcoin for Cashu ecash tokens through trusted mints, offering a layer of privacy by making transaction histories less traceable to individual users. This makes it a powerful tool for automated financial operations where privacy and efficiency are key concerns.

Best use case

The primary use case is for AI agents to automate Bitcoin and Cashu ecash transactions, balance checks, and mint management. It benefits users who want to programmatically interact with their funds, make payments, receive funds, or manage their ecash assets within automated workflows or through conversational AI interfaces.

Manage Bitcoin and Cashu ecash through a command-line interface, enabling private transactions via Lightning and ecash tokens.

Users should expect successful execution of Bitcoin/Lightning payments, Cashu ecash transfers, accurate balance reporting, and effective management of connected mints.

Practical example

Example input

I need to send 5000 sats using my Cashu wallet via Lightning to the invoice 'lnbc...'. After that, please check my current balance.

Example output

Successfully sent 5000 sats via Lightning. Current wallet balance: 12,345 sats (across 2 connected mints).

When to use this skill

  • When a user wants to pay for a service using Bitcoin or Lightning.
  • When a user needs to receive Bitcoin or Lightning payments.
  • When a user wants to check their wallet balance or transaction history.
  • When a user wants to send, receive, or manage Cashu ecash tokens and mints.

When not to use this skill

  • When managing traditional fiat currencies or other non-cryptocurrency assets.
  • When a user prefers a graphical user interface (GUI) for wallet management.
  • For high-frequency trading or complex financial derivatives.
  • If the user is managing large sums of Bitcoin requiring a full, self-hosted node.

How Cashu wallet Compares

Feature / AgentCashu walletStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityeasyN/A

Frequently Asked Questions

What does this skill do?

Manage Bitcoin and Cashu ecash through a command-line interface, enabling private transactions via Lightning and ecash tokens.

How difficult is it to install?

The installation complexity is rated as easy. You can find the installation instructions above.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Cashu Wallet

**Cashu Wallet** is a lightweight, privacy-focused Bitcoin wallet powered by **Cashu ecash**. It allows you to send and receive payments instantly using the **Lightning Network** or by exchanging **ecash tokens** directly.

### 🌟 Key Features
*   **Bitcoin over Lightning:** Seamlessly send and receive Lightning payments.
*   **Cashu Ecash:** Privacy-preserving ecash tokens.
*   **Multi-Mint Support:** Connect to multiple mints to diversify risk or support different currencies (sats, usd, eur, etc., depending on the mint).


---

## 📦 Installation & Setup

The wallet is a Node.js CLI application located in this directory.

1.  **Install Dependencies:**
    ```bash
    cd cli
    npm install
    ```

2.  **Create Alias (Optional but Recommended):**
    To make commands easier to run, you can create an alias:
    ```bash
    alias cashu='node cli/wallet.mjs'
    ```

---

## 🚀 Usage Guide

All commands can be run using `node cli/wallet.mjs <command>` (or `cashu <command>` if aliased).

### 1. Managing Mints
Before you can do anything, you need to trust a **Mint**. A mint exchanges Bitcoin (Lightning) for ecash tokens.

*   **List Mints:** View connected mints and their status.
    ```bash
    node cli/wallet.mjs mints
    ```
*   **Add a Mint:** connect to a new mint URL.
    ```bash
    node cli/wallet.mjs add-mint https://mint.url
    # Example (Testnut):
    node cli/wallet.mjs add-mint https://testnut.cashu.space
    ```

### 2. Receiving Money (In)
*   **Via Lightning (Deposit):** Create a Lightning invoice to swap BTC for ecash.
    ```bash
    # Usage: invoice <amount> [mint_url]
    node cli/wallet.mjs invoice 1000
    ```
    *This command will generate an invoice and wait for payment. Once paid, it automatically mints the tokens.*

*   **Via Ecash Token:** Receive a Cashu token string sent by someone else.
    ```bash
    # Usage: receive <token>
    node cli/wallet.mjs receive "cashuA..."
    ```

### 3. Sending Money (Out)
*   **Via Lightning (Pay Invoice):** Pay a BOLT11 Lightning invoice using your ecash balance.
    ```bash
    # Usage: pay-invoice <bolt11_invoice> [mint_url]
    node cli/wallet.mjs pay-invoice lnbc10u...
    ```

*   **Via Ecash Token:** Generate a token to send to someone else off-chain.
    ```bash
    # Usage: send <amount> [mint_url]
    node cli/wallet.mjs send 500
    ```
    *Output: A `cashuA...` token string that you can share.*

### 4. Wallet Management
*   **Check Balance:** See your total balance across all mints.
    ```bash
    node cli/wallet.mjs balance
    ```

*   **Transaction History:** View past deposits, withdrawals, and transfers.
    ```bash
    node cli/wallet.mjs history
    ```

*   **Check Pending Invoice:** If you created an invoice but closed the CLI before it confirmed, check it manually.
    ```bash
    # Usage: check-invoice <quote_id> [mint_url]
    node cli/wallet.mjs check-invoice "quote_id_here"
    ```

*   **Restore Wallet:** Recover funds from a specific mint using your seed (stored in `~/.cashu-wallet/seed.txt`).
    ```bash
    node cli/wallet.mjs restore https://mint.url
    ```

---

## 🛠️ Troubleshooting


*   **Logs & Data:** Data is stored in `~/.cashu-wallet/wallet.db`.
*   **Recommended Mint:** `https://mint.coinos.io`

Related Skills

AgentWallet — Non-Custodial Smart Wallets for AI Agents

3891
from openclaw/skills

Non-custodial smart wallets with onchain spending limits and passkey-based human control. Supports **Base** (EVM) and **Solana**. Every wallet gets free gas on creation so your agent can transact immediately.

General Utilities

find-skills

3891
from openclaw/skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

General Utilities

filesystem

3891
from openclaw/skills

Advanced filesystem operations for listing files, searching content, batch processing, and directory analysis. Supports recursive search, file type filtering, size analysis, and batch operations like copy/move/delete. Use when you need to: list directory contents, search for files by name or content, analyze directory structures, perform batch file operations, or analyze file sizes and distribution.

General Utilities

Budget & Expense Tracker — AI Agent Financial Command Center

3891
from openclaw/skills

Track every dollar, enforce budgets, spot spending patterns, and build wealth — all through natural conversation with your AI agent.

General Utilities

yt-dlp

3891
from openclaw/skills

A robust CLI wrapper for yt-dlp to download videos, playlists, and audio from YouTube and thousands of other sites. Supports format selection, quality control, metadata embedding, and cookie authentication.

General Utilities

time-checker

3891
from openclaw/skills

Check accurate current time, date, and timezone information for any location worldwide using time.is. Use when the user asks "what time is it in X", "current time in Y", or needs to verify timezone offsets.

General Utilities

pihole-ctl

3891
from openclaw/skills

Manage and monitor local Pi-hole instance. Query FTL database for statistics (blocked ads, top clients) and control service via CLI. Use when user asks "how many ads blocked", "pihole status", or "update gravity".

General Utilities

mermaid-architect

3891
from openclaw/skills

Generate beautiful, hand-drawn Mermaid diagrams with robust syntax (quoted labels, ELK layout). Use this skill when the user asks for "diagram", "flowchart", "sequence diagram", or "visualize this process".

General Utilities

memory-cache

3891
from openclaw/skills

High-performance temporary storage system using Redis. Supports namespaced keys (mema:*), TTL management, and session context caching. Use for: (1) Saving agent state, (2) Caching API results, (3) Sharing data between sub-agents.

General Utilities

mema

3891
from openclaw/skills

Mema's personal brain - SQLite metadata index for documents and Redis short-term context buffer. Use for organizing workspace knowledge paths and managing ephemeral session state.

General Utilities

file-organizer-skill

3891
from openclaw/skills

Organize files in directories by grouping them into folders based on their extensions or date. Includes Dry-Run, Recursive, and Undo capabilities.

General Utilities

media-compress

3891
from openclaw/skills

Compress and convert images and videos using ffmpeg. Use when the user wants to reduce file size, change format, resize, or optimize media files. Handles common formats like JPG, PNG, WebP, MP4, MOV, WebM. Triggers on phrases like "compress image", "compress video", "reduce file size", "convert to webp/mp4", "resize image", "make image smaller", "batch compress", "optimize media".

General Utilities