41 lines
10 KiB
HTML
41 lines
10 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="An SQLite-based Zcash light client."><title>zcash_client_sqlite - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-20739d33.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="zcash_client_sqlite" data-themes="" data-resource-suffix="" data-rustdoc-version="1.88.0-nightly (74509131e 2025-04-29)" data-channel="nightly" data-search-js="search-f7877310.js" data-settings-js="settings-5514c975.js" ><script src="../static.files/storage-4e99c027.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-7ef8a74a.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../zcash_client_sqlite/index.html">zcash_<wbr>client_<wbr>sqlite</a><span class="version">0.16.2</span></h2></div><div class="sidebar-elems"><ul class="block"><li><a id="all-types" href="all.html">All Items</a></li></ul><section id="rustdoc-toc"><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#design" title="Design">Design</a><ul><li><a href="#feature-flags" title="Feature flags">Feature flags</a></li></ul></li></ul><h3><a href="#modules">Crate Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li></ul></section><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Crate <span>zcash_client_sqlite</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/zcash_client_sqlite/lib.rs.html#1-2836">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p><em>An SQLite-based Zcash light client.</em></p>
|
||
<p><code>zcash_client_sqlite</code> contains complete SQLite-based implementations of the <a href="../zcash_client_backend/data_api/trait.WalletRead.html" title="trait zcash_client_backend::data_api::WalletRead"><code>WalletRead</code></a>,
|
||
<a href="../zcash_client_backend/data_api/trait.WalletWrite.html" title="trait zcash_client_backend::data_api::WalletWrite"><code>WalletWrite</code></a>, and <a href="../zcash_client_backend/data_api/chain/trait.BlockSource.html" title="trait zcash_client_backend::data_api::chain::BlockSource"><code>BlockSource</code></a> traits from the <a href="../zcash_client_backend/index.html" title="mod zcash_client_backend"><code>zcash_client_backend</code></a> crate. In
|
||
combination with <a href="../zcash_client_backend/index.html" title="mod zcash_client_backend"><code>zcash_client_backend</code></a>, it provides a full implementation of a SQLite-backed
|
||
client for the Zcash network.</p>
|
||
<h2 id="design"><a class="doc-anchor" href="#design">§</a>Design</h2>
|
||
<p>The light client is built around two SQLite databases:</p>
|
||
<ul>
|
||
<li>
|
||
<p>A cache database, used to inform the light client about new <a href="../zcash_client_backend/proto/compact_formats/struct.CompactBlock.html" title="struct zcash_client_backend::proto::compact_formats::CompactBlock"><code>CompactBlock</code></a>s. It is
|
||
read-only within all light client APIs <em>except</em> for <a href="chain/init/fn.init_cache_database.html" title="fn zcash_client_sqlite::chain::init::init_cache_database"><code>init_cache_database</code></a> which
|
||
can be used to initialize the database.</p>
|
||
</li>
|
||
<li>
|
||
<p>A data database, where the light client’s state is stored. It is read-write within
|
||
the light client APIs, and <strong>assumed to be read-only outside these APIs</strong>. Callers
|
||
<strong>MUST NOT</strong> write to the database without using these APIs. Callers <strong>MAY</strong> read
|
||
the database directly in order to extract information for display to users.</p>
|
||
</li>
|
||
</ul>
|
||
<h3 id="feature-flags"><a class="doc-anchor" href="#feature-flags">§</a>Feature flags</h3>
|
||
<ul>
|
||
<li><strong><code>multicore</code></strong> <em>(enabled by default)</em> — Enables multithreading support for creating proofs and building subtrees.</li>
|
||
<li><strong><code>orchard</code></strong> — Enables support for storing data related to the sending and receiving of
|
||
Orchard funds.</li>
|
||
<li><strong><code>test-dependencies</code></strong> — Exposes APIs that are useful for testing, such as <code>proptest</code> strategies.</li>
|
||
<li><strong><code>transparent-inputs</code></strong> — Enables receiving transparent funds and sending to transparent recipients</li>
|
||
<li><strong><code>serde</code></strong> — Enables <code>serde</code> derives for certain types.</li>
|
||
</ul>
|
||
<h4 id="experimental-features"><a class="doc-anchor" href="#experimental-features">§</a>Experimental features</h4>
|
||
<ul>
|
||
<li><strong><code>unstable</code></strong> — Exposes unstable APIs. Their behaviour may change at any time.</li>
|
||
<li><strong><code>expensive-tests</code></strong> — A feature used to isolate tests that are expensive to run. Test-only.</li>
|
||
<li><strong><code>pczt-tests</code></strong> — A feature used to enable PCZT-specific tests without interfering with the
|
||
protocol-specific flags. Test-only.</li>
|
||
</ul>
|
||
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="chain/index.html" title="mod zcash_client_sqlite::chain">chain</a></dt><dd>Functions for enforcing chain validity and handling chain reorgs.</dd><dt><a class="mod" href="error/index.html" title="mod zcash_client_sqlite::error">error</a></dt><dd>Error types for problems that may arise when reading or storing wallet data to SQLite.</dd><dt><a class="mod" href="util/index.html" title="mod zcash_client_sqlite::util">util</a></dt><dd>Types that should be part of the standard library, but aren’t.</dd><dt><a class="mod" href="wallet/index.html" title="mod zcash_client_sqlite::wallet">wallet</a></dt><dd>Functions for querying information in the wallet database.</dd></dl><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.AccountUuid.html" title="struct zcash_client_sqlite::AccountUuid">Account<wbr>Uuid</a></dt><dd>Unique identifier for a specific account tracked by a <a href="struct.WalletDb.html" title="struct zcash_client_sqlite::WalletDb"><code>WalletDb</code></a>.</dd><dt><a class="struct" href="struct.BlockDb.html" title="struct zcash_client_sqlite::BlockDb">BlockDb</a></dt><dd>A handle for the SQLite block source.</dd><dt><a class="struct" href="struct.FsBlockDb.html" title="struct zcash_client_sqlite::FsBlockDb">FsBlock<wbr>Db</a><wbr><span class="stab portability" title="Available on crate feature `unstable` only"><code>unstable</code></span></dt><dd>A block source that reads block data from disk and block metadata from a SQLite database.</dd><dt><a class="struct" href="struct.GapLimits.html" title="struct zcash_client_sqlite::GapLimits">GapLimits</a><wbr><span class="stab portability" title="Available on crate feature `transparent-inputs` only"><code>transparent-inputs</code></span></dt><dd>A data structure that can be used to configure custom gap limits for use in transparent address
|
||
rotation.</dd><dt><a class="struct" href="struct.ReceivedNoteId.html" title="struct zcash_client_sqlite::ReceivedNoteId">Received<wbr>Note<wbr>Id</a></dt><dd>An opaque type for received note identifiers.</dd><dt><a class="struct" href="struct.SqlTransaction.html" title="struct zcash_client_sqlite::SqlTransaction">SqlTransaction</a></dt><dd>A wrapper for a SQLite transaction affecting the wallet database.</dd><dt><a class="struct" href="struct.UtxoId.html" title="struct zcash_client_sqlite::UtxoId">UtxoId</a></dt><dd>A newtype wrapper for sqlite primary key values for the utxos table.</dd><dt><a class="struct" href="struct.WalletDb.html" title="struct zcash_client_sqlite::WalletDb">Wallet<wbr>Db</a></dt><dd>A wrapper for the SQLite connection to the wallet database, along with a capability to read the
|
||
system from the clock. A <code>WalletDb</code> encapsulates the full set of capabilities that are required
|
||
in order to implement the <a href="../zcash_client_backend/data_api/trait.WalletRead.html" title="trait zcash_client_backend::data_api::WalletRead"><code>WalletRead</code></a>, <a href="../zcash_client_backend/data_api/trait.WalletWrite.html" title="trait zcash_client_backend::data_api::WalletWrite"><code>WalletWrite</code></a> and <a href="../zcash_client_backend/data_api/trait.WalletCommitmentTrees.html" title="trait zcash_client_backend::data_api::WalletCommitmentTrees"><code>WalletCommitmentTrees</code></a> traits.</dd></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.FsBlockDbError.html" title="enum zcash_client_sqlite::FsBlockDbError">FsBlock<wbr>DbError</a><wbr><span class="stab portability" title="Available on crate feature `unstable` only"><code>unstable</code></span></dt><dd>Errors that can be generated by the filesystem/sqlite-backed
|
||
block source.</dd></dl></section></div></main></body></html> |