0

What is difference between createmultisig and addmultisigaddress? I ran 2 methods for 2 same bitcoin address on bitcoin-cli but gives different addresses as multisig to me. the results are as follows:

>  bitcoin-cli -testnet createmultisig 2 "[\"03f47a5115cd9e5e21b94136db90e2e3d6ac7e40396d8e62f73df3fd3fcfb3f214\",\"0395ad430034c1761bbe9b4dfd784fb06229970d54016a7e090fc6ceb3814611b5\"]"
RESULT:
{
  "address": "**2Mt1jgrBoojAHbJS5zGJTZnx4TFktUCCNxu**",
  "redeemScript": "522103f47a5115cd9e5e21b94136db90e2e3d6ac7e40396d8e62f73df3fd3fcfb3f214210395ad430034c1761bbe9b4dfd784fb06229970d54016a7e090fc6ceb3814611b552ae",
  "descriptor": "sh(multi(2,03f47a5115cd9e5e21b94136db90e2e3d6ac7e40396d8e62f73df3fd3fcfb3f214,0395ad430034c1761bbe9b4dfd784fb06229970d54016a7e090fc6ceb3814611b5))#6nexfs8d"
} ```

> bitcoin-cli -testnet addmultisigaddress 2 "[\"2NEy9um4CpWerPeaEhPa3TckNYWnh58yDXN\",\"2Mxr2oaph8iapbnbL1MSEvfZH8EQaXYuhAy\"]"

RESULT: 
 {
  "address": "**tb1qjyvx2kwl4kq2cypj5zawhw5gpwxmphxe487z3hxj9m36ux8tylpszpazsu**",
  "redeemScript": "522103f47a5115cd9e5e21b94136db90e2e3d6ac7e40396d8e62f73df3fd3fcfb3f214210395ad430034c1761bbe9b4dfd784fb06229970d54016a7e090fc6ceb3814611b552ae",
  "descriptor": "wsh(multi(2,[a025344d/0'/0'/0']03f47a5115cd9e5e21b94136db90e2e3d6ac7e40396d8e62f73df3fd3fcfb3f214,[a025344d/0'/0'/1']0395ad430034c1761bbe9b4dfd784fb06229970d54016a7e090fc6ceb3814611b5))#gmdd9d2p"
}

why those addresses is different?

thank you

1
  • Try running this as first command: bitcoin-cli -testnet createmultisig 2 "[\"03f47a5115cd9e5e21b94136db90e2e3d6ac7e40396d8e62f73df3fd3fcfb3f214\",\"0395ad430034c1761bbe9b4dfd784fb06229970d54016a7e090fc6ceb3814611b5\"]" "bech32"
    – user103136
    Commented Nov 18, 2020 at 13:43

1 Answer 1

0

If solution suggested in the comment resolved your problem it's related to address_type in both RPC commands. It is legacy by default for createmultisig and set by -addresstype in bitcoin.conf for addmultisigaddress

You have used public keys in first command and addresses in second so I am not sure if the addresses are for same keys and in the same order.

Please refer to this question for order of keys: Is the `addmultisignature` API call dependent on order of public keys in the array? Or is it lexicographically sorted?

Your Answer

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

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