0.7.3 • Published 2 months ago
js-snarkvm v0.7.3
Introduce
The js-snarkvm dependency library is AleoHQ/snarkVM and the version is tag=v0.11.7
Installing
npm i js-snarkvm
1.eth_to_field
import __wbg_init, { bhp256 } from 'js-snarkvm'
__wbg_init().then(() => {
const f = eth_to_field("0x3eabeda2dd026dce0ad50609c48352654fb5c123");
console.log(f)
})
2.bhp256
import __wbg_init, { bhp256 } from 'js-snarkvm'
__wbg_init().then(() => {
const b = bhp256("aleo14k6t50pt4cul55t32nf2t3m87zj6urtlfgpe6vg6xwrxxxdh9uxqaywt03");
console.log(b)
})
3 3.sign
import __wbg_init, { sign } from 'js-snarkvm'
__wbg_init().then(() => {
const s = sign("xx","xx","xx",['xxx'],['xxx'],BigInt(64))
console.log(s)
})
4.public_key
import __wbg_init, { publicKey } from 'js-snarkvm'
__wbg_init().then(() => {
const p = publicKey("APrivateKey1zkp8cC4jgHEBnbtu3xxs1Ndja2EMizcvTRDq5Nikdkukg1p")
console.log("======",p)
})