Cashu – eChash Lightning Wallet and Mint System
Cashu extension at LNbits
Cashu is an ecash wallet and mint system for Bitcoin Lightning.
Cashu is an extension at LNbits. With the help of Cashu, the operator of an LNbits server can create his own Mint (Lightning Bank) and thus offer a wallet system for his friends and acquaintances.
The Cashu system is based on the Chaumian eCash system, which we introduce in more detail in the article “Chaumian eCash for Bitcoin Lightning“. The eCash system was introduced by David Chaum in 1982, using the term Mint. Transferred to modern times and the use for Lightning, the term Lightning Bank seems more contemporary and is used synonymously here.
As an operator of your own LNbits server, you can create a kind of Lightning Bank using the Cashu extension. Users of this Lightning Bank (Mint) can create Lightning accounts (wallet) and send and receive Lightning payments.
Such a Lightning Bank can be made available to friends and acquaintances who do not want to (or cannot) run their own Lightning Node. Operators of a Lightning Bank can also become platform operators, communities and banks that offer this Lightning service to their own customers and members.
Cashu is a mint that allows you to generate tokens and the necessary wallets. The advantage is data protection, scalability and ease of use.
On the Coincharge YouTube channel we have published a German language video (with english subtitle) about Cashu – eCash Wallet and Mint System for Bitcoin Lightning on the LNbits server.
LNbits Cashu
An LNbits server is required to create a Lightning Bank based on Cashu. LNbits is a Lightning system with a variety of extensions that can be used to make Lightning payments.
In the article: LNbits – Lightning Wallet and Account System we introduce LNbits in a little more detail.
Cashu is an eCash wallet and mint system for Bitcoin Lightning.
A Cashu Mint does not know the users of the wallet, their balances, or with whom payments were made.
Cashu also offers a Lightning Wallet for the browser, smartphone and desktop.
More information can be found on the homepage at Cashu.Space.
You can either operate and offer Cashu yourself (Lightning Node operator) or use it as a user of a Cashu Wallet to send and receive Lightning payments.
In the first step, we will explain how you can set up your own Cashu Lightning Bank (Mint) as an operator of a Lightning Node. The second step explains how Lightning Bank users can create a Cashu Wallet, load it with Lightning funds, and use it to send and receive payments.
In order to use Cashu, an LNbits server is required. You can either run and use your own LNbits server or share the Legend LNbits server from LNbits.
Using Cashu on its own LNbits server
If you do not use your own LNbits server, but use the Legend LNbits server, you can skip this step.
We recommend using your own LNbits server. As an operator of an own LNbits server it is necessary to add the entry in the config file or to set a secure password.
In the config file you will find the following entry:
# Cashu Mint
# Use a long-enough random (!) private key.
# Once set, you cannot change this key as for now.
CASHU_PRIVATE_KEY=”SuperSecretPrivateKey”
Replace the entry “SuperSecretPrivateKey” with a secure password, save the changes and restart the server.
Create a Lightning Bank (Mint) via LNbits Cashu
In order to use Cashu, an LNbits server is required. You can run Cashu on your own LNbits server or share LNbits’ Legend LNbits server and enable the Cashu extension there.
In our example, we use the Legend Lnbits server and set up a Cashu Mint and the corresponding eCash wallet there.
Before we set up Cashu, it is recommended to create a custom Lightning Wallet for Cashu on LNbits.
All Lightning payments will later be processed via this LNbits wallet.
All Cashu Wallet users’ deposits and withdrawals go through this LNbits Wallet.
After you have created a separate LNbits wallet for Cashu, select the Cashu extension in the LNbits Extensions and activate it.
Then we click on New Mint. We choose a name for our Mint.
Then we select the wallet through which the Lightning payments will be made. We choose the wallet that we have created specifically for Cashu.
A Cashu Mint and additionally a Cashu Wallet will then be created, which can be accessed by clicking on the corresponding icon.
The Cashu Mint page will appear, with the name you chose. You can share the url from this page with the users who want to share the Cashu system.
By clicking Open Wallet, these users can then access the Cashu Wallet and create their own wallet.
Create a Cashu Wallet
After you create the Mint in your name, the link with Open Wallet is located and we create and about it a Cashu Wallet.
On the smartphone, you should use the Safari browser or Chrome browser. Cashu Wallet also runs as a web app via the Chrome browser extension on the desktop.
For example, the url of Cashu Wallet is then structured as follows:
https://legend.lnbits.com/cashu/wallet?mint_id=GsAL2…………….5GZF
with a Mint ID attached. This Mint ID is different for each Mint created. There is no separate Cashu Wallet ID.
Then we bookmark that URL so that you can access your Cashu Wallet again. It is also recommended to make a backup. The system is still beta and is only suitable for testing purposes so far.
Cashu Wallet Backend
In Cashu Wallet, we can find Get Invoice and Pay Invoice sections in addition to the amount in Sats. Payments can be made via Lightning. Either to make Lightning deposits to the Cashu Wallet (Get Invoice) or to pay Lightning invoices or make withdrawals from the Cashu Wallet (Pay Invoice).
Among them are the options for Get eCash and Pay eCash. This is Lightning Token, which is used for internal payment processing within Lightning Bank (Mint). Anyone who wants to send or receive a Lightning payment to another user of Calle’s Mint uses Get or Pay eCash.
Get Invoice and Pay Invoice is for external Lightning payments and Get Ecash and Pay Ecash is for internal payments within the same Mint.
Our Cashu Wallet is currently empty, so we want to top it up first.
Cashu Wallet recharge by Lightning payment / receive Lightning payment
Make a deposit to the Cashu Wallet.
To make a Lightning deposit to Cashu Wallet, we click on Get Invoice.
In our example, create a Lightning Invoice equivalent to 1,000 sats. A Lightning Invoice is created by Mint and displayed in the form of a QR code.
We can now pay this Lightning Invoice with any Lightning Wallet.
Upon payment, the deposited sats will be credited to the LNbits wallet.
In the overview with the navigation points Invoice, Tokens and History we get this displayed accordingly.
Under Invoices we find the Lightning Invoice we received and paid from Calle’s Mint.
Under Tokens we can find the Ecash Lightning Tokens we received in return. We have received 5 Ecash Lightning tokens with the respective values 1,2,8,256 and 512, which add up to 1,000 again.
Send payment to another Cashu Wallet user at the same Mint
To make a payment via eCash, we create a payment order through Pay Ecash. We enter amount (eg 100 sats) and a purpose.
Then we get a QR code displayed and the options to copy the token to the clipboard (Copy Token) or create a token link (Copy link).
This information is sent to the recipient of the payment.
Receiving payment from another Cashu Wallet user at the same Mint
The recipient of this token opens “Get Ecash” in his wallet and copies the token into the field or clicks on the link and then the field is filled in automatically.
After that click Receive and the amount will be credited.
Pay Lightning Invoice via Cashu Wallet
In addition to payments within the Mint system, normal Lightning payments can be made. This is done via the Pay Invoice function.
If you have received a Lightning Invoice, then click on the Pay Invoice field and copy the Lightning Invoice details into the appropriate field.
After a few seconds, the Lightning Invoice is credited to the issuer of the Lightning Invoice.
The Cashu Wallet will display the withdrawal. In addition to the invoice amount of 100 sats, the routing fee of the Lightning network will be charged.
Conclusion about the Cashu extension on LNbits
For Lightning to continue to grow, there must be custodial solutions because not everyone can run their own Lightning Node.
Cashu based on eCash for Lightning offers such a solution.
With the Cashu extension on LNbits, the operator of a Lightning Node gets a Mint with which to generate tokens and the necessary wallets.
Operators of a Lightning Node can thus enable friends and acquaintances to use and process payments via Lightning without having to operate their own Lightning Node.
Applications like Cashu and Fedimint, which are based on Chaumian eCash, can help the Lightning network grow, enable more Lightning transactions, and make Lightning payments more anonymous and secure for users.
If you want to learn more about Chaumian eCash, we recommend the article: Chaumian eCash for Bitcoin Lightning