0

When instantiating a new Psbt in my Visual Studio Code like below:

  const psbt = new bitcoin.Psbt()

The variable psbt doesn't auto display any of its methods/properties after I add the . right after it. Why is this?

3
  • Can you also include the line where you import/require bitcoinjs? Commented May 15, 2023 at 15:26
  • import * as bitcoin from "../../../../bitcoinjs-lib" It's importing to the browser as I am using it in a React app
    – jiamijiang
    Commented May 16, 2023 at 11:05
  • That's a strange way to be importing a library. Why don't you install it using a package manager (npm/yarn)? It comes with type definitions which you likely haven't included in your way of importing it. Commented May 16, 2023 at 15:28

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.