Closed coincrypto closed 6 years ago
Zcash is same as Bitcoin, but 2 bytes as version... you should check coininfo sources, you will find values.
const sha = crypto.createHash('sha256').update(publicKey).digest()
const pubKeyHash = crypto.createHash('rmd160').update(sha).digest()
const payload = Buffer.allocUnsafe(22)
payload.writeUInt16BE(coinInfo(name).versions.public)
pubKeyHash.copy(payload, 2)
return bs58check.encode(payload)
Thank you very much. It was helped me a lot.
@fanatid sorry to bother you, but I have a question. Can we use coininfo and coinkey to create zcash address/private key? If so, could you give example please!. I tried but seem address created is invalid. I googled it but could not find. Thank you very much!