In v0.19.1, importing a pk()
descriptor resulted in a pkh()
descriptor being imported into the wallet with the p2pkh base58 address:
0$ bitcoin-cli importmulti '[{"desc":"pk(0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798)#gn28ywm7","watchonly":true,"timestamp":0}]'
1
2$ getaddressinfo mrCDrCybB6J1vRfbwM5hemdJz73FwDBC8r
3{
4 "address": "mrCDrCybB6J1vRfbwM5hemdJz73FwDBC8r",
5 "scriptPubKey": "76a914751e76e8199196d454941c45d1b3a323f1433bd688ac",
6 "ismine": false,
7 "solvable": true,
8 "desc": "pkh([751e76e8]0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798)#6ewytvca",
9 "iswatchonly": false,
10 "isscript": false,
11 "iswitness": false,
12 "pubkey": "0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
13 "iscompressed": true,
14 "label": "",
15 "ischange": false,
16 "timestamp": 0,
17 "hdkeypath": "m",
18 "hdseedid": "0000000000000000000000000000000000000000",
19 "hdmasterfingerprint": "751e76e8",
20 "labels": [ { "name": "", "purpose": "receive" }
21 ]
22}
I would consider this an unexpected behavior (p2pk should have no address format), but its somewhat consistent with deriveaddresses
returning p2pkh addresses for pk()
descriptors (which itself also seems wrong?).
Beginning in v0.20, it appears like the p2pkh address is still being added to the wallet, but without any associated descriptor information and with solvable
being reported as false
:
0$ bitcoin-cli importmulti '[{"desc":"pk(0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798)#gn28ywm7","watchonly":true,"label":"L","timestamp":0}]'
1
2$ bitcoin-cli getaddressesbylabel L
3{
4 "mrCDrCybB6J1vRfbwM5hemdJz73FwDBC8r": {
5 "purpose": "receive"
6 }
7}
8
9$ bitcoin-cli getaddressinfo mrCDrCybB6J1vRfbwM5hemdJz73FwDBC8r
10{
11 "address": "mrCDrCybB6J1vRfbwM5hemdJz73FwDBC8r",
12 "scriptPubKey": "76a914751e76e8199196d454941c45d1b3a323f1433bd688ac",
13 "ismine": false,
14 "solvable": false,
15 "iswatchonly": false,
16 "isscript": false,
17 "iswitness": false,
18 "ischange": false,
19 "labels": [
20 "L"
21 ]
22}
Which seems even more unexpected. Also of note is that iswatchonly
is reported as false
, for both v0.19 and v0.20.