From 76b739db959b757ef6b99740e655d1807432af75 Mon Sep 17 00:00:00 2001 From: sripwoud Date: Sun, 19 May 2024 14:24:52 +0200 Subject: [PATCH] chore: add `@zk-kit/artifacts` dep --- jest.config.ts | 1 + packages/poseidon-proof/package.json | 1 + packages/poseidon-proof/src/generate.ts | 3 +-- yarn.lock | 8 ++++++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/jest.config.ts b/jest.config.ts index 99d2a2194..3ec455eb0 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -12,6 +12,7 @@ const projects: any = fs rootDir: `packages/${name}`, displayName: name, moduleNameMapper: { + "@zk-kit/artifacts": ["/../../node_modules/@zk-kit/artifacts/dist/index.node.cjs"], "@zk-kit/(.*)/(.*)": ["/../$1/src/$2.ts", "/../$1/src/$2/$2.node.ts"], "@zk-kit/(.*)": "/../$1/src/index.ts" } diff --git a/packages/poseidon-proof/package.json b/packages/poseidon-proof/package.json index c3bd14f80..6df785fab 100644 --- a/packages/poseidon-proof/package.json +++ b/packages/poseidon-proof/package.json @@ -44,6 +44,7 @@ "rollup-plugin-cleanup": "^3.2.1" }, "dependencies": { + "@zk-kit/artifacts": "^1.3.1", "@zk-kit/utils": "1.0.0-beta.4", "ethers": "^6.12.0", "snarkjs": "^0.7.3" diff --git a/packages/poseidon-proof/src/generate.ts b/packages/poseidon-proof/src/generate.ts index cdaa56be9..4185d2f20 100644 --- a/packages/poseidon-proof/src/generate.ts +++ b/packages/poseidon-proof/src/generate.ts @@ -1,7 +1,6 @@ import { BigNumber } from "@ethersproject/bignumber" -import type { SnarkArtifacts } from "@zk-kit/utils" +import { maybeGetSnarkArtifacts, Project, type SnarkArtifacts } from "@zk-kit/artifacts" import { packGroth16Proof } from "@zk-kit/utils/proof-packing" -import maybeGetSnarkArtifacts, { Project } from "@zk-kit/utils/snark-artifacts" import { BigNumberish } from "ethers" import { NumericString, groth16 } from "snarkjs" import hash from "./hash" diff --git a/yarn.lock b/yarn.lock index b17654be6..29b0f1ac1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3437,6 +3437,13 @@ __metadata: languageName: node linkType: hard +"@zk-kit/artifacts@npm:^1.3.1": + version: 1.3.1 + resolution: "@zk-kit/artifacts@npm:1.3.1" + checksum: 10/8be21e3967c05b0b8ed250db84c0d37c86bcbc389b0792b55b27313c5b8fdae03e8fd5fdcafd8dfcbabee253f7d90669c485b168790eaf96e60e38261698a4d4 + languageName: node + linkType: hard + "@zk-kit/baby-jubjub@npm:1.0.0, @zk-kit/baby-jubjub@workspace:packages/baby-jubjub": version: 0.0.0-use.local resolution: "@zk-kit/baby-jubjub@workspace:packages/baby-jubjub" @@ -3590,6 +3597,7 @@ __metadata: "@types/download": "npm:^8.0.5" "@types/snarkjs": "npm:^0" "@types/tmp": "npm:^0.2.6" + "@zk-kit/artifacts": "npm:^1.3.1" "@zk-kit/utils": "npm:1.0.0-beta.4" ethers: "npm:^6.12.0" poseidon-lite: "npm:^0.2.0"