1

Can anyone tell me how to generate a Monero wallet address with API???

On the Monero offical website I read that document but I can't understand.

If anyone knows, please update....

Nabil Kadimi
  • 103
  • 3

1 Answers1

2

You didn't specify any specific language so I'll assume you're using a shell. Even if you don't, it shouldn't be hard to run a shell command using a different language.

Download the latest command-line tools from https://getmonero.org/downloads/

Extract and run the following command

monero-wallet-cli --generate-new-wallet "my_wallet_name" --password "pass123" --mnemonic-language English --create-address-file

This will create and open a new wallet (and keep it open). If you want to create a wallet and immediately close it you could use

echo "exit" | ./monero-wallet-cli --generate-new-wallet "my_wallet_name" --password "pass123" --mnemonic-language English --create-address-file

That's it. A new wallet named my_wallet_name was created with password pass123. You can see your address by running

cat my_wallet_name.address.txt
Jona
  • 832
  • 5
  • 16
  • but jona i want to generate address with API. not specific language. In monero coin any method available to generate wallet address on one method like genrateWalletAddress(); it was generate address and public or private key who need it in monero wallet..? – user3388438 Jul 17 '18 at 09:34
  • I'm sorry but I'm not sure what you have in mind. API is a general term, and "generate address using API" is a bit undefined. Please try to give more details about what you wish to do. – Jona Jul 17 '18 at 15:13
  • Or use the monero-wallet-rpc which has a json rpc "API" https://getmonero.org/resources/developer-guides/wallet-rpc.html#create_wallet – jtgrassie Jul 18 '18 at 08:23