Compare commits

...

2 Commits

Author SHA1 Message Date
53cb3ac414
Update Dockerfile 2024-12-23 19:09:40 +00:00
f4382f4e78
Rename package name 2024-12-23 19:09:02 +00:00
10 changed files with 82 additions and 76 deletions

@ -7,7 +7,7 @@ RUN apt update && apt install --yes --no-install-recommends wget git apt-transpo
ENV GIT_REPOSITORY=https://github.com/tornadocontrib/tornado-scripts.git
# From main branch, double check with git.tornado.ws and codeberg.org
ENV GIT_COMMIT_HASH=d143bc2923e4dcb1c84e4123fbc56cb406e6db6f
ENV GIT_COMMIT_HASH=f4382f4e786f438ef612212326f3cc465d422b95
# clone the repository
RUN mkdir /app/

8
dist/hashes.json vendored

@ -1,11 +1,11 @@
{
"dist/index.js": "sha384-9VSo+DyOg7bk9fplN0eusAdRqdhB/o9VBM9Y4TinC0tYBljNm2IDfxC4G60luJDp",
"dist/index.mjs": "sha384-Cm+w57MAhudCJ1Xk+H0dwspZlGJV3Yny1uFzoQBbNaCNaLwTH9CqDHdmu2mAYQxJ",
"dist/index.js": "sha384-DMBnRJIMRwGIEYdgWy5NptEFmOmmB4DrUWvVNf60ZUMHDWnuHdogrjx1dkCSOWtN",
"dist/index.mjs": "sha384-3zq911CcPyyFDXeBw8eByPFafkAn/CA5zHaBTQnpU7wIXczHIYYMBvb9GN3ugnd/",
"dist/merkleTreeWorker.js": "sha384-HPaQH762jYxlfAdS4KPJou1AXG9Ww4N+PDEc6vHgFeIX1HI8S/StRmOoJR+gHScM",
"dist/merkleTreeWorker.umd.js": "sha384-+VOeGAa/XGNYsar06LgAquRWKO3CG7anvbpVvlWIa6J9pg9+DskqaDkAusiVz8HZ",
"dist/merkleTreeWorker.umd.min.js": "sha384-fOCKW9eYxMVLFTOQcuKJxJwNyRu6MRIzmPFHqzxlp0P/ZT24y+A3HcgCylohIfJ0",
"dist/tornado.umd.js": "sha384-/dWCQ81GwzoRqHnv+pi9tsHj2mzMyvxBk5ttIbOLe/0MIcSw9aBoSr3vgRoSlWZ+",
"dist/tornado.umd.min.js": "sha384-CgPo6GlnCtdGLqeu7OIcOliLTRQy289Q3CxWv5xqXCQhrHxSUupP8nBv55xQiqkW",
"dist/tornado.umd.js": "sha384-XeXTO328XhMcGl1pxByq1uxvXQhqvHM29YMNE9axl6CvAL2QaZiCxnPReNSflkjS",
"dist/tornado.umd.min.js": "sha384-l8SqurxZw9c56JNIytR6PW5Unprk11ruakjTC9Wgk2HLoNEQfrn7kalzBIzCQ13X",
"dist/tornadoContracts.umd.js": "sha384-Gmawcz/XTH7WFUFnMJKPUCy2zrjDOhf/DtSv9xfHBulPyCEJwI70Hw+n7E1Y60EU",
"dist/tornadoContracts.umd.min.js": "sha384-Sclkp3xkhjmDekfQaQFkgUctmauYUF7ieeyyFhFBnwAzyp2eFBS5qzxvOIBhlJza"
}

2
dist/index.js vendored

