Introduction
Zallet is a full-node Zcash wallet written in Rust.
Installation
There are multiple ways to install the zallet
binary. The table below has a summary of
the simplest options:
Environment | CLI command |
---|---|
Debian | Debian packages |
Ubuntu | Debian packages |
Help from new packagers is very welcome. However, please note that Zallet is currently ALPHA software, and is rapidly changing. If you create a Zallet package before the 1.0.0 production release, please ensure you mark it as alpha software and regularly update it.
Pre-compiled binaries
WARNING: This approach does not have automatic updates.
Executable binaries are available for download on the GitHub Releases page.
Build from source using Rust
WARNING: This approach does not have automatic updates.
To build Zallet from source, you will first need to install Rust and Cargo. Follow the instructions on the Rust installation page. Zallet currently requires at least Rust version 1.85.
WARNING: The following does not yet work because Zallet cannot be published to crates.io while it has unpublished dependencies. This will be fixed during the alpha phase. In the meantime, follow the instructions to install the latest development version.
Once you have installed Rust, the following command can be used to build and install Zallet:
cargo install zallet
This will automatically download Zallet from crates.io, build it, and install it in
Cargo's global binary directory (~/.cargo/bin/
by default).
To update, run cargo install zallet
again. It will check if there is a newer version,
and re-install Zallet if a new version is found. You will need to shut down and restart
any running Zallet instances to apply the new version.
To uninstall, run the command cargo uninstall zallet
. This will only uninstall the
binary, and will not alter any existing wallet datadir.
Installing the latest development version
If you want to run the latest unpublished changes, then you can instead install Zallet directly from the main branch of its code repository:
cargo install --git https://github.com/zcash/wallet.git
Debian binary packages setup
The Electric Coin Company operates a package repository for 64-bit Debian-based distributions. If you'd like to try out the binary packages, you can set it up on your system and install Zcash from there.
TODO: add instructions.
Setting up a Zallet wallet
WARNING: This process is currently unstable, very manual, and subject to change as we make Zallet easier to use.
Create a config file
Zallet by default uses $HOME/.zallet
as its data directory. You can override
this with the -d/--datadir
flag.
Once you have picked a datadir for Zallet, create a zallet.toml
file in it.
You currently need at least the following:
[builder.limits]
[consensus]
network = "main"
[database]
[external]
[features]
as_of_version = "0.0.0"
[features.deprecated]
[features.experimental]
[indexer]
validator_user = ".."
validator_password = ".."
[keystore]
[note_management]
[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
andvalidator_cookie_path
(if using cookie auth)validator_user
andvalidator_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
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/encryption-identity.txt Public key: age1...
-
A passphrase-encrypted identity file:
$ rage -p -o /path/to/zallet/datadir/encryption-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 -d /path/to/zallet/datadir init-wallet-encryption
Generate a mnemonic phrase
$ zallet -d /path/to/zallet/datadir 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 -d /path/to/zallet/datadir start
Command-line tool
The zallet
command-line tool is used to create and maintain wallet datadirs, as well as
run wallets themselves. After you have installed zallet
, you
can run the zallet help
command in your terminal to view the available commands.
The following sections provide in-depth information on the different commands available.
zallet start
zallet example-config
zallet migrate-zcash-conf
zallet init-wallet-encryption
zallet generate-mnemonic
zallet import-mnemonic
zallet rpc-cli
The start
command
TODO
The example-config
command
TODO
The migrate-zcash-conf
command
TODO
The init-wallet-encryption
command
TODO
The generate-mnemonic
command
TODO
The import-mnemonic
command
zallet import-mnemonic
enables a BIP 39 mnemonic to be imported into a Zallet wallet.
The command takes no arguments (beyond the top-level flags on zallet
itself). When run,
Zallet will ask you to enter the mnemonic. It is recommended to paste the mnemonic in from
e.g. a password manager, as what you type will not be printed to the screen and thus it is
possible to make mistakes.
$ zallet import-mnemonic
Enter mnemonic:
Once the mnemonic has been provided, press Enter. Zallet will import the mnemonic, and print out its ZIP 32 seed fingerprint (which you will use to identify it in other Zallet commands and RPCs).
$ zallet import-mnemonic
Enter mnemonic:
Seed fingerprint: zip32seedfp1qhrfsdsqlj7xuvw3ncu76u98c2pxfyq2c24zdm5jr3pr6ms6dswss6dvur
The rpc-cli
command
TODO
Migrating from zcashd
TODO: Document how to migrate from zcashd
to Zallet.
JSON-RPC altered semantics
Zallet implements a subset of the zcashd
JSON-RPC wallet methods. While we
have endeavoured to preserve semantics where possible, for some methods it was
necessary to make changes in order for the methods to be usable with Zallet's
wallet architecture. This page documents the semantic differences between the
zcashd
and Zallet wallet methods.
Changed RPC methods
z_listaccounts
Changes to response:
- New
account_uuid
field.
z_getnewaccount
Changes to parameters:
- New
account_name
required parameter. - New
seedfp
optional parameter.- This is required if the wallet has more than one seed.
z_getaddressforaccount
Changes to parameters:
account
parameter can be a UUID.
Changes to response:
- New
account_uuid
field. account
field in response is not present if theaccount
parameter is a UUID.- The returned address is now time-based if no transparent receiver is present and no explicit index is requested.
- Returns an error if an empty list of receiver types is provided along with a previously-generated diversifier index, and the previously-generated address did not use the default set of receiver types.
listaddresses
Changes to response:
imported_watchonly
includes addresses derived from imported Unified Viewing Keys.- Transparent addresses for which we have BIP 44 derivation information are now
listed in a new
derived_transparent
field (an array of objects) instead of thetransparent
field.
z_sendmany
Changes to parameters:
fee
must benull
if set; ZIP 317 fees are always used.- If the
minconf
field is omitted, the default ZIP 315 confirmation policy (3 confirmations for trusted notes, 10 confirmations for untrusted notes) is used.
Changes to response:
- New
txids
array field in response. txid
field is omitted iftxids
has length greater than 1.
Omitted RPC methods
The following RPC methods from zcashd
have intentionally not been implemented
in Zallet, either due to being long-deprecated in zcashd
, or because other RPC
methods have been updated to replace them.
Omitted RPC method | Use this instead |
---|---|
createrawtransaction | To-be-implemented methods for working with PCZTs |
fundrawtransaction | To-be-implemented methods for working with PCZTs |
getnewaddress | z_getnewaccount , z_getaddressforaccount |
getrawchangeaddress | |
keypoolrefill | |
importpubkey | |
importwallet | |
settxfee | |
signrawtransaction | To-be-implemented methods for working with PCZTs |
z_importwallet | |
z_getbalance | z_getbalanceforaccount , z_getbalanceforviewingkey , getbalance |
z_getmigrationstatus | |
z_getnewaddress | z_getnewaccount , z_getaddressforaccount |
z_listaddresses | listaddresses |