I would like to new address generate with this command

bitcoin-cli -testnet getnewaddress "adr1" "p2sh-segwit" but I get this msg:

error message:
Wallet file not specified (must request wallet RPC through /wallet/<filename> uri-path).
Try adding "-rpcwallet=<filename>" option to bitcoin-cli command line. 

then I added the -rpcwallet command like that: bitcoin-cli -testnet -rpcwallet=/home/bitcoin/.bitcoin/ getnewaddress "adr1" "p2sh-segwit" but I got an error again like this:

error message:
Requested wallet does not exist or is not loaded````

what should I do?

thank you

-rpcwallet takes the name of the wallet, not the path to the datadir (as you appear to have done) or the path to the wallet file.

To get a list of the names of the wallets currently loaded, you can use the listwallets command.

  • thank you, that's worked!
    – sollover
    Nov 15 '20 at 0:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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