mirror of
https://github.com/arnaucube/go-snark-study.git
synced 2026-02-02 17:26:41 +01:00
wasm proof generation from browser working. Added cli wasm exporters, html&js browser example, wasm wrapper from go
This commit is contained in:
19
wasm/index.html
Normal file
19
wasm/index.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>go-snark wasm experiments</title>
|
||||
</head>
|
||||
<body>
|
||||
<script src="wasm_exec.js"></script>
|
||||
<script>
|
||||
const go = new Go();
|
||||
WebAssembly.instantiateStreaming(fetch('go-snark.wasm'), go.importObject).then(function(dat) {
|
||||
go.run(dat.instance);
|
||||
});
|
||||
</script>
|
||||
<button onClick="callGenerateProof();">Generate Proof</button>
|
||||
<textarea id="proofResult" rows="15" style="width: 80%;">
|
||||
</textarea>
|
||||
<script src="index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user