Partially addresses #12703. Fully addresses #9694.
This implementation simply uses the existing importprivkey
code (moved into a separate ImportPrivateKey
method), and does not support redeem scripts, internal, pubkeys, or keys options.
One question is if this should be simplified to where a user can put private keys in keys
and leave scriptPubKey
empty, or if it makes more sense to add a new field as I do here.
Another question is whether this should be incorporated more into how importmulti
works, rather than basing it off of importprivkey
(although with the timestamp argument, it seems like it does all we want it to).
(I was initially planning on deriving the arguments for ProcessImport
and letting it do its thing, but realized there can be multiple scriptPubKeys for one private key, so I’d have to call ProcessImport
multiple times, with the same private key.. which will trigger an error.)