Zcash Browser Wallet Library

Well, there was a ZecWallet lite web demo and a Zcon1 web wallet demo with a live demo, so I believe ChainSafe’s claim of this being the Worlds FIRST Zcash SHIELDED transaction from within the browser may not be exactly true. It’s a nitpick, I know, but still …

But nonetheless, awesome work by ChainSafe! can wait to test it.

1 Like

Understood. They note that correction in the thread:

2 Likes

Hi Zcash Community,

I am very proud to deliver what will be our final update for this phase of WebZjs. I am happy to report we (ec2 and myself) have concluded work on the library which is now has the features required to support wallet development.

We are in the process of handing it off to another team within ChainSafe for the next phase which is developing the Zcash MetaMask snap and accompanying production ready web wallet.

This marks the beginning of WebZjs as a tool that can be used and contributed to by the community with ChainSafe being the first consumer! We expect a lot of bugs to emerge in the first few weeks of use and so are planning to wait before cutting an official release on npm.

Please check out:

For the demo wallet do not use it to hold any significant value and do not import wallets you are about. Keys and seed phrases are not handled securely in the demo.

Please submit a new github issues for any problems that come up using the library or demo rather than posting in the forum.


Grant details

All milestones as set in the original grant proposal have been completed. See further details below

We are really proud of what we were able to achieve here and can’t wait to see it improve over time and to see the new uses of Zcash that is unlocks!

28 Likes

Regarding our memory backend and fork of librustzcash.

A number of people working on the library have expressed interest in having the memory backend and some of our other changes merged upstream. We expect this to require a reasonable amount of work and collaboration make happen.

Since this does not fall under the scope of our original grant (in fact we didn’t expect to have to fork librustzcash at all) we propose a small addemdum to the grant to include an additional 3 weeks of 1 engineer working with the librustzcash team to upstream these new features and generally help improve the library given our experience working with it.

As I see it this is a benefit to both parties. The memory backend would become an officially supported wallet backend (useful for web or embedded applications where sqlite isn’t supported) and WebZjs would depend only on the official librustzcash fork which reduces the maintenance burden.

We are seeking feedback from the community before officially applying for an extension so any thoughts on this are welcome.

15 Likes

great work!

I think this should be done asap to limit any possible fragmentation to librustzcash, an important part of the Zcash stack.

2 Likes

@Wollum-ChainSafe, you and Eric and all the folks at Chainsafe have achieved something that many others tried and did not succeed. With the extra bonus of being great people, highly collaborative, focused and fun to work with.

This is a huge milestone for the Zcash ecosystem. You’ve written a remarkable chapter in Zcash’s history!

Congratulations!

As always, please count with me for anything I can help you folks with.

6 Likes

Exciting!

Where is the source code to the gRPC proxy? Zec.rocks would like to host a few, thanks.

Also is there a list of browser requirements to run this library, a list of minimum supported browser versions? WASM is required for example.

Do you see a path towards a pure JS/TS implementation at some point in the future?

Also who are the maintainers, what is the plan for keeping this maintained long-term?

This is a great step forward for the community, thank you to everyone who supported this.

3 Likes

Where is the source code to the gRPC proxy? Zec.rocks would like to host a few, thanks.

It is possible to deploy a gRPC-web proxy using most existing proxies (in theory) although we only had success using traefik. Check out our configs and docker file if you want to deploy your own it is really easy WebZjs/traefik at main · ChainSafe/WebZjs · GitHub

It would be really fantastic to have some of these hosted by zec.rocks! Especially if the proxies can be configured to be close to the lightwalletd instances and there can be different proxies per region. Currently the block downloading is the main bottleneck so anything that can make this faster will make sync times faster for everyone.

Also is there a list of browser requirements to run this library, a list of minimum supported browser versions? WASM is required for example.

Currently our e2e tests are testing against desktop Chrome, Firefox and Safari latest versions. I agree it would be good to expand these test to more and be able to report a minimal required version for each.

Do you see a path towards a pure JS/TS implementation at some point in the future?

I say this is very unlikely. 99% of our code is Rust with js bindings. The amount of effort required to do this would be huge for minimal benefits and it would probably be much slower.

Also who are the maintainers, what is the plan for keeping this maintained long-term?

This remains to be determined. I hope in the future new grants will be open for maintenance and upgrades and that these could be taken on by individual contributors or companies other than ChainSafe

2 Likes

I’m excited to build on the updates provided by @Wollum-ChainSafe with the first update about the Zcash MetaMask Snap and production web wallet that is being developed by ChainSafe. This work is being done by one of our experienced TypeScript and Snap developers, Anton Lykhoyda, with support from me as project manager.

The initial Pull Request to begin work on the Snap was merged into the WebZjs repository on November 6th. The BIP-44 entropy from MetaMask is used by WebZjs to generate a unified spending key, and a Snap interface has been created to allow web pages to request a viewing key. At this time, this capability is being consumed by the existing demo wallet.

The next steps involve the initialization of a production web wallet that only supports using keys provided by the Snap. A wireframe of the production web wallet has been prepared by Serena Ho, one of ChainSafe’s UI/UX designers. The Snap will be enhanced to allow transactions to be sent with a spending key.

Due to conferences and upcoming holidays, we expect the month of November to be slow with respect to further developments on this project. In the meantime, please share any questions or comments. We look forward to contributing to the Zcash ecosystem with this work!

17 Likes

Exciting updates!

Do you think it’s safe for a business to use this library to accept Zcash (orchard) payments today? I want to add Zcash as a currency that my business accepts, but I don’t want to run zcashd or wait for Zebra to support wallet RPCs (or whatever tool in the Zebra ecosystem).

I’ll throw together a test, love that we have this library now. Thank you everyone for your hard work on it, having a JS library is essential for developer adoption in today’s cryptocurrency ecosystem.

1 Like

I would advise against using this for anything that isn’t testing or prototyping at the moment. It has not been audited and is surely buggy.

Greetings, Zcash community :wave: I’m happy to provide the December update on ChainSafe’s work for the Zcash MetaMask Snap and web wallet :rocket:

The WebZjs monorepo now includes a package for a new web wallet. Unlike the demo web wallet, the new web wallet relies solely on the Zcash MetaMask Snap for secure handling of account keys. The new web wallet displays a summary for the connected account, which includes the account’s balance. We are currently working on deploying the new web wallet with Netlify.

The next steps for the new web wallet include transfer capabilities and the ability to list the transactions for an account. To support transfer capabilities, the Snap will be enhanced to persist a spending key for the account. We expect this to be complete by early January. To support the ability to list transactions, the WebZjs Rust library will be enhanced to provide this information to the front end. This enhancement to the WebZjs Rust library is also expected to be complete by early January.

After transfer capabilities and the ability to list transactions have been implemented, the final step for the web wallet will be the creation of a page that can be used to share unified and transparent addresses for the account, including a QR code that encodes these addresses.

ChainSafe will be on holiday from December 23rd through January 3rd, but we look forward to delivering this exciting product to the Zcash community when we return! Please feel free to share any questions or comments in the meantime.

10 Likes