1790 lines
57 KiB
HTML
1790 lines
57 KiB
HTML
<!DOCTYPE html>
|
||
|
||
<html>
|
||
<head>
|
||
<title>Protocol Documentation</title>
|
||
<meta charset="UTF-8">
|
||
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic"/>
|
||
<style>
|
||
body {
|
||
width: 60em;
|
||
margin: 1em auto;
|
||
color: #222;
|
||
font-family: "Ubuntu", sans-serif;
|
||
padding-bottom: 4em;
|
||
}
|
||
|
||
h1 {
|
||
font-weight: normal;
|
||
border-bottom: 1px solid #aaa;
|
||
padding-bottom: 0.5ex;
|
||
}
|
||
|
||
h2 {
|
||
border-bottom: 1px solid #aaa;
|
||
padding-bottom: 0.5ex;
|
||
margin: 1.5em 0;
|
||
}
|
||
|
||
h3 {
|
||
font-weight: normal;
|
||
border-bottom: 1px solid #aaa;
|
||
padding-bottom: 0.5ex;
|
||
}
|
||
|
||
a {
|
||
text-decoration: none;
|
||
color: #567e25;
|
||
}
|
||
|
||
table {
|
||
width: 100%;
|
||
font-size: 80%;
|
||
border-collapse: collapse;
|
||
}
|
||
|
||
thead {
|
||
font-weight: 700;
|
||
background-color: #dcdcdc;
|
||
}
|
||
|
||
tbody tr:nth-child(even) {
|
||
background-color: #fbfbfb;
|
||
}
|
||
|
||
td {
|
||
border: 1px solid #ccc;
|
||
padding: 0.5ex 2ex;
|
||
}
|
||
|
||
td p {
|
||
text-indent: 1em;
|
||
margin: 0;
|
||
}
|
||
|
||
td p:nth-child(1) {
|
||
text-indent: 0;
|
||
}
|
||
|
||
|
||
.field-table td:nth-child(1) {
|
||
width: 10em;
|
||
}
|
||
.field-table td:nth-child(2) {
|
||
width: 10em;
|
||
}
|
||
.field-table td:nth-child(3) {
|
||
width: 6em;
|
||
}
|
||
.field-table td:nth-child(4) {
|
||
width: auto;
|
||
}
|
||
|
||
|
||
.extension-table td:nth-child(1) {
|
||
width: 10em;
|
||
}
|
||
.extension-table td:nth-child(2) {
|
||
width: 10em;
|
||
}
|
||
.extension-table td:nth-child(3) {
|
||
width: 10em;
|
||
}
|
||
.extension-table td:nth-child(4) {
|
||
width: 5em;
|
||
}
|
||
.extension-table td:nth-child(5) {
|
||
width: auto;
|
||
}
|
||
|
||
|
||
.enum-table td:nth-child(1) {
|
||
width: 10em;
|
||
}
|
||
.enum-table td:nth-child(2) {
|
||
width: 10em;
|
||
}
|
||
.enum-table td:nth-child(3) {
|
||
width: auto;
|
||
}
|
||
|
||
|
||
.scalar-value-types-table tr {
|
||
height: 3em;
|
||
}
|
||
|
||
|
||
#toc-container ul {
|
||
list-style-type: none;
|
||
padding-left: 1em;
|
||
line-height: 180%;
|
||
margin: 0;
|
||
}
|
||
#toc > li > a {
|
||
font-weight: bold;
|
||
}
|
||
|
||
|
||
.file-heading {
|
||
width: 100%;
|
||
display: table;
|
||
border-bottom: 1px solid #aaa;
|
||
margin: 4em 0 1.5em 0;
|
||
}
|
||
.file-heading h2 {
|
||
border: none;
|
||
display: table-cell;
|
||
}
|
||
.file-heading a {
|
||
text-align: right;
|
||
display: table-cell;
|
||
}
|
||
|
||
|
||
.badge {
|
||
width: 1.6em;
|
||
height: 1.6em;
|
||
display: inline-block;
|
||
|
||
line-height: 1.6em;
|
||
text-align: center;
|
||
font-weight: bold;
|
||
font-size: 60%;
|
||
|
||
color: #89ba48;
|
||
background-color: #dff0c8;
|
||
|
||
margin: 0.5ex 1em 0.5ex -1em;
|
||
border: 1px solid #fbfbfb;
|
||
border-radius: 1ex;
|
||
}
|
||
</style>
|
||
|
||
|
||
<link rel="stylesheet" type="text/css" href="stylesheet.css"/>
|
||
</head>
|
||
|
||
<body>
|
||
|
||
<h1 id="title">Protocol Documentation</h1>
|
||
|
||
<h2>Table of Contents</h2>
|
||
|
||
<div id="toc-container">
|
||
<ul id="toc">
|
||
|
||
|
||
<li>
|
||
<a href="#compact_formats.proto">compact_formats.proto</a>
|
||
<ul>
|
||
|
||
<li>
|
||
<a href="#cash.z.wallet.sdk.rpc.CompactBlock"><span class="badge">M</span>CompactBlock</a>
|
||
</li>
|
||
|
||
<li>
|
||
<a href="#cash.z.wallet.sdk.rpc.CompactOutput"><span class="badge">M</span>CompactOutput</a>
|
||
</li>
|
||
|
||
<li>
|
||
<a href="#cash.z.wallet.sdk.rpc.CompactSpend"><span class="badge">M</span>CompactSpend</a>
|
||
</li>
|
||
|
||
<li>
|
||
<a href="#cash.z.wallet.sdk.rpc.CompactTx"><span class="badge">M</span>CompactTx</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
<li>
|
||
<a href="#darkside.proto">darkside.proto</a>
|
||
<ul>
|
||
|
||
<li>
|
||
<a href="#cash.z.wallet.sdk.rpc.DarksideBlock"><span class="badge">M</span>DarksideBlock</a>
|
||
</li>
|
||
|
||
<li>
|
||
<a href="#cash.z.wallet.sdk.rpc.DarksideBlocksURL"><span class="badge">M</span>DarksideBlocksURL</a>
|
||
</li>
|
||
|
||
<li>
|
||
<a href="#cash.z.wallet.sdk.rpc.DarksideEmptyBlocks"><span class="badge">M</span>DarksideEmptyBlocks</a>
|
||
</li>
|
||
|
||
<li>
|
||
<a href="#cash.z.wallet.sdk.rpc.DarksideHeight"><span class="badge">M</span>DarksideHeight</a>
|
||
</li>
|
||
|
||
<li>
|
||
<a href="#cash.z.wallet.sdk.rpc.DarksideMetaState"><span class="badge">M</span>DarksideMetaState</a>
|
||
</li>
|
||
|
||
<li>
|
||
<a href="#cash.z.wallet.sdk.rpc.DarksideTransactionsURL"><span class="badge">M</span>DarksideTransactionsURL</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
<li>
|
||
<a href="#cash.z.wallet.sdk.rpc.DarksideStreamer"><span class="badge">S</span>DarksideStreamer</a>
|
||
</li>
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
<li>
|
||
<a href="#service.proto">service.proto</a>
|
||
<ul>
|
||
|
||
<li>
|
||
<a href="#cash.z.wallet.sdk.rpc.Address"><span class="badge">M</span>Address</a>
|
||
</li>
|
||
|
||
<li>
|
||
<a href="#cash.z.wallet.sdk.rpc.AddressList"><span class="badge">M</span>AddressList</a>
|
||
</li>
|
||
|
||
<li>
|
||
<a href="#cash.z.wallet.sdk.rpc.Balance"><span class="badge">M</span>Balance</a>
|
||
</li>
|
||
|
||
<li>
|
||
<a href="#cash.z.wallet.sdk.rpc.BlockID"><span class="badge">M</span>BlockID</a>
|
||
</li>
|
||
|
||
<li>
|
||
<a href="#cash.z.wallet.sdk.rpc.BlockRange"><span class="badge">M</span>BlockRange</a>
|
||
</li>
|
||
|
||
<li>
|
||
<a href="#cash.z.wallet.sdk.rpc.ChainSpec"><span class="badge">M</span>ChainSpec</a>
|
||
</li>
|
||
|
||
<li>
|
||
<a href="#cash.z.wallet.sdk.rpc.Duration"><span class="badge">M</span>Duration</a>
|
||
</li>
|
||
|
||
<li>
|
||
<a href="#cash.z.wallet.sdk.rpc.Empty"><span class="badge">M</span>Empty</a>
|
||
</li>
|
||
|
||
<li>
|
||
<a href="#cash.z.wallet.sdk.rpc.Exclude"><span class="badge">M</span>Exclude</a>
|
||
</li>
|
||
|
||
<li>
|
||
<a href="#cash.z.wallet.sdk.rpc.GetAddressUtxosArg"><span class="badge">M</span>GetAddressUtxosArg</a>
|
||
</li>
|
||
|
||
<li>
|
||
<a href="#cash.z.wallet.sdk.rpc.GetAddressUtxosReply"><span class="badge">M</span>GetAddressUtxosReply</a>
|
||
</li>
|
||
|
||
<li>
|
||
<a href="#cash.z.wallet.sdk.rpc.GetAddressUtxosReplyList"><span class="badge">M</span>GetAddressUtxosReplyList</a>
|
||
</li>
|
||
|
||
<li>
|
||
<a href="#cash.z.wallet.sdk.rpc.LightdInfo"><span class="badge">M</span>LightdInfo</a>
|
||
</li>
|
||
|
||
<li>
|
||
<a href="#cash.z.wallet.sdk.rpc.PingResponse"><span class="badge">M</span>PingResponse</a>
|
||
</li>
|
||
|
||
<li>
|
||
<a href="#cash.z.wallet.sdk.rpc.RawTransaction"><span class="badge">M</span>RawTransaction</a>
|
||
</li>
|
||
|
||
<li>
|
||
<a href="#cash.z.wallet.sdk.rpc.SendResponse"><span class="badge">M</span>SendResponse</a>
|
||
</li>
|
||
|
||
<li>
|
||
<a href="#cash.z.wallet.sdk.rpc.TransparentAddressBlockFilter"><span class="badge">M</span>TransparentAddressBlockFilter</a>
|
||
</li>
|
||
|
||
<li>
|
||
<a href="#cash.z.wallet.sdk.rpc.TreeState"><span class="badge">M</span>TreeState</a>
|
||
</li>
|
||
|
||
<li>
|
||
<a href="#cash.z.wallet.sdk.rpc.TxFilter"><span class="badge">M</span>TxFilter</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
<li>
|
||
<a href="#cash.z.wallet.sdk.rpc.CompactTxStreamer"><span class="badge">S</span>CompactTxStreamer</a>
|
||
</li>
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
<li><a href="#scalar-value-types">Scalar Value Types</a></li>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
|
||
<div class="file-heading">
|
||
<h2 id="compact_formats.proto">compact_formats.proto</h2><a href="#title">Top</a>
|
||
</div>
|
||
<p></p>
|
||
|
||
|
||
<h3 id="cash.z.wallet.sdk.rpc.CompactBlock">CompactBlock</h3>
|
||
<p>CompactBlock is a packaging of ONLY the data from a block that's needed to:</p><p>1. Detect a payment to your shielded Sapling address</p><p>2. Detect a spend of your shielded Sapling notes</p><p>3. Update your witnesses to generate new Sapling spend proofs.</p>
|
||
|
||
|
||
<table class="field-table">
|
||
<thead>
|
||
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
|
||
</thead>
|
||
<tbody>
|
||
|
||
<tr>
|
||
<td>protoVersion</td>
|
||
<td><a href="#uint32">uint32</a></td>
|
||
<td></td>
|
||
<td><p>the version of this wire format, for storage </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>height</td>
|
||
<td><a href="#uint64">uint64</a></td>
|
||
<td></td>
|
||
<td><p>the height of this block </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>hash</td>
|
||
<td><a href="#bytes">bytes</a></td>
|
||
<td></td>
|
||
<td><p>the ID (hash) of this block, same as in block explorers </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>prevHash</td>
|
||
<td><a href="#bytes">bytes</a></td>
|
||
<td></td>
|
||
<td><p>the ID (hash) of this block's predecessor </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>time</td>
|
||
<td><a href="#uint32">uint32</a></td>
|
||
<td></td>
|
||
<td><p>Unix epoch time when the block was mined </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>header</td>
|
||
<td><a href="#bytes">bytes</a></td>
|
||
<td></td>
|
||
<td><p>(hash, prevHash, and time) OR (full header) </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>vtx</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.CompactTx">CompactTx</a></td>
|
||
<td>repeated</td>
|
||
<td><p>zero or more compact transactions from this block </p></td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
|
||
|
||
|
||
<h3 id="cash.z.wallet.sdk.rpc.CompactOutput">CompactOutput</h3>
|
||
<p>output is a Sapling Output Description as described in section 7.4 of the</p><p>Zcash protocol spec. Total size is 948.</p>
|
||
|
||
|
||
<table class="field-table">
|
||
<thead>
|
||
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
|
||
</thead>
|
||
<tbody>
|
||
|
||
<tr>
|
||
<td>cmu</td>
|
||
<td><a href="#bytes">bytes</a></td>
|
||
<td></td>
|
||
<td><p>note commitment u-coordinate </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>epk</td>
|
||
<td><a href="#bytes">bytes</a></td>
|
||
<td></td>
|
||
<td><p>ephemeral public key </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>ciphertext</td>
|
||
<td><a href="#bytes">bytes</a></td>
|
||
<td></td>
|
||
<td><p>ciphertext and zkproof </p></td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
|
||
|
||
|
||
<h3 id="cash.z.wallet.sdk.rpc.CompactSpend">CompactSpend</h3>
|
||
<p>CompactSpend is a Sapling Spend Description as described in 7.3 of the Zcash</p><p>protocol specification.</p>
|
||
|
||
|
||
<table class="field-table">
|
||
<thead>
|
||
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
|
||
</thead>
|
||
<tbody>
|
||
|
||
<tr>
|
||
<td>nf</td>
|
||
<td><a href="#bytes">bytes</a></td>
|
||
<td></td>
|
||
<td><p>nullifier (see the Zcash protocol specification) </p></td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
|
||
|
||
|
||
<h3 id="cash.z.wallet.sdk.rpc.CompactTx">CompactTx</h3>
|
||
<p>CompactTx contains the minimum information for a wallet to know if this transaction</p><p>is relevant to it (either pays to it or spends from it) via shielded elements</p><p>only. This message will not encode a transparent-to-transparent transaction.</p>
|
||
|
||
|
||
<table class="field-table">
|
||
<thead>
|
||
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
|
||
</thead>
|
||
<tbody>
|
||
|
||
<tr>
|
||
<td>index</td>
|
||
<td><a href="#uint64">uint64</a></td>
|
||
<td></td>
|
||
<td><p>the index within the full block </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>hash</td>
|
||
<td><a href="#bytes">bytes</a></td>
|
||
<td></td>
|
||
<td><p>the ID (hash) of this transaction, same as in block explorers </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>fee</td>
|
||
<td><a href="#uint32">uint32</a></td>
|
||
<td></td>
|
||
<td><p>The transaction fee: present if server can provide. In the case of a
|
||
stateless server and a transaction with transparent inputs, this will be
|
||
unset because the calculation requires reference to prior transactions.
|
||
in a pure-Sapling context, the fee will be calculable as:
|
||
valueBalance + (sum(vPubNew) - sum(vPubOld) - sum(tOut)) </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>spends</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.CompactSpend">CompactSpend</a></td>
|
||
<td>repeated</td>
|
||
<td><p>inputs </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>outputs</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.CompactOutput">CompactOutput</a></td>
|
||
<td>repeated</td>
|
||
<td><p>outputs </p></td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="file-heading">
|
||
<h2 id="darkside.proto">darkside.proto</h2><a href="#title">Top</a>
|
||
</div>
|
||
<p></p>
|
||
|
||
|
||
<h3 id="cash.z.wallet.sdk.rpc.DarksideBlock">DarksideBlock</h3>
|
||
<p>A block is a hex-encoded string.</p>
|
||
|
||
|
||
<table class="field-table">
|
||
<thead>
|
||
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
|
||
</thead>
|
||
<tbody>
|
||
|
||
<tr>
|
||
<td>block</td>
|
||
<td><a href="#string">string</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
|
||
|
||
|
||
<h3 id="cash.z.wallet.sdk.rpc.DarksideBlocksURL">DarksideBlocksURL</h3>
|
||
<p>DarksideBlocksURL is typically something like:</p><p>https://raw.githubusercontent.com/zcash-hackworks/darksidewalletd-test-data/master/basic-reorg/before-reorg.txt</p>
|
||
|
||
|
||
<table class="field-table">
|
||
<thead>
|
||
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
|
||
</thead>
|
||
<tbody>
|
||
|
||
<tr>
|
||
<td>url</td>
|
||
<td><a href="#string">string</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
|
||
|
||
|
||
<h3 id="cash.z.wallet.sdk.rpc.DarksideEmptyBlocks">DarksideEmptyBlocks</h3>
|
||
<p></p>
|
||
|
||
|
||
<table class="field-table">
|
||
<thead>
|
||
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
|
||
</thead>
|
||
<tbody>
|
||
|
||
<tr>
|
||
<td>height</td>
|
||
<td><a href="#int32">int32</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>nonce</td>
|
||
<td><a href="#int32">int32</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>count</td>
|
||
<td><a href="#int32">int32</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
|
||
|
||
|
||
<h3 id="cash.z.wallet.sdk.rpc.DarksideHeight">DarksideHeight</h3>
|
||
<p></p>
|
||
|
||
|
||
<table class="field-table">
|
||
<thead>
|
||
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
|
||
</thead>
|
||
<tbody>
|
||
|
||
<tr>
|
||
<td>height</td>
|
||
<td><a href="#int32">int32</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
|
||
|
||
|
||
<h3 id="cash.z.wallet.sdk.rpc.DarksideMetaState">DarksideMetaState</h3>
|
||
<p></p>
|
||
|
||
|
||
<table class="field-table">
|
||
<thead>
|
||
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
|
||
</thead>
|
||
<tbody>
|
||
|
||
<tr>
|
||
<td>saplingActivation</td>
|
||
<td><a href="#int32">int32</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>branchID</td>
|
||
<td><a href="#string">string</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>chainName</td>
|
||
<td><a href="#string">string</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
|
||
|
||
|
||
<h3 id="cash.z.wallet.sdk.rpc.DarksideTransactionsURL">DarksideTransactionsURL</h3>
|
||
<p>DarksideTransactionsURL refers to an HTTP source that contains a list</p><p>of hex-encoded transactions, one per line, that are to be associated</p><p>with the given height (fake-mined into the block at that height)</p>
|
||
|
||
|
||
<table class="field-table">
|
||
<thead>
|
||
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
|
||
</thead>
|
||
<tbody>
|
||
|
||
<tr>
|
||
<td>height</td>
|
||
<td><a href="#int32">int32</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>url</td>
|
||
<td><a href="#string">string</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<h3 id="cash.z.wallet.sdk.rpc.DarksideStreamer">DarksideStreamer</h3>
|
||
<p>Darksidewalletd maintains two staging areas, blocks and transactions. The</p><p>Stage*() gRPCs add items to the staging area; ApplyStaged() "applies" everything</p><p>in the staging area to the working (operational) state that the mock zcashd</p><p>serves; transactions are placed into their corresponding blocks (by height).</p>
|
||
<table class="enum-table">
|
||
<thead>
|
||
<tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
|
||
</thead>
|
||
<tbody>
|
||
|
||
<tr>
|
||
<td>Reset</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.DarksideMetaState">DarksideMetaState</a></td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.Empty">Empty</a></td>
|
||
<td><p>Reset reverts all darksidewalletd state (active block range, latest height,
|
||
staged blocks and transactions) and lightwalletd state (cache) to empty,
|
||
the same as the initial state. This occurs synchronously and instantaneously;
|
||
no reorg happens in lightwalletd. This is good to do before each independent
|
||
test so that no state leaks from one test to another.
|
||
Also sets (some of) the values returned by GetLightdInfo(). The Sapling
|
||
activation height specified here must be where the block range starts.</p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>StageBlocksStream</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.DarksideBlock">DarksideBlock</a> stream</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.Empty">Empty</a></td>
|
||
<td><p>StageBlocksStream accepts a list of blocks and saves them into the blocks
|
||
staging area until ApplyStaged() is called; there is no immediate effect on
|
||
the mock zcashd. Blocks are hex-encoded. Order is important, see ApplyStaged.</p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>StageBlocks</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.DarksideBlocksURL">DarksideBlocksURL</a></td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.Empty">Empty</a></td>
|
||
<td><p>StageBlocks is the same as StageBlocksStream() except the blocks are fetched
|
||
from the given URL. Blocks are one per line, hex-encoded (not JSON).</p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>StageBlocksCreate</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.DarksideEmptyBlocks">DarksideEmptyBlocks</a></td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.Empty">Empty</a></td>
|
||
<td><p>StageBlocksCreate is like the previous two, except it creates 'count'
|
||
empty blocks at consecutive heights starting at height 'height'. The
|
||
'nonce' is part of the header, so it contributes to the block hash; this
|
||
lets you create identical blocks (same transactions and height), but with
|
||
different hashes.</p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>StageTransactionsStream</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.RawTransaction">RawTransaction</a> stream</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.Empty">Empty</a></td>
|
||
<td><p>StageTransactionsStream stores the given transaction-height pairs in the
|
||
staging area until ApplyStaged() is called. Note that these transactions
|
||
are not returned by the production GetTransaction() gRPC until they
|
||
appear in a "mined" block (contained in the active blockchain presented
|
||
by the mock zcashd).</p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>StageTransactions</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.DarksideTransactionsURL">DarksideTransactionsURL</a></td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.Empty">Empty</a></td>
|
||
<td><p>StageTransactions is the same except the transactions are fetched from
|
||
the given url. They are all staged into the block at the given height.
|
||
Staging transactions to different heights requires multiple calls.</p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>ApplyStaged</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.DarksideHeight">DarksideHeight</a></td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.Empty">Empty</a></td>
|
||
<td><p>ApplyStaged iterates the list of blocks that were staged by the
|
||
StageBlocks*() gRPCs, in the order they were staged, and "merges" each
|
||
into the active, working blocks list that the mock zcashd is presenting
|
||
to lightwalletd. Even as each block is applied, the active list can't
|
||
have gaps; if the active block range is 1000-1006, and the staged block
|
||
range is 1003-1004, the resulting range is 1000-1004, with 1000-1002
|
||
unchanged, blocks 1003-1004 from the new range, and 1005-1006 dropped.
|
||
|
||
After merging all blocks, ApplyStaged() appends staged transactions (in
|
||
the order received) into each one's corresponding (by height) block
|
||
The staging area is then cleared.
|
||
|
||
The argument specifies the latest block height that mock zcashd reports
|
||
(i.e. what's returned by GetLatestBlock). Note that ApplyStaged() can
|
||
also be used to simply advance the latest block height presented by mock
|
||
zcashd. That is, there doesn't need to be anything in the staging area.</p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>GetIncomingTransactions</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.Empty">Empty</a></td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.RawTransaction">RawTransaction</a> stream</td>
|
||
<td><p>Calls to the production gRPC SendTransaction() store the transaction in
|
||
a separate area (not the staging area); this method returns all transactions
|
||
in this separate area, which is then cleared. The height returned
|
||
with each transaction is -1 (invalid) since these transactions haven't
|
||
been mined yet. The intention is that the transactions returned here can
|
||
then, for example, be given to StageTransactions() to get them "mined"
|
||
into a specified block on the next ApplyStaged().</p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>ClearIncomingTransactions</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.Empty">Empty</a></td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.Empty">Empty</a></td>
|
||
<td><p>Clear the incoming transaction pool.</p></td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
|
||
|
||
<div class="file-heading">
|
||
<h2 id="service.proto">service.proto</h2><a href="#title">Top</a>
|
||
</div>
|
||
<p></p>
|
||
|
||
|
||
<h3 id="cash.z.wallet.sdk.rpc.Address">Address</h3>
|
||
<p></p>
|
||
|
||
|
||
<table class="field-table">
|
||
<thead>
|
||
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
|
||
</thead>
|
||
<tbody>
|
||
|
||
<tr>
|
||
<td>address</td>
|
||
<td><a href="#string">string</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
|
||
|
||
|
||
<h3 id="cash.z.wallet.sdk.rpc.AddressList">AddressList</h3>
|
||
<p></p>
|
||
|
||
|
||
<table class="field-table">
|
||
<thead>
|
||
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
|
||
</thead>
|
||
<tbody>
|
||
|
||
<tr>
|
||
<td>addresses</td>
|
||
<td><a href="#string">string</a></td>
|
||
<td>repeated</td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
|
||
|
||
|
||
<h3 id="cash.z.wallet.sdk.rpc.Balance">Balance</h3>
|
||
<p></p>
|
||
|
||
|
||
<table class="field-table">
|
||
<thead>
|
||
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
|
||
</thead>
|
||
<tbody>
|
||
|
||
<tr>
|
||
<td>valueZat</td>
|
||
<td><a href="#int64">int64</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
|
||
|
||
|
||
<h3 id="cash.z.wallet.sdk.rpc.BlockID">BlockID</h3>
|
||
<p>A BlockID message contains identifiers to select a block: a height or a</p><p>hash. Specification by hash is not implemented, but may be in the future.</p>
|
||
|
||
|
||
<table class="field-table">
|
||
<thead>
|
||
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
|
||
</thead>
|
||
<tbody>
|
||
|
||
<tr>
|
||
<td>height</td>
|
||
<td><a href="#uint64">uint64</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>hash</td>
|
||
<td><a href="#bytes">bytes</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
|
||
|
||
|
||
<h3 id="cash.z.wallet.sdk.rpc.BlockRange">BlockRange</h3>
|
||
<p>BlockRange specifies a series of blocks from start to end inclusive.</p><p>Both BlockIDs must be heights; specification by hash is not yet supported.</p>
|
||
|
||
|
||
<table class="field-table">
|
||
<thead>
|
||
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
|
||
</thead>
|
||
<tbody>
|
||
|
||
<tr>
|
||
<td>start</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.BlockID">BlockID</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>end</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.BlockID">BlockID</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
|
||
|
||
|
||
<h3 id="cash.z.wallet.sdk.rpc.ChainSpec">ChainSpec</h3>
|
||
<p>Chainspec is a placeholder to allow specification of a particular chain fork.</p>
|
||
|
||
|
||
|
||
|
||
|
||
<h3 id="cash.z.wallet.sdk.rpc.Duration">Duration</h3>
|
||
<p>Duration is currently used only for testing, so that the Ping rpc</p><p>can simulate a delay, to create many simultaneous connections. Units</p><p>are microseconds.</p>
|
||
|
||
|
||
<table class="field-table">
|
||
<thead>
|
||
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
|
||
</thead>
|
||
<tbody>
|
||
|
||
<tr>
|
||
<td>intervalUs</td>
|
||
<td><a href="#int64">int64</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
|
||
|
||
|
||
<h3 id="cash.z.wallet.sdk.rpc.Empty">Empty</h3>
|
||
<p>Empty is for gRPCs that take no arguments, currently only GetLightdInfo.</p>
|
||
|
||
|
||
|
||
|
||
|
||
<h3 id="cash.z.wallet.sdk.rpc.Exclude">Exclude</h3>
|
||
<p></p>
|
||
|
||
|
||
<table class="field-table">
|
||
<thead>
|
||
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
|
||
</thead>
|
||
<tbody>
|
||
|
||
<tr>
|
||
<td>txid</td>
|
||
<td><a href="#bytes">bytes</a></td>
|
||
<td>repeated</td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
|
||
|
||
|
||
<h3 id="cash.z.wallet.sdk.rpc.GetAddressUtxosArg">GetAddressUtxosArg</h3>
|
||
<p></p>
|
||
|
||
|
||
<table class="field-table">
|
||
<thead>
|
||
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
|
||
</thead>
|
||
<tbody>
|
||
|
||
<tr>
|
||
<td>address</td>
|
||
<td><a href="#string">string</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>startHeight</td>
|
||
<td><a href="#uint64">uint64</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>maxEntries</td>
|
||
<td><a href="#uint32">uint32</a></td>
|
||
<td></td>
|
||
<td><p>zero means unlimited </p></td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
|
||
|
||
|
||
<h3 id="cash.z.wallet.sdk.rpc.GetAddressUtxosReply">GetAddressUtxosReply</h3>
|
||
<p></p>
|
||
|
||
|
||
<table class="field-table">
|
||
<thead>
|
||
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
|
||
</thead>
|
||
<tbody>
|
||
|
||
<tr>
|
||
<td>txid</td>
|
||
<td><a href="#bytes">bytes</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>index</td>
|
||
<td><a href="#int32">int32</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>script</td>
|
||
<td><a href="#bytes">bytes</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>valueZat</td>
|
||
<td><a href="#int64">int64</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>height</td>
|
||
<td><a href="#uint64">uint64</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
|
||
|
||
|
||
<h3 id="cash.z.wallet.sdk.rpc.GetAddressUtxosReplyList">GetAddressUtxosReplyList</h3>
|
||
<p></p>
|
||
|
||
|
||
<table class="field-table">
|
||
<thead>
|
||
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
|
||
</thead>
|
||
<tbody>
|
||
|
||
<tr>
|
||
<td>addressUtxos</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.GetAddressUtxosReply">GetAddressUtxosReply</a></td>
|
||
<td>repeated</td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
|
||
|
||
|
||
<h3 id="cash.z.wallet.sdk.rpc.LightdInfo">LightdInfo</h3>
|
||
<p>LightdInfo returns various information about this lightwalletd instance</p><p>and the state of the blockchain.</p>
|
||
|
||
|
||
<table class="field-table">
|
||
<thead>
|
||
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
|
||
</thead>
|
||
<tbody>
|
||
|
||
<tr>
|
||
<td>version</td>
|
||
<td><a href="#string">string</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>vendor</td>
|
||
<td><a href="#string">string</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>taddrSupport</td>
|
||
<td><a href="#bool">bool</a></td>
|
||
<td></td>
|
||
<td><p>true </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>chainName</td>
|
||
<td><a href="#string">string</a></td>
|
||
<td></td>
|
||
<td><p>either "main" or "test" </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>saplingActivationHeight</td>
|
||
<td><a href="#uint64">uint64</a></td>
|
||
<td></td>
|
||
<td><p>depends on mainnet or testnet </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>consensusBranchId</td>
|
||
<td><a href="#string">string</a></td>
|
||
<td></td>
|
||
<td><p>protocol identifier, see consensus/upgrades.cpp </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>blockHeight</td>
|
||
<td><a href="#uint64">uint64</a></td>
|
||
<td></td>
|
||
<td><p>latest block on the best chain </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>gitCommit</td>
|
||
<td><a href="#string">string</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>branch</td>
|
||
<td><a href="#string">string</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>buildDate</td>
|
||
<td><a href="#string">string</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>buildUser</td>
|
||
<td><a href="#string">string</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
|
||
|
||
|
||
<h3 id="cash.z.wallet.sdk.rpc.PingResponse">PingResponse</h3>
|
||
<p>PingResponse is used to indicate concurrency, how many Ping rpcs</p><p>are executing upon entry and upon exit (after the delay).</p><p>This rpc is used for testing only.</p>
|
||
|
||
|
||
<table class="field-table">
|
||
<thead>
|
||
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
|
||
</thead>
|
||
<tbody>
|
||
|
||
<tr>
|
||
<td>entry</td>
|
||
<td><a href="#int64">int64</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>exit</td>
|
||
<td><a href="#int64">int64</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
|
||
|
||
|
||
<h3 id="cash.z.wallet.sdk.rpc.RawTransaction">RawTransaction</h3>
|
||
<p>RawTransaction contains the complete transaction data. It also optionally includes </p><p>the block height in which the transaction was included.</p>
|
||
|
||
|
||
<table class="field-table">
|
||
<thead>
|
||
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
|
||
</thead>
|
||
<tbody>
|
||
|
||
<tr>
|
||
<td>data</td>
|
||
<td><a href="#bytes">bytes</a></td>
|
||
<td></td>
|
||
<td><p>exact data returned by zcash 'getrawtransaction' </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>height</td>
|
||
<td><a href="#uint64">uint64</a></td>
|
||
<td></td>
|
||
<td><p>height that the transaction was mined (or -1) </p></td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
|
||
|
||
|
||
<h3 id="cash.z.wallet.sdk.rpc.SendResponse">SendResponse</h3>
|
||
<p>A SendResponse encodes an error code and a string. It is currently used</p><p>only by SendTransaction(). If error code is zero, the operation was</p><p>successful; if non-zero, it and the message specify the failure.</p>
|
||
|
||
|
||
<table class="field-table">
|
||
<thead>
|
||
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
|
||
</thead>
|
||
<tbody>
|
||
|
||
<tr>
|
||
<td>errorCode</td>
|
||
<td><a href="#int32">int32</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>errorMessage</td>
|
||
<td><a href="#string">string</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
|
||
|
||
|
||
<h3 id="cash.z.wallet.sdk.rpc.TransparentAddressBlockFilter">TransparentAddressBlockFilter</h3>
|
||
<p>TransparentAddressBlockFilter restricts the results to the given address</p><p>or block range.</p>
|
||
|
||
|
||
<table class="field-table">
|
||
<thead>
|
||
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
|
||
</thead>
|
||
<tbody>
|
||
|
||
<tr>
|
||
<td>address</td>
|
||
<td><a href="#string">string</a></td>
|
||
<td></td>
|
||
<td><p>t-address </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>range</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.BlockRange">BlockRange</a></td>
|
||
<td></td>
|
||
<td><p>start, end heights </p></td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
|
||
|
||
|
||
<h3 id="cash.z.wallet.sdk.rpc.TreeState">TreeState</h3>
|
||
<p>The TreeState is derived from the zcash z_gettreestate rpc.</p>
|
||
|
||
|
||
<table class="field-table">
|
||
<thead>
|
||
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
|
||
</thead>
|
||
<tbody>
|
||
|
||
<tr>
|
||
<td>network</td>
|
||
<td><a href="#string">string</a></td>
|
||
<td></td>
|
||
<td><p>"main" or "test" </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>height</td>
|
||
<td><a href="#uint64">uint64</a></td>
|
||
<td></td>
|
||
<td><p> </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>hash</td>
|
||
<td><a href="#string">string</a></td>
|
||
<td></td>
|
||
<td><p>block id </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>time</td>
|
||
<td><a href="#uint32">uint32</a></td>
|
||
<td></td>
|
||
<td><p>Unix epoch time when the block was mined </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>tree</td>
|
||
<td><a href="#string">string</a></td>
|
||
<td></td>
|
||
<td><p>sapling commitment tree state </p></td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
|
||
|
||
|
||
<h3 id="cash.z.wallet.sdk.rpc.TxFilter">TxFilter</h3>
|
||
<p>A TxFilter contains the information needed to identify a particular</p><p>transaction: either a block and an index, or a direct transaction hash.</p><p>Currently, only specification by hash is supported.</p>
|
||
|
||
|
||
<table class="field-table">
|
||
<thead>
|
||
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
|
||
</thead>
|
||
<tbody>
|
||
|
||
<tr>
|
||
<td>block</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.BlockID">BlockID</a></td>
|
||
<td></td>
|
||
<td><p>block identifier, height or hash </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>index</td>
|
||
<td><a href="#uint64">uint64</a></td>
|
||
<td></td>
|
||
<td><p>index within the block </p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>hash</td>
|
||
<td><a href="#bytes">bytes</a></td>
|
||
<td></td>
|
||
<td><p>transaction ID (hash, txid) </p></td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<h3 id="cash.z.wallet.sdk.rpc.CompactTxStreamer">CompactTxStreamer</h3>
|
||
<p></p>
|
||
<table class="enum-table">
|
||
<thead>
|
||
<tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
|
||
</thead>
|
||
<tbody>
|
||
|
||
<tr>
|
||
<td>GetLatestBlock</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.ChainSpec">ChainSpec</a></td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.BlockID">BlockID</a></td>
|
||
<td><p>Return the height of the tip of the best chain</p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>GetBlock</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.BlockID">BlockID</a></td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.CompactBlock">CompactBlock</a></td>
|
||
<td><p>Return the compact block corresponding to the given block identifier</p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>GetBlockRange</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.BlockRange">BlockRange</a></td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.CompactBlock">CompactBlock</a> stream</td>
|
||
<td><p>Return a list of consecutive compact blocks</p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>GetTransaction</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.TxFilter">TxFilter</a></td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.RawTransaction">RawTransaction</a></td>
|
||
<td><p>Return the requested full (not compact) transaction (as from zcashd)</p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>SendTransaction</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.RawTransaction">RawTransaction</a></td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.SendResponse">SendResponse</a></td>
|
||
<td><p>Submit the given transaction to the zcash network</p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>GetTaddressTxids</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.TransparentAddressBlockFilter">TransparentAddressBlockFilter</a></td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.RawTransaction">RawTransaction</a> stream</td>
|
||
<td><p>Return the txids corresponding to the given t-address within the given block range</p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>GetTaddressBalance</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.AddressList">AddressList</a></td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.Balance">Balance</a></td>
|
||
<td><p></p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>GetTaddressBalanceStream</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.Address">Address</a> stream</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.Balance">Balance</a></td>
|
||
<td><p></p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>GetMempoolTx</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.Exclude">Exclude</a></td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.CompactTx">CompactTx</a> stream</td>
|
||
<td><p>Return the compact transactions currently in the mempool; the results
|
||
can be a few seconds out of date. If the Exclude list is empty, return
|
||
all transactions; otherwise return all *except* those in the Exclude list
|
||
(if any); this allows the client to avoid receiving transactions that it
|
||
already has (from an earlier call to this rpc). The transaction IDs in the
|
||
Exclude list can be shortened to any number of bytes to make the request
|
||
more bandwidth-efficient; if two or more transactions in the mempool
|
||
match a shortened txid, they are all sent (none is excluded). Transactions
|
||
in the exclude list that don't exist in the mempool are ignored.</p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>GetTreeState</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.BlockID">BlockID</a></td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.TreeState">TreeState</a></td>
|
||
<td><p>GetTreeState returns the note commitment tree state corresponding to the given block.
|
||
See section 3.7 of the zcash protocol specification. It returns several other useful
|
||
values also (even though they can be obtained using GetBlock).
|
||
The block can be specified by either height or hash.</p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>GetAddressUtxos</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.GetAddressUtxosArg">GetAddressUtxosArg</a></td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.GetAddressUtxosReplyList">GetAddressUtxosReplyList</a></td>
|
||
<td><p></p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>GetAddressUtxosStream</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.GetAddressUtxosArg">GetAddressUtxosArg</a></td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.GetAddressUtxosReply">GetAddressUtxosReply</a> stream</td>
|
||
<td><p></p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>GetLightdInfo</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.Empty">Empty</a></td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.LightdInfo">LightdInfo</a></td>
|
||
<td><p>Return information about this lightwalletd instance and the blockchain</p></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>Ping</td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.Duration">Duration</a></td>
|
||
<td><a href="#cash.z.wallet.sdk.rpc.PingResponse">PingResponse</a></td>
|
||
<td><p>Testing-only</p></td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
|
||
|
||
<h2 id="scalar-value-types">Scalar Value Types</h2>
|
||
<table class="scalar-value-types-table">
|
||
<thead>
|
||
<tr><td>.proto Type</td><td>Notes</td><td>C++</td><td>Java</td><td>Python</td><td>Go</td><td>C#</td><td>PHP</td><td>Ruby</td></tr>
|
||
</thead>
|
||
<tbody>
|
||
|
||
<tr id="double">
|
||
<td>double</td>
|
||
<td></td>
|
||
<td>double</td>
|
||
<td>double</td>
|
||
<td>float</td>
|
||
<td>float64</td>
|
||
<td>double</td>
|
||
<td>float</td>
|
||
<td>Float</td>
|
||
</tr>
|
||
|
||
<tr id="float">
|
||
<td>float</td>
|
||
<td></td>
|
||
<td>float</td>
|
||
<td>float</td>
|
||
<td>float</td>
|
||
<td>float32</td>
|
||
<td>float</td>
|
||
<td>float</td>
|
||
<td>Float</td>
|
||
</tr>
|
||
|
||
<tr id="int32">
|
||
<td>int32</td>
|
||
<td>Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.</td>
|
||
<td>int32</td>
|
||
<td>int</td>
|
||
<td>int</td>
|
||
<td>int32</td>
|
||
<td>int</td>
|
||
<td>integer</td>
|
||
<td>Bignum or Fixnum (as required)</td>
|
||
</tr>
|
||
|
||
<tr id="int64">
|
||
<td>int64</td>
|
||
<td>Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.</td>
|
||
<td>int64</td>
|
||
<td>long</td>
|
||
<td>int/long</td>
|
||
<td>int64</td>
|
||
<td>long</td>
|
||
<td>integer/string</td>
|
||
<td>Bignum</td>
|
||
</tr>
|
||
|
||
<tr id="uint32">
|
||
<td>uint32</td>
|
||
<td>Uses variable-length encoding.</td>
|
||
<td>uint32</td>
|
||
<td>int</td>
|
||
<td>int/long</td>
|
||
<td>uint32</td>
|
||
<td>uint</td>
|
||
<td>integer</td>
|
||
<td>Bignum or Fixnum (as required)</td>
|
||
</tr>
|
||
|
||
<tr id="uint64">
|
||
<td>uint64</td>
|
||
<td>Uses variable-length encoding.</td>
|
||
<td>uint64</td>
|
||
<td>long</td>
|
||
<td>int/long</td>
|
||
<td>uint64</td>
|
||
<td>ulong</td>
|
||
<td>integer/string</td>
|
||
<td>Bignum or Fixnum (as required)</td>
|
||
</tr>
|
||
|
||
<tr id="sint32">
|
||
<td>sint32</td>
|
||
<td>Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.</td>
|
||
<td>int32</td>
|
||
<td>int</td>
|
||
<td>int</td>
|
||
<td>int32</td>
|
||
<td>int</td>
|
||
<td>integer</td>
|
||
<td>Bignum or Fixnum (as required)</td>
|
||
</tr>
|
||
|
||
<tr id="sint64">
|
||
<td>sint64</td>
|
||
<td>Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.</td>
|
||
<td>int64</td>
|
||
<td>long</td>
|
||
<td>int/long</td>
|
||
<td>int64</td>
|
||
<td>long</td>
|
||
<td>integer/string</td>
|
||
<td>Bignum</td>
|
||
</tr>
|
||
|
||
<tr id="fixed32">
|
||
<td>fixed32</td>
|
||
<td>Always four bytes. More efficient than uint32 if values are often greater than 2^28.</td>
|
||
<td>uint32</td>
|
||
<td>int</td>
|
||
<td>int</td>
|
||
<td>uint32</td>
|
||
<td>uint</td>
|
||
<td>integer</td>
|
||
<td>Bignum or Fixnum (as required)</td>
|
||
</tr>
|
||
|
||
<tr id="fixed64">
|
||
<td>fixed64</td>
|
||
<td>Always eight bytes. More efficient than uint64 if values are often greater than 2^56.</td>
|
||
<td>uint64</td>
|
||
<td>long</td>
|
||
<td>int/long</td>
|
||
<td>uint64</td>
|
||
<td>ulong</td>
|
||
<td>integer/string</td>
|
||
<td>Bignum</td>
|
||
</tr>
|
||
|
||
<tr id="sfixed32">
|
||
<td>sfixed32</td>
|
||
<td>Always four bytes.</td>
|
||
<td>int32</td>
|
||
<td>int</td>
|
||
<td>int</td>
|
||
<td>int32</td>
|
||
<td>int</td>
|
||
<td>integer</td>
|
||
<td>Bignum or Fixnum (as required)</td>
|
||
</tr>
|
||
|
||
<tr id="sfixed64">
|
||
<td>sfixed64</td>
|
||
<td>Always eight bytes.</td>
|
||
<td>int64</td>
|
||
<td>long</td>
|
||
<td>int/long</td>
|
||
<td>int64</td>
|
||
<td>long</td>
|
||
<td>integer/string</td>
|
||
<td>Bignum</td>
|
||
</tr>
|
||
|
||
<tr id="bool">
|
||
<td>bool</td>
|
||
<td></td>
|
||
<td>bool</td>
|
||
<td>boolean</td>
|
||
<td>boolean</td>
|
||
<td>bool</td>
|
||
<td>bool</td>
|
||
<td>boolean</td>
|
||
<td>TrueClass/FalseClass</td>
|
||
</tr>
|
||
|
||
<tr id="string">
|
||
<td>string</td>
|
||
<td>A string must always contain UTF-8 encoded or 7-bit ASCII text.</td>
|
||
<td>string</td>
|
||
<td>String</td>
|
||
<td>str/unicode</td>
|
||
<td>string</td>
|
||
<td>string</td>
|
||
<td>string</td>
|
||
<td>String (UTF-8)</td>
|
||
</tr>
|
||
|
||
<tr id="bytes">
|
||
<td>bytes</td>
|
||
<td>May contain any arbitrary sequence of bytes.</td>
|
||
<td>string</td>
|
||
<td>ByteString</td>
|
||
<td>str</td>
|
||
<td>[]byte</td>
|
||
<td>ByteString</td>
|
||
<td>string</td>
|
||
<td>String (ASCII-8BIT)</td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
</table>
|
||
</body>
|
||
</html>
|
||
|