Cashu playground

Run cashu-ts flows and see what actually changes.

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.

Primary mint: https://nofee.testnut.cashu.spaceFallback: https://testnut.cashu.spaceLive calls and test-only steps are labelled in the timeline.Open starter kit

How it works

Start here.

1. Choose a flowUse the recipe cards below. Create wallet is the clean first run.
2. Press runThe timeline shows each request and response.
3. Copy the codeThe code panel shows the cashu-ts calls and the state your app owns.

Choose a flow

These cards are clickable.

Inputs

Create wallet

Mint: https://nofee.testnut.cashu.space

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

cashu-ts code

create-wallet.ts

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

Request / response timeline

2 steps

Step 1

Fetch active keyset

EXAMPLE

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

Persist wallet cache

EXAMPLE

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 / after

Wallet state

Before summary

{
  "balance": 0,
  "proofs": []
}

After summary

{
  "balance": 0,
  "proofs": []
}