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

Put resources outside package #97

Merged
merged 2 commits into from
Sep 1, 2023
Merged

Conversation

mhchia
Copy link
Member

@mhchia mhchia commented Sep 1, 2023

What's wrong?

Previously resources were encoded in base64 to make it easier to support both NodeJS and browser, as mentioned in #93. However, it drastically increases the bundle size and it even failed to work in firefox, as reported by the CryptKeeper team.

Fixes #93.

How it is fixed?

Thanks to the examples from Semaphore and zkitter, we can host the resources else where and download them while initiating the RLN instance. Now, they are temporarily hosted on https://rln-resources-temp.s3.us-west-1.amazonaws.com/resources. We can change it to a permanent one later, for example, after the trusted setup is done.

- Put default resources to an external storage and access it through URL
- Add `RLN.create` which downloads the default resources if devs
didn't give resources
- Fix tests
@mhchia mhchia merged commit 043c906 into main Sep 1, 2023
2 of 3 checks passed
@mhchia
Copy link
Member Author

mhchia commented Sep 1, 2023

Merge it for now since we'd need this feature and NodeJS v16 has passed

@mhchia mhchia deleted the fix/put-resources-outside-npm branch September 1, 2023 16:25
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

Successfully merging this pull request may close these issues.

Make resources standalone files
1 participant