1

I'm trying to generate a public key associated with a wallet. How would I do this using the wallet rpc commands, I couldn't find a command in reference docs which does this.

Thanks.

1 Answer 1

2

I expect the pair

getnewaddress  ( "label" "address_type" )
getaddressinfo  "address" 

will generate a new pubkey and tell you what it is


The same commands are supported by bitcoin-qt console so I can easily demonstrate it thusly ...

getnewaddress
bc1q************************************5e

getaddressinfo bc1q************************************5e
{
  "address": "bc1q************************************5e",
  [...]
  "pubkey": "03**************************************************************4d",
  [...]
}
0

Your Answer

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

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