Great! The package actually already has an inbuilt command to create a standalone bundle. Simply clone the repo and do

- npm i

- npm run compile:standalone

Reply to this note

Please Login to reply.

Discussion

lol nice, that’s way easier

At least it was a good learning experience 😅

Is the standalone bundle already hosted on a CDN anywhere?

I could at least do that if that benefits anyone

I got this error in the image below because I'm on an old Windows machine

I had to:

- npm i

- npm install --save-dev cross-env

- update "compile:standalone": "cross-env BUILD_FORMAT=iife vite build" on package.json

- npm run compile:standalone

But now I think I got the full cashu-ts library working! Thanks for your help!

Can I lock e-cash to an npub using cashu-ts?

Yes, you can lock to schnorr public keys. Just make sure to convert them accordingly