How to import p2wsh-in-p2sh multisig as watch-only?

How to import p2wsh-in-p2sh multisig as watch-only?

I've created a p2wsh-in-p2sh multisig address using an offline node. I have the address and redeem script, as provided by bitcoin-cli addmultisigaddress on the offline node. How do I import this as a watch-only address on an online node, so I can use the online node to create transactions?

I have tried the following:

$ bitcoin-cli -testnet -rpcwallet=glacier importmulti '[{ "scriptPubKey": { "address": "2MzqiaZzpLT2SSBfsFqqo3FpZsP8g6WTvyC" }, "timestamp":"now", "redeemscript":"5221029f531503facdac2496f50a446d9bd29846a06a04a45e3845b656bb471df422fc2102e30787703a990e4015a2cb9071fcfd1c7d4641fb294e4b4c3f5f6b450a1925132102da28088a8022651171c4f13429b98709dabe13bc6da526537fdd2d0730dd2dbb2103286c96ecaa850a6ba43cc45fbb539c1fb1d65c23cc0f3cd09fcf9765826ff9de54ae", "watchonly":true, "label":"Glacier 2012-12-21" }]'
[
  {
    "success": true
  }
]

That seemed to work, but getaddressinfo doesn't look correct:

$ bitcoin-cli -testnet -rpcwallet=glacier getaddressinfo "2MzqiaZzpLT2SSBfsFqqo3FpZsP8g6WTvyC"
{
    "address": "2MzqiaZzpLT2SSBfsFqqo3FpZsP8g6WTvyC",
    "scriptPubKey": "a914534ee3ce21b8f805128f76b9d977e351bbbea20d87",
    "ismine": false,
    "iswatchonly": false,
    "isscript": true,
    "iswitness": false,
    "label": "Glacier 2012-12-21",
    "labels": [
       {
           "name": "Glacier 2012-12-21",
           "purpose": "receive"
       }
    ]
}

Shouldn't ismine and iswatchonly be true, and more details appear, such as hex and script?

Note that the glacier wallet was created with disable_private_keys=true. I'm running Bitcoin Core v0.17.0.1.

http://bit.ly/2Sh8dzG

Comments

Popular posts from this blog

couldn't connect to server: EOF reached (code 1)