Skip to content

Commit

Permalink
updated code example in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Egge21M committed Feb 6, 2025
1 parent f8015a9 commit 8af29ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ npm i @cashu/cashu-ts

```typescript
import { CashuMint, CashuWallet, MintQuoteState } from '@cashu/cashu-ts';
const mintUrl = 'http://localhost:3338'; // the mint URL
const mintUrl = 'http://localhost:3338';
const mint = new CashuMint(mintUrl);
const wallet = new CashuWallet(mint);
await wallet.loadMint(); // persist wallet.keys and wallet.keysets to avoid calling loadMint() in the future
const mintQuote = await wallet.createMintQuote(64);
// pay the invoice here before you continue...
const mintQuoteChecked = await wallet.checkMintQuote(mintQuote.quote);
if (mintQuoteChecked.state == MintQuoteState.PAID) {
const { proofs } = await wallet.mintProofs(64, mintQuote.quote);
const proofs = await wallet.mintProofs(64, mintQuote.quote);
}
```

Expand Down

0 comments on commit 8af29ca

Please sign in to comment.