c32check
How it works
0 1 n+1 n+5
|------|-----------------------------|---------------|
version n-byte hex payload 4-byte hashchecksum = sha256(sha256(version + payload)).substring(0,4)Examples
npm install c32check> c32 = require('c32check')
{ c32encode: [Function: c32encode],
c32decode: [Function: c32decode],
c32checkEncode: [Function: c32checkEncode],
c32checkDecode: [Function: c32checkDecode],
c32address: [Function: c32address],
c32addressDecode: [Function: c32addressDecode],
versions:
{ mainnet: { p2pkh: 22, p2sh: 20 },
testnet: { p2pkh: 26, p2sh: 21 } },
c32ToB58: [Function: c32ToB58],
b58ToC32: [Function: b58ToC32] }c32encode, c32decode
c32checkEncode, c32checkDecode
c32address, c32addressDecode
c32ToB58, b58ToC32
Was this helpful?