Expand description

An SQLite-based Zcash light client.

zcash_client_sqlite contains complete SQLite-based implementations of the WalletRead, WalletWrite, and BlockSource traits from the zcash_client_backend crate. In combination with zcash_client_backend, it provides a full implementation of a SQLite-backed client for the Zcash network.

Design

The light client is built around two SQLite databases:

  • A cache database, used to inform the light client about new CompactBlocks. It is read-only within all light client APIs except for init_cache_database which can be used to initialize the database.

  • A data database, where the light client’s state is stored. It is read-write within the light client APIs, and assumed to be read-only outside these APIs. Callers MUST NOT write to the database without using these APIs. Callers MAY read the database directly in order to extract information for display to users.

Features

The mainnet feature configures the light client for use with the Zcash mainnet. By default, the light client is configured for use with the Zcash testnet.

Modules

  • Functions for enforcing chain validity and handling chain reorgs.
  • Error types for problems that may arise when reading or storing wallet data to SQLite.
  • Functions for querying information in the wallet database.

Structs

  • A handle for the SQLite block source.
  • A newtype wrapper for received note identifiers.
  • A wrapper for a SQLite transaction affecting the wallet database.
  • A newtype wrapper for sqlite primary key values for the utxos table.
  • A wrapper for the SQLite connection to the wallet database.