We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The getSignatures() method on Transaction fails if the transaction being signed is a non-multisig P2SH transaction.
The transaction signature should be returned.
The method throws Abstract Method Invocation: Trying to sign unsupported output type (only P2PKH and P2SH multisig inputs are supported) for input
Abstract Method Invocation: Trying to sign unsupported output type (only P2PKH and P2SH multisig inputs are supported) for input
the following code attempts to sign a transaction spending from a trivial P2SH address with a locking script of
OP_5 OP_EQUAL <pubkey> OP_CHECKSIG
$ node > const dashcore = require('@dashevo/dashcore-lib'); undefined > tx = dashcore.Transaction('03000000018618449e1b1f090518ff2d2e7ec185af7688aca26b7c3a4a35db0c45117a05e30000000028005525558721032a90617b3d14645bb0db5acc83037ff4953ea7ecb2403430dd81375a2d69aeacacffffffff0118c69a3b000000001976a914efb38bcb860f3704cadab10947be89b7b24de70a88ac00000000') <Transaction: 03000000018618449e1b1f090518ff2d2e7ec185af7688aca26b7c3a4a35db0c45117a05e30000000028005525558721032a90617b3d14645bb0db5acc83037ff4953ea7ecb2403430dd81375a2d69aeacacffffffff0118c69a3b000000001976a914efb38bcb860f3704cadab10947be89b7b24de70a88ac00000000> > tx.getSignatures('cUstHm2KaHLXsqcVmq3eKkSs4258WCaHByvqMMmNVjrcFWCWWkCb') Abstract Method Invocation: Trying to sign unsupported output type (only P2PKH and P2SH multisig inputs are supported) for input: {"prevTxId":"e3057a11450cdb354a3a7c6ba2ac8876af85c17e2e2dff1805091f1b9e441886","outputIndex":0,"sequenceNumber":4294967295,"script":"005525558721032a90617b3d14645bb0db5acc83037ff4953ea7ecb2403430dd81375a2d69aeacac","scriptString":"OP_0 OP_5 37 0x558721032a90617b3d14645bb0db5acc83037ff4953ea7ecb2403430dd81375a2d69aeacac"} Error at Error.NodeError (dashcore-lib/lib/errors/index.js:23:41) at Input.getSignatures (dashcore-lib/lib/transaction/input/input.js:188:9) at forEachInput (dashcore-lib/lib/transaction/transaction.js:1168:18) at arrayEach (lodash/lodash.js:516:11) at Function.forEach (lodash/lodash.js:9368:14) at Transaction.getSignatures (dashcore-lib/lib/transaction/transaction.js:1167:5) >
P2SH transactions are needed to implement more sophisticated transactions like atomic swaps
The text was updated successfully, but these errors were encountered:
Hello @bappelt,
Thank you for raising this issue. This has been added to our backlog and will be dealt with as soon as possible !
Sorry, something went wrong.
Agreed on triage to process as a P3.
retest failed, the above example still throws on @dashevo/[email protected]:
@dashevo/[email protected]
tx.getSignatures('cUstHm2KaHLXsqcVmq3eKkSs4258WCaHByvqMMmNVjrcFWCWWkCb') Abstract Method Invocation: Trying to sign unsupported output type (only P2PKH and P2SH multisig inputs are supported) for input: {"prevTxId":"e3057a11450cdb354a3a7c6ba2ac8876af85c17e2e2dff1805091f1b9e441886","outputIndex":0,"sequenceNumber":4294967295,"script":"005525558721032a90617b3d14645bb0db5acc83037ff4953ea7ecb2403430dd81375a2d69aeacac","scriptString":"OP_0 OP_5 37 0x558721032a90617b3d14645bb0db5acc83037ff4953ea7ecb2403430dd81375a2d69aeacac"}
No branches or pull requests
The getSignatures() method on Transaction fails if the transaction being signed is a non-multisig P2SH transaction.
Expected Behavior
The transaction signature should be returned.
Current Behavior
The method throws
Abstract Method Invocation: Trying to sign unsupported output type (only P2PKH and P2SH multisig inputs are supported) for input
Possible Solution
Steps to Reproduce (for bugs)
the following code attempts to sign a transaction spending from a trivial P2SH address with a locking script of
OP_5 OP_EQUAL <pubkey> OP_CHECKSIG
Context
P2SH transactions are needed to implement more sophisticated transactions like atomic swaps
Your Environment
The text was updated successfully, but these errors were encountered: