This tutorial will show you how to:
- Run monero-wallet-cli.
- Generate a wallet securely, by adding entropy to ensure the private-key randomness.
- Backup, Restore a wallet.
- Connect our wallet to a monero node over Tor.
Step 1 - Get the monero software
- Go to the official monero website | Tor hidden-service.
- Download the CLI for your architecture. And verify the checksum of the archive with the PGP signature (follow this guide if you don’t know PGP).
- Extract the archive, go inside the directory and open a terminal window.
Step 2 - Run monero-wallet-cli
Let’s run monero-wallet-cli by typing:
./monero-wallet-cli
The software will directly ask you the wallet filename to open or typing a name to create a new one. In our case we just close the software.
Step 3 - Create a new wallet:
We will do it offline and by generating it with our own entropy, by rolling a dice in the real life.
3.1 Making our own entropy
It’s very easy. Create a new file, roll a dice and write results in. More you rolled your dice more the seed generation will be randomized.
3.2 Generate the wallet
Save the file and now, let’s run our wallet offline, while specifying the filename entropy, for this wallet generation:
$ ./monero-wallet-cli --offline --generate-new-wallet <name-of-the-new-wallet> --extra-entropy <entropy-filename>
The wallet’s console will ask you a password, the seed mnemonic words language and you now can exit the wallet after you wrote the displayed words on something safe.
Step 4 - Restore the wallet
Simple specify you want to restore a seed and the mnemonic language you choose when generating a new wallet
$ ./monerod --generate-new-wallet <name-of-the-new-wallet> --restore-from-seed --mnemonic-language <lang>
Mention the seed and the password you want when it’s prompted and the wallet will be restored.
Step 5 - Open a wallet
Mention the filename (+ the directory if needed) of your wallet when running monero-wallet-cli.
./monero-wallet-cli --wallet-file <(/directory/)filename>
Put the password when its prompted and you’ll be on your wallet.
Step 6 - Connect the wallet to a node over Tor.
Mention the SOCKS proxy wanted (Tor in our case, follow this guide if needed), deactivate DNS requests since you’re connecting to a hidden-service, mention the RPC’s hidden-service and mention if the RPC is trusted or not. If you don’t host the RPC you’re going to connect to, put untrusted. Why not mentioning the wallet file.
./monero-wallet-cli --wallet-file <filename> --proxy 127.0.0.1:9050 --no-dns --daemon-address xxxxx.onion:port --(un)trusted-daemon
Step 7 - Generate a new address
address new
2 (the index number of the sub-address) 86WR4xz5zmR7JXSmMtt5hucYMwKCUmnFz2nHN5xagVGoX6s3T5UKwZYJK2USYeFZvFCSYRdivVSszVpJeBYmyUrb239edhy (Untitled address)
To see all your generated address, do:
address all
Step 8 - Transfer funds
We’re going to send funds to the previously generated address
transfer 86WR4xz5zmR7JXSmMtt5hucYMwKCUmnFz2nHN5xagVGoX6s3T5UKwZYJK2USYeFZvFCSYRdivVSszVpJeBYmyUrb239edhy
(the address)0.0019
(the amount)Wallet password:
put your password
Transaction 1/1: Spending from address index 1 Sending 0.001900000000. The transaction fee is 0.000030680000
Is this okay? (Y/Yes/N/No):
put yes
Transaction successfully submitted, transaction <010f4b949a6406b39618de93d05aee2af3aef0c5970946b92e3beb8d3f75452b>
Step 8.1 - For looking up a transaction
show_transfer
the TxID
Outgoing transaction found txid: <010f4b949a6406b39618de93d05aee2af3aef0c5970946b92e3beb8d3f75452b> Height: 3030992 Timestamp: 2023-12-02 18:30:37 Amount: 0.000000000000 Payment ID: 0000000000000000 Change: 0.001969320000 Fee: 0.000030680000 Destinations: 86WR4xz5zmR7JXSmMtt5hucYMwKCUmnFz2nHN5xagVGoX6s3T5UKwZYJK2USYeFZvFCSYRdivVSszVpJeBYmyUrb239edhy: 0.001900000000
Step 8.2 - See your transaction history
show_transfers
3030982 in unlocked 2023-12-02 18:02:38 0.002000000000 45f34edd9ac01b4d1e71e1e06f6865e12188796060e6901a20072791215a09d4 0000000000000000 0.000000000000 8493i9:0.002000000000 1 - 3030992 out - 2023-12-02 18:30:37 0.000000000000 010f4b949a6406b39618de93d05aee2af3aef0c5970946b92e3beb8d3f75452b 0000000000000000 0.000030680000 86WR4xz5zmR7JXSmMtt5hucYMwKCUmnFz2nHN5xagVGoX6s3T5UKwZYJK2USYeFZvFCSYRdivVSszVpJeBYmyUrb239edhy:0.001900000000
Step 9 - Prove you spend a transaction
get_spend_proof
010f4b949a6406b39618de93d05aee2afraef0c5970946b92e3beb8d3f75452b
Wallet password:
put your password
signature file saved to: monero_spend_proof
cat monero_spend_proof
SpendProofV1SLtg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