Skip to content

Spend Ecash

mint.spendNotes(amountMsats: number)

Generates ecash notes for spending.

ts
import { 
WalletDirector
} from '@fedimint/core'
import {
WasmWorkerTransport
} from '@fedimint/transport-web'
const
director
= new
WalletDirector
(new
WasmWorkerTransport
())
const
wallet
= await
director
.
createWallet
()
await
wallet
.
open
()
const
amountMsats
= 10_000
const
result
= await
wallet
.
mint
.
spendNotes
(
amountMsats
)
console
.
log
(
result
.
notes
) // ecash notes