libitx / txforge

Modern Bitcoin transaction builder, capable of supporting any non-standard and custom script type.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

P2PKH.js - ReferenceError: casts is not defined (Unable to find module within Nimble)

jsim77 opened this issue · comments

Dear Community,

Sorry is me again. I'm referring to - nimble/classes/p2pkh.js

Have solved the first "import" issue that is to replace with - const { forgeTx } =require('txforge') and in the package.json, I've added "module":"true"

Right now, the next line problem is the:

const { P2PKH, OpReturn } =casts
^

ReferenceError: casts is not defined

I did add the word "require" --> const { P2PKH, OpReturn } =require('casts')
then the new error is:

node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module 'casts'
Require stack:

Question - how to search for "casts" module within nimble?

Kindly refer to the screenshot for your easy reference, thanks.

Screenshot 2022-08-12 at 8 42 59 PM

Screenshot 2022-08-12 at 8 44 57 PM

Using Const.