Go to file
Kris Nuttycombe a3be12860c
Merge pull request #112 from zcash/import-existing
2025-04-18 19:59:22 -06:00
.github/workflows Fix CI failures 2025-02-08 04:11:14 +00:00
supply-chain Migrate to latest Zaino with bugfix 2025-04-09 20:55:43 +00:00
zallet rpc: Add `z_recoveraccounts` 2025-04-19 00:13:15 +00:00
.gitignore Initial workspace with empty crate 2024-10-30 21:12:17 +00:00
Cargo.lock cli: Add `zallet import-mnemonic` 2025-04-18 11:48:56 +00:00
Cargo.toml cli: Add `zallet import-mnemonic` 2025-04-18 11:48:56 +00:00
LICENSE-APACHE Initial workspace with empty crate 2024-10-30 21:12:17 +00:00
LICENSE-MIT Initial workspace with empty crate 2024-10-30 21:12:17 +00:00
README.md Point out indexer config options needed for full node connection 2025-04-18 00:30:33 +00:00
deny.toml Add license allowances 2025-04-08 17:28:08 +00:00
rust-toolchain.toml Migrate to 2024 edition 2025-04-04 16:30:42 +00:00

README.md

zcashd wallet replacement

Work in progress replacement of the zcashd wallet.

Security Warnings

These crates are under development and have not been fully reviewed.

Setting up a Zallet instance

This process is currently unstable, very manual, and subject to change as we make Zallet easier to use.

Zallet is not designed to be used as a Rust library; we give no guarantees about any such usage.

Create a config file

Pick a folder to use for Zallet, and create a zallet.toml file in it. You currently need at least the following:

network = "main"
wallet_db = "/path/to/zallet/datadir/data.sqlite"

[builder]

[indexer]
validator_user = ".."
validator_password = ".."
db_path = "/path/to/zallet/datadir/zaino"

[keystore]
identity = "/path/to/zallet/datadir/identity.txt"

[limits]

[rpc]
bind = ["127.0.0.1:SOMEPORT"]

In particular, you currently need to configure the [indexer] section to point at your full node's JSON-RPC endpoint. The relevant config options in that section are:

  • validator_address (if not running on localhost at the default port)
  • validator_cookie_auth = true and validator_cookie_path (if using cookie auth)
  • validator_user and validator_password (if using basic auth)

If you have an existing zcash.conf, you can use it as a starting point:

$ zallet migrate-zcash-conf --datadir /path/to/zcashd/datadir -o /path/to/zallet/datadir/zallet.toml

The remaining commands currently require providing the path to the config file via the -c/--config flag.

Initialize the wallet encryption

Zallet uses age encryption to encrypt all key material internally. Currently you can use two kinds of age identities, which you can generate with rage:

  • A plain identity file directly on disk:

    $ rage-keygen -o /path/to/zallet/datadir/identity.txt
    Public key: age1...
    
  • A passphrase-encrypted identity file:

    $ rage -p -o /path/to/zallet/datadir/identity.txt <(rage-keygen)
    Public key: age1...
    Using an autogenerated passphrase:
        drip-lecture-engine-wood-play-business-blame-kitchen-month-combine
    

(age plugins will also be supported but currently are tricky to set up.)

Once you have created your identity file, initialize your Zallet wallet:

$ zallet -c /path/to/zallet/datadir/zallet.toml init-wallet-encryption

Generate a mnemonic phrase

$ zallet -c /path/to/zallet/datadir/zallet.toml generate-mnemonic

Each time you run this, a new BIP 39 mnemonic will be added to the wallet. Be careful to only run it multiple times if you want multiple independent roots of spend authority!

Start Zallet

$ zallet -c /path/to/zallet/datadir/zallet.toml start

License

All code in this workspace is licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.