1254 lines
67 KiB
HTML
1254 lines
67 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<title>Synchronizer 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/Synchronizer" class="dashAnchor"></a>
|
||
<a title="Synchronizer 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=""/>
|
||
Synchronizer 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>Synchronizer</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">Synchronizer</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
<p>Primary interface for interacting with the SDK. Defines the contract that specific
|
||
implementations like SdkSynchronizer fulfill.</p>
|
||
|
||
</section>
|
||
<section class="section task-group-section">
|
||
<div class="task-group">
|
||
<ul>
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:19ZcashLightClientKit12SynchronizerP6statusAA10SyncStatusOvp"></a>
|
||
<a name="//apple_ref/swift/Property/status" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:19ZcashLightClientKit12SynchronizerP6statusAA10SyncStatusOvp">status</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>Value representing the Status of this Synchronizer. As the status changes, it will be also notified</p>
|
||
|
||
</div>
|
||
<div class="declaration">
|
||
<h4>Declaration</h4>
|
||
<div class="language">
|
||
<p class="aside-title">Swift</p>
|
||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">status</span><span class="p">:</span> <span class="kt"><a href="../Enums/SyncStatus.html">SyncStatus</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:19ZcashLightClientKit12SynchronizerP15connectionStateAA010ConnectionG0Ovp"></a>
|
||
<a name="//apple_ref/swift/Property/connectionState" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:19ZcashLightClientKit12SynchronizerP15connectionStateAA010ConnectionG0Ovp">connectionState</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>reflects current connection state to LightwalletEndpoint</p>
|
||
|
||
</div>
|
||
<div class="declaration">
|
||
<h4>Declaration</h4>
|
||
<div class="language">
|
||
<p class="aside-title">Swift</p>
|
||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">connectionState</span><span class="p">:</span> <span class="kt"><a href="../Enums/ConnectionState.html">ConnectionState</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:19ZcashLightClientKit12SynchronizerP7prepareyyKF"></a>
|
||
<a name="//apple_ref/swift/Method/prepare()" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:19ZcashLightClientKit12SynchronizerP7prepareyyKF">prepare()</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>prepares this initializer to operate. Initializes the internal state with the given Extended Viewing Keys and a wallet birthday found in the initializer object</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">func</span> <span class="nf">prepare</span><span class="p">()</span> <span class="k">throws</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:19ZcashLightClientKit12SynchronizerP5start5retryySb_tKF"></a>
|
||
<a name="//apple_ref/swift/Method/start(retry:)" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:19ZcashLightClientKit12SynchronizerP5start5retryySb_tKF">start(retry:<wbr>)</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>Starts this synchronizer within the given scope.</p>
|
||
|
||
<p>Implementations should leverage structured concurrency and
|
||
cancel all jobs when this scope completes.</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">func</span> <span class="nf">start</span><span class="p">(</span><span class="nv">retry</span><span class="p">:</span> <span class="kt">Bool</span><span class="p">)</span> <span class="k">throws</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:19ZcashLightClientKit12SynchronizerP4stopyyKF"></a>
|
||
<a name="//apple_ref/swift/Method/stop()" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:19ZcashLightClientKit12SynchronizerP4stopyyKF">stop()</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>Stop this synchronizer. Implementations should ensure that calling this method cancels all jobs that were created by this instance.</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">func</span> <span class="nf">stop</span><span class="p">()</span> <span class="k">throws</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:19ZcashLightClientKit12SynchronizerP18getShieldedAddress12accountIndexSSSgSi_tF"></a>
|
||
<a name="//apple_ref/swift/Method/getShieldedAddress(accountIndex:)" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:19ZcashLightClientKit12SynchronizerP18getShieldedAddress12accountIndexSSSgSi_tF">getShieldedAddress(accountIndex:<wbr>)</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>Gets the sapling shielded address for the given account.</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">func</span> <span class="nf">getShieldedAddress</span><span class="p">(</span><span class="nv">accountIndex</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span> <span class="o">-></span> <span class="kt"><a href="../Typealiases.html#/s:19ZcashLightClientKit22SaplingShieldedAddressa">SaplingShieldedAddress</a></span><span class="p">?</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
<div>
|
||
<h4>Parameters</h4>
|
||
<table class="graybox">
|
||
<tbody>
|
||
<tr>
|
||
<td>
|
||
<code>
|
||
<em>accountIndex</em>
|
||
</code>
|
||
</td>
|
||
<td>
|
||
<div>
|
||
<p>the optional accountId whose address is of interest. By default, the first account is used.</p>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:19ZcashLightClientKit12SynchronizerP17getUnifiedAddress12accountIndexAA0gH0_pSgSi_tF"></a>
|
||
<a name="//apple_ref/swift/Method/getUnifiedAddress(accountIndex:)" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:19ZcashLightClientKit12SynchronizerP17getUnifiedAddress12accountIndexAA0gH0_pSgSi_tF">getUnifiedAddress(accountIndex:<wbr>)</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>Gets the unified address for the given account.</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">func</span> <span class="nf">getUnifiedAddress</span><span class="p">(</span><span class="nv">accountIndex</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span> <span class="o">-></span> <span class="kt"><a href="../Protocols/UnifiedAddress.html">UnifiedAddress</a></span><span class="p">?</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
<div>
|
||
<h4>Parameters</h4>
|
||
<table class="graybox">
|
||
<tbody>
|
||
<tr>
|
||
<td>
|
||
<code>
|
||
<em>accountIndex</em>
|
||
</code>
|
||
</td>
|
||
<td>
|
||
<div>
|
||
<p>the optional accountId whose address is of interest. By default, the first account is used.</p>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:19ZcashLightClientKit12SynchronizerP21getTransparentAddress12accountIndexSSSgSi_tF"></a>
|
||
<a name="//apple_ref/swift/Method/getTransparentAddress(accountIndex:)" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:19ZcashLightClientKit12SynchronizerP21getTransparentAddress12accountIndexSSSgSi_tF">getTransparentAddress(accountIndex:<wbr>)</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>Gets the transparent address for the given account.</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">func</span> <span class="nf">getTransparentAddress</span><span class="p">(</span><span class="nv">accountIndex</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span> <span class="o">-></span> <span class="kt"><a href="../Typealiases.html#/s:19ZcashLightClientKit18TransparentAddressa">TransparentAddress</a></span><span class="p">?</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
<div>
|
||
<h4>Parameters</h4>
|
||
<table class="graybox">
|
||
<tbody>
|
||
<tr>
|
||
<td>
|
||
<code>
|
||
<em>accountIndex</em>
|
||
</code>
|
||
</td>
|
||
<td>
|
||
<div>
|
||
<p>the optional accountId whose address is of interest. By default, the first account is used.</p>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:19ZcashLightClientKit12SynchronizerP13sendToAddress11spendingKey7zatoshi02toH04memo4from11resultBlockySS_s5Int64VS2SSgSiys6ResultOyAA24PendingTransactionEntity_ps5Error_pGctF"></a>
|
||
<a name="//apple_ref/swift/Method/sendToAddress(spendingKey:zatoshi:toAddress:memo:from:resultBlock:)" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:19ZcashLightClientKit12SynchronizerP13sendToAddress11spendingKey7zatoshi02toH04memo4from11resultBlockySS_s5Int64VS2SSgSiys6ResultOyAA24PendingTransactionEntity_ps5Error_pGctF">sendToAddress(spendingKey:<wbr>zatoshi:<wbr>toAddress:<wbr>memo:<wbr>from:<wbr>resultBlock:<wbr>)</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">func</span> <span class="nf">sendToAddress</span><span class="p">(</span>
|
||
<span class="nv">spendingKey</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
|
||
<span class="nv">zatoshi</span><span class="p">:</span> <span class="kt">Int64</span><span class="p">,</span>
|
||
<span class="nv">toAddress</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
|
||
<span class="nv">memo</span><span class="p">:</span> <span class="kt">String</span><span class="p">?,</span>
|
||
<span class="n">from</span> <span class="nv">accountIndex</span><span class="p">:</span> <span class="kt">Int</span><span class="p">,</span>
|
||
<span class="nv">resultBlock</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="n">_</span> <span class="nv">result</span><span class="p">:</span> <span class="kt">Result</span><span class="o"><</span><span class="kt"><a href="../Protocols/PendingTransactionEntity.html">PendingTransactionEntity</a></span><span class="p">,</span> <span class="kt">Error</span><span class="o">></span><span class="p">)</span> <span class="o">-></span> <span class="kt">Void</span>
|
||
<span class="p">)</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:19ZcashLightClientKit12SynchronizerP11shieldFunds11spendingKey017transparentSecretI04memo4from11resultBlockySS_S2SSgSiys6ResultOyAA24PendingTransactionEntity_ps5Error_pGctF"></a>
|
||
<a name="//apple_ref/swift/Method/shieldFunds(spendingKey:transparentSecretKey:memo:from:resultBlock:)" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:19ZcashLightClientKit12SynchronizerP11shieldFunds11spendingKey017transparentSecretI04memo4from11resultBlockySS_S2SSgSiys6ResultOyAA24PendingTransactionEntity_ps5Error_pGctF">shieldFunds(spendingKey:<wbr>transparentSecretKey:<wbr>memo:<wbr>from:<wbr>resultBlock:<wbr>)</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>Sends zatoshi.</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">func</span> <span class="nf">shieldFunds</span><span class="p">(</span>
|
||
<span class="nv">spendingKey</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
|
||
<span class="nv">transparentSecretKey</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
|
||
<span class="nv">memo</span><span class="p">:</span> <span class="kt">String</span><span class="p">?,</span>
|
||
<span class="n">from</span> <span class="nv">accountIndex</span><span class="p">:</span> <span class="kt">Int</span><span class="p">,</span>
|
||
<span class="nv">resultBlock</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="n">_</span> <span class="nv">result</span><span class="p">:</span> <span class="kt">Result</span><span class="o"><</span><span class="kt"><a href="../Protocols/PendingTransactionEntity.html">PendingTransactionEntity</a></span><span class="p">,</span> <span class="kt">Error</span><span class="o">></span><span class="p">)</span> <span class="o">-></span> <span class="kt">Void</span>
|
||
<span class="p">)</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
<div>
|
||
<h4>Parameters</h4>
|
||
<table class="graybox">
|
||
<tbody>
|
||
<tr>
|
||
<td>
|
||
<code>
|
||
<em>spendingKey</em>
|
||
</code>
|
||
</td>
|
||
<td>
|
||
<div>
|
||
<p>the key that allows spends to occur.</p>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<code>
|
||
<em>transparentSecretKey</em>
|
||
</code>
|
||
</td>
|
||
<td>
|
||
<div>
|
||
<p>the key that allows to spend transaprent funds</p>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<code>
|
||
<em>memo</em>
|
||
</code>
|
||
</td>
|
||
<td>
|
||
<div>
|
||
<p>the optional memo to include as part of the transaction.</p>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<code>
|
||
<em>accountIndex</em>
|
||
</code>
|
||
</td>
|
||
<td>
|
||
<div>
|
||
<p>the optional account id that will be used to shield your funds to. By default, the first account is used.</p>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:19ZcashLightClientKit12SynchronizerP11cancelSpend11transactionSbAA24PendingTransactionEntity_p_tF"></a>
|
||
<a name="//apple_ref/swift/Method/cancelSpend(transaction:)" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:19ZcashLightClientKit12SynchronizerP11cancelSpend11transactionSbAA24PendingTransactionEntity_p_tF">cancelSpend(transaction:<wbr>)</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>Attempts to cancel a transaction that is about to be sent. Typically, cancellation is only
|
||
an option if the transaction has not yet been submitted to the server.</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">func</span> <span class="nf">cancelSpend</span><span class="p">(</span><span class="nv">transaction</span><span class="p">:</span> <span class="kt"><a href="../Protocols/PendingTransactionEntity.html">PendingTransactionEntity</a></span><span class="p">)</span> <span class="o">-></span> <span class="kt">Bool</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
<div>
|
||
<h4>Parameters</h4>
|
||
<table class="graybox">
|
||
<tbody>
|
||
<tr>
|
||
<td>
|
||
<code>
|
||
<em>transaction</em>
|
||
</code>
|
||
</td>
|
||
<td>
|
||
<div>
|
||
<p>the transaction to cancel.</p>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div>
|
||
<h4>Return Value</h4>
|
||
<p>true when the cancellation request was successful. False when it is too late.</p>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:19ZcashLightClientKit12SynchronizerP19pendingTransactionsSayAA24PendingTransactionEntity_pGvp"></a>
|
||
<a name="//apple_ref/swift/Property/pendingTransactions" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:19ZcashLightClientKit12SynchronizerP19pendingTransactionsSayAA24PendingTransactionEntity_pGvp">pendingTransactions</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>all outbound pending transactions that have been sent but are awaiting confirmations</p>
|
||
|
||
</div>
|
||
<div class="declaration">
|
||
<h4>Declaration</h4>
|
||
<div class="language">
|
||
<p class="aside-title">Swift</p>
|
||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">pendingTransactions</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Protocols/PendingTransactionEntity.html">PendingTransactionEntity</a></span><span class="p">]</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:19ZcashLightClientKit12SynchronizerP19clearedTransactionsSayAA26ConfirmedTransactionEntity_pGvp"></a>
|
||
<a name="//apple_ref/swift/Property/clearedTransactions" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:19ZcashLightClientKit12SynchronizerP19clearedTransactionsSayAA26ConfirmedTransactionEntity_pGvp">clearedTransactions</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>all the transactions that are on the blockchain</p>
|
||
|
||
</div>
|
||
<div class="declaration">
|
||
<h4>Declaration</h4>
|
||
<div class="language">
|
||
<p class="aside-title">Swift</p>
|
||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">clearedTransactions</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Protocols/ConfirmedTransactionEntity.html">ConfirmedTransactionEntity</a></span><span class="p">]</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:19ZcashLightClientKit12SynchronizerP16sentTransactionsSayAA26ConfirmedTransactionEntity_pGvp"></a>
|
||
<a name="//apple_ref/swift/Property/sentTransactions" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:19ZcashLightClientKit12SynchronizerP16sentTransactionsSayAA26ConfirmedTransactionEntity_pGvp">sentTransactions</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>All transactions that are related to sending funds</p>
|
||
|
||
</div>
|
||
<div class="declaration">
|
||
<h4>Declaration</h4>
|
||
<div class="language">
|
||
<p class="aside-title">Swift</p>
|
||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">sentTransactions</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Protocols/ConfirmedTransactionEntity.html">ConfirmedTransactionEntity</a></span><span class="p">]</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:19ZcashLightClientKit12SynchronizerP20receivedTransactionsSayAA26ConfirmedTransactionEntity_pGvp"></a>
|
||
<a name="//apple_ref/swift/Property/receivedTransactions" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:19ZcashLightClientKit12SynchronizerP20receivedTransactionsSayAA26ConfirmedTransactionEntity_pGvp">receivedTransactions</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>all transactions related to receiving funds</p>
|
||
|
||
</div>
|
||
<div class="declaration">
|
||
<h4>Declaration</h4>
|
||
<div class="language">
|
||
<p class="aside-title">Swift</p>
|
||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">receivedTransactions</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Protocols/ConfirmedTransactionEntity.html">ConfirmedTransactionEntity</a></span><span class="p">]</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:19ZcashLightClientKit12SynchronizerP21paginatedTransactions2ofAA30PaginatedTransactionRepository_pAA0J4KindO_tF"></a>
|
||
<a name="//apple_ref/swift/Method/paginatedTransactions(of:)" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:19ZcashLightClientKit12SynchronizerP21paginatedTransactions2ofAA30PaginatedTransactionRepository_pAA0J4KindO_tF">paginatedTransactions(of:<wbr>)</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>A repository serving transactions in a paginated manner</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">func</span> <span class="nf">paginatedTransactions</span><span class="p">(</span><span class="n">of</span> <span class="nv">kind</span><span class="p">:</span> <span class="kt"><a href="../Enums/TransactionKind.html">TransactionKind</a></span><span class="p">)</span> <span class="o">-></span> <span class="kt"><a href="../Protocols/PaginatedTransactionRepository.html">PaginatedTransactionRepository</a></span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
<div>
|
||
<h4>Parameters</h4>
|
||
<table class="graybox">
|
||
<tbody>
|
||
<tr>
|
||
<td>
|
||
<code>
|
||
<em>kind</em>
|
||
</code>
|
||
</td>
|
||
<td>
|
||
<div>
|
||
<p>Transaction Kind expected from this PaginatedTransactionRepository</p>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:19ZcashLightClientKit12SynchronizerP24allConfirmedTransactions4from5limitSayAA0G17TransactionEntity_pGSgAaG_pSg_SitKF"></a>
|
||
<a name="//apple_ref/swift/Method/allConfirmedTransactions(from:limit:)" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:19ZcashLightClientKit12SynchronizerP24allConfirmedTransactions4from5limitSayAA0G17TransactionEntity_pGSgAaG_pSg_SitKF">allConfirmedTransactions(from:<wbr>limit:<wbr>)</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>Returns a list of confirmed transactions that precede the given transaction with a limit count.</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">func</span> <span class="nf">allConfirmedTransactions</span><span class="p">(</span><span class="n">from</span> <span class="nv">transaction</span><span class="p">:</span> <span class="kt"><a href="../Protocols/ConfirmedTransactionEntity.html">ConfirmedTransactionEntity</a></span><span class="p">?,</span> <span class="nv">limit</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span> <span class="k">throws</span> <span class="o">-></span> <span class="p">[</span><span class="kt"><a href="../Protocols/ConfirmedTransactionEntity.html">ConfirmedTransactionEntity</a></span><span class="p">]?</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
<div>
|
||
<h4>Parameters</h4>
|
||
<table class="graybox">
|
||
<tbody>
|
||
<tr>
|
||
<td>
|
||
<code>
|
||
<em>from</em>
|
||
</code>
|
||
</td>
|
||
<td>
|
||
<div>
|
||
<p>the confirmed transaction from which the query should start from or nil to retrieve from the most recent transaction</p>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<code>
|
||
<em>limit</em>
|
||
</code>
|
||
</td>
|
||
<td>
|
||
<div>
|
||
<p>the maximum amount of items this should return if available</p>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div>
|
||
<h4>Return Value</h4>
|
||
<p>an array with the given Transactions or nil</p>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:19ZcashLightClientKit12SynchronizerP22latestDownloadedHeightSiyKF"></a>
|
||
<a name="//apple_ref/swift/Method/latestDownloadedHeight()" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:19ZcashLightClientKit12SynchronizerP22latestDownloadedHeightSiyKF">latestDownloadedHeight()</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>Returns the latest downloaded height from the compact block cache</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">func</span> <span class="nf">latestDownloadedHeight</span><span class="p">()</span> <span class="k">throws</span> <span class="o">-></span> <span class="kt"><a href="../Typealiases.html#/s:19ZcashLightClientKit11BlockHeighta">BlockHeight</a></span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:19ZcashLightClientKit12SynchronizerP12latestHeight6resultyys6ResultOySis5Error_pGc_tF"></a>
|
||
<a name="//apple_ref/swift/Method/latestHeight(result:)" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:19ZcashLightClientKit12SynchronizerP12latestHeight6resultyys6ResultOySis5Error_pGc_tF">latestHeight(result:<wbr>)</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>Returns the latest block height from the provided Lightwallet endpoint</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">func</span> <span class="nf">latestHeight</span><span class="p">(</span><span class="nv">result</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt">Result</span><span class="o"><</span><span class="kt"><a href="../Typealiases.html#/s:19ZcashLightClientKit11BlockHeighta">BlockHeight</a></span><span class="p">,</span> <span class="kt">Error</span><span class="o">></span><span class="p">)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:19ZcashLightClientKit12SynchronizerP12latestHeightSiyKF"></a>
|
||
<a name="//apple_ref/swift/Method/latestHeight()" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:19ZcashLightClientKit12SynchronizerP12latestHeightSiyKF">latestHeight()</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>Returns the latest block height from the provided Lightwallet endpoint
|
||
Blocking</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">func</span> <span class="nf">latestHeight</span><span class="p">()</span> <span class="k">throws</span> <span class="o">-></span> <span class="kt"><a href="../Typealiases.html#/s:19ZcashLightClientKit11BlockHeighta">BlockHeight</a></span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:19ZcashLightClientKit12SynchronizerP12refreshUTXOs7address4from6resultySS_Siys6ResultOySayAA30UnspentTransactionOutputEntity_pG8inserted_AK7skippedts5Error_pGctF"></a>
|
||
<a name="//apple_ref/swift/Method/refreshUTXOs(address:from:result:)" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:19ZcashLightClientKit12SynchronizerP12refreshUTXOs7address4from6resultySS_Siys6ResultOySayAA30UnspentTransactionOutputEntity_pG8inserted_AK7skippedts5Error_pGctF">refreshUTXOs(address:<wbr>from:<wbr>result:<wbr>)</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>Returns the latests UTXOs for the given address from the specified height on</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">func</span> <span class="nf">refreshUTXOs</span><span class="p">(</span><span class="nv">address</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="n">from</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="nv">result</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt">Result</span><span class="o"><</span><span class="kt"><a href="../Typealiases.html#/s:19ZcashLightClientKit14RefreshedUTXOsa">RefreshedUTXOs</a></span><span class="p">,</span> <span class="kt">Error</span><span class="o">></span><span class="p">)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:19ZcashLightClientKit12SynchronizerP21getTransparentBalance12accountIndexAA06WalletH0_pSi_tKF"></a>
|
||
<a name="//apple_ref/swift/Method/getTransparentBalance(accountIndex:)" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:19ZcashLightClientKit12SynchronizerP21getTransparentBalance12accountIndexAA06WalletH0_pSi_tKF">getTransparentBalance(accountIndex:<wbr>)</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>Returns the last stored unshielded balance</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">func</span> <span class="nf">getTransparentBalance</span><span class="p">(</span><span class="nv">accountIndex</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span> <span class="k">throws</span> <span class="o">-></span> <span class="kt"><a href="../Protocols/WalletBalance.html">WalletBalance</a></span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:19ZcashLightClientKit12SynchronizerP18getShieldedBalance12accountIndexs5Int64VSi_tF"></a>
|
||
<a name="//apple_ref/swift/Method/getShieldedBalance(accountIndex:)" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:19ZcashLightClientKit12SynchronizerP18getShieldedBalance12accountIndexs5Int64VSi_tF">getShieldedBalance(accountIndex:<wbr>)</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>Returns the shielded total balance (includes verified and unverified balance)</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">func</span> <span class="nf">getShieldedBalance</span><span class="p">(</span><span class="nv">accountIndex</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span> <span class="o">-></span> <span class="kt">Int64</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:19ZcashLightClientKit12SynchronizerP26getShieldedVerifiedBalance12accountIndexs5Int64VSi_tF"></a>
|
||
<a name="//apple_ref/swift/Method/getShieldedVerifiedBalance(accountIndex:)" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:19ZcashLightClientKit12SynchronizerP26getShieldedVerifiedBalance12accountIndexs5Int64VSi_tF">getShieldedVerifiedBalance(accountIndex:<wbr>)</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>Returns the shielded verified balance (anchor is 10 blocks back)</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">func</span> <span class="nf">getShieldedVerifiedBalance</span><span class="p">(</span><span class="nv">accountIndex</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span> <span class="o">-></span> <span class="kt">Int64</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:19ZcashLightClientKit12SynchronizerP6rewindyyAA12RewindPolicyOKF"></a>
|
||
<a name="//apple_ref/swift/Method/rewind(_:)" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:19ZcashLightClientKit12SynchronizerP6rewindyyAA12RewindPolicyOKF">rewind(_:<wbr>)</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>Stops the synchronizer and rescans the known blocks with the current keys.</p>
|
||
<div class="aside aside-throws">
|
||
<p class="aside-title">Throws</p>
|
||
Throws rewindErrorUnknownArchorHeight when the rewind points to an invalid height
|
||
|
||
</div><div class="aside aside-throws">
|
||
<p class="aside-title">Throws</p>
|
||
Throws rewindError for other errors
|
||
|
||
</div><div class="aside aside-note">
|
||
<p class="aside-title">Note</p>
|
||
Note rewind does not trigger notifications as a reorg would. You need to restart the synchronizer afterwards
|
||
|
||
</div>
|
||
|
||
</div>
|
||
<div class="declaration">
|
||
<h4>Declaration</h4>
|
||
<div class="language">
|
||
<p class="aside-title">Swift</p>
|
||
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">rewind</span><span class="p">(</span><span class="n">_</span> <span class="nv">policy</span><span class="p">:</span> <span class="kt"><a href="../Enums/RewindPolicy.html">RewindPolicy</a></span><span class="p">)</span> <span class="k">throws</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
<div>
|
||
<h4>Parameters</h4>
|
||
<table class="graybox">
|
||
<tbody>
|
||
<tr>
|
||
<td>
|
||
<code>
|
||
<em>policy</em>
|
||
</code>
|
||
</td>
|
||
<td>
|
||
<div>
|
||
<p>the rewind policy</p>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</section>
|
||
</section>
|
||
<section id="footer">
|
||
<p>© 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>
|