ZcashLightClientKit/docs/rtd/Protocols/NetworkConstants.html

538 lines
26 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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>NetworkConstants Protocol 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/Protocol/NetworkConstants" class="dashAnchor"></a>
<a title="NetworkConstants Protocol 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=""/>
NetworkConstants Protocol 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>NetworkConstants</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">NetworkConstants</span></code></pre>
</div>
</div>
<p>Undocumented</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:19ZcashLightClientKit16NetworkConstantsP23saplingActivationHeightSivpZ"></a>
<a name="//apple_ref/swift/Variable/saplingActivationHeight" class="dashAnchor"></a>
<a class="token" href="#/s:19ZcashLightClientKit16NetworkConstantsP23saplingActivationHeightSivpZ">saplingActivationHeight</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The height of the first sapling block. When it comes to shielded transactions, we do not need to consider any blocks
prior to this height, at all.</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">static</span> <span class="k">var</span> <span class="nv">saplingActivationHeight</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:19ZcashLightClientKit11BlockHeighta">BlockHeight</a></span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19ZcashLightClientKit16NetworkConstantsP17defaultDataDbNameSSvpZ"></a>
<a name="//apple_ref/swift/Variable/defaultDataDbName" class="dashAnchor"></a>
<a class="token" href="#/s:19ZcashLightClientKit16NetworkConstantsP17defaultDataDbNameSSvpZ">defaultDataDbName</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Default Name for LibRustZcash data.db</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">static</span> <span class="k">var</span> <span class="nv">defaultDataDbName</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19ZcashLightClientKit16NetworkConstantsP18defaultCacheDbNameSSvpZ"></a>
<a name="//apple_ref/swift/Variable/defaultCacheDbName" class="dashAnchor"></a>
<a class="token" href="#/s:19ZcashLightClientKit16NetworkConstantsP18defaultCacheDbNameSSvpZ">defaultCacheDbName</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Default Name for Compact Block caches db</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">static</span> <span class="k">var</span> <span class="nv">defaultCacheDbName</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19ZcashLightClientKit16NetworkConstantsP20defaultPendingDbNameSSvpZ"></a>
<a name="//apple_ref/swift/Variable/defaultPendingDbName" class="dashAnchor"></a>
<a class="token" href="#/s:19ZcashLightClientKit16NetworkConstantsP20defaultPendingDbNameSSvpZ">defaultPendingDbName</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Default name for pending transactions db</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">static</span> <span class="k">var</span> <span class="nv">defaultPendingDbName</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19ZcashLightClientKit16NetworkConstantsP19defaultDbNamePrefixSSvpZ"></a>
<a name="//apple_ref/swift/Variable/defaultDbNamePrefix" class="dashAnchor"></a>
<a class="token" href="#/s:19ZcashLightClientKit16NetworkConstantsP19defaultDbNamePrefixSSvpZ">defaultDbNamePrefix</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">static</span> <span class="k">var</span> <span class="nv">defaultDbNamePrefix</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19ZcashLightClientKit16NetworkConstantsP15feeChangeHeightSivpZ"></a>
<a name="//apple_ref/swift/Variable/feeChangeHeight" class="dashAnchor"></a>
<a class="token" href="#/s:19ZcashLightClientKit16NetworkConstantsP15feeChangeHeightSivpZ">feeChangeHeight</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>fixed height where the SDK considers that the ZIP-321 was deployed. This is a workaround
for librustzcash not figuring out the tx fee from the tx itself.</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">static</span> <span class="k">var</span> <span class="nv">feeChangeHeight</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:19ZcashLightClientKit11BlockHeighta">BlockHeight</a></span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19ZcashLightClientKit16NetworkConstantsP10defaultFee3fors5Int64VSi_tFZ"></a>
<a name="//apple_ref/swift/Method/defaultFee(for:)" class="dashAnchor"></a>
<a class="token" href="#/s:19ZcashLightClientKit16NetworkConstantsP10defaultFee3fors5Int64VSi_tFZ">defaultFee(for:<wbr>)</a>
</code>
<span class="declaration-note">
Default implementation
</span>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Undocumented</p>
</div>
<h4>Default Implementation</h4>
<div class="default_impl 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">static</span> <span class="kd">func</span> <span class="nf">defaultFee</span><span class="p">(</span><span class="k">for</span> <span class="nv">height</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:19ZcashLightClientKit11BlockHeighta">BlockHeight</a></span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Int64</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>