diff --git a/package-lock.json b/package-lock.json index db7dd48..12d480f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.6.1", "license": "Apache-2.0", "dependencies": { - "o1js": "1.3.1" + "o1js": "1.8.0" }, "devDependencies": { "@babel/preset-env": "^7.16.4", @@ -24,7 +24,7 @@ "lint-staged": "^11.0.1", "prettier": "^2.3.2", "ts-jest": "^28.0.8", - "typescript": "^5.1" + "typescript": "^5.4" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -3340,11 +3340,12 @@ } }, "node_modules/braces": { - "version": "3.0.2", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, - "license": "MIT", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -4291,9 +4292,10 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, - "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -4339,6 +4341,20 @@ "dev": true, "license": "ISC" }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.2", "dev": true, @@ -4624,8 +4640,9 @@ }, "node_modules/is-number": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.12.0" } @@ -6878,11 +6895,12 @@ } }, "node_modules/micromatch": { - "version": "4.0.5", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, - "license": "MIT", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -6987,8 +7005,9 @@ } }, "node_modules/o1js": { - "version": "1.3.1", - "license": "Apache-2.0", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/o1js/-/o1js-1.8.0.tgz", + "integrity": "sha512-mN0aM4HW3kyl/Gx0irqKQSQ2JftbmsK2t5nSZpTuNgTOVl0wQ6KZumXXps6E5hGkCjRfk+FjlL7CBsmqKqzYzg==", "dependencies": { "blakejs": "1.2.1", "cachedir": "^2.4.0", @@ -7858,8 +7877,9 @@ }, "node_modules/to-regex-range": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, - "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, diff --git a/package.json b/package.json index 1ff0eaa..3af9d69 100644 --- a/package.json +++ b/package.json @@ -57,9 +57,9 @@ "lint-staged": "^11.0.1", "prettier": "^2.3.2", "ts-jest": "^28.0.8", - "typescript": "^5.1" + "typescript": "^5.4" }, "dependencies": { - "o1js": "1.3.1" + "o1js": "1.8.0" } } diff --git a/src/CustomScalar.ts b/src/CustomScalar.ts index 93ae33e..cf1cb1d 100644 --- a/src/CustomScalar.ts +++ b/src/CustomScalar.ts @@ -1,6 +1,9 @@ import { Bool, Field, Poseidon, Scalar, Struct, UInt64 } from 'o1js'; import { fromUInt64ToScalar } from './utils/math.js'; +/** + * @deprecated This class is deprecated. Use Scalar instead. + */ export class CustomScalar extends Struct({ scalar: Scalar, }) { diff --git a/src/utils/utils.test.ts b/src/utils/utils.test.ts index cbda79e..f6f865c 100644 --- a/src/utils/utils.test.ts +++ b/src/utils/utils.test.ts @@ -59,7 +59,7 @@ describe('Network', () => { @method async testWithSender(value1: Field, value2: Field) { - this.sender.getAndRequireSignature(); + this.sender.getAndRequireSignatureV2(); value1.assertEquals(value2); this.num.set(value1); this.reducer.dispatch(value1); diff --git a/src/utils/zkApp.ts b/src/utils/zkApp.ts index 2eb7894..b86a158 100644 --- a/src/utils/zkApp.ts +++ b/src/utils/zkApp.ts @@ -64,10 +64,10 @@ function requireCaller(address: PublicKey, contract: SmartContract) { return update; } -function checkCondition(condition: Bool, message: string) { +function checkCondition(condition: Bool, message?: string) { Provable.witness(Void, () => { if (!condition.toBoolean()) { - console.error(message); + console.error(message || 'Unknown error!'); } }); return condition;