Zcash Extensible Wallet Interchange Format (ZeWIF) Meeting

Hey Folks,

Blockchain Commons & Zingo Labs were recently awarded a grant to produce a ZCash Extensible Wallet Interchange Format, libraries for moving things in and out of the format, and a ZExCavator tool to extract and export content from Legacy wallets.

The first step, which we’re taking in January, is to survey and report out on what data is being stored in current wallets, so that we can accommodate all widely used data in the interchange format itself (which we’ll be designing in February).

We’d like your input!

Tell us what you think is particularly important in your wallet data, what we might miss as we survey, and what’s important for you as a feature in the new interchange format.

We’re happy to receive any input here, but more importantly we’d like to invite you to a meeting on Friday January 24th at 10am PT (1pm ET, 7pm CET) to discuss the topic.

WHERE? Zoom (Launch Meeting - Zoom)
WHAT? Zcash Wallet Developers Meeting
WHEN? Fri. January 24th, 10am-noon PT

We expect to have initial surveys fully done by that point, covering wallets such as Zcashd, Zecwallet, Zashi, eZcash, and Zingo!, but we want to make sure our final report of wallet contents (scheduled for the 29th) is as comprehensive yet focused as possible, as it’ll be the basis of the interchange format, and that’s where you can help.

Hope to see you there, but if not, as I said, comments here are very welcome.

Shannon

15 Likes

Hi Folks,

We are moving to the 24th (10am PT still) with the Z|ECC Summit. On the bright side, we’ll also have the complete survey done by that point, for anyone who wants to review in advance of the meeting. (The final report is still scheduled for afterward, on the 29th.)

I’ll update the original post.

Hope to see you there!

5 Likes

For Zenith, we would need at least the seed phrase and the birthday height. It would be great if the format included a list of derived accounts and the indices of the addresses that have been derived for each account, including change addresses.

2 Likes

I was working on a project called uzw-parser or Universal Zcash Wallet Parser:

Concept

The idea was to create a lib that can parse many wallet formats and export into a common rust structure, so it can be used to extract seeds, keys or even convert to another formats.

Here’s the basic struct:

pub struct WalletAccount {
    pub name: String,
    pub seed: Option<Vec<u8>>,
    pub birthday: BlockHeight,
    pub keys: WalletKeys
}

pub struct Wallet {
    pub wallet_name: String,
    pub version: u64,
    pub accounts: Vec<WalletAccount>
}

Explanation:
A Wallet struct holds information about the source wallet, e.g. ZecWallet Lite, YWallet, and so on … and version number, for compatibility tracking.
A Wallet also has one or more WalletAccounts, which hold a account name, seed and keys. The keys is yet another struct that contains sk, ivk, account index and key source (HD or imported)

Parsing wallet files

I implemented parsers for ZecWallet lite, but it’s imcomplete, it can only parse ZecWallet files version 25 (latest), cannot parse encrypted wallet files and cannot parse the birthday height.
I also implemented basic YWallet parsing.

Maybe Ze-WIF prototype?

I believe this lib and structs are basically the skeleton for a ZeWIF of some sorts. Just remove redundancies, serialize and encode this struct and there we go.

WalletParser <> WalletWriter

Basically the project has a WalletParser and WalletWriter trait bounds, which when implemented can generate the struct mentioned above and save to another format.

As a test, I implemented a writer for YWallet, so the lib can parse a ZecWallet lite file, construct a Wallet struct and then write it to Ywallet compatible seqlite db. No tests was made to see if the generated wallet actually works, but at least it syncs.

I’m still very new to Rust development, but in this project I was trying to use generics to allow implementations for any wallet format in a easy manner, anyone fell free to fork the code and do your own parsers and writers.

See it in action

If you wan to see the parsing in action, edit cli/src/main.rs and uncomment lines 6 and 17 (and maybe comment lines 7 and 8) , then run cargo run to see the the results (example wallet files are provided in the repo).

This was a learning project and should not be considered a production ready code.

I’m probably attending the zoom call, I want to learn more from the experts.

6 Likes