We all know that the viewkey can be used to verify transactions you've made, and has been covered to a certain extent in other questions, but how is this employed using the simplewallet client? What steps need to be undertaken to create a watchonly wallet so that you can keep the private key offline, but still monitor any funds being sent to your address with simplewallet?
With your account's standard public address and private view key handy:
- Start simplewallet from the command line with
./simplewallet --generate-from-view-key <wallet name>(Linux/OSX) or
simplewallet --generate-from-view-key <wallet name>(Windows) where
<wallet name>is the name of your new "watch-only" wallet.
- simplewallet will prompt for an optional password (this wallet can't spend funds after all). Enter one if desired.
- simplewallet will prompt for an optional blockchain height to begin scanning from. If you know the approximate creation date of the wallet, you can save a lot of time for first startup by entering a height near (but for sure before) that date.
- simplewallet will prompt for a "Standard address:". Enter it.
- simlewallet will prompt for a "View key:". Enter it also.
- You are done! simpewallet will immediately begin "refreshing" from the height you chose until it has caught up to the current chain height. This can take some time, depending on your computer speed and the age of your wallet, but when it's done you should see all incoming outputs to that account.
To adjust the watch only wallet balance for spent outputs in v10.0.0:
Start monero-wallet-cli and open normal wallet with write access, then run in it: export_key_images file-name-for-key-images
Exit monero-wallet-cli, start it again and open watch only wallet, then run in it: import_key_images file-name-for-key-images
You are done. You will get the correct balance.