You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

10 lines
215 B

const snarkjs = require("snarkjs");
let n = 16352677002768649294638363183714474939219394808856154771098596513875516795430n
let r = snarkjs.bn128.Fr.sqrt(n)
r = snarkjs.bn128.Fr.q -r;
console.log(r.toString());