1

I am trying to import a 2-of-3 multisignature address into my bitcoind wallet, watch-only. I have the public keys, but not the private keys. Two potential bitcoind JSON-RPC calls that seem to fit are:

bitcoin-cli addmultisigaddress 2 ["pubkey1", "pubkey2", "pubkey3"] "my_account"

and

bitcoin-cli importaddress "multisig-ed_address" "my_account"

Assume "multisig-ed_address" == multisig("pubkey1", "pubkey2", "pubkey3")

Are these equivalent? Would they both work?

The only difference I can find is that importaddress has an option to rescan the blockchain for transactions that might have involved the imported address. Does addmultisigaddress rescan or not?

1 Answer 1

1

The difference between these two is that with addmultisigaddress, bitcoind stores the redeem script and the second one, bitcoind has no idea what the redeem script is and only stores its hash (which is essentially the p2sh address).

For watching the address, the two are essentially equivalent since you'll still know when bitcoins get sent to that p2sh address. The redeem script is necessary if you want to spend from the p2sh address to some other address. Even if you had the private keys in the multisig p2sh address, you wouldn't be able to spend it using importaddress since you still need the redeem script in order to be able to spend it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.