bitpay / bitcore

A full stack for bitcoin and blockchain-based applications
https://bitcore.io/
MIT License
4.85k stars 2.09k forks source link

taproot address #3701

Closed blastgo closed 2 months ago

blastgo commented 7 months ago

I try to convert a pubkey to a taproot type address using codes like below:

pubkey.toAddress(undefined, 'taproot').toString() And I got an error saying:

xxx/node_modules/bitcore-lib/lib/address.js:293 info.hashBuffer = Hash.sha256ripemd160(Script.buildWitnessV1Out(pubkey).toBuffer()); ^

TypeError: Script.buildWitnessV1Out is not a function I've search buildWitnessV1Out in the whole codebase. It seems to be absent. Am I missing something?

kajoseph commented 2 months ago

The taproot branch was finally merged in and published to npm in v10.1.0