Skip to content

Commit

Permalink
chore: rename vk to halo2Vk
Browse files Browse the repository at this point in the history
  • Loading branch information
rpalakkal committed Nov 25, 2023
1 parent 9705417 commit 8f963d9
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "halo2-wasm-cli",
"version": "0.1.1",
"version": "0.1.3",
"description": "Halo2 Javascript library",
"main": "index.js",
"scripts": {
Expand All @@ -18,7 +18,7 @@
"author": "Intrinsic Technologies",
"license": "ISC",
"dependencies": {
"@axiom-crypto/halo2-wasm": "^0.2.3",
"@axiom-crypto/halo2-wasm": "0.2.10",
"commander": "^11.1.0",
"typescript": "^5.2.2"
},
Expand Down
8 changes: 4 additions & 4 deletions cli/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions cli/src/keygen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ export const keygen = async (path: string, options: { pk: string, vk: string, ci
try {
await scaffold.populateCircuit(circuit.circuit, circuit.inputs);
await scaffold.keygen();
const vk = scaffold.exportVk();
const vk = scaffold.exportVkBuffer();
saveBufferToFile(vk, options.vk, "VK")
const pk = scaffold.exportPk();
const pk = scaffold.exportPkBuffer();
saveBufferToFile(pk, options.pk, "PK")
}
catch (e) {
Expand Down
6 changes: 3 additions & 3 deletions cli/src/scaffold.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ export class CircuitScaffold extends ICircuitScaffold {
this.halo2wasm.assignInstances();
}

exportVk() {
exportVkBuffer() {
const vk = this.halo2wasm.getVk();
return Buffer.from(vk);
}

exportPk() {
exportPkBuffer() {
const pk = this.halo2wasm.getPk();
return Buffer.from(pk);
}
Expand All @@ -42,7 +42,7 @@ export class CircuitScaffold extends ICircuitScaffold {
this.halo2wasm.loadPk(pk);
}

exportProof() {
exportProofBuffer() {
const proof = this.halo2wasm.prove();
return Buffer.from(proof);
}
Expand Down
4 changes: 2 additions & 2 deletions halo2-lib-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@axiom-crypto/halo2-lib-js",
"version": "0.2.11",
"version": "0.2.12",
"description": "Halo2 Javascript library",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -30,7 +30,7 @@
"typescript": "^5.2.2"
},
"dependencies": {
"@axiom-crypto/halo2-wasm": "0.2.9",
"@axiom-crypto/halo2-wasm": "0.2.10",
"ethers": "^6.8.0",
"prettier": "1.18.2"
},
Expand Down
8 changes: 4 additions & 4 deletions halo2-lib-js/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion halo2-wasm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "halo2-wasm"
version = "0.2.9"
version = "0.2.10"
edition = "2021"

[lib]
Expand Down
4 changes: 2 additions & 2 deletions halo2-wasm/js/shared/scaffold.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ export abstract class BaseCircuitScaffold {
return this.halo2wasm.getCircuitStats();
}

getVk() {
getHalo2Vk() {
const vk = this.halo2wasm.getVk();
return new Uint8Array(vk);
}

exportVk() {
exportHalo2Vk() {
const vk_arr = this.halo2wasm.getVk();
const vk = "0x" + Buffer.from(vk_arr).toString('hex');
const blob = new Blob([vk], { type: "text/plain" });
Expand Down
2 changes: 1 addition & 1 deletion halo2-wasm/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@axiom-crypto/halo2-wasm",
"description": "Halo2 wasm bindings",
"version": "0.2.9",
"version": "0.2.10",
"main": "index.js",
"types": "index.d.ts",
"scripts": {
Expand Down

0 comments on commit 8f963d9

Please sign in to comment.