Cashu TS is a JavaScript library for Cashu wallets written in Typescript.
Wallet Features:
- connect to mint (load keys)
- request minting tokens
- minting tokens
- sending tokens (get encoded token for chosen value)
- receiving tokens
- melting tokens
- check if tokens are spent
- ...
Implemented NUTs:
Supported token formats:
- v1 read
- v2 read (deprecated)
- v3 read/write
Go to the docs for detailed usage, or have a look at the integration tests for examples on how to implement a wallet.
npm i @cashu/cashu-ts
import { CashuMint, CashuWallet, getEncodedToken } from '@cashu/cashu-ts';
const mint = new CashuMint(mintUrl);
const wallet = new CashuWallet(mint);
const mintQuote = await wallet.mintQuote(64);
const tokens = await wallet.mintTokens(64, mintQuote.quote);
Contributions are very welcome.
If you want to contribute, please open an Issue or a PR.
If you open a PR, please do so from the development
branch as the base branch.
* `main`
|\
|\ \
| | * `hotfix`
| |
| * `staging`
| |\
| |\ \
| | | * `bugfix`
| | |
| | * `development`
| | |\
| | | * `feature1`
| | | |
| | |/
| | *
| | |\
| | | * `feature2`
| | |/
| |/
|/ (create new version)