0
I create a wallet with private keys disabled.
Then use importmulti like so:
command curl --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "importmulti", "params":[[{ "scriptPubKey": { "address": "bcrt1qeappehxje9d46zjeyvh3cqslzzda9p92nx2xg495e8memcjvppvqhk6hcn" }, "label": "Imported Address", "timestamp": "now", "watchonly": true, "keypool": true, "internal": false }], ''{"rescan": false}''] }' -H 'content-type: text/plain;' http://user:password@127.0.0.1:18443/wallet/Test
result = Optional({
error = "<null>";
id = curltest;
result = (
{
success = 1;
}
);
})
But when I run getnewaddress it says keypool empty:
curl --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnewaddress", "params":["", "bech32"] }' -H 'content-type: text/plain;' http://user:password@127.0.0.1:18443/wallet/Test
result = Optional({
error = {
code = "-4";
message = "Error: This wallet has no available keys";
};
id = curltest;
result = "<null>";
})
This also happens when I use importmulti descriptor approach to import a multisig.
I am trying to create a watch-only wallet for my multisig, where the only key that is in the keypool is the multisig address, just to make building transactions with the wallet seamless.
Ok, so it is not possible to add a multi-sig address to the keypool then I take it? – Fontaine – 2019-07-23T17:51:27.483
1No, it is not possible. You currently cannot get any addresses from Bitcoin Core except for the standard single key addresses. – Andrew Chow – 2019-07-23T21:08:15.860