mirror of
https://github.com/arnaucube/blindsig-client-server-example.git
synced 2026-02-06 18:56:40 +01:00
Add blindsecp256k1-js client web example
This commit is contained in:
36
client/index-wasm.html
Normal file
36
client/index-wasm.html
Normal file
@@ -0,0 +1,36 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>blindsig-client-server-example</title>
|
||||
</head>
|
||||
<body>
|
||||
<script src="wasm_exec.js"></script>
|
||||
<script>
|
||||
const go = new Go();
|
||||
WebAssembly.instantiateStreaming(fetch('blindsecp256k1.wasm'), go.importObject).then(function(dat) {
|
||||
go.run(dat.instance);
|
||||
});
|
||||
</script>
|
||||
<h3>blindsig-client-server-example (client in WASM version)</h3>
|
||||
<p>This is an example of usage of <a href="https://github.com/arnaucube/go-blindsecp256k1" target="_blank">https://github.com/arnaucube/go-blindsecp256k1</a></p>
|
||||
<br>
|
||||
Message (only numbers): <input id="msg" value="1234"></input>
|
||||
<button onClick="newRequest();">newRequest()</button>
|
||||
<p id="signerRx"></p>
|
||||
<p id="signerRy"></p>
|
||||
<p id="signerQx"></p>
|
||||
<p id="signerQy"></p>
|
||||
|
||||
<button onClick="askBlindSign();">askBlindSign()</button>
|
||||
<p id="sBlind"></p>
|
||||
<p id="sigS"></p>
|
||||
<p id="sigFx"></p>
|
||||
<p id="sigFy"></p>
|
||||
|
||||
<button onClick="verify();">verify()</button>
|
||||
<p id="verified"></p>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
|
||||
<script src="index-wasm.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user