patcito/mindwallet

make a single file html page of mindwallet

kropple opened this issue · 4 comments

hi.
all the good brainwallet generator were always single-page html file files with no external loading scripts.
mindwallet includes a google script tag on top

and also loads the worker and argon2.js from an external file.
could you please integrate it so it is all one html file?

i tried, but i could not get the worker included in the html.
the argon2 js i was able to data uri base64

but i am a real idiot at javascript, so best would be if the pro does it right.

thanks a lot,
as i would like to save offline copy of mindwallet but not with a lot of files, it should be a single file which is easy to store and distribute.
thank

argon2 is too heavy, it needs to run in another thread through a web worker in another file otherwise it will freeze the browser and most likely crash the tab. There is a go version in the repo, you can compile it and run it in a terminal if you want to.

thanks for the quick answer.

i was sourcing the argon2.min.js wia base64 data uri and that worked nice

but sourcing the worker from data uri i could not get done:

i tried like this

return new Worker(webpack_require.p + "data:application/javascript;base64,.......

but seems the webpack require doesnt like data uri

i want and need it a single html page for archival, when 20 years later someone needs to re-make his private key from his brain phrase...

i am loading the argon2.min.js like this
scriptLoadedPromise = loadScript('data:application/javascript;base64,
that works nice.
but for loading the worker file like this i am too stupid. dont know anything about webpack sorry

It uses webassembly so you may need something like this to inline it https://www.npmjs.com/package/js-inline-wasm