@ -10017,7 +10017,7 @@ class IndexedDB {
}
async function getIndexedDB(netId) {
if (!netId) {
const idb2 = new IndexedDB({ dbName: "tornado-core" });
const idb2 = new IndexedDB({ dbName: "tornado-scripts" });
await idb2.initDB();
return idb2;
}

2
dist/index.mjs vendored

@ -9995,7 +9995,7 @@ class IndexedDB {
}
async function getIndexedDB(netId) {
if (!netId) {
const idb2 = new IndexedDB({ dbName: "tornado-core" });
const idb2 = new IndexedDB({ dbName: "tornado-scripts" });
await idb2.initDB();
return idb2;
}

2
dist/tornado.umd.js vendored

@ -91523,7 +91523,7 @@ class IndexedDB {
}
async function getIndexedDB(netId) {
if (!netId) {
const idb2 = new IndexedDB({ dbName: "tornado-core" });
const idb2 = new IndexedDB({ dbName: "tornado-scripts" });
await idb2.initDB();
return idb2;
}

File diff suppressed because one or more lines are too long

@ -15,23 +15,29 @@
"build:web": "webpack",
"build:hash": "ts-node scripts/hash.ts",
"build": "yarn types && yarn build:node && yarn build:web && yarn build:hash",
"ipfs:build": "docker build -t tornado-core .",
"ipfs:hash": "docker container run --rm -it --entrypoint cat tornado-core /app/dist/hashes.json",
"docker:build": "docker build -t tornado-scripts .",
"docker:hash": "docker container run --rm -it --entrypoint cat tornado-scripts /app/dist/hashes.json",
"test": "nyc mocha --require ts-node/register --require source-map-support/register --recursive 'test/**/*.ts' --timeout '300000'"
},
"author": "Tornado Contrib",
"license": "MIT",
"files": [
"dist",
"scripts",
"src",
".eslintrc.js",
"test",
".gitattributes",
".gitignore",
".npmrc",
"Dockerfile",
"eslint.config.mjs",
"hardhat.config.ts",
"LICENSE",
"logo.png",
"logo2.png",
"rollup.config.mjs",
"tsconfig.build.json",
"tsconfig.json",
"webpack.config.js",
"yarn.lock"
],
"dependencies": {
@ -47,7 +53,7 @@
"fixed-merkle-tree": "0.7.3",
"idb": "^8.0.1",
"snarkjs": "git+https://github.com/tornadocontrib/snarkjs.git#2c964b3fe6019e057acab04cc17705d1f7fdaf9a",
"tornado-contracts": "git+https://github.com/tornadocontrib/tornado-contracts.git#4c2fe0b80fa1a0571ffa538a046e234d4e38d140",
"tornado-contracts": "git+https://github.com/tornadocontrib/tornado-contracts.git#9be1e1c308ae891e939944b2220d9e2810e579f5",
"websnark": "git+https://github.com/tornadocontrib/websnark.git#e5a79cca905d1ffb61a69739492be58d438c9f17"
},
"devDependencies": {
@ -90,7 +96,7 @@
"tsc": "^2.0.4",
"typechain": "^8.3.2",
"typescript": "^5.7.2",
"typescript-eslint": "^8.18.1",
"typescript-eslint": "^8.18.2",
"webpack": "^5.97.1",
"webpack-cli": "^6.0.1"
},

@ -317,7 +317,7 @@ export class IndexedDB {
export async function getIndexedDB(netId?: NetIdType) {
// key-value db for settings
if (!netId) {
const idb = new IndexedDB({ dbName: 'tornado-core' });
const idb = new IndexedDB({ dbName: 'tornado-scripts' });
await idb.initDB();
return idb;
}

@ -112,7 +112,7 @@ export function leInt2Buff(bigint: bnInput | bigint) {
return Uint8Array.from(new BN(bigint as bnInput).toArray('le', 31));
}
// Inherited from tornado-core and tornado-cli
// Inherited from tornado-scripts and tornado-cli
export function toFixedHex(numberish: BigNumberish, length = 32) {
return (
'0x' +

118
yarn.lock

@ -1493,62 +1493,62 @@
dependencies:
"@types/node" "*"
"@typescript-eslint/eslint-plugin@8.18.1":
version "8.18.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.18.1.tgz#992e5ac1553ce20d0d46aa6eccd79dc36dedc805"
integrity sha512-Ncvsq5CT3Gvh+uJG0Lwlho6suwDfUXH0HztslDf5I+F2wAFAZMRwYLEorumpKLzmO2suAXZ/td1tBg4NZIi9CQ==
"@typescript-eslint/eslint-plugin@8.18.2":
version "8.18.2"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.18.2.tgz#c78e363ab5fe3b21dd1c90d8be9581534417f78e"
integrity sha512-adig4SzPLjeQ0Tm+jvsozSGiCliI2ajeURDGHjZ2llnA+A67HihCQ+a3amtPhUakd1GlwHxSRvzOZktbEvhPPg==
dependencies:
"@eslint-community/regexpp" "^4.10.0"
"@typescript-eslint/scope-manager" "8.18.1"
"@typescript-eslint/type-utils" "8.18.1"
"@typescript-eslint/utils" "8.18.1"
"@typescript-eslint/visitor-keys" "8.18.1"
"@typescript-eslint/scope-manager" "8.18.2"
"@typescript-eslint/type-utils" "8.18.2"
"@typescript-eslint/utils" "8.18.2"
"@typescript-eslint/visitor-keys" "8.18.2"
graphemer "^1.4.0"
ignore "^5.3.1"
natural-compare "^1.4.0"
ts-api-utils "^1.3.0"
"@typescript-eslint/parser@8.18.1":
version "8.18.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.18.1.tgz#c258bae062778b7696793bc492249027a39dfb95"
integrity sha512-rBnTWHCdbYM2lh7hjyXqxk70wvon3p2FyaniZuey5TrcGBpfhVp0OxOa6gxr9Q9YhZFKyfbEnxc24ZnVbbUkCA==
"@typescript-eslint/parser@8.18.2":
version "8.18.2"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.18.2.tgz#0379a2e881d51d8fcf7ebdfa0dd18eee79182ce2"
integrity sha512-y7tcq4StgxQD4mDr9+Jb26dZ+HTZ/SkfqpXSiqeUXZHxOUyjWDKsmwKhJ0/tApR08DgOhrFAoAhyB80/p3ViuA==
dependencies:
"@typescript-eslint/scope-manager" "8.18.1"
"@typescript-eslint/types" "8.18.1"
"@typescript-eslint/typescript-estree" "8.18.1"
"@typescript-eslint/visitor-keys" "8.18.1"
"@typescript-eslint/scope-manager" "8.18.2"
"@typescript-eslint/types" "8.18.2"
"@typescript-eslint/typescript-estree" "8.18.2"
"@typescript-eslint/visitor-keys" "8.18.2"
debug "^4.3.4"
"@typescript-eslint/scope-manager@8.18.1":
version "8.18.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.18.1.tgz#52cedc3a8178d7464a70beffed3203678648e55b"
integrity sha512-HxfHo2b090M5s2+/9Z3gkBhI6xBH8OJCFjH9MhQ+nnoZqxU3wNxkLT+VWXWSFWc3UF3Z+CfPAyqdCTdoXtDPCQ==
"@typescript-eslint/scope-manager@8.18.2":
version "8.18.2"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.18.2.tgz#d193c200d61eb0ddec5987c8e48c9d4e1c0510bd"
integrity sha512-YJFSfbd0CJjy14r/EvWapYgV4R5CHzptssoag2M7y3Ra7XNta6GPAJPPP5KGB9j14viYXyrzRO5GkX7CRfo8/g==
dependencies:
"@typescript-eslint/types" "8.18.1"
"@typescript-eslint/visitor-keys" "8.18.1"
"@typescript-eslint/types" "8.18.2"
"@typescript-eslint/visitor-keys" "8.18.2"
"@typescript-eslint/type-utils@8.18.1":
version "8.18.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.18.1.tgz#10f41285475c0bdee452b79ff7223f0e43a7781e"
integrity sha512-jAhTdK/Qx2NJPNOTxXpMwlOiSymtR2j283TtPqXkKBdH8OAMmhiUfP0kJjc/qSE51Xrq02Gj9NY7MwK+UxVwHQ==
"@typescript-eslint/type-utils@8.18.2":
version "8.18.2"
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.18.2.tgz#5ad07e09002eee237591881df674c1c0c91ca52f"
integrity sha512-AB/Wr1Lz31bzHfGm/jgbFR0VB0SML/hd2P1yxzKDM48YmP7vbyJNHRExUE/wZsQj2wUCvbWH8poNHFuxLqCTnA==
dependencies:
"@typescript-eslint/typescript-estree" "8.18.1"
"@typescript-eslint/utils" "8.18.1"
"@typescript-eslint/typescript-estree" "8.18.2"
"@typescript-eslint/utils" "8.18.2"
debug "^4.3.4"
ts-api-utils "^1.3.0"
"@typescript-eslint/types@8.18.1":
version "8.18.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.18.1.tgz#d7f4f94d0bba9ebd088de840266fcd45408a8fff"
integrity sha512-7uoAUsCj66qdNQNpH2G8MyTFlgerum8ubf21s3TSM3XmKXuIn+H2Sifh/ES2nPOPiYSRJWAk0fDkW0APBWcpfw==
"@typescript-eslint/types@8.18.2":
version "8.18.2"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.18.2.tgz#5ebad5b384c8aa1c0f86cee1c61bcdbe7511f547"
integrity sha512-Z/zblEPp8cIvmEn6+tPDIHUbRu/0z5lqZ+NvolL5SvXWT5rQy7+Nch83M0++XzO0XrWRFWECgOAyE8bsJTl1GQ==
"@typescript-eslint/typescript-estree@8.18.1":
version "8.18.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.18.1.tgz#2a86cd64b211a742f78dfa7e6f4860413475367e"
integrity sha512-z8U21WI5txzl2XYOW7i9hJhxoKKNG1kcU4RzyNvKrdZDmbjkmLBo8bgeiOJmA06kizLI76/CCBAAGlTlEeUfyg==
"@typescript-eslint/typescript-estree@8.18.2":
version "8.18.2"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.18.2.tgz#fffb85527f8304e29bfbbdc712f4515da9f8b47c"
integrity sha512-WXAVt595HjpmlfH4crSdM/1bcsqh+1weFRWIa9XMTx/XHZ9TCKMcr725tLYqWOgzKdeDrqVHxFotrvWcEsk2Tg==
dependencies:
"@typescript-eslint/types" "8.18.1"
"@typescript-eslint/visitor-keys" "8.18.1"
"@typescript-eslint/types" "8.18.2"
"@typescript-eslint/visitor-keys" "8.18.2"
debug "^4.3.4"
fast-glob "^3.3.2"
is-glob "^4.0.3"
@ -1556,22 +1556,22 @@
semver "^7.6.0"
ts-api-utils "^1.3.0"
"@typescript-eslint/utils@8.18.1":
version "8.18.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.18.1.tgz#c4199ea23fc823c736e2c96fd07b1f7235fa92d5"
integrity sha512-8vikiIj2ebrC4WRdcAdDcmnu9Q/MXXwg+STf40BVfT8exDqBCUPdypvzcUPxEqRGKg9ALagZ0UWcYCtn+4W2iQ==
"@typescript-eslint/utils@8.18.2":
version "8.18.2"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.18.2.tgz#a2635f71904a84f9e47fe1b6f65a6d944ff1adf9"
integrity sha512-Cr4A0H7DtVIPkauj4sTSXVl+VBWewE9/o40KcF3TV9aqDEOWoXF3/+oRXNby3DYzZeCATvbdksYsGZzplwnK/Q==
dependencies:
"@eslint-community/eslint-utils" "^4.4.0"
"@typescript-eslint/scope-manager" "8.18.1"
"@typescript-eslint/types" "8.18.1"
"@typescript-eslint/typescript-estree" "8.18.1"
"@typescript-eslint/scope-manager" "8.18.2"
"@typescript-eslint/types" "8.18.2"
"@typescript-eslint/typescript-estree" "8.18.2"
"@typescript-eslint/visitor-keys@8.18.1":
version "8.18.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.18.1.tgz#344b4f6bc83f104f514676facf3129260df7610a"
integrity sha512-Vj0WLm5/ZsD013YeUKn+K0y8p1M0jPpxOkKdbD1wB0ns53a5piVY02zjf072TblEweAbcYiFiPoSMF3kp+VhhQ==
"@typescript-eslint/visitor-keys@8.18.2":
version "8.18.2"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.18.2.tgz#b3e434b701f086b10a7c82416ebc56899d27ef2f"
integrity sha512-zORcwn4C3trOWiCqFQP1x6G3xTRyZ1LYydnj51cRnJ6hxBlr/cKPckk+PKPUw/fXmvfKTcw7bwY3w9izgx5jZw==
dependencies:
"@typescript-eslint/types" "8.18.1"
"@typescript-eslint/types" "8.18.2"
eslint-visitor-keys "^4.2.0"
"@webassemblyjs/ast@1.14.1", "@webassemblyjs/ast@^1.14.1":
@ -6494,9 +6494,9 @@ toidentifier@1.0.1:
resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35"
integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==
"tornado-contracts@git+https://github.com/tornadocontrib/tornado-contracts.git#4c2fe0b80fa1a0571ffa538a046e234d4e38d140":
"tornado-contracts@git+https://github.com/tornadocontrib/tornado-contracts.git#9be1e1c308ae891e939944b2220d9e2810e579f5":
version "1.0.2"
resolved "git+https://github.com/tornadocontrib/tornado-contracts.git#4c2fe0b80fa1a0571ffa538a046e234d4e38d140"
resolved "git+https://github.com/tornadocontrib/tornado-contracts.git#9be1e1c308ae891e939944b2220d9e2810e579f5"
dependencies:
"@openzeppelin/contracts" "5.1.0"
"@openzeppelin/contracts-v3" "npm:@openzeppelin/contracts@3.2.0-rc.0"
@ -6707,14 +6707,14 @@ typedescriptor@3.0.2:
resolved "https://registry.yarnpkg.com/typedescriptor/-/typedescriptor-3.0.2.tgz#9ad1715bc2be1cf063d5acbc4cd4bfc96d644225"
integrity sha512-hyVbaCUd18UiXk656g/imaBLMogpdijIEpnhWYrSda9rhvO4gOU16n2nh7xG5lv/rjumnZzGOdz0CEGTmFe0fQ==
typescript-eslint@^8.18.1:
version "8.18.1"
resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-8.18.1.tgz#197b284b6769678ed77d9868df180eeaf61108eb"
integrity sha512-Mlaw6yxuaDEPQvb/2Qwu3/TfgeBHy9iTJ3mTwe7OvpPmF6KPQjVOfGyEJpPv6Ez2C34OODChhXrzYw/9phI0MQ==
typescript-eslint@^8.18.2:
version "8.18.2"
resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-8.18.2.tgz#71334dcf843adc3fbb771dce5ade7876aa0d62b7"
integrity sha512-KuXezG6jHkvC3MvizeXgupZzaG5wjhU3yE8E7e6viOvAvD9xAWYp8/vy0WULTGe9DYDWcQu7aW03YIV3mSitrQ==
dependencies:
"@typescript-eslint/eslint-plugin" "8.18.1"
"@typescript-eslint/parser" "8.18.1"
"@typescript-eslint/utils" "8.18.1"
"@typescript-eslint/eslint-plugin" "8.18.2"
"@typescript-eslint/parser" "8.18.2"
"@typescript-eslint/utils" "8.18.2"
typescript@^5.7.2:
version "5.7.2"