Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make a single file html page of mindwallet #4

Open
kropple opened this issue Nov 21, 2019 · 4 comments
Open

make a single file html page of mindwallet #4

kropple opened this issue Nov 21, 2019 · 4 comments

Comments

@kropple
Copy link

kropple commented Nov 21, 2019

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

@patcito
Copy link
Owner

patcito commented Nov 21, 2019

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.

@kropple
Copy link
Author

kropple commented Nov 21, 2019

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...

@kropple
Copy link
Author

kropple commented Nov 21, 2019

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

@patcito
Copy link
Owner

patcito commented Nov 21, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants