1.0.0-rc.3 • Published 1 month ago

@cashu/cashu-ts v1.0.0-rc.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

Cashu TS

GitHub Workflow Status GitHub issues GitHub package.json version npm npm type definitions npm bundle size code coverage

⚠️ Don't be reckless: This project is in early development, it does however work with real sats! Always use amounts you don't mind losing.

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

Usage

Go to the docs for detailed usage, or have a look at the integration tests for examples on how to implement a wallet.

Install

npm i @cashu/cashu-ts

Example

import { CashuMint, CashuWallet, getEncodedToken } from '@cashu/cashu-ts';

const mint = new CashuMint(mintUrl);
const wallet = new CashuWallet(mint);
const request = await wallet.getMintQuote(64);
const tokens = await wallet.mintTokens(64, request.quote);

Contribute

Contributions are very welcome.

If you want to contribute, please open an Issue or a PR.

1.0.0-rc.3

1 month ago

1.0.0-rc.2

1 month ago

1.0.0-rc.1

2 months ago

1.0.0-rc.0

2 months ago

0.9.0

4 months ago

0.8.0-rc.6

10 months ago

0.8.0-rc.5

10 months ago

0.8.2-rc.6

8 months ago

0.8.2-rc.7

7 months ago

0.8.2-rc.2

8 months ago

0.8.2-rc.3

8 months ago

0.8.2-rc.4

8 months ago

0.8.2-rc.5

8 months ago

0.8.2-rc.1

8 months ago

0.8.1

8 months ago

0.6.1-rc4

1 year ago

0.6.1-rc3

1 year ago

0.6.1-rc6

1 year ago

0.6.1-rc5

1 year ago

0.8.0-rc.2

1 year ago

0.8.0-rc.3

1 year ago

0.8.0-rc.0

1 year ago

0.6.1-rc2

1 year ago

0.6.1-rc1

1 year ago

0.7.2

1 year ago

0.8.0-rc.4

12 months ago

0.7.0

1 year ago

0.6.1

1 year ago

0.6.0-rc3

1 year ago

0.6.0-rc2

1 year ago

0.6.0-rc1

1 year ago

0.6.0

1 year ago

0.5.3-rc2

1 year ago

0.5.3-rc1

1 year ago

0.5.2

1 year ago

0.5.2-rc1

1 year ago

0.5.1

1 year ago