bitcoinjs/bitcoinjs-lib

How to use the API in version 6.1.5

ArkChou opened this issue · 1 comments

I don't know how to use this library to generate a Taproot address. I use the fromWIF method, but it prompts me that I can't find this method. I use my WIF PrivateKey to generate my Taproot address.

TypeError: Cannot read properties of undefined (reading 'fromWIF')

Please check the tests. There is an example of generating a key-spend taproot address.

https://github.com/bitcoinjs/bitcoinjs-lib/blob/v6.1.5/test/integration/taproot.spec.ts

fromWIF is a method on ecpair, which is no longer a part of the main library, but is a separate library now.