![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
April 26, 2018, 07:07:24 AM Last edit: April 26, 2018, 07:32:35 AM by tsubasa1380 |
|
I use bitcoin core api and want to create multisigaddress with this api.
So I have two question about multisigaddress.
I created 2 multisigaddresses by different two commands;
*These address were '2 of 3' multisigaddresses.
One address was created by using 'createmultisig' command as follows. bitcoin-cli createmultisig 2 ''' [ "publicKey_1", ← These were dummy keys "publicKey_2", "publicKey_3" ] '''
Return multisigaddress and redeemscript.
Then I checked this address by validateaddress command. bitcoin-cli validateaddress xxxxxxxxxxxxx ←dummy multisig address Return { "isvalid": true, "address": "xxxxxxxxxxxxxxxxxx", "scriptPubKey": "a9142c3647f41008a9a4098155d5d9ccc29d66d10ae787", "ismine": false, "iswatchonly": false, ← Why false ? "isscript": true }
The other address was created by using 'addmultisigaddress' command as follows.
bitcoin-cli addmultisigaddress \ 2 \ ''' [ "publicKey_4", ← These were dummy keys "publicKey_5", "publicKey_6" ] ''' Return multisigaddress.
Then I checked this address by validateaddress command. bitcoin-cli validateaddress YYYYYYYYYYYYYYYYYYY ←dummy multisig address Return { "isvalid": true, "address": "YYYYYYYYYYYYYYYYYYY", "scriptPubKey": "a914e435fa2df32285ab3f3532001ee8eae0173b6ab487", "ismine": true, ← attention! "iswatchonly": false, "isscript": true, "script": "multisig", "hex": "5221037fb9d7a84228a2ad880e0ddb490f6b215d54d59b5da009eb6965213148941bed21025f78b 5a4bea95ad92a82bfbb1a9bae7e7ce631e425937fff0d2953c1543e19212102a6f29806b8340ed9 b512e463944b9b02f48c4ce0d0f49d87472caa03c0deae7e53ae", "addresses": [ "singlesigaddress_1", ← These are dummy addresses by which I created multisigaddress "singlesigaddress_2", "singlesigaddress_3" ], "sigsrequired": 2, "account": "" }
As mentioned above, "hex" is redeemscript and "address" consists of these three "addresses".
Q1 What is the difference between createmultisig and addmultisigaddress?
Q2 If I create multisigaddress by 'createmultisig' command and then forget private keys of this multisigaddress, how can I get these private keys ? Not knowing these singlesig addresses, I can't use dumpprivkey command.
If aynone knows these question, please answear me.
|