Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expose snarky hashToGroup #5

Merged
merged 18 commits into from
May 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 43 additions & 43 deletions compiled/node_bindings/plonk_wasm.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2719,96 +2719,96 @@ module.exports.caml_pasta_fq_plonk_verifier_index_deep_copy = function(x) {

/**
* @param {Uint32Array} lgr_comm
* @param {WasmFqPlonkVerifierIndex} index
* @param {WasmFqProverProof} proof
* @returns {WasmFqOracles}
* @param {WasmFpPlonkVerifierIndex} index
* @param {WasmFpProverProof} proof
* @returns {WasmFpOracles}
*/
module.exports.fq_oracles_create = function(lgr_comm, index, proof) {
module.exports.fp_oracles_create = function(lgr_comm, index, proof) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passArray32ToWasm0(lgr_comm, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
_assertClass(index, WasmFqPlonkVerifierIndex);
_assertClass(index, WasmFpPlonkVerifierIndex);
var ptr1 = index.__destroy_into_raw();
_assertClass(proof, WasmFqProverProof);
_assertClass(proof, WasmFpProverProof);
var ptr2 = proof.__destroy_into_raw();
wasm.fq_oracles_create(retptr, ptr0, len0, ptr1, ptr2);
wasm.fp_oracles_create(retptr, ptr0, len0, ptr1, ptr2);
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var r2 = getInt32Memory0()[retptr / 4 + 2];
if (r2) {
throw takeObject(r1);
}
return WasmFqOracles.__wrap(r0);
return WasmFpOracles.__wrap(r0);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
};

/**
* @returns {WasmFqOracles}
* @returns {WasmFpOracles}
*/
module.exports.fq_oracles_dummy = function() {
const ret = wasm.fq_oracles_dummy();
return WasmFqOracles.__wrap(ret);
module.exports.fp_oracles_dummy = function() {
const ret = wasm.fp_oracles_dummy();
return WasmFpOracles.__wrap(ret);
};

/**
* @param {WasmFqProverProof} x
* @returns {WasmFqProverProof}
* @param {WasmFpProverProof} x
* @returns {WasmFpProverProof}
*/
module.exports.fq_oracles_deep_copy = function(x) {
_assertClass(x, WasmFqProverProof);
module.exports.fp_oracles_deep_copy = function(x) {
_assertClass(x, WasmFpProverProof);
var ptr0 = x.__destroy_into_raw();
const ret = wasm.fq_oracles_deep_copy(ptr0);
return WasmFqProverProof.__wrap(ret);
const ret = wasm.fp_oracles_deep_copy(ptr0);
return WasmFpProverProof.__wrap(ret);
};

/**
* @param {Uint32Array} lgr_comm
* @param {WasmFpPlonkVerifierIndex} index
* @param {WasmFpProverProof} proof
* @returns {WasmFpOracles}
* @param {WasmFqPlonkVerifierIndex} index
* @param {WasmFqProverProof} proof
* @returns {WasmFqOracles}
*/
module.exports.fp_oracles_create = function(lgr_comm, index, proof) {
module.exports.fq_oracles_create = function(lgr_comm, index, proof) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passArray32ToWasm0(lgr_comm, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
_assertClass(index, WasmFpPlonkVerifierIndex);
_assertClass(index, WasmFqPlonkVerifierIndex);
var ptr1 = index.__destroy_into_raw();
_assertClass(proof, WasmFpProverProof);
_assertClass(proof, WasmFqProverProof);
var ptr2 = proof.__destroy_into_raw();
wasm.fp_oracles_create(retptr, ptr0, len0, ptr1, ptr2);
wasm.fq_oracles_create(retptr, ptr0, len0, ptr1, ptr2);
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var r2 = getInt32Memory0()[retptr / 4 + 2];
if (r2) {
throw takeObject(r1);
}
return WasmFpOracles.__wrap(r0);
return WasmFqOracles.__wrap(r0);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
};

/**
* @returns {WasmFpOracles}
* @returns {WasmFqOracles}
*/
module.exports.fp_oracles_dummy = function() {
const ret = wasm.fp_oracles_dummy();
return WasmFpOracles.__wrap(ret);
module.exports.fq_oracles_dummy = function() {
const ret = wasm.fq_oracles_dummy();
return WasmFqOracles.__wrap(ret);
};

/**
* @param {WasmFpProverProof} x
* @returns {WasmFpProverProof}
* @param {WasmFqProverProof} x
* @returns {WasmFqProverProof}
*/
module.exports.fp_oracles_deep_copy = function(x) {
_assertClass(x, WasmFpProverProof);
module.exports.fq_oracles_deep_copy = function(x) {
_assertClass(x, WasmFqProverProof);
var ptr0 = x.__destroy_into_raw();
const ret = wasm.caml_pasta_fp_plonk_proof_deep_copy(ptr0);
return WasmFpProverProof.__wrap(ret);
return WasmFqProverProof.__wrap(ret);
};

/**
Expand Down Expand Up @@ -7622,14 +7622,6 @@ module.exports.__wbindgen_is_object = function(arg0) {
return ret;
};

module.exports.__wbg_getRandomValues_3774744e221a22ad = function() { return handleError(function (arg0, arg1) {
getObject(arg0).getRandomValues(getObject(arg1));
}, arguments) };

module.exports.__wbg_randomFillSync_e950366c42764a07 = function() { return handleError(function (arg0, arg1) {
getObject(arg0).randomFillSync(takeObject(arg1));
}, arguments) };

module.exports.__wbg_crypto_70a96de3b6b73dac = function(arg0) {
const ret = getObject(arg0).crypto;
return addHeapObject(ret);
Expand Down Expand Up @@ -7670,6 +7662,14 @@ module.exports.__wbindgen_is_function = function(arg0) {
return ret;
};

module.exports.__wbg_getRandomValues_3774744e221a22ad = function() { return handleError(function (arg0, arg1) {
getObject(arg0).getRandomValues(getObject(arg1));
}, arguments) };

module.exports.__wbg_randomFillSync_e950366c42764a07 = function() { return handleError(function (arg0, arg1) {
getObject(arg0).randomFillSync(takeObject(arg1));
}, arguments) };

module.exports.__wbg_get_27fe3dac1c4d0224 = function(arg0, arg1) {
const ret = getObject(arg0)[arg1 >>> 0];
return addHeapObject(ret);
Expand Down
32 changes: 16 additions & 16 deletions compiled/node_bindings/plonk_wasm.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -839,22 +839,6 @@ export function caml_pasta_fq_plonk_verifier_index_dummy(): WasmFqPlonkVerifierI
export function caml_pasta_fq_plonk_verifier_index_deep_copy(x: WasmFqPlonkVerifierIndex): WasmFqPlonkVerifierIndex;
/**
* @param {Uint32Array} lgr_comm
* @param {WasmFqPlonkVerifierIndex} index
* @param {WasmFqProverProof} proof
* @returns {WasmFqOracles}
*/
export function fq_oracles_create(lgr_comm: Uint32Array, index: WasmFqPlonkVerifierIndex, proof: WasmFqProverProof): WasmFqOracles;
/**
* @returns {WasmFqOracles}
*/
export function fq_oracles_dummy(): WasmFqOracles;
/**
* @param {WasmFqProverProof} x
* @returns {WasmFqProverProof}
*/
export function fq_oracles_deep_copy(x: WasmFqProverProof): WasmFqProverProof;
/**
* @param {Uint32Array} lgr_comm
* @param {WasmFpPlonkVerifierIndex} index
* @param {WasmFpProverProof} proof
* @returns {WasmFpOracles}
Expand All @@ -870,6 +854,22 @@ export function fp_oracles_dummy(): WasmFpOracles;
*/
export function fp_oracles_deep_copy(x: WasmFpProverProof): WasmFpProverProof;
/**
* @param {Uint32Array} lgr_comm
* @param {WasmFqPlonkVerifierIndex} index
* @param {WasmFqProverProof} proof
* @returns {WasmFqOracles}
*/
export function fq_oracles_create(lgr_comm: Uint32Array, index: WasmFqPlonkVerifierIndex, proof: WasmFqProverProof): WasmFqOracles;
/**
* @returns {WasmFqOracles}
*/
export function fq_oracles_dummy(): WasmFqOracles;
/**
* @param {WasmFqProverProof} x
* @returns {WasmFqProverProof}
*/
export function fq_oracles_deep_copy(x: WasmFqProverProof): WasmFqProverProof;
/**
* @param {WasmPastaFpPlonkIndex} index
* @param {WasmVecVecFp} witness
* @param {Uint8Array} prev_challenges
Expand Down
Binary file modified compiled/node_bindings/plonk_wasm_bg.wasm
Binary file not shown.
Loading