The ViewingKey feature ensures that users can have visibility of a wallet but cannot spend the amount in it. A feature that could have multiple uses, as an example an organisation that is fundraising into a wallet and wants 5 different people to have oversight of the balance. It can be used as a form of accounting system too.
Using the viewingkey for a z-address, a user can verify if that z-address has payments sent to it and to monitor the balance, but they wont be able to spend it.
Step by Step Instructions
🦜 Install the Pirate Ocean wallet
🦜 Open the wallet and go to Help > Debug window > Console
🦜 Type and enter: z_exportviewingkey YourZaddress
🦜 Select and save the ViewingKey and your Z-address
🦜 You then send both the ViewingKey and Z-address to User2 (the person you want to view the balance)
🦜 User2 then has to go to Help > Debug window > Console
🦜 Type z_importviewingkey and press Enter
🦜 Type again and at the end enter: z_importviewingkey (ViewingKey) yes (BlockHeight) (YourZaddress)
🦜 Confirm the import of the ViewingKey
🦜 You can check the latest Txy by typing: z_listreceivedbyaddress (YourZaddress)
🦜 Now you can check the amount of that address as often as you want by typing the z_listreceivedbyaddress command