Compare commits
2 Commits
v1
...
06ad4d1a5f
| Author | SHA1 | Date | |
|---|---|---|---|
|
06ad4d1a5f
|
|||
|
|
d3b649c151 |
20
Dockerfile
20
Dockerfile
@@ -1,17 +1,17 @@
|
|||||||
FROM node:22.11.0-alpine3.20@sha256:b64ced2e7cd0a4816699fe308ce6e8a08ccba463c757c00c14cd372e3d2c763e
|
FROM node:22.11.0-alpine3.20@sha256:b64ced2e7cd0a4816699fe308ce6e8a08ccba463c757c00c14cd372e3d2c763e
|
||||||
|
|
||||||
WORKDIR /workspace/
|
WORKDIR /websnark/
|
||||||
|
|
||||||
# cache dependencies
|
# cache dependencies
|
||||||
COPY ./package.json ./package-lock.json /workspace/
|
COPY ./package.json ./package-lock.json /websnark/
|
||||||
RUN npm install --ignore-scripts --trace-warnings
|
RUN npm ci --ignore-scripts
|
||||||
|
|
||||||
COPY index.js main.js /workspace/
|
COPY index.js main.js /websnark/
|
||||||
COPY ./src/ /workspace/src/
|
COPY ./src/ /websnark/src/
|
||||||
COPY ./tools/ /workspace/tools/
|
COPY ./tools/ /websnark/tools/
|
||||||
COPY ./test/ /workspace/test/
|
COPY ./test/ /websnark/test/
|
||||||
COPY ./example/ /workspace/example/
|
COPY ./example/ /websnark/example/
|
||||||
RUN mkdir /workspace/build/
|
RUN mkdir /websnark/build/
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
RUN node --test
|
RUN node --test
|
||||||
RUN npx --no esbuild index.js --bundle --platform=browser --format=esm --outfile=bundle.mjs
|
RUN npx --no esbuild index.js --bundle --platform=browser --format=esm --outfile=build/bundle.mjs
|
||||||
|
|||||||
15
README.md
15
README.md
@@ -1,3 +1,18 @@
|
|||||||
|
# Fork
|
||||||
|
|
||||||
|
This is a fork of the version of websnark that is used in the Tornado Classic UI. The changes here only seek to remove as many dependencies as possible, and make the project bundlable with a simple bundler like `esbuild`. A Dockerfile is included to facilitate deterministic builds of the generated `bundle.mjs` file. You can generate and extract the bundle file by doing:
|
||||||
|
```
|
||||||
|
docker image build --tag temp_image .
|
||||||
|
docker container create --name temp_container temp_image
|
||||||
|
docker container cp temp_container:/websnark/build/bundle.mjs bundle.mjs
|
||||||
|
docker container rm temp_container
|
||||||
|
docker image rm temp_image
|
||||||
|
```
|
||||||
|
|
||||||
|
The full set of changes between what Tornado Classic UI usse and this can be seen at https://github.com/tornadocash/websnark/compare/4c0af6a8b65aabea3c09f377f63c44e7a58afa6d...MicahZoltu:websnark:master, and details about each change can be seen in the commit messages.
|
||||||
|
|
||||||
|
Everything below in this Readme is from the original repository.
|
||||||
|
|
||||||
# websnark
|
# websnark
|
||||||
|
|
||||||
A fast zkSnark proof generator written in native Web Assembly.
|
A fast zkSnark proof generator written in native Web Assembly.
|
||||||
|
|||||||
7257
build/bundle.mjs
Normal file
7257
build/bundle.mjs
Normal file
File diff suppressed because one or more lines are too long
@@ -3,6 +3,7 @@
|
|||||||
"version": "0.0.4",
|
"version": "0.0.4",
|
||||||
"description": "big integer library to work in Zq",
|
"description": "big integer library to work in Zq",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
|
"module": "build/bundle.mjs",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "node --test",
|
"test": "node --test",
|
||||||
"build": "node tools/buildwasm.js"
|
"build": "node tools/buildwasm.js"
|
||||||
|
|||||||
Reference in New Issue
Block a user