ZcashLightClientKit/docs/rtd/Structs.html

569 lines
27 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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>
<script src="js/lunr.min.js" defer></script>
<script src="js/typeahead.jquery.js" defer></script>
<script src="js/jazzy.search.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 0.13.0-beta.2 Docs</a> (53% documented)</p>
<div class="header-right">
<form role="search" action="search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="index.html">ZcashLightClientKit Reference</a>
<img id="carat" src="img/carat.png" alt=""/>
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/DerivationTool.html">DerivationTool</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/ZcashSDKMainnetConstants.html">ZcashSDKMainnetConstants</a>
</li>
<li class="nav-group-task">
<a href="Classes/ZcashSDKTestnetConstants.html">ZcashSDKTestnetConstants</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/CompactBlockProcessorNotificationKey.html">CompactBlockProcessorNotificationKey</a>
</li>
<li class="nav-group-task">
<a href="Enums/CompactBlockProgress.html">CompactBlockProgress</a>
</li>
<li class="nav-group-task">
<a href="Enums/ConnectionState.html">ConnectionState</a>
</li>
<li class="nav-group-task">
<a href="Enums/GRPCResult.html">GRPCResult</a>
</li>
<li class="nav-group-task">
<a href="Enums/InitializerError.html">InitializerError</a>
</li>
<li class="nav-group-task">
<a href="Enums/KeyDerivationErrors.html">KeyDerivationErrors</a>
</li>
<li class="nav-group-task">
<a href="Enums/LightWalletServiceError.html">LightWalletServiceError</a>
</li>
<li class="nav-group-task">
<a href="Enums/NetworkType.html">NetworkType</a>
</li>
<li class="nav-group-task">
<a href="Enums/ResourceProviderError.html">ResourceProviderError</a>
</li>
<li class="nav-group-task">
<a href="Enums/RewindPolicy.html">RewindPolicy</a>
</li>
<li class="nav-group-task">
<a href="Enums/RustWeldingError.html">RustWeldingError</a>
</li>
<li class="nav-group-task">
<a href="Enums.html#/s:19ZcashLightClientKit10SDKMetricsO">SDKMetrics</a>
</li>
<li class="nav-group-task">
<a href="Enums/SaplingParameterDownloader.html">SaplingParameterDownloader</a>
</li>
<li class="nav-group-task">
<a href="Enums/SaplingParameterDownloader/Errors.html"> Errors</a>
</li>
<li class="nav-group-task">
<a href="Enums/ShieldFundsError.html">ShieldFundsError</a>
</li>
<li class="nav-group-task">
<a href="Enums/SyncStatus.html">SyncStatus</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>
<li class="nav-group-task">
<a href="Enums/ZcashNetworkBuilder.html">ZcashNetworkBuilder</a>
</li>
<li class="nav-group-task">
<a href="Enums.html#/s:19ZcashLightClientKit0A27RustBackendWeldingConstantsO">ZcashRustBackendWeldingConstants</a>
</li>
<li class="nav-group-task">
<a href="Enums/ZcashSDK.html">ZcashSDK</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/ConsensusBranchID.html">ConsensusBranchID</a>
</li>
<li class="nav-group-task">
<a href="Extensions/Data.html">Data</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/ServerStreamingCall.html">ServerStreamingCall</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/CancellableCall.html">CancellableCall</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/EnhancementProgress.html">EnhancementProgress</a>
</li>
<li class="nav-group-task">
<a href="Protocols/KeyDeriving.html">KeyDeriving</a>
</li>
<li class="nav-group-task">
<a href="Protocols/KeyValidation.html">KeyValidation</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/LightWalletdInfo.html">LightWalletdInfo</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/NetworkConstants.html">NetworkConstants</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/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/UnifiedAddress.html">UnifiedAddress</a>
</li>
<li class="nav-group-task">
<a href="Protocols/UnifiedViewingKey.html">UnifiedViewingKey</a>
</li>
<li class="nav-group-task">
<a href="Protocols/UnspentTransactionOutputEntity.html">UnspentTransactionOutputEntity</a>
</li>
<li class="nav-group-task">
<a href="Protocols/WalletBalance.html">WalletBalance</a>
</li>
<li class="nav-group-task">
<a href="Protocols/ZcashNetwork.html">ZcashNetwork</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/BlockProgress.html">BlockProgress</a>
</li>
<li class="nav-group-task">
<a href="Structs/DefaultResourceProvider.html">DefaultResourceProvider</a>
</li>
<li class="nav-group-task">
<a href="Structs/EnhancementStreamProgress.html">EnhancementStreamProgress</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>
</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:19ZcashLightClientKit7Channela">Channel</a>
</li>
<li class="nav-group-task">
<a href="Typealiases.html#/s:19ZcashLightClientKit17CompactBlockRangea">CompactBlockRange</a>
</li>
<li class="nav-group-task">
<a href="Typealiases.html#/s:19ZcashLightClientKit17ConsensusBranchIDa">ConsensusBranchID</a>
</li>
<li class="nav-group-task">
<a href="Typealiases.html#/s:19ZcashLightClientKit22ExtendedFullViewingKeya">ExtendedFullViewingKey</a>
</li>
<li class="nav-group-task">
<a href="Typealiases.html#/s:19ZcashLightClientKit17ExtendedPublicKeya">ExtendedPublicKey</a>
</li>
<li class="nav-group-task">
<a href="Typealiases.html#/s:19ZcashLightClientKit14RefreshedUTXOsa">RefreshedUTXOs</a>
</li>
<li class="nav-group-task">
<a href="Typealiases.html#/s:19ZcashLightClientKit22SaplingShieldedAddressa">SaplingShieldedAddress</a>
</li>
<li class="nav-group-task">
<a href="Typealiases.html#/s:19ZcashLightClientKit18TransparentAddressa">TransparentAddress</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:19ZcashLightClientKit25EnhancementStreamProgressV"></a>
<a name="//apple_ref/swift/Struct/EnhancementStreamProgress" class="dashAnchor"></a>
<a class="token" href="#/s:19ZcashLightClientKit25EnhancementStreamProgressV">EnhancementStreamProgress</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>
<a href="Structs/EnhancementStreamProgress.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">EnhancementStreamProgress</span> <span class="p">:</span> <span class="kt"><a href="Protocols/EnhancementProgress.html">EnhancementProgress</a></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&rsquo;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&rsquo;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:19ZcashLightClientKit13BlockProgressV"></a>
<a name="//apple_ref/swift/Struct/BlockProgress" class="dashAnchor"></a>
<a class="token" href="#/s:19ZcashLightClientKit13BlockProgressV">BlockProgress</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>
<a href="Structs/BlockProgress.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">BlockProgress</span> <span class="p">:</span> <span class="kt">Equatable</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2022 <a class="link" href="https://github.com/zcash/ZcashLightClientKit" target="_blank" rel="external noopener">Francisco Gindre and Jack Grigg</a>. All rights reserved. (Last updated: 2022-04-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</html>