I obtained a uncooked tx:
{
"txid": "***********************",
"model": 2,
"locktime": 0,
"vin": [
...
],
"vout": [
...
{
"scriptpubkey": "a9***********************",
"scriptpubkey_asm": "OP_HASH160 OP_PUSHBYTES_20 20b6da29af9fc5a17b54946558c28eed2d5f1d48 OP_EQUAL",
"scriptpubkey_type": "p2sh",
"scriptpubkey_address": "34***********************",
"value": 1010000
},
...
],
"dimension": 3982,
"weight": 9082,
"sigops": 75,
...
}
And I used to be making an attempt to spend these outputs this manner:
inputs = [{"txid": txid, "vout": vout}]
the place the txid
and vout
are changed by the precise values.
then I used createrawtransaction
(by offering inputs
and outputs
) and signrawtransactionwithkey
(by offering tx_hex
and privkeys
).
Nevertheless I obtained this response:
{'txid': '**************************', 'vout': 34, 'witness': [], 'scriptSig': '', 'sequence': **********, 'error': 'Unable to signal enter, invalid stack dimension (probably lacking key)'}
Why? What's lacking? One thing associated to the script?
I obtained a uncooked tx:
{
"txid": "***********************",
"model": 2,
"locktime": 0,
"vin": [
...
],
"vout": [
...
{
"scriptpubkey": "a9***********************",
"scriptpubkey_asm": "OP_HASH160 OP_PUSHBYTES_20 20b6da29af9fc5a17b54946558c28eed2d5f1d48 OP_EQUAL",
"scriptpubkey_type": "p2sh",
"scriptpubkey_address": "34***********************",
"value": 1010000
},
...
],
"dimension": 3982,
"weight": 9082,
"sigops": 75,
...
}
And I used to be making an attempt to spend these outputs this manner:
inputs = [{"txid": txid, "vout": vout}]
the place the txid
and vout
are changed by the precise values.
then I used createrawtransaction
(by offering inputs
and outputs
) and signrawtransactionwithkey
(by offering tx_hex
and privkeys
).
Nevertheless I obtained this response:
{'txid': '**************************', 'vout': 34, 'witness': [], 'scriptSig': '', 'sequence': **********, 'error': 'Unable to signal enter, invalid stack dimension (probably lacking key)'}
Why? What's lacking? One thing associated to the script?