@noir-lang/acvm_js 0.53.0-fb1a8ca.nightly → 0.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/nodejs/acvm_js.d.ts +28 -28
- package/nodejs/acvm_js.js +51 -51
- package/nodejs/acvm_js_bg.wasm +0 -0
- package/nodejs/acvm_js_bg.wasm.d.ts +3 -3
- package/package.json +1 -1
- package/web/acvm_js.d.ts +31 -31
- package/web/acvm_js.js +51 -51
- package/web/acvm_js_bg.wasm +0 -0
- package/web/acvm_js_bg.wasm.d.ts +3 -3
package/nodejs/acvm_js.d.ts
CHANGED
|
@@ -90,6 +90,34 @@ export function ecdsa_secp256r1_verify(hashed_msg: Uint8Array, public_key_x_byte
|
|
|
90
90
|
*/
|
|
91
91
|
export function buildInfo(): BuildInfo;
|
|
92
92
|
/**
|
|
93
|
+
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
94
|
+
*
|
|
95
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
96
|
+
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
97
|
+
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
98
|
+
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
|
|
99
|
+
*/
|
|
100
|
+
export function executeCircuit(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessMap>;
|
|
101
|
+
/**
|
|
102
|
+
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
103
|
+
* This method also extracts the public return values from the solved witness into its own return witness.
|
|
104
|
+
*
|
|
105
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
106
|
+
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
107
|
+
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
108
|
+
* @returns {SolvedAndReturnWitness} The solved witness calculated by executing the circuit on the provided inputs, as well as the return witness indices as specified by the circuit.
|
|
109
|
+
*/
|
|
110
|
+
export function executeCircuitWithReturnWitness(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<SolvedAndReturnWitness>;
|
|
111
|
+
/**
|
|
112
|
+
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
113
|
+
*
|
|
114
|
+
* @param {Uint8Array} program - A serialized representation of an ACIR program
|
|
115
|
+
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `program`.
|
|
116
|
+
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the program.
|
|
117
|
+
* @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
|
|
118
|
+
*/
|
|
119
|
+
export function executeProgram(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessStack>;
|
|
120
|
+
/**
|
|
93
121
|
* Compresses a `WitnessMap` into the binary format outputted by Nargo.
|
|
94
122
|
*
|
|
95
123
|
* @param {WitnessMap} witness_map - A witness map.
|
|
@@ -118,34 +146,6 @@ export function compressWitnessStack(witness_stack: WitnessStack): Uint8Array;
|
|
|
118
146
|
* @returns {WitnessStack} The decompressed witness stack.
|
|
119
147
|
*/
|
|
120
148
|
export function decompressWitnessStack(compressed_witness: Uint8Array): WitnessStack;
|
|
121
|
-
/**
|
|
122
|
-
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
123
|
-
*
|
|
124
|
-
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
125
|
-
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
126
|
-
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
127
|
-
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
|
|
128
|
-
*/
|
|
129
|
-
export function executeCircuit(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessMap>;
|
|
130
|
-
/**
|
|
131
|
-
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
132
|
-
* This method also extracts the public return values from the solved witness into its own return witness.
|
|
133
|
-
*
|
|
134
|
-
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
135
|
-
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
136
|
-
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
137
|
-
* @returns {SolvedAndReturnWitness} The solved witness calculated by executing the circuit on the provided inputs, as well as the return witness indices as specified by the circuit.
|
|
138
|
-
*/
|
|
139
|
-
export function executeCircuitWithReturnWitness(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<SolvedAndReturnWitness>;
|
|
140
|
-
/**
|
|
141
|
-
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
142
|
-
*
|
|
143
|
-
* @param {Uint8Array} program - A serialized representation of an ACIR program
|
|
144
|
-
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `program`.
|
|
145
|
-
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the program.
|
|
146
|
-
* @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
|
|
147
|
-
*/
|
|
148
|
-
export function executeProgram(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessStack>;
|
|
149
149
|
|
|
150
150
|
export type RawAssertionPayload = {
|
|
151
151
|
selector: string;
|
package/nodejs/acvm_js.js
CHANGED
|
@@ -473,6 +473,52 @@ module.exports.buildInfo = function() {
|
|
|
473
473
|
return takeObject(ret);
|
|
474
474
|
};
|
|
475
475
|
|
|
476
|
+
/**
|
|
477
|
+
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
478
|
+
*
|
|
479
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
480
|
+
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
481
|
+
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
482
|
+
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
|
|
483
|
+
*/
|
|
484
|
+
module.exports.executeCircuit = function(program, initial_witness, foreign_call_handler) {
|
|
485
|
+
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
486
|
+
const len0 = WASM_VECTOR_LEN;
|
|
487
|
+
const ret = wasm.executeCircuit(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
|
|
488
|
+
return takeObject(ret);
|
|
489
|
+
};
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
493
|
+
* This method also extracts the public return values from the solved witness into its own return witness.
|
|
494
|
+
*
|
|
495
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
496
|
+
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
497
|
+
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
498
|
+
* @returns {SolvedAndReturnWitness} The solved witness calculated by executing the circuit on the provided inputs, as well as the return witness indices as specified by the circuit.
|
|
499
|
+
*/
|
|
500
|
+
module.exports.executeCircuitWithReturnWitness = function(program, initial_witness, foreign_call_handler) {
|
|
501
|
+
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
502
|
+
const len0 = WASM_VECTOR_LEN;
|
|
503
|
+
const ret = wasm.executeCircuitWithReturnWitness(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
|
|
504
|
+
return takeObject(ret);
|
|
505
|
+
};
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
509
|
+
*
|
|
510
|
+
* @param {Uint8Array} program - A serialized representation of an ACIR program
|
|
511
|
+
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `program`.
|
|
512
|
+
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the program.
|
|
513
|
+
* @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
|
|
514
|
+
*/
|
|
515
|
+
module.exports.executeProgram = function(program, initial_witness, foreign_call_handler) {
|
|
516
|
+
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
517
|
+
const len0 = WASM_VECTOR_LEN;
|
|
518
|
+
const ret = wasm.executeProgram(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
|
|
519
|
+
return takeObject(ret);
|
|
520
|
+
};
|
|
521
|
+
|
|
476
522
|
/**
|
|
477
523
|
* Compresses a `WitnessMap` into the binary format outputted by Nargo.
|
|
478
524
|
*
|
|
@@ -572,52 +618,6 @@ module.exports.decompressWitnessStack = function(compressed_witness) {
|
|
|
572
618
|
}
|
|
573
619
|
};
|
|
574
620
|
|
|
575
|
-
/**
|
|
576
|
-
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
577
|
-
*
|
|
578
|
-
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
579
|
-
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
580
|
-
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
581
|
-
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
|
|
582
|
-
*/
|
|
583
|
-
module.exports.executeCircuit = function(program, initial_witness, foreign_call_handler) {
|
|
584
|
-
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
585
|
-
const len0 = WASM_VECTOR_LEN;
|
|
586
|
-
const ret = wasm.executeCircuit(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
|
|
587
|
-
return takeObject(ret);
|
|
588
|
-
};
|
|
589
|
-
|
|
590
|
-
/**
|
|
591
|
-
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
592
|
-
* This method also extracts the public return values from the solved witness into its own return witness.
|
|
593
|
-
*
|
|
594
|
-
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
595
|
-
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
596
|
-
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
597
|
-
* @returns {SolvedAndReturnWitness} The solved witness calculated by executing the circuit on the provided inputs, as well as the return witness indices as specified by the circuit.
|
|
598
|
-
*/
|
|
599
|
-
module.exports.executeCircuitWithReturnWitness = function(program, initial_witness, foreign_call_handler) {
|
|
600
|
-
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
601
|
-
const len0 = WASM_VECTOR_LEN;
|
|
602
|
-
const ret = wasm.executeCircuitWithReturnWitness(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
|
|
603
|
-
return takeObject(ret);
|
|
604
|
-
};
|
|
605
|
-
|
|
606
|
-
/**
|
|
607
|
-
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
608
|
-
*
|
|
609
|
-
* @param {Uint8Array} program - A serialized representation of an ACIR program
|
|
610
|
-
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `program`.
|
|
611
|
-
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the program.
|
|
612
|
-
* @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
|
|
613
|
-
*/
|
|
614
|
-
module.exports.executeProgram = function(program, initial_witness, foreign_call_handler) {
|
|
615
|
-
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
616
|
-
const len0 = WASM_VECTOR_LEN;
|
|
617
|
-
const ret = wasm.executeProgram(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
|
|
618
|
-
return takeObject(ret);
|
|
619
|
-
};
|
|
620
|
-
|
|
621
621
|
function __wbg_adapter_75(arg0, arg1, arg2, arg3, arg4) {
|
|
622
622
|
wasm.wasm_bindgen__convert__closures__invoke3_mut__h17fc532521b46256(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4));
|
|
623
623
|
}
|
|
@@ -647,7 +647,7 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
|
|
|
647
647
|
return ret;
|
|
648
648
|
};
|
|
649
649
|
|
|
650
|
-
module.exports.
|
|
650
|
+
module.exports.__wbg_constructor_79bab16c42849d1b = function(arg0) {
|
|
651
651
|
const ret = new Error(takeObject(arg0));
|
|
652
652
|
return addHeapObject(ret);
|
|
653
653
|
};
|
|
@@ -657,7 +657,7 @@ module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
|
657
657
|
return addHeapObject(ret);
|
|
658
658
|
};
|
|
659
659
|
|
|
660
|
-
module.exports.
|
|
660
|
+
module.exports.__wbg_new_610492d70b2d4e55 = function() {
|
|
661
661
|
const ret = new Array();
|
|
662
662
|
return addHeapObject(ret);
|
|
663
663
|
};
|
|
@@ -684,7 +684,7 @@ module.exports.__wbindgen_is_array = function(arg0) {
|
|
|
684
684
|
return ret;
|
|
685
685
|
};
|
|
686
686
|
|
|
687
|
-
module.exports.
|
|
687
|
+
module.exports.__wbg_new_7b5514a697f386eb = function() {
|
|
688
688
|
const ret = new Map();
|
|
689
689
|
return addHeapObject(ret);
|
|
690
690
|
};
|
|
@@ -916,8 +916,8 @@ module.exports.__wbindgen_throw = function(arg0, arg1) {
|
|
|
916
916
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
917
917
|
};
|
|
918
918
|
|
|
919
|
-
module.exports.
|
|
920
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
919
|
+
module.exports.__wbindgen_closure_wrapper734 = function(arg0, arg1, arg2) {
|
|
920
|
+
const ret = makeMutClosure(arg0, arg1, 268, __wbg_adapter_22);
|
|
921
921
|
return addHeapObject(ret);
|
|
922
922
|
};
|
|
923
923
|
|
package/nodejs/acvm_js_bg.wasm
CHANGED
|
Binary file
|
|
@@ -12,13 +12,13 @@ export function blake2s256(a: number, b: number, c: number): void;
|
|
|
12
12
|
export function ecdsa_secp256k1_verify(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): number;
|
|
13
13
|
export function ecdsa_secp256r1_verify(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): number;
|
|
14
14
|
export function buildInfo(): number;
|
|
15
|
+
export function executeCircuit(a: number, b: number, c: number, d: number): number;
|
|
16
|
+
export function executeCircuitWithReturnWitness(a: number, b: number, c: number, d: number): number;
|
|
17
|
+
export function executeProgram(a: number, b: number, c: number, d: number): number;
|
|
15
18
|
export function compressWitness(a: number, b: number): void;
|
|
16
19
|
export function decompressWitness(a: number, b: number, c: number): void;
|
|
17
20
|
export function compressWitnessStack(a: number, b: number): void;
|
|
18
21
|
export function decompressWitnessStack(a: number, b: number, c: number): void;
|
|
19
|
-
export function executeCircuit(a: number, b: number, c: number, d: number): number;
|
|
20
|
-
export function executeCircuitWithReturnWitness(a: number, b: number, c: number, d: number): number;
|
|
21
|
-
export function executeProgram(a: number, b: number, c: number, d: number): number;
|
|
22
22
|
export function __wbindgen_malloc(a: number): number;
|
|
23
23
|
export function __wbindgen_realloc(a: number, b: number, c: number): number;
|
|
24
24
|
export const __wbindgen_export_2: WebAssembly.Table;
|
package/package.json
CHANGED
package/web/acvm_js.d.ts
CHANGED
|
@@ -90,6 +90,34 @@ export function ecdsa_secp256r1_verify(hashed_msg: Uint8Array, public_key_x_byte
|
|
|
90
90
|
*/
|
|
91
91
|
export function buildInfo(): BuildInfo;
|
|
92
92
|
/**
|
|
93
|
+
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
94
|
+
*
|
|
95
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
96
|
+
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
97
|
+
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
98
|
+
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
|
|
99
|
+
*/
|
|
100
|
+
export function executeCircuit(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessMap>;
|
|
101
|
+
/**
|
|
102
|
+
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
103
|
+
* This method also extracts the public return values from the solved witness into its own return witness.
|
|
104
|
+
*
|
|
105
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
106
|
+
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
107
|
+
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
108
|
+
* @returns {SolvedAndReturnWitness} The solved witness calculated by executing the circuit on the provided inputs, as well as the return witness indices as specified by the circuit.
|
|
109
|
+
*/
|
|
110
|
+
export function executeCircuitWithReturnWitness(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<SolvedAndReturnWitness>;
|
|
111
|
+
/**
|
|
112
|
+
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
113
|
+
*
|
|
114
|
+
* @param {Uint8Array} program - A serialized representation of an ACIR program
|
|
115
|
+
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `program`.
|
|
116
|
+
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the program.
|
|
117
|
+
* @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
|
|
118
|
+
*/
|
|
119
|
+
export function executeProgram(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessStack>;
|
|
120
|
+
/**
|
|
93
121
|
* Compresses a `WitnessMap` into the binary format outputted by Nargo.
|
|
94
122
|
*
|
|
95
123
|
* @param {WitnessMap} witness_map - A witness map.
|
|
@@ -118,34 +146,6 @@ export function compressWitnessStack(witness_stack: WitnessStack): Uint8Array;
|
|
|
118
146
|
* @returns {WitnessStack} The decompressed witness stack.
|
|
119
147
|
*/
|
|
120
148
|
export function decompressWitnessStack(compressed_witness: Uint8Array): WitnessStack;
|
|
121
|
-
/**
|
|
122
|
-
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
123
|
-
*
|
|
124
|
-
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
125
|
-
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
126
|
-
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
127
|
-
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
|
|
128
|
-
*/
|
|
129
|
-
export function executeCircuit(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessMap>;
|
|
130
|
-
/**
|
|
131
|
-
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
132
|
-
* This method also extracts the public return values from the solved witness into its own return witness.
|
|
133
|
-
*
|
|
134
|
-
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
135
|
-
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
136
|
-
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
137
|
-
* @returns {SolvedAndReturnWitness} The solved witness calculated by executing the circuit on the provided inputs, as well as the return witness indices as specified by the circuit.
|
|
138
|
-
*/
|
|
139
|
-
export function executeCircuitWithReturnWitness(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<SolvedAndReturnWitness>;
|
|
140
|
-
/**
|
|
141
|
-
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
142
|
-
*
|
|
143
|
-
* @param {Uint8Array} program - A serialized representation of an ACIR program
|
|
144
|
-
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `program`.
|
|
145
|
-
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the program.
|
|
146
|
-
* @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
|
|
147
|
-
*/
|
|
148
|
-
export function executeProgram(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessStack>;
|
|
149
149
|
|
|
150
150
|
export type RawAssertionPayload = {
|
|
151
151
|
selector: string;
|
|
@@ -227,13 +227,13 @@ export interface InitOutput {
|
|
|
227
227
|
readonly ecdsa_secp256k1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
|
|
228
228
|
readonly ecdsa_secp256r1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
|
|
229
229
|
readonly buildInfo: () => number;
|
|
230
|
+
readonly executeCircuit: (a: number, b: number, c: number, d: number) => number;
|
|
231
|
+
readonly executeCircuitWithReturnWitness: (a: number, b: number, c: number, d: number) => number;
|
|
232
|
+
readonly executeProgram: (a: number, b: number, c: number, d: number) => number;
|
|
230
233
|
readonly compressWitness: (a: number, b: number) => void;
|
|
231
234
|
readonly decompressWitness: (a: number, b: number, c: number) => void;
|
|
232
235
|
readonly compressWitnessStack: (a: number, b: number) => void;
|
|
233
236
|
readonly decompressWitnessStack: (a: number, b: number, c: number) => void;
|
|
234
|
-
readonly executeCircuit: (a: number, b: number, c: number, d: number) => number;
|
|
235
|
-
readonly executeCircuitWithReturnWitness: (a: number, b: number, c: number, d: number) => number;
|
|
236
|
-
readonly executeProgram: (a: number, b: number, c: number, d: number) => number;
|
|
237
237
|
readonly __wbindgen_malloc: (a: number) => number;
|
|
238
238
|
readonly __wbindgen_realloc: (a: number, b: number, c: number) => number;
|
|
239
239
|
readonly __wbindgen_export_2: WebAssembly.Table;
|
package/web/acvm_js.js
CHANGED
|
@@ -470,6 +470,52 @@ export function buildInfo() {
|
|
|
470
470
|
return takeObject(ret);
|
|
471
471
|
}
|
|
472
472
|
|
|
473
|
+
/**
|
|
474
|
+
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
475
|
+
*
|
|
476
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
477
|
+
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
478
|
+
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
479
|
+
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
|
|
480
|
+
*/
|
|
481
|
+
export function executeCircuit(program, initial_witness, foreign_call_handler) {
|
|
482
|
+
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
483
|
+
const len0 = WASM_VECTOR_LEN;
|
|
484
|
+
const ret = wasm.executeCircuit(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
|
|
485
|
+
return takeObject(ret);
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
490
|
+
* This method also extracts the public return values from the solved witness into its own return witness.
|
|
491
|
+
*
|
|
492
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
493
|
+
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
494
|
+
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
495
|
+
* @returns {SolvedAndReturnWitness} The solved witness calculated by executing the circuit on the provided inputs, as well as the return witness indices as specified by the circuit.
|
|
496
|
+
*/
|
|
497
|
+
export function executeCircuitWithReturnWitness(program, initial_witness, foreign_call_handler) {
|
|
498
|
+
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
499
|
+
const len0 = WASM_VECTOR_LEN;
|
|
500
|
+
const ret = wasm.executeCircuitWithReturnWitness(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
|
|
501
|
+
return takeObject(ret);
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
506
|
+
*
|
|
507
|
+
* @param {Uint8Array} program - A serialized representation of an ACIR program
|
|
508
|
+
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `program`.
|
|
509
|
+
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the program.
|
|
510
|
+
* @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
|
|
511
|
+
*/
|
|
512
|
+
export function executeProgram(program, initial_witness, foreign_call_handler) {
|
|
513
|
+
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
514
|
+
const len0 = WASM_VECTOR_LEN;
|
|
515
|
+
const ret = wasm.executeProgram(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
|
|
516
|
+
return takeObject(ret);
|
|
517
|
+
}
|
|
518
|
+
|
|
473
519
|
/**
|
|
474
520
|
* Compresses a `WitnessMap` into the binary format outputted by Nargo.
|
|
475
521
|
*
|
|
@@ -569,52 +615,6 @@ export function decompressWitnessStack(compressed_witness) {
|
|
|
569
615
|
}
|
|
570
616
|
}
|
|
571
617
|
|
|
572
|
-
/**
|
|
573
|
-
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
574
|
-
*
|
|
575
|
-
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
576
|
-
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
577
|
-
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
578
|
-
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
|
|
579
|
-
*/
|
|
580
|
-
export function executeCircuit(program, initial_witness, foreign_call_handler) {
|
|
581
|
-
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
582
|
-
const len0 = WASM_VECTOR_LEN;
|
|
583
|
-
const ret = wasm.executeCircuit(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
|
|
584
|
-
return takeObject(ret);
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
/**
|
|
588
|
-
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
589
|
-
* This method also extracts the public return values from the solved witness into its own return witness.
|
|
590
|
-
*
|
|
591
|
-
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
592
|
-
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
593
|
-
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
594
|
-
* @returns {SolvedAndReturnWitness} The solved witness calculated by executing the circuit on the provided inputs, as well as the return witness indices as specified by the circuit.
|
|
595
|
-
*/
|
|
596
|
-
export function executeCircuitWithReturnWitness(program, initial_witness, foreign_call_handler) {
|
|
597
|
-
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
598
|
-
const len0 = WASM_VECTOR_LEN;
|
|
599
|
-
const ret = wasm.executeCircuitWithReturnWitness(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
|
|
600
|
-
return takeObject(ret);
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
/**
|
|
604
|
-
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
605
|
-
*
|
|
606
|
-
* @param {Uint8Array} program - A serialized representation of an ACIR program
|
|
607
|
-
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `program`.
|
|
608
|
-
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the program.
|
|
609
|
-
* @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
|
|
610
|
-
*/
|
|
611
|
-
export function executeProgram(program, initial_witness, foreign_call_handler) {
|
|
612
|
-
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
613
|
-
const len0 = WASM_VECTOR_LEN;
|
|
614
|
-
const ret = wasm.executeProgram(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
|
|
615
|
-
return takeObject(ret);
|
|
616
|
-
}
|
|
617
|
-
|
|
618
618
|
function __wbg_adapter_75(arg0, arg1, arg2, arg3, arg4) {
|
|
619
619
|
wasm.wasm_bindgen__convert__closures__invoke3_mut__h17fc532521b46256(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4));
|
|
620
620
|
}
|
|
@@ -676,7 +676,7 @@ function __wbg_get_imports() {
|
|
|
676
676
|
const ret = false;
|
|
677
677
|
return ret;
|
|
678
678
|
};
|
|
679
|
-
imports.wbg.
|
|
679
|
+
imports.wbg.__wbg_constructor_79bab16c42849d1b = function(arg0) {
|
|
680
680
|
const ret = new Error(takeObject(arg0));
|
|
681
681
|
return addHeapObject(ret);
|
|
682
682
|
};
|
|
@@ -684,7 +684,7 @@ function __wbg_get_imports() {
|
|
|
684
684
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
685
685
|
return addHeapObject(ret);
|
|
686
686
|
};
|
|
687
|
-
imports.wbg.
|
|
687
|
+
imports.wbg.__wbg_new_610492d70b2d4e55 = function() {
|
|
688
688
|
const ret = new Array();
|
|
689
689
|
return addHeapObject(ret);
|
|
690
690
|
};
|
|
@@ -706,7 +706,7 @@ function __wbg_get_imports() {
|
|
|
706
706
|
const ret = Array.isArray(getObject(arg0));
|
|
707
707
|
return ret;
|
|
708
708
|
};
|
|
709
|
-
imports.wbg.
|
|
709
|
+
imports.wbg.__wbg_new_7b5514a697f386eb = function() {
|
|
710
710
|
const ret = new Map();
|
|
711
711
|
return addHeapObject(ret);
|
|
712
712
|
};
|
|
@@ -901,8 +901,8 @@ function __wbg_get_imports() {
|
|
|
901
901
|
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
902
902
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
903
903
|
};
|
|
904
|
-
imports.wbg.
|
|
905
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
904
|
+
imports.wbg.__wbindgen_closure_wrapper734 = function(arg0, arg1, arg2) {
|
|
905
|
+
const ret = makeMutClosure(arg0, arg1, 268, __wbg_adapter_22);
|
|
906
906
|
return addHeapObject(ret);
|
|
907
907
|
};
|
|
908
908
|
|
package/web/acvm_js_bg.wasm
CHANGED
|
Binary file
|
package/web/acvm_js_bg.wasm.d.ts
CHANGED
|
@@ -12,13 +12,13 @@ export function blake2s256(a: number, b: number, c: number): void;
|
|
|
12
12
|
export function ecdsa_secp256k1_verify(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): number;
|
|
13
13
|
export function ecdsa_secp256r1_verify(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): number;
|
|
14
14
|
export function buildInfo(): number;
|
|
15
|
+
export function executeCircuit(a: number, b: number, c: number, d: number): number;
|
|
16
|
+
export function executeCircuitWithReturnWitness(a: number, b: number, c: number, d: number): number;
|
|
17
|
+
export function executeProgram(a: number, b: number, c: number, d: number): number;
|
|
15
18
|
export function compressWitness(a: number, b: number): void;
|
|
16
19
|
export function decompressWitness(a: number, b: number, c: number): void;
|
|
17
20
|
export function compressWitnessStack(a: number, b: number): void;
|
|
18
21
|
export function decompressWitnessStack(a: number, b: number, c: number): void;
|
|
19
|
-
export function executeCircuit(a: number, b: number, c: number, d: number): number;
|
|
20
|
-
export function executeCircuitWithReturnWitness(a: number, b: number, c: number, d: number): number;
|
|
21
|
-
export function executeProgram(a: number, b: number, c: number, d: number): number;
|
|
22
22
|
export function __wbindgen_malloc(a: number): number;
|
|
23
23
|
export function __wbindgen_realloc(a: number, b: number, c: number): number;
|
|
24
24
|
export const __wbindgen_export_2: WebAssembly.Table;
|