• Forum has been upgraded, all links, images, etc are as they were. Please see Official Announcements for more information

Finding the redeemScript hash on a multisig

JZA

Active member
I am trying to create a multisig address and then execute a withdraw. However I am finding myself in trouble when trying to sign the transaction. I am getting the error: "error": "Operation not valid with the current stack size"

So I tried to retrace my steps to find out that I am not sure how could I get the redeemScript on the transaction. From video tutorials this redeem script is declared when creating a multisig on bitcoin, however dash doesnt return any of this data.

At the moment I include what I thought was a redeem script from the hex value from the validateaddress command.

{

"isvalid": true,
"address": "............CgPBDTEch9.......",
"scriptPubKey": ".....ad8f8744d7f97410296489c.....",
"ismine": false,
"iswatchonly": false,
"isscript": true,
"script": "multisig",
"hex": "........c475c6dd9a7eec0f37d484efe96e2b9cc06fe75781ca359a52102af0a223f46bd04280519d83200deaeae26e25c20642d19a25a..........",
"addresses": [
"Xjf1fjiMGtj.......................",
".................MsbNNdN9wPhV4x5wv"
],
"sigsrequired": 2,
"account": ""
}
 
to get valid `pubkey/redeemScript`, do `validateaddress dash-address(not msig address)` on the wallet which has `private key` of the address. then do `createmultisig`

private key ===> one way ==> public key ===> one way ====> dash address
 
Last edited:
I did validateaddress and the multisig was generated in the current wallet.
 
Seems I did addmultisigaddress instead of createmultisig, however that didnt help when doing the signtransaction command. I hold the privatekey of the same address in the multisig (the other is on a friend laptop), so I wonder if the order that was put during the generation of the multisig address has to do which who owns the address?

From the logs the process was like this:
1. getnewaddress
2. validateaddress
3. dumprivkey
4. addmultisigaddress 2
5. getrawtransaction 1
6. createrawtransaction
7. signrawtransaction
8. createmultisig 2
9. validateaddress

It still gives me a "ismine": false,
What does that mean?
Do the order of the pubkeys matter when generating an multisig?
Can the public keys be wrong and still generate a multisig address?
 
Last edited:
Back
Top