1
0
mirror of https://github.com/Bytom/bytom-node-sdk.git synced 2020-06-03 17:14:54 +00:00
bytom-node-sdk/docs/global.html
2018-11-26 17:02:52 +08:00

4451 lines
62 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Bytom Node.js SDK Global</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
<link type="text/css" rel="stylesheet" href="styles/site.cosmo.css">
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top ">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">Bytom Node.js SDK</a>
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="navbar-collapse collapse" id="topNavigation">
<ul class="nav navbar-nav">
<li class="dropdown">
<a href="modules.list.html" class="dropdown-toggle" data-toggle="dropdown">Modules<b class="caret"></b></a>
<ul class="dropdown-menu ">
<li><a href="module-AccessTokensApi.html">AccessTokensApi</a></li><li><a href="module-AccountsApi.html">AccountsApi</a></li><li><a href="module-AssetsApi.html">AssetsApi</a></li><li><a href="module-BalancesApi.html">BalancesApi</a></li><li><a href="module-BlockAPI.html">BlockAPI</a></li><li><a href="module-ConfigApi.html">ConfigApi</a></li><li><a href="module-KeysApi.html">KeysApi</a></li><li><a href="module-TransactionsApi.html">TransactionsApi</a></li><li><a href="module-UnspentOutputsApi.html">UnspentOutputsApi</a></li>
</ul>
</li>
<li class="dropdown">
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
<ul class="dropdown-menu ">
<li><a href="TransactionBuilder.html">TransactionBuilder</a></li>
</ul>
</li>
<li class="dropdown">
<a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
<ul class="dropdown-menu ">
<li><a href="global.html">Global</a></li>
</ul>
</li>
</ul>
<div class="col-sm-3 col-md-3">
<form class="navbar-form" role="search">
<div class="input-group">
<input type="text" class="form-control" placeholder="Search" name="q" id="search-input">
<div class="input-group-btn">
<button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="container" id="toc-content">
<div class="row">
<div class="col-md-8">
<div id="main">
<h1 class="page-title">Global</h1>
<section>
<header>
<h2>
</h2>
</header>
<article>
<div class="container-overview">
<dl class="details">
</dl>
</div>
<h3 class="subsection-title">Type Definitions</h3>
<dl>
<hr>
<dt class="name" id="AccessToken">
<h4 id="AccessToken">AccessToken</h4>
</dt>
<dd>
<div class="description">
<p>Access tokens are <code>name:secret-token</code> pairs that are granted authorization for accessing Bytom Core features.</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Object</span>
</li>
</ul>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>id</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>User specified, unique identifier.</p></td>
</tr>
<tr>
<td class="name"><code>token</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>Only returned in the response from AccessTokensApi~create.</p></td>
</tr>
<tr>
<td class="name"><code>created_at</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>Timestamp of token creation, RFC3339 formatted.</p></td>
</tr>
</tbody>
</table>
</dl>
</dl>
</dd>
<hr>
<dt class="name" id="Account">
<h4 id="Account">Account</h4>
</dt>
<dd>
<div class="description">
<p>An account is an object in Bytom that tracks ownership of assets on a
blockchain.</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Object</span>
</li>
</ul>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>id</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>Unique account identifier in one Bytom node.</p></td>
</tr>
<tr>
<td class="name"><code>alias</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>User specified, unique identifier in one Bytom node.</p></td>
</tr>
<tr>
<td class="name"><code>keys</code></td>
<td class="type">
<span class="param-type">Array.&lt;<a href="global.html#Key">Key</a>></span>
</td>
<td class="description last"><p>The list of keys used to create control programs under the account.
Signatures from these keys are required for spending funds held in the account.</p></td>
</tr>
<tr>
<td class="name"><code>key_index</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>The index of keys.</p></td>
</tr>
<tr>
<td class="name"><code>quorum</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>The number of keys required to sign transactions for the account.</p></td>
</tr>
</tbody>
</table>
</dl>
</dl>
</dd>
<hr>
<dt class="name" id="Asset">
<h4 id="Asset">Asset</h4>
</dt>
<dd>
<div class="description">
<p>An asset is a type of value that can be issued on a blockchain. All units of
a given asset are fungible. Units of an asset can be transacted directly
between parties without the involvement of the issuer.</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Object</span>
</li>
</ul>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>id</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>Globally unique identifier of the asset.
Asset specifies the asset id as the hash of:</p>
<ul>
<li>the asset's issuance program</li>
<li>the core's VM version</li>
<li>the hash of asset definition</li>
</ul></td>
</tr>
<tr>
<td class="name"><code>alias</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>User specified, unique identifier in one Bytom node.</p></td>
</tr>
<tr>
<td class="name"><code>issuanceProgram</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>keys</code></td>
<td class="type">
<span class="param-type">Array.&lt;<a href="global.html#Key">Key</a>></span>
</td>
<td class="description last"><p>The list of keys used to issue units of the asset.</p></td>
</tr>
<tr>
<td class="name"><code>quorum</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>The number of signatures required to issue new units of the asset.</p></td>
</tr>
<tr>
<td class="name"><code>defintion</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>User-specified, arbitrary/unstructured data visible across Bytom
blockchain networks. assets specify the definition in their
issuance programs, rendering the definition immutable.</p></td>
</tr>
</tbody>
</table>
</dl>
</dl>
</dd>
<hr>
<dt class="name" id="Balance">
<h4 id="Balance">Balance</h4>
</dt>
<dd>
<div class="description">
<p>Any balance on the blockchain is simply a summation of unspent outputs.</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Object</span>
</li>
</ul>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>amount</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>Sum of the unspent outputs.</p></td>
</tr>
<tr>
<td class="name"><code>account_alias</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>Account alias.</p></td>
</tr>
<tr>
<td class="name"><code>account_id</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>Account id.</p></td>
</tr>
<tr>
<td class="name"><code>asset_id</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>Asset id.</p></td>
</tr>
<tr>
<td class="name"><code>asset_alias</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>Asset alias.</p></td>
</tr>
<tr>
<td class="name"><code>asset_definition</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>Asset definition</p></td>
</tr>
</tbody>
</table>
</dl>
</dl>
</dd>
<hr>
<dt class="name" id="BlockInfo">
<h4 id="BlockInfo">BlockInfo</h4>
</dt>
<dd>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Object</span>
</li>
</ul>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>hash</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>hash of block.</p></td>
</tr>
<tr>
<td class="name"><code>size</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"><p>size of block.</p></td>
</tr>
<tr>
<td class="name"><code>version</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"><p>version of block.</p></td>
</tr>
<tr>
<td class="name"><code>height</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"><p>height of block.</p></td>
</tr>
<tr>
<td class="name"><code>previous_block_hash</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>previous block hash.</p></td>
</tr>
<tr>
<td class="name"><code>timestamp</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"><p>timestamp of block.</p></td>
</tr>
<tr>
<td class="name"><code>nonce</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"><p>nonce value.</p></td>
</tr>
<tr>
<td class="name"><code>bits</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"><p>bits of difficulty.</p></td>
</tr>
<tr>
<td class="name"><code>difficulty</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>difficulty value(String type).</p></td>
</tr>
<tr>
<td class="name"><code>transaction_merkle_root</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>merkle root of transaction.</p></td>
</tr>
<tr>
<td class="name"><code>transaction_status_hash</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>merkle root of transaction status.</p></td>
</tr>
<tr>
<td class="name"><code>transactions</code></td>
<td class="type">
<span class="param-type">Array.&lt;Object></span>
</td>
<td class="description last"><p>transaction object:</p>
<h6>Properties</h6>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>id</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>transaction id, hash of the transaction.</p></td>
</tr>
<tr>
<td class="name"><code>version</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"><p>version of transaction.</p></td>
</tr>
<tr>
<td class="name"><code>size</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"><p>size of transaction.</p></td>
</tr>
<tr>
<td class="name"><code>time_range</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"><p>the unix timestamp for when the requst was responsed.</p></td>
</tr>
<tr>
<td class="name"><code>status_fail</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="description last"><p>whether the state of the request has failed.</p></td>
</tr>
<tr>
<td class="name"><code>mux_id</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>the previous transaction mux id(source id of utxo).</p></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>inputs</code></td>
<td class="type">
<span class="param-type">Array.&lt;Object></span>
</td>
<td class="description last"><p>object of inputs for the transaction.</p>
<h6>Properties</h6>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>the type of input action, available option include: 'spend', 'issue', 'coinbase'.</p></td>
</tr>
<tr>
<td class="name"><code>asset_id</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>asset id.</p></td>
</tr>
<tr>
<td class="name"><code>asset_alias</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>name of asset.</p></td>
</tr>
<tr>
<td class="name"><code>asset_definition</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>definition of asset(json object).</p></td>
</tr>
<tr>
<td class="name"><code>amount</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"><p>amount of asset.</p></td>
</tr>
<tr>
<td class="name"><code>issuance_program</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>issuance program, it only exist when type is 'issue'.</p></td>
</tr>
<tr>
<td class="name"><code>control_program</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>control program of account, it only exist when type is 'spend'.</p></td>
</tr>
<tr>
<td class="name"><code>address</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>address of account, it only exist when type is 'spend'.</p></td>
</tr>
<tr>
<td class="name"><code>spent_output_id</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>the front of outputID to be spent in this input, it only exist when type is 'spend'.</p></td>
</tr>
<tr>
<td class="name"><code>account_id</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>account id.</p></td>
</tr>
<tr>
<td class="name"><code>account_alias</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>name of account.</p></td>
</tr>
<tr>
<td class="name"><code>arbitrary</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>arbitrary infomation can be set by miner, it only exist when type is 'coinbase'.</p></td>
</tr>
<tr>
<td class="name"><code>input_id</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>hash of input action.</p></td>
</tr>
<tr>
<td class="name"><code>witness_arguments</code></td>
<td class="type">
<span class="param-type">Array.&lt;String></span>
</td>
<td class="description last"><p>witness arguments.</p></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>outputs</code></td>
<td class="type">
<span class="param-type">Array.&lt;Object></span>
</td>
<td class="description last"><p>object of outputs for the transaction.</p>
<h6>Properties</h6>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>the type of output action, available option include: 'retire', 'control'.</p></td>
</tr>
<tr>
<td class="name"><code>id</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>outputid related to utxo.</p></td>
</tr>
<tr>
<td class="name"><code>position</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"><p>position of outputs.</p></td>
</tr>
<tr>
<td class="name"><code>asset_id</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>asset id.</p></td>
</tr>
<tr>
<td class="name"><code>asset_alias</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>name of asset.</p></td>
</tr>
<tr>
<td class="name"><code>asset_definition</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>definition of asset(json object).</p></td>
</tr>
<tr>
<td class="name"><code>amount</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"><p>amount of asset.</p></td>
</tr>
<tr>
<td class="name"><code>account_id</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>account id.</p></td>
</tr>
<tr>
<td class="name"><code>account_alias</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>name of account.</p></td>
</tr>
<tr>
<td class="name"><code>control_program</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>control program of account.</p></td>
</tr>
<tr>
<td class="name"><code>address</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>address of account.</p></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</dl>
</dl>
</dd>
<hr>
<dt class="name" id="CoreInfo">
<h4 id="CoreInfo">CoreInfo</h4>
</dt>
<dd>
<div class="description">
<p>Basic information about the configuration of Bytom Core, as well as any
errors encountered when updating the local state of the blockchain</p>
<p>More info: {}</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Object</span>
</li>
</ul>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>listening</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="description last"><p>whether the node is listening.</p></td>
</tr>
<tr>
<td class="name"><code>syncing</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="description last"><p>whether the node is syncing.</p></td>
</tr>
<tr>
<td class="name"><code>mining</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="description last"><p>whether the node is mining.</p></td>
</tr>
<tr>
<td class="name"><code>peer_count</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"><p>current count of connected peers.</p></td>
</tr>
<tr>
<td class="name"><code>current_block</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"><p>current block height in the node's blockchain.</p></td>
</tr>
<tr>
<td class="name"><code>highest_block</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"><p>current highest block of the connected peers.</p></td>
</tr>
<tr>
<td class="name"><code>network_id</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>network id.</p></td>
</tr>
<tr>
<td class="name"><code>version_info</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>bytomd version information:</p></td>
</tr>
<tr>
<td class="name"><code>version</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>current version of the running bytomd.</p></td>
</tr>
<tr>
<td class="name"><code>update</code></td>
<td class="type">
<span class="param-type">uint16</span>
</td>
<td class="description last"><p>whether there exists an update.
0: no update;
1: small update;
2: significant update.</p></td>
</tr>
<tr>
<td class="name"><code>new_version</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>the newest version of bytomd if there is one.</p></td>
</tr>
</tbody>
</table>
</dl>
</dl>
</dd>
<hr>
<dt class="name" id="Key">
<h4 id="Key">Key</h4>
</dt>
<dd>
<div class="description">
<p>Cryptographic private keys are the primary authorization mechanism on a
blockchain.</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Object</span>
</li>
</ul>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>alias</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>User specified, unique identifier of the key.</p></td>
</tr>
<tr>
<td class="name"><code>xpub</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>Hex-encoded string representation of the key.</p></td>
</tr>
</tbody>
</table>
</dl>
</dl>
</dd>
<hr>
<dt class="name" id="Receiver">
<h4 id="Receiver">Receiver</h4>
</dt>
<dd>
<div class="description">
<p>A receiver is an object that wraps an account control program with the corresponding address.</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Object</span>
</li>
</ul>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>control_program</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>The underlying control program that will be used in transactions paying to the address.</p></td>
</tr>
<tr>
<td class="name"><code>address</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>The target address one transaction can pay UTXO to.</p></td>
</tr>
</tbody>
</table>
</dl>
</dl>
</dd>
<hr>
<dt class="name" id="Transaction">
<h4 id="Transaction">Transaction</h4>
</dt>
<dd>
<div class="description">
<p>A blockchain consists of an immutable set of cryptographically linked
transactions. Each transaction contains one or more actions.</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Object</span>
</li>
</ul>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>tx_id</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>Unique transaction identifier.</p></td>
</tr>
<tr>
<td class="name"><code>block_time</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>Time of transaction.</p></td>
</tr>
<tr>
<td class="name"><code>inputs</code></td>
<td class="type">
<span class="param-type">Array.&lt;<a href="global.html#TransactionInput">TransactionInput</a>></span>
</td>
<td class="description last"><p>List of specified inputs for a transaction.</p></td>
</tr>
<tr>
<td class="name"><code>outputs</code></td>
<td class="type">
<span class="param-type">Array.&lt;<a href="global.html#TransactionOutput">TransactionOutput</a>></span>
</td>
<td class="description last"><p>List of specified outputs for a transaction.</p></td>
</tr>
</tbody>
</table>
</dl>
</dl>
</dd>
<hr>
<dt class="name" id="TransactionInput">
<h4 id="TransactionInput">TransactionInput</h4>
</dt>
<dd>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Object</span>
</li>
</ul>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>The type of the input. Possible values are &quot;issue&quot;, &quot;spend&quot;.</p></td>
</tr>
<tr>
<td class="name"><code>asset_id</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>The id of the asset being issued or spent.</p></td>
</tr>
<tr>
<td class="name"><code>asset_alias</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>The alias of the asset being issued or spent (possibly null).</p></td>
</tr>
<tr>
<td class="name"><code>asset_definition</code></td>
<td class="type">
<span class="param-type">Hash</span>
</td>
<td class="description last"><p>The definition of the asset being issued or spent (possibly null).</p></td>
</tr>
<tr>
<td class="name"><code>amount</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"><p>The number of units of the asset being issued or spent.</p></td>
</tr>
<tr>
<td class="name"><code>spentOutputId</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>The id of the output consumed by this input. ID is nil if this is an issuance input.</p></td>
</tr>
<tr>
<td class="name"><code>account_id</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>The id of the account transferring the asset (possibly null if the
input is an issuance or an unspent output is specified).</p></td>
</tr>
<tr>
<td class="name"><code>account_alias</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>The alias of the account transferring the asset (possibly null if the
input is an issuance or an unspent output is specified).</p></td>
</tr>
<tr>
<td class="name"><code>issuance_program</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>A program specifying a predicate for issuing an asset (possibly null
if input is not an issuance).</p></td>
</tr>
<tr>
<td class="name"><code>control_program</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>A UTXO control program.</p></td>
</tr>
<tr>
<td class="name"><code>address</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>The UTXO address.</p></td>
</tr>
</tbody>
</table>
</dl>
</dl>
</dd>
<hr>
<dt class="name" id="TransactionOutput">
<h4 id="TransactionOutput">TransactionOutput</h4>
</dt>
<dd>
<div class="description">
<p>Each new transaction in the blockchain consumes some unspent outputs and
creates others. An output is considered unspent when it has not yet been used
as an input to a new transaction. All asset units on a blockchain exist in
the unspent output set.</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Object</span>
</li>
</ul>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>id</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>The id of the output.</p></td>
</tr>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>The type of the output. Possible values are &quot;control&quot; and &quot;retire&quot;.</p></td>
</tr>
<tr>
<td class="name"><code>transaction_id</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>Id of the transaction.</p></td>
</tr>
<tr>
<td class="name"><code>position</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>The output's position in a transaction's list of outputs.</p></td>
</tr>
<tr>
<td class="name"><code>asset_id</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>The id of the asset being issued or spent.</p></td>
</tr>
<tr>
<td class="name"><code>asset_alias</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>The alias of the asset being issued or spent (possibly null).</p></td>
</tr>
<tr>
<td class="name"><code>asset_definition</code></td>
<td class="type">
<span class="param-type">Hash</span>
</td>
<td class="description last"><p>The definition of the asset being issued or spent (possibly null).</p></td>
</tr>
<tr>
<td class="name"><code>amount</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"><p>The number of units of the asset being issued or spent.</p></td>
</tr>
<tr>
<td class="name"><code>account_id</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>The id of the account transferring the asset (possibly null).</p></td>
</tr>
<tr>
<td class="name"><code>account_alias</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>The alias of the account transferring the asset (possibly null).</p></td>
</tr>
<tr>
<td class="name"><code>control_program</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>The control program which must be satisfied to transfer this output.</p></td>
</tr>
</tbody>
</table>
</dl>
</dl>
</dd>
<hr>
<dt class="name" id="UnspentOutput">
<h4 id="UnspentOutput">UnspentOutput</h4>
</dt>
<dd>
<div class="description">
<p>Each new transaction in the blockchain consumes some unspent outputs and
creates others. An output is considered unspent when it has not yet been used
as an input to a new transaction. All asset units on a blockchain exist in
the unspent output set.</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Object</span>
</li>
</ul>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>account_alias</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>The alias of the account transferring the asset (possibly null).</p></td>
</tr>
<tr>
<td class="name"><code>account_id</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>The id of the account transferring the asset (possibly null).</p></td>
</tr>
<tr>
<td class="name"><code>address</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>The output address.</p></td>
</tr>
<tr>
<td class="name"><code>id</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>Unique transaction identifier.</p></td>
</tr>
<tr>
<td class="name"><code>amount</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>The number of units of the asset being issued or spent.</p></td>
</tr>
<tr>
<td class="name"><code>asset_alias</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>The alias of the asset being issued or spent (possibly null).</p></td>
</tr>
<tr>
<td class="name"><code>asset_id</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>The id of the asset being issued or spent.</p></td>
</tr>
<tr>
<td class="name"><code>source_pos</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>The output's position in a transaction's list of outputs.</p></td>
</tr>
<tr>
<td class="name"><code>change</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="description last"><p>Whether this output is asset change of one spend.</p></td>
</tr>
<tr>
<td class="name"><code>control_program_index</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>Control program index.</p></td>
</tr>
<tr>
<td class="name"><code>program</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>The control program which must be satisfied to transfer this output.</p></td>
</tr>
<tr>
<td class="name"><code>source_id</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>The source unspent output id.</p></td>
</tr>
<tr>
<td class="name"><code>valid_height</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>It means coinbase utxo if valid_height &gt; 0.</p></td>
</tr>
</tbody>
</table>
</dl>
</dl>
</dd>
</dl>
</article>
</section>
</div>
</div>
<div class="clearfix"></div>
<div class="col-md-3">
<div id="toc" class="col-md-3 hidden-xs hidden-sm hidden-md"></div>
</div>
</div>
</div>
<div class="modal fade" id="searchResults">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">Search results</h4>
</div>
<div class="modal-body"></div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div>
<footer>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
on 2018-11-26T16:28:32+08:00
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
</footer>
<script src="scripts/docstrap.lib.js"></script>
<script src="scripts/toc.js"></script>
<script type="text/javascript" src="scripts/fulltext-search-ui.js"></script>
<script>
$( function () {
$( "[id*='$']" ).each( function () {
var $this = $( this );
$this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
} );
$( ".tutorial-section pre, .readme-section pre, pre.prettyprint.source" ).each( function () {
var $this = $( this );
var example = $this.find( "code" );
exampleText = example.html();
var lang = /{@lang (.*?)}/.exec( exampleText );
if ( lang && lang[1] ) {
exampleText = exampleText.replace( lang[0], "" );
example.html( exampleText );
lang = lang[1];
} else {
var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
lang = langClassMatch ? langClassMatch[1] : "javascript";
}
if ( lang ) {
$this
.addClass( "sunlight-highlight-" + lang )
.addClass( "linenums" )
.html( example.html() );
}
} );
Sunlight.highlightAll( {
lineNumbers : true,
showMenu : true,
enableDoclinks : true
} );
$.catchAnchorLinks( {
navbarOffset: 10
} );
$( "#toc" ).toc( {
anchorName : function ( i, heading, prefix ) {
return $( heading ).attr( "id" ) || ( prefix + i );
},
selectors : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4",
showAndHide : false,
smoothScrolling: true
} );
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
$( '.dropdown-toggle' ).dropdown();
$( "table" ).each( function () {
var $this = $( this );
$this.addClass('table');
} );
} );
</script>
<!--Navigation and Symbol Display-->
<!--Google Analytics-->
<script type="text/javascript">
$(document).ready(function() {
SearcherDisplay.init();
});
</script>
</body>
</html>