The Zcash protocol allows splitting the spending key (i.e., the private key) into a viewing key, which allows a wallet to track incoming and outgoing transactions, but prevents spending funds from it, until the spending key is presented.
Adding this feature in the SDK will also allow other apps, most notably ZBay, to switch to using the lightclient, so that users don't have to download and run a full zcashd node in order to use ZBay.
Viewing keys have many uses:
This funding request is to add support for Zcash viewing keys into the Zecwallet lite SDK and the light client apps.
Zecwallet Lite will allow importing and exporting Viewing keys.
Zecwallet Lite SDK will be expanded to add a new "import" command, which will allow importing a viewing or spending key into the wallet. The import command will automatically trigger a rescan from the birthday, allowing the user to recover historical transactions and memos into the wallet.
The viewing key will be stored in the wallet, allowing the wallet to follow transactions into or from the associated address. The wallet format will be upgraded to include storing just view keys. Other wallet functions like listing memos, addresses, transactions and encrypting will continue to work as they do today on the imported viewing keys.
On the Zecwallet Lite Apps, the UI will support exporting a viewing key (in addition to the spending key, which is already supported). A new "import" menu item will allow importing viewing and spending keys into the wallet.
There aren't many technical risks to this project, as the lightwallet protocol already fully supports viewing keys, and Zecwallet lite (both the SDK and the UI wallet) were built in anticipation of adding this feature in the future.
Allowing importing keys breaks an important user expectation: That the entire wallet can be recovered using just the seed. If a viewing key from an external wallet or external seed is imported, it is, of course, not derivable from the wallet's seed, and so the transactions from/to the viewing key will not be restored if the user restores the wallet on a new machine with the wallet's original seed.
This is somewhat mitigated due to the fact that the user already has access to the viewing key, and can just import it one more time into a newly restored wallet.
The plan to mitigate this in the UI is to:
The project will take 1 week, for both the SDK and the Lightclient App.
The total cost of the project will be USD 7,500. This is based on the hourly rate of $187.5, which is what the previous proposals from Zecwallet are based at as well.