1

I want to use importmulti to import 100 addresses from an xpub descriptor.

If I set keypool: true as one of the arguments the keys get added to the keypool.

How does the wallet prioritise which keys it generates when calling getnewaddress? Will it prioritise the imported addresses or do I have to request the imported address via the label argument in getnewaddress? What if I don't add a label argument to the importmulti command?

1 Answer 1

0

There is no guarantee of the order by the API. But its currently FIFO (first in first out).

If the order/remembering is important to you, consider using fundrawtransaction with a wallet where you have private keys disabled createwallet "name" true. Just import pubkeys define the change output address in fundrawtransaction.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.