472 lines
22 KiB
HTML
472 lines
22 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<title>Structures Reference</title>
|
||
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||
<meta charset='utf-8'>
|
||
<script src="js/jquery.min.js" defer></script>
|
||
<script src="js/jazzy.js" defer></script>
|
||
|
||
</head>
|
||
<body>
|
||
<a name="//apple_ref/swift/Section/Structures" class="dashAnchor"></a>
|
||
<a title="Structures Reference"></a>
|
||
<header>
|
||
<div class="content-wrapper">
|
||
<p><a href="index.html">ZcashLightClientKit Docs</a> (71% documented)</p>
|
||
</div>
|
||
</header>
|
||
<div class="content-wrapper">
|
||
<p id="breadcrumbs">
|
||
<a href="index.html">ZcashLightClientKit Reference</a>
|
||
<img id="carat" src="img/carat.png" />
|
||
Structures Reference
|
||
</p>
|
||
</div>
|
||
<div class="content-wrapper">
|
||
<nav class="sidebar">
|
||
<ul class="nav-groups">
|
||
<li class="nav-group-name">
|
||
<a href="Classes.html">Classes</a>
|
||
<ul class="nav-group-tasks">
|
||
<li class="nav-group-task">
|
||
<a href="Classes/CompactBlockProcessor.html">CompactBlockProcessor</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Classes/CompactBlockProcessor/Configuration.html">– Configuration</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Classes/CompactBlockProcessor/State.html">– State</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Classes/Initializer.html">Initializer</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Classes/LightWalletGRPCService.html">LightWalletGRPCService</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Classes/SDKSynchronizer.html">SDKSynchronizer</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Classes/SDKSynchronizer/NotificationKeys.html">– NotificationKeys</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Classes/ZcashSDK.html">ZcashSDK</a>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="nav-group-name">
|
||
<a href="Enums.html">Enumerations</a>
|
||
<ul class="nav-group-tasks">
|
||
<li class="nav-group-task">
|
||
<a href="Enums/CompactBlockProcessorError.html">CompactBlockProcessorError</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Enums/InitializerError.html">InitializerError</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Enums/LightWalletServiceError.html">LightWalletServiceError</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Enums/ResourceProviderError.html">ResourceProviderError</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Enums/RustWeldingError.html">RustWeldingError</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Enums/Status.html">Status</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Enums/SynchronizerError.html">SynchronizerError</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Enums/TransactionEncoderError.html">TransactionEncoderError</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Enums/TransactionKind.html">TransactionKind</a>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="nav-group-name">
|
||
<a href="Extensions.html">Extensions</a>
|
||
<ul class="nav-group-tasks">
|
||
<li class="nav-group-task">
|
||
<a href="Extensions/Array.html">Array</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Extensions/BlockHeight.html">BlockHeight</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Extensions/Collection.html">Collection</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Extensions/CompactBlockRange.html">CompactBlockRange</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Extensions/Data.html">Data</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Extensions/Data/HexEncodingOptions.html">– HexEncodingOptions</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Extensions/Notification.html">Notification</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Extensions/Notification/Name.html">– Name</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Extensions/String.html">String</a>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="nav-group-name">
|
||
<a href="Protocols.html">Protocols</a>
|
||
<ul class="nav-group-tasks">
|
||
<li class="nav-group-task">
|
||
<a href="Protocols/AbstractTransaction.html">AbstractTransaction</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Protocols/CompactBlockDownloading.html">CompactBlockDownloading</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Protocols/ConfirmedTransactionEntity.html">ConfirmedTransactionEntity</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Protocols/LightWalletService.html">LightWalletService</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Protocols/LightWalletServiceResponse.html">LightWalletServiceResponse</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Protocols/Logger.html">Logger</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Protocols/MinedTransactionEntity.html">MinedTransactionEntity</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Protocols/PaginatedTransactionRepository.html">PaginatedTransactionRepository</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Protocols/PendingTransactionEntity.html">PendingTransactionEntity</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Protocols/RawIdentifiable.html">RawIdentifiable</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Protocols/ResourceProvider.html">ResourceProvider</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Protocols/SeedProvider.html">SeedProvider</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Protocols/SignedTransactionEntity.html">SignedTransactionEntity</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Protocols/Synchronizer.html">Synchronizer</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Protocols/TransactionEntity.html">TransactionEntity</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Protocols/ZcashRustBackendWelding.html">ZcashRustBackendWelding</a>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="nav-group-name">
|
||
<a href="Structs.html">Structures</a>
|
||
<ul class="nav-group-tasks">
|
||
<li class="nav-group-task">
|
||
<a href="Structs/CompactBlockProcessorNotificationKey.html">CompactBlockProcessorNotificationKey</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Structs/DefaultResourceProvider.html">DefaultResourceProvider</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Structs/LightWalletEndpoint.html">LightWalletEndpoint</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Structs/WalletBirthday.html">WalletBirthday</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Structs/ZcashCompactBlock.html">ZcashCompactBlock</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Structs.html#/s:19ZcashLightClientKit0A27RustBackendWeldingConstantsV">ZcashRustBackendWeldingConstants</a>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="nav-group-name">
|
||
<a href="Typealiases.html">Type Aliases</a>
|
||
<ul class="nav-group-tasks">
|
||
<li class="nav-group-task">
|
||
<a href="Typealiases.html#/s:19ZcashLightClientKit11BlockHeighta">BlockHeight</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a href="Typealiases.html#/s:19ZcashLightClientKit17CompactBlockRangea">CompactBlockRange</a>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</nav>
|
||
<article class="main-content">
|
||
<section>
|
||
<section class="section">
|
||
<h1>Structures</h1>
|
||
<p>The following structures are available globally.</p>
|
||
|
||
</section>
|
||
<section class="section task-group-section">
|
||
<div class="task-group">
|
||
<ul>
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:19ZcashLightClientKit36CompactBlockProcessorNotificationKeyV"></a>
|
||
<a name="//apple_ref/swift/Struct/CompactBlockProcessorNotificationKey" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:19ZcashLightClientKit36CompactBlockProcessorNotificationKeyV">CompactBlockProcessorNotificationKey</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>CompactBlockProcessor notification userInfo object keys.
|
||
check Notification.Name extensions for more details.</p>
|
||
|
||
<a href="Structs/CompactBlockProcessorNotificationKey.html" class="slightly-smaller">See more</a>
|
||
</div>
|
||
<div class="declaration">
|
||
<h4>Declaration</h4>
|
||
<div class="language">
|
||
<p class="aside-title">Swift</p>
|
||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">CompactBlockProcessorNotificationKey</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:19ZcashLightClientKit14WalletBirthdayV"></a>
|
||
<a name="//apple_ref/swift/Struct/WalletBirthday" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:19ZcashLightClientKit14WalletBirthdayV">WalletBirthday</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>Represents the wallet’s birthday which can be thought of as a checkpoint at the earliest moment in history where
|
||
transactions related to this wallet could exist. Ideally, this would correspond to the latest block height at the
|
||
time the wallet key was created. Worst case, the height of Sapling activation could be used (280000).</p>
|
||
|
||
<p>Knowing a wallet’s birthday can significantly reduce the amount of data that it needs to download because none of
|
||
the data before that height needs to be scanned for transactions. However, we do need the Sapling tree data in
|
||
order to construct valid transactions from that point forward. This birthday contains that tree data, allowing us
|
||
to avoid downloading all the compact blocks required in order to generate it.</p>
|
||
|
||
<p>New wallets can ignore any blocks created before their birthday.</p>
|
||
|
||
<a href="Structs/WalletBirthday.html" class="slightly-smaller">See more</a>
|
||
</div>
|
||
<div class="declaration">
|
||
<h4>Declaration</h4>
|
||
<div class="language">
|
||
<p class="aside-title">Swift</p>
|
||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">WalletBirthday</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
<div>
|
||
<h4>Parameters</h4>
|
||
<table class="graybox">
|
||
<tbody>
|
||
<tr>
|
||
<td>
|
||
<code>
|
||
<em>height</em>
|
||
</code>
|
||
</td>
|
||
<td>
|
||
<div>
|
||
<p>the height at the time the wallet was born</p>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<code>
|
||
<em>hash</em>
|
||
</code>
|
||
</td>
|
||
<td>
|
||
<div>
|
||
<p>the block hash corresponding to the given height</p>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<code>
|
||
<em>time</em>
|
||
</code>
|
||
</td>
|
||
<td>
|
||
<div>
|
||
<p>the time the wallet was born, in seconds</p>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<code>
|
||
<em>tree</em>
|
||
</code>
|
||
</td>
|
||
<td>
|
||
<div>
|
||
<p>the sapling tree corresponding to the given height. This takes around 15 minutes of processing to
|
||
generate from scratch because all blocks since activation need to be considered. So when it is calculated in
|
||
advance it can save the user a lot of time.</p>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:19ZcashLightClientKit0B14WalletEndpointV"></a>
|
||
<a name="//apple_ref/swift/Struct/LightWalletEndpoint" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:19ZcashLightClientKit0B14WalletEndpointV">LightWalletEndpoint</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>Represents a lightwallet instance endpoint to connect to</p>
|
||
|
||
<a href="Structs/LightWalletEndpoint.html" class="slightly-smaller">See more</a>
|
||
</div>
|
||
<div class="declaration">
|
||
<h4>Declaration</h4>
|
||
<div class="language">
|
||
<p class="aside-title">Swift</p>
|
||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">LightWalletEndpoint</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:19ZcashLightClientKit23DefaultResourceProviderV"></a>
|
||
<a name="//apple_ref/swift/Struct/DefaultResourceProvider" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:19ZcashLightClientKit23DefaultResourceProviderV">DefaultResourceProvider</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>Convenience provider for a data db and cache db resources.</p>
|
||
|
||
<a href="Structs/DefaultResourceProvider.html" class="slightly-smaller">See more</a>
|
||
</div>
|
||
<div class="declaration">
|
||
<h4>Declaration</h4>
|
||
<div class="language">
|
||
<p class="aside-title">Swift</p>
|
||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">DefaultResourceProvider</span> <span class="p">:</span> <span class="kt"><a href="Protocols/ResourceProvider.html">ResourceProvider</a></span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:19ZcashLightClientKit0A12CompactBlockV"></a>
|
||
<a name="//apple_ref/swift/Struct/ZcashCompactBlock" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:19ZcashLightClientKit0A12CompactBlockV">ZcashCompactBlock</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>A Zcash compact block to store on cache DB</p>
|
||
|
||
<a href="Structs/ZcashCompactBlock.html" class="slightly-smaller">See more</a>
|
||
</div>
|
||
<div class="declaration">
|
||
<h4>Declaration</h4>
|
||
<div class="language">
|
||
<p class="aside-title">Swift</p>
|
||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">ZcashCompactBlock</span> <span class="p">:</span> <span class="kt">CompactBlockEntity</span></code></pre>
|
||
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">ZcashCompactBlock</span><span class="p">:</span> <span class="kt">Encodable</span></code></pre>
|
||
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">ZcashCompactBlock</span><span class="p">:</span> <span class="kt">Equatable</span></code></pre>
|
||
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">ZcashCompactBlock</span><span class="p">:</span> <span class="kt">Hashable</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:19ZcashLightClientKit0A27RustBackendWeldingConstantsV"></a>
|
||
<a name="//apple_ref/swift/Struct/ZcashRustBackendWeldingConstants" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:19ZcashLightClientKit0A27RustBackendWeldingConstantsV">ZcashRustBackendWeldingConstants</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>Undocumented</p>
|
||
|
||
</div>
|
||
<div class="declaration">
|
||
<h4>Declaration</h4>
|
||
<div class="language">
|
||
<p class="aside-title">Swift</p>
|
||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">ZcashRustBackendWeldingConstants</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</section>
|
||
</section>
|
||
<section id="footer">
|
||
<p>© 2020 <a class="link" href="https://github.com/zcash/ZcashLightClientKit" target="_blank" rel="external">Francisco Gindre and Jack Grigg</a>. All rights reserved. (Last updated: 2020-04-06)</p>
|
||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.1</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||
</section>
|
||
</article>
|
||
</div>
|
||
</body>
|
||
</div>
|
||
</html>
|