Bitcoinjs-lib: Creating a 1-1 transaction works fine with one input but fails on multiple inputs

Created on 29 Apr 2018  路  4Comments  路  Source: bitcoinjs/bitcoinjs-lib

When I construct a transaction with one input, it works fine but when I try constructing a transaction with multiple inputs, I get the following error. Has anyone else encountered this error?

transaction_builder.js:632 Uncaught Error: Transaction is not complete
at TransactionBuilder../node_modules/bitcoinjs-lib/src/transaction_builder.js.TransactionBuilder.__build
at TransactionBuilder../node_modules/bitcoinjs-lib/src/transaction_builder.js.TransactionBuilder.build
how to / question / docs

Most helpful comment

Sure, I looked at the examples and inferred that every input in the transaction needs to be signed. I was previously just signing one of the inputs. It would be nice if the error message explained why the transaction is incomplete.

All 4 comments

Resolved the issue

@abhinavlanka care to share with everyone the solution?

Sure, I looked at the examples and inferred that every input in the transaction needs to be signed. I was previously just signing one of the inputs. It would be nice if the error message explained why the transaction is incomplete.

@abhinavlanka Transaction is not complete, in Bitcoin layman terms, means "not enough signatures" (or in this case, missing scriptSig data).

It is the verbatim term for that issue.

From signrawtransaction:

complete The value聽true聽if transaction is fully signed; the value聽false聽if more聽signatures聽are required

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dakk picture dakk  路  3Comments

zhaozhiming picture zhaozhiming  路  3Comments

hoshsadiq picture hoshsadiq  路  3Comments

Beardcoding picture Beardcoding  路  3Comments

LeonYanghaha picture LeonYanghaha  路  3Comments