Step 1
Fetch active keyset
GET /v1/keys
The wallet needs the mint keyset before it can request blinded signatures.
Request
{}Response
{
"keysets": [
{
"id": "009a1f293253e41e",
"unit": "sat",
"active": true
}
]
}Cashu playground
Choose a flow, run it against a test mint, and compare the request, response, wallet state, and cashu-ts code. Test shortcuts are labelled where they appear.
How it works
Choose a flow
These cards are clickable.Inputs
Create a wallet object and load mint metadata. Storage is your app’s job.
Ready. Run this to fetch real mint info and keysets.
Code
Kept close to the cashu-ts docs. Add your own storage functions where shown.
import { Wallet } from '@cashu/cashu-ts'
const mintUrl = "https://nofee.testnut.cashu.space"
const unit = "sat"
const wallet = new Wallet(mintUrl, { unit })
await wallet.loadMint()
// Your app decides how to store proofs and whether to cache mint metadata.
const keychainCache = wallet.keyChain.cache
const mintInfoCache = wallet.getMintInfo().cache
Workings
Step 1
GET /v1/keys
The wallet needs the mint keyset before it can request blinded signatures.
Request
{}Response
{
"keysets": [
{
"id": "009a1f293253e41e",
"unit": "sat",
"active": true
}
]
}Step 2
LOCAL wallet.keyChain.cache + wallet.getMintInfo().cache
There is no wallet.init() call. cashu-ts is ready after new Wallet(...) and loadMint(); your app owns proof storage and optional mint caches.
Request
{
"mint": "https://nofee.testnut.cashu.space",
"unit": "sat"
}Response
{
"ready": true,
"balance": 0,
"proofs": []
}State
Before summary
{
"balance": 0,
"proofs": []
}After summary
{
"balance": 0,
"proofs": []
}