bitcoinjs / bitcoinjs-lib

A javascript Bitcoin library for node.js and browsers.
MIT License
5.6k stars 2.08k forks source link

Getting the inputs array from a transaction builder - missing getter #1179

Closed omrip30 closed 5 years ago

omrip30 commented 5 years ago

When using the 'TransactionBuilder.fromTransaction' method and then trying to access the transaction inputs, the only way to access those inputs is by accessing the '__inputs' private member. A getter method for the inputs should exist for this

dcousens commented 5 years ago

What are you actually trying to do? You shouldn't need to manually access the inputs.

omrip30 commented 5 years ago

Basically, you can see https://github.com/bitcoinjs/bitcoinjs-lib/issues/1180 for the reason I require the inputs (in the for loop at the bottom). This issue can be closed, in retrospective I think the issue I mentioned above already covers this one as well.