Failed to import Bech32 SegWit addresses using importmulti Bitcoin-Core 0.16.0rc3

0

I was trying to import Bech32 addresses using importmulti on Bitcoin Core 0.16.0rc3.

       [
    {
        "scriptPubKey" : { "address": "tb1qkzq7kgx7rk45na3d3vt6vrqftfczq6ryn9zq0d" },
        "timestamp" : "now",
        "watchonly" : "true"
    }
  ] ,  { "rescan": false }

Response:

Please enter the wallet passphrase with walletpassphrase first.


Why that error? and shouldn't I add witness scrpit instead of scriptPubKey?

Adam

Posted 2018-02-27T03:24:54.443

Reputation: 3 215

Answers

0

You should type your wallet passphrase before importing any addresses or private keys.

'walletpassphrase yourpassword 60' would unlock your wallet for 60 seconds. You should import the addresses in that 60 seconds. (Type the walletpassphrase command again if you couldn't import your addresses in that 60 seconds)

MCCCS

Posted 2018-02-27T03:24:54.443

Reputation: 5 827

But I'm importing watchonly addresses, I don't think that's correct! Since I don't have a passphrase, my wallet isn't encrypted and i tried the same command on litecoin and bitcoin cash and it did work.Adam 2018-02-27T04:48:06.080

I don't know why was that, I tried to remove wallet.dat and tried again and it did work.Adam 2018-02-27T04:58:36.630

This is unrelated.Pieter Wuille 2018-02-27T06:05:38.280

Actually i had two problems and that was the first problem.Adam 2018-02-27T06:23:35.277

2

As noted in the Bitcoin Core 0.16 release notes, importmulti does not support SegWit addresses yet. This will be fixed in an upcoming release.

Pieter Wuille

Posted 2018-02-27T03:24:54.443

Reputation: 54 032

it could be weird, But I've imported an address using importmulti and I've got success equals to true, then I've sent some TestNet bitcoins and it did work!!Adam 2018-02-27T06:41:05.347

[ { "involvesWatchonly": true, "account": "", "address": "tb1qh2sdesazn9ac34xk3qt4d2jn0vhd993hjrkk9h", "category": "receive", "amount": 0.10000000, "label": "", "vout": 0, "confirmations": 0, "trusted": false, "txid": "48089a814ac571944feb7162cc0145eea4e72742aa51f6f23d470debd838eeb3", "walletconflicts": [ ], "time": 1519713147, "timereceived": 1519713147, "bip125-replaceable": "yes" } ]Adam 2018-02-27T06:41:39.327

I've made a separate question on https://github.com/bitcoin/bitcoin/issues/12554

Adam 2018-02-27T06:56:51.193