ChainSafe Systems has submitted a proposal to expand the ZCash ecosystem by building and offering developers a browser-compatible library offering essential primitives for web wallets and browser plugins.
Hi @bryant.chainsafe - Thank you for submitting your grant proposal! We will review it in the upcoming weeks and reach out if we have any questions.
In the meantime, if you have any questions for us, you can post them to this thread or DM us at @ZcashGrants.
Zcash Community - We want to hear your feedback on this grant! You can post your comments to this thread or DM us at @ZcashGrants if you’d like to provide feedback in private.
Can we have a roundup and accounting on all the web/wasm attempts at a Zcash wallet? This is an idea that I have always liked but several people have thrown some hours at the problem without a ringing success (even I). What exactly happened with these efforts and what are the current statuses?
Hey! For full transparency our v1 of this proposal actually included the following as part of Milestone 5:
"Implement simple PoC wallet page using API
Upon running the proposal by the foundation it was suggested that we attempt to reduce the scope so as to bring the overall cost of the project down, without limiting the outcome of the project.
In light of our completed feasibility study (see above) and pending further feedback from the foundation and community, should it be decided that the PoC is still essential in getting this passed, ChainSafe will be willing to support this request.
Does the link to the research phase address this concern @skyl ? If not, cc’ing my colleague @Wollum-ChainSafe in here should he have anything more to add.
I’m not referencing chainsafe or these efforts directly but there were more efforts historically. I think “Zephyr” was one … I think there were more … I can maybe look more closely later but chatgpt found a few things.
FWIW, the Nerdbank.Zcash library (which a Minor Grant funded) is something I’d like to expose to browsers through wasm, but I’ve been blocked by ring (and possibly other dependencies of librustzcash) not compiling to wasm. If we can overcome that problem, I expect I can get a web-based wallet going fairly quickly based on this library and the eZcash wallet that is already available on other platforms.
@bryant.chainsafe at the most recent meeting, the @ZcashGrants Committee voted to approve this proposal. MetaMask has matched $150,000 to support the development of a MetaMask Snap that will support Shielded ZEC. ZCG also requested that you provide monthly updates via the forum in this thread.
We should be okay for support right now, but would cetainly love to speak with you to see if we can collaborate in another way! feel free to hit me up on telegram @ bryanteurope
Hello! Yes certainly. Let me get back to you asap. We are just coordinating internally as to how best to make sure the community can follow along, and have the right person within this forum to do so. I’m on it!!
Hi Zcash Community. I’m excited to deliver our first update from our work on WebZjs. Updates will continue to be posted here at least once a month and possibly more frequently as we hit more milestones.
Compared with the PoC this time around we are aligning ourselves more with librustzcash and specifically their zcash_client_backend traits for creating wallets. This is to better take advantage of the existing work and test suites, benefit from future improvements, and all-round reduce duplication.
There are some challenges bringing this to the web, the main one being that the zcash_client_backend traits assume you have access to a lot of very fast storage (e.g. sqlite). This is not something a browser can provide so we have opted to write a memory-backed wallet backend (something that was already on the roadmap for librustzcash). These last two weeks have been primarily focused on this.
In order to prevent having to reload keys and rescan the wallet on every page refresh we are making the memory-backed wallet serializable. This way we can schedule flushing to storage (e.g IndexedDB or SnapStorage) outside of the main loops and write in larger chunks less frequently.
Milestones Acchieved
In-memory zcash_client_backend synced to testnet using the zec-cli front-end
Obtained correct balances for a testnet wallet
Rigorous testing still required
Memory wallet compiled to Wasm and tested in-browser with blocks retrieved via gRPC-web
Preliminary tests show it to be building and working in Wasm without issue
No consideration made for efficiency (memory or speed) at this stage)
Javascript API sketched out and automatic documentation page generation from rustdocs
Next Steps
Completing serialization for memory-wallet
Solidifying the Javascript/Typescript interface
Modifying tests for zcash_client_sqlite to be backend agnostic (thanks to @nuttycom for the help here)