btc笔记

作者: gmsy | 来源:发表于2020-02-24 17:03 被阅读0次

WIF = Wallet Import Format (private key)

const BigNumber = require('bignumber.js')
const BNOf = n => new BigNumber(n)

const p = BNOf('115792089237316195423570985008687907853269984665640564039457584007908834671663')
const x = BNOf('55066263022277343669578718895168534326250603453777594175500187360389116729240')
const y = BNOf('32670510020758816978083085130507043184471273380659243275938904335757337482424')
// >>> (x ** 3 + 7 - y**2) % p

console.log(
    x
    .pow(3)
    .plus(6)
    .minus(y.pow(2))
    .mod(p)
    .toNumber() 
)



相关文章

网友评论

      本文标题:btc笔记

      本文链接:https://www.haomeiwen.com/subject/nirjgttx.html