Zcash Browser Wallet Library

Hey Zcash community!

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.

You can view the full grant application here.

Thank you so much for your support! <3

Bryant
bryant@chainsafe.io

10 Likes

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.

1 Like

wonderful!

1 Like

It is a library only? A wallet (like Metamask) isn’t part of the grant?
Personally, I am not keen on proposals that don’t have a user facing app.

3 Likes

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?

1 Like

FYI for anyone who missed the chainsafe research phase Zcash SDK Implementation [JS/TS] - Proposal - #49 by ec2

4 Likes

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.

With this in mind, we reduced the cost significantly (as highlighted in the cost breakdown here: WebZjs Grant Application Breakdown - Google Docs )

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.

I hope that this helps!! :slight_smile:
Bryant

Well, I wasn’t referring to a PoC but a full fledged wallet.

Anyway, it is up to the committee to decide.

In my opinion, this is a step forward.

3 Likes

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. :slight_smile:

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.

2 Likes

@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.

18 Likes

I’m interested to help develop this, who should I connect with or how can I start?

1 Like

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! :slight_smile: feel free to hit me up on telegram @ bryanteurope

1 Like

Hi @bryant.chainsafe, any chance you can point interested parties in a direction to follow the project.

Thanks

2 Likes

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!! :slight_smile:

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)
  • Transaction building and proving

You can track our progress on the mem-wallet in our fork of librustzcash and our WebZjs Repo

12 Likes

Awesome! Congratulations!

What’s the longterm plan for version and dependency management? Might this get merged at some point?

1 Like

Nice work @ec2 and @Wollum-ChainSafe!

7 Likes