OSDN Git Service

update the document
authorZhiting Lin <zlin035@uottawa.ca>
Mon, 26 Nov 2018 09:02:52 +0000 (17:02 +0800)
committerZhiting Lin <zlin035@uottawa.ca>
Mon, 26 Nov 2018 09:02:52 +0000 (17:02 +0800)
16 files changed:
README.md
docs/TransactionBuilder.html [new file with mode: 0644]
docs/classes.list.html [new file with mode: 0644]
docs/global.html
docs/index.html
docs/module-AccessTokensApi.html
docs/module-AccountsApi.html
docs/module-AssetsApi.html
docs/module-BalancesApi.html
docs/module-BlockAPI.html [new file with mode: 0644]
docs/module-ConfigApi.html [new file with mode: 0644]
docs/module-KeysApi.html
docs/module-TransactionsApi.html
docs/module-UnspentOutputsApi.html
docs/modules.list.html
docs/quicksearch.html

index f89cf65..4f03f6c 100644 (file)
--- a/README.md
+++ b/README.md
@@ -2,48 +2,62 @@
 
 ## Terminology
 
-### [Keys](https://bytom.github.io/node-sdk/global.html#Key__anchor)
+### [Keys](https://bytom.github.io/bytom-node-sdk/global.html#Key__anchor)
 
 Cryptographic keys are the primary authorization mechanism on a blockchain.
 
 To create accounts or assets, xpub of keys are required. With this sdk, we can
-`create/delete/list/resetPassword` the key. Please check the 
-[API doc](https://bytom.github.io/node-sdk/module-KeysApi.html) if you want
+`create/delete/listAll/resetPassword/checkPassword` the key. Please check the 
+[API doc](https://bytom.github.io/bytom-node-sdk/module-KeysApi.html) if you want
 to operate with keys.
 
-### [Account](https://bytom.github.io/node-sdk/global.html#Account__anchor)
+### [Account](https://bytom.github.io/bytom-node-sdk/global.html#Account__anchor)
 
 An account is an object in Bytom that tracks ownership of assets on a blockchain. 
 It's defined under one Bytom node created with one or serveral keys.  
 
-[Related API](https://bytom.github.io/node-sdk/module-AccountsApi.html)
+[Related API](https://bytom.github.io/bytom-node-sdk/module-AccountsApi.html)
 
-### [Asset](https://bytom.github.io/node-sdk/global.html#Asset__anchor)
+### [Asset](https://bytom.github.io/bytom-node-sdk/global.html#Asset__anchor)
 
 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.
 
-[Related API](https://bytom.github.io/node-sdk/module-AssetsApi.html)
+[Related API](https://bytom.github.io/bytom-node-sdk/module-AssetsApi.html)
 
-### [Transaction](https://bytom.github.io/node-sdk/global.html#Transaction__anchor)
+### [Transaction](https://bytom.github.io/bytom-node-sdk/global.html#Transaction__anchor)
 
 Blockchain is chain of blocks, while block consists of numbers of transactions.
 
-[Related API](https://bytom.github.io/node-sdk/module-TransactionsApi.html)
+[Related API](https://bytom.github.io/bytom-node-sdk/module-TransactionsApi.html)
 
-### [Unspent Output(UTXO)](https://bytom.github.io/node-sdk/global.html#UnspentOutput__anchor)
+### [Unspent Output(UTXO)](https://bytom.github.io/bytom-node-sdk/global.html#UnspentOutput__anchor)
 
 Bytom is UTXO based blockchain. One transaction spend some UTXOs, and produces new UTXOs.
 
-[Related API](https://bytom.github.io/node-sdk/module-UnspentOutputsApi.html)
+[Related API](https://bytom.github.io/bytom-node-sdk/module-UnspentOutputsApi.html)
 
-### [Balance](https://bytom.github.io/node-sdk/global.html#Balance__anchor)
+### [Balance](https://bytom.github.io/bytom-node-sdk/global.html#Balance__anchor)
 
 Any balance on the blockchain is simply a summation of UTXOs. In one bytomd, balance means
 summation of UTXOs of one account.
 
-[Related API](https://bytom.github.io/node-sdk/module-BalancesApi.html)
+[Related API](https://bytom.github.io/bytom-node-sdk/module-BalancesApi.html)
+
+### [Block](https://bytom.github.io/bytom-node-sdk/global.html#Block__anchor)
+
+​    A block is a container data structure that aggregates transactions for inclusion in the public ledger, the blockchain.
+ It is made of a header, containing metadata, followed by a long list of transactions that make up the bulk of its size.
+  Each block references to the previous block, and all the blocks are linked from the back to the front to grow a blockchain.
+
+[Related API](https://bytom.github.io/bytom-node-sdk/module-BlockApi.html)
+
+### [Config](https://bytom.github.io/bytom-node-sdk/global.html#Config__anchor)
+
+Config contain the network information that you wanted to know.  
+
+[Related API](https://bytom.github.io/bytom-node-sdk/module-ConfigApi.html)
 
 ## Usage
 
@@ -67,7 +81,10 @@ We will walk you through the process to issue some assets.
 ### Step 1: create a key
 
 ```javascript
-const keyPromise = client.keys.create('alias', 'password')
+const keyPromise = client.keys.create({ 
+          alias:'key', 
+          password: 'password'
+         })
 ```
 
 It will create a key whose alias is 'alias' while password is 'password'.
@@ -76,7 +93,11 @@ It will create a key whose alias is 'alias' while password is 'password'.
 
 ```javascript
 const accountPromise = keyPromise.then(key => {
- client.accounts.create([key.xpub], 1, 'account')
+ client.accounts.create({
+     alias: 'account', 
+     root_xpubs: [key.xpub], 
+     quorum: 1 
+ })
 })
 ```
 
@@ -84,7 +105,9 @@ const accountPromise = keyPromise.then(key => {
 
 ```javascript
 const addressPromise = accountPromise.then(account => {
-  return client.accounts.createReceiverById(account.id)
+  return client.accounts.createReceiver({
+    account_alias: account.alias
+  })
 })
 ```
 
@@ -93,12 +116,19 @@ const addressPromise = accountPromise.then(account => {
 ```javascript
 const definition = {
   name: "GOLD",
-  symobol: "GOLD",
+  symbol: "GOLD",
   decimals: 8,
   description: {}
 }
+
 const assetPromise = keyPromise.then(key => {
-  return client.assets.create([key.xpub], 1, 'asset', definition)
+  return client.assets.create(
+    {
+     alias: 'asset',
+     definition,
+     root_xpubs: [key.xpub],
+     quorum: 1
+    })
 })
 ```
 
@@ -113,27 +143,27 @@ const buildPromise = Promise.all([
   assetPromise]
   ).then(([account, address, asset]) => {
   const issueAction = {
-    amount: 10000000000,
+    amount: 100000000,
     asset_alias: asset.alias,
-    type: 'issue'
   }
 
   const gasAction = {
-    type: 'spend_account',
     account_alias: account.alias,
     asset_alias: 'BTM',
     amount: 50000000
   }
 
   const controlAction = {
-    type: 'control_address',
-    amount: 10000000000,
+    amount: 100000000,
     asset_alias: asset.alias,
     address: address.address
   }
   
-  return client.transactions.build(null,
-  [issueAction, gasAction, controlAction])
+  return client.transactions.build(builder => {
+      builder.issue(issueAction)
+      builder.spendFromAccount(gasAction)
+      builder.controlWithAddress(controlAction)
+  })
 })
 
 ```
@@ -142,7 +172,10 @@ const buildPromise = Promise.all([
 
 ```javascript
 const signPromise = buildPromise.then(transactionTemplate => {
-  return client.transactions.sign(transactionTemplate, 'password')
+  return client.transactions.sign({
+    transaction: transactionTemplate, 
+    password: 'password'
+  })
 })
 ```
 
diff --git a/docs/TransactionBuilder.html b/docs/TransactionBuilder.html
new file mode 100644 (file)
index 0000000..0df55f3
--- /dev/null
@@ -0,0 +1,1902 @@
+<!DOCTYPE html>
+
+<html lang="en">
+<head>
+       <meta charset="utf-8">
+       <meta name="viewport" content="width=device-width">
+       <title>Bytom Node.js SDK Class: TransactionBuilder</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">Class: TransactionBuilder</h1>
+<section>
+
+<header>
+    
+        <h2>
+        TransactionBuilder
+        </h2>
+        
+            <div class="class-description"><p>A convenience class for building transaction template objects.</p></div>
+        
+    
+</header>
+
+
+<article>
+    <div class="container-overview">
+    
+        
+<hr>
+<dt>
+    <h4 class="name" id="TransactionBuilder"><span class="type-signature"></span>new TransactionBuilder()</h4>
+    
+    
+</dt>
+<dd>
+
+    
+    <div class="description">
+        <p>constructor - return a new object used for constructing a transaction.</p>
+    </div>
+    
+
+    
+
+    
+
+    
+    
+
+    
+<dl class="details">
+    
+
+       
+
+       
+
+       
+
+    
+
+    
+
+    
+
+    
+
+       
+
+       
+
+       
+
+       
+
+       
+
+
+
+       
+
+       
+
+       
+
+       
+</dl>
+
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+</dd>
+
+    
+    </div>
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+        <h3 class="subsection-title">Members</h3>
+
+        <dl>
+            
+<hr>
+<dt class="name" id="baseTransaction">
+    <h4 id="baseTransaction"><span class="type-signature"></span>baseTransaction<span class="type-signature"> :Object</span></h4>
+
+    
+</dt>
+<dd>
+    
+    <div class="description">
+        <p>Base data for the transaction, default is null.</p>
+    </div>
+    
+
+    
+        <h5>Type:</h5>
+        <ul>
+            <li>
+                
+<span class="param-type">Object</span>
+
+
+
+            </li>
+        </ul>
+    
+
+    
+<dl class="details">
+    
+
+       
+
+       
+
+       
+
+    
+
+    
+
+    
+
+    
+
+       
+
+       
+
+       
+
+       
+
+       
+
+
+
+       
+
+       
+
+       
+
+       
+</dl>
+
+
+    
+</dd>
+
+        
+            
+<hr>
+<dt class="name" id="ttl">
+    <h4 id="ttl"><span class="type-signature"></span>ttl<span class="type-signature"> :Integer</span></h4>
+
+    
+</dt>
+<dd>
+    
+    <div class="description">
+        <p>Integer of the time to live in milliseconds, it means utxo will be reserved(locked) for
+builded transaction in this time range, if the transaction will not to be submitted into block,
+it will be auto unlocked for build transaction again after this ttl time. it will be set to
+5 minutes(300 seconds) defaultly when ttl is 0.</p>
+    </div>
+    
+
+    
+        <h5>Type:</h5>
+        <ul>
+            <li>
+                
+<span class="param-type">Integer</span>
+
+
+
+            </li>
+        </ul>
+    
+
+    
+<dl class="details">
+    
+
+       
+
+       
+
+       
+
+    
+
+    
+
+    
+
+    
+
+       
+
+       
+
+       
+
+       
+
+       
+
+
+
+       
+
+       
+
+       
+
+       
+</dl>
+
+
+    
+</dd>
+
+        </dl>
+    
+
+    
+        <h3 class="subsection-title">Methods</h3>
+
+        <dl>
+            
+<hr>
+<dt>
+    <h4 class="name" id="controlWithAddress"><span class="type-signature"></span>controlWithAddress(params)</h4>
+    
+    
+</dt>
+<dd>
+
+    
+    <div class="description">
+        <p>Add an action that controls assets with an account specified by identifier.</p>
+    </div>
+    
+
+    
+
+    
+
+    
+    
+        <h5>Parameters:</h5>
+        
+
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>params</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>Action parameters.</p>
+                <h6 class="method-params-label method-subparams-label">Properties</h6>
+                
+
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <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 specifying the asset to be controlled.
+                                  You must specify either an ID or an alias.</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 specifying the account controlling the asset.
+                                  You must specify either an ID or an alias.</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>Account address specifying the account controlling the asset.
+                                  You must specify either an ID or an alias.</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>Amount of the asset to be controlled.</p></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+            </td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+    
+
+    
+<dl class="details">
+    
+
+       
+
+       
+
+       
+
+    
+
+    
+
+    
+
+    
+
+       
+
+       
+
+       
+
+       
+
+       
+
+
+
+       
+
+       
+
+       
+
+       
+</dl>
+
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+</dd>
+
+        
+            
+<hr>
+<dt>
+    <h4 class="name" id="controlWithControlProgram"><span class="type-signature"></span>controlWithControlProgram(params)</h4>
+    
+    
+</dt>
+<dd>
+
+    
+    <div class="description">
+        <p>Add an action that controls assets with a receiver.</p>
+    </div>
+    
+
+    
+
+    
+
+    
+    
+        <h5>Parameters:</h5>
+        
+
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>params</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>Action parameters.</p>
+                <h6 class="method-params-label method-subparams-label">Properties</h6>
+                
+
+<table class="params 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">Object</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>The receiver object in which assets will be controlled.</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 specifying the asset to be controlled.
+                                  You must specify either an ID or an alias.</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 specifying the asset to be controlled.
+                                  You must specify either an ID or an alias.</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>Amount of the asset to be controlled.</p></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+            </td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+    
+
+    
+<dl class="details">
+    
+
+       
+
+       
+
+       
+
+    
+
+    
+
+    
+
+    
+
+       
+
+       
+
+       
+
+       
+
+       
+
+
+
+       
+
+       
+
+       
+
+       
+</dl>
+
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+</dd>
+
+        
+            
+<hr>
+<dt>
+    <h4 class="name" id="issue"><span class="type-signature"></span>issue(params)</h4>
+    
+    
+</dt>
+<dd>
+
+    
+    <div class="description">
+        <p>Add an action that issues assets.</p>
+    </div>
+    
+
+    
+
+    
+
+    
+    
+        <h5>Parameters:</h5>
+        
+
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>params</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>Action parameters.</p>
+                <h6 class="method-params-label method-subparams-label">Properties</h6>
+                
+
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>assetId</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">String</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>Asset ID specifying the asset to be issued.
+                                  You must specify either an ID or an alias.</p></td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>assetAlias</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">String</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>Asset alias specifying the asset to be issued.
+                                     You must specify either an ID or an alias.</p></td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>amount</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">String</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>Amount of the asset to be issued.</p></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+            </td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+    
+
+    
+<dl class="details">
+    
+
+       
+
+       
+
+       
+
+    
+
+    
+
+    
+
+    
+
+       
+
+       
+
+       
+
+       
+
+       
+
+
+
+       
+
+       
+
+       
+
+       
+</dl>
+
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+</dd>
+
+        
+            
+<hr>
+<dt>
+    <h4 class="name" id="retire"><span class="type-signature"></span>retire(params)</h4>
+    
+    
+</dt>
+<dd>
+
+    
+    <div class="description">
+        <p>Add an action that retires units of an asset.</p>
+    </div>
+    
+
+    
+
+    
+
+    
+    
+        <h5>Parameters:</h5>
+        
+
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>params</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>Action parameters.</p>
+                <h6 class="method-params-label method-subparams-label">Properties</h6>
+                
+
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <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 specifying the asset to be retired.
+                                  You must specify either an ID or an alias.</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 specifying the asset to be retired.
+                                  You must specify either an ID or an alias.</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>Amount of the asset to be retired.</p></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+            </td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+    
+
+    
+<dl class="details">
+    
+
+       
+
+       
+
+       
+
+    
+
+    
+
+    
+
+    
+
+       
+
+       
+
+       
+
+       
+
+       
+
+
+
+       
+
+       
+
+       
+
+       
+</dl>
+
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+</dd>
+
+        
+            
+<hr>
+<dt>
+    <h4 class="name" id="spendAccountUnspentOutput"><span class="type-signature"></span>spendAccountUnspentOutput(params)</h4>
+    
+    
+</dt>
+<dd>
+
+    
+    <div class="description">
+        <p>Add an action that spends an account unspent output.</p>
+    </div>
+    
+
+    
+
+    
+
+    
+    
+        <h5>Parameters:</h5>
+        
+
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>params</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>Action parameters.</p>
+                <h6 class="method-params-label method-subparams-label">Properties</h6>
+                
+
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>output_id</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">String</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>ID of the transaction output to be spent.</p></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+            </td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+    
+
+    
+<dl class="details">
+    
+
+       
+
+       
+
+       
+
+    
+
+    
+
+    
+
+    
+
+       
+
+       
+
+       
+
+       
+
+       
+
+
+
+       
+
+       
+
+       
+
+       
+</dl>
+
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+</dd>
+
+        
+            
+<hr>
+<dt>
+    <h4 class="name" id="spendFromAccount"><span class="type-signature"></span>spendFromAccount(params)</h4>
+    
+    
+</dt>
+<dd>
+
+    
+    <div class="description">
+        <p>Add an action that spends assets from an account specified by identifier.</p>
+    </div>
+    
+
+    
+
+    
+
+    
+    
+        <h5>Parameters:</h5>
+        
+
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>params</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>Action parameters.</p>
+                <h6 class="method-params-label method-subparams-label">Properties</h6>
+                
+
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <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 specifying the asset to be spent.
+                                  You must specify either an ID or an alias.</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 specifying the asset to be spent.
+                                  You must specify either an ID or an 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 specifying the account spending the asset.
+                                  You must specify either an ID or an alias.</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 specifying the account spending the asset.
+                                  You must specify either an ID or an alias.</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>Amount of the asset to be spent.</p></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+            </td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+    
+
+    
+<dl class="details">
+    
+
+       
+
+       
+
+       
+
+    
+
+    
+
+    
+
+    
+
+       
+
+       
+
+       
+
+       
+
+       
+
+
+
+       
+
+       
+
+       
+
+       
+</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>
\ No newline at end of file
diff --git a/docs/classes.list.html b/docs/classes.list.html
new file mode 100644 (file)
index 0000000..47f4fcb
--- /dev/null
@@ -0,0 +1,303 @@
+<!DOCTYPE html>
+
+<html lang="en">
+<head>
+       <meta charset="utf-8">
+       <meta name="viewport" content="width=device-width">
+       <title>Bytom Node.js SDK Classes</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">Classes</h1>
+<section>
+
+<header>
+    
+        <h2>
+        
+        </h2>
+        
+    
+</header>
+
+
+<article>
+    <div class="container-overview">
+    
+        
+
+        
+<dl class="details">
+    
+
+       
+
+       
+
+       
+
+    
+
+    
+
+    
+
+    
+
+       
+
+       
+
+       
+
+       
+
+       
+
+
+
+       
+
+       
+
+       
+
+       
+</dl>
+
+
+        
+    
+    </div>
+
+    
+
+    
+
+    
+        <h3 class="subsection-title">Classes</h3>
+
+        <dl>
+            <dt><a href="TransactionBuilder.html">TransactionBuilder</a></dt>
+            <dd></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>
\ No newline at end of file
index 9c743b9..b529f91 100644 (file)
                        <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-KeysApi.html">KeysApi</a></li><li><a href="module-TransactionsApi.html">TransactionsApi</a></li><li><a href="module-UnspentOutputsApi.html">UnspentOutputsApi</a></li>
+                                       <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>
                        
 <dd>
     
     <div class="description">
-        <p>Access tokens are <code>name:secret-token</code> pairs that are granted authorization for accessing Chain Core features.</p>
+        <p>Access tokens are <code>name:secret-token</code> pairs that are granted authorization for accessing Bytom Core features.</p>
     </div>
     
 
@@ -1046,6 +1053,1626 @@ issuance programs, rendering the definition immutable.</p></td>
             
                 
 <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>
 
@@ -2730,7 +4357,7 @@ the unspent output set.</p>
 <span class="jsdoc-message">
        Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
        
-               on 2018-05-24T14:04:59+08:00
+               on 2018-11-26T16:28:32+08:00
        
        using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
 </span>
index e900eee..9798966 100644 (file)
                        <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-KeysApi.html">KeysApi</a></li><li><a href="module-TransactionsApi.html">TransactionsApi</a></li><li><a href="module-UnspentOutputsApi.html">UnspentOutputsApi</a></li>
+                                       <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>
                        
 
 
     <section class="readme-section">
-        <article><h1>Bytom Node.js SDK</h1><h2>Terminology</h2><h3><a href="https://bytom.github.io/node-sdk/global.html#Key__anchor">Keys</a></h3><p>Cryptographic keys are the primary authorization mechanism on a blockchain.</p>
+        <article><h1>Bytom Node.js SDK</h1><h2>Terminology</h2><h3><a href="https://bytom.github.io/bytom-node-sdk/global.html#Key__anchor">Keys</a></h3><p>Cryptographic keys are the primary authorization mechanism on a blockchain.</p>
 <p>To create accounts or assets, xpub of keys are required. With this sdk, we can
-<code>create/delete/list/resetPassword</code> the key. Please check the 
-<a href="https://bytom.github.io/node-sdk/module-KeysApi.html">API doc</a> if you want
+<code>create/delete/listAll/resetPassword/checkPassword</code> the key. Please check the 
+<a href="https://bytom.github.io/bytom-node-sdk/module-KeysApi.html">API doc</a> if you want
 to operate with keys.</p>
-<h3><a href="https://bytom.github.io/node-sdk/global.html#Account__anchor">Account</a></h3><p>An account is an object in Bytom that tracks ownership of assets on a blockchain. 
+<h3><a href="https://bytom.github.io/bytom-node-sdk/global.html#Account__anchor">Account</a></h3><p>An account is an object in Bytom that tracks ownership of assets on a blockchain. 
 It's defined under one Bytom node created with one or serveral keys.  </p>
-<p><a href="https://bytom.github.io/node-sdk/module-AccountsApi.html">Related API</a></p>
-<h3><a href="https://bytom.github.io/node-sdk/global.html#Asset__anchor">Asset</a></h3><p>An asset is a type of value that can be issued on a blockchain. All units of
+<p><a href="https://bytom.github.io/bytom-node-sdk/module-AccountsApi.html">Related API</a></p>
+<h3><a href="https://bytom.github.io/bytom-node-sdk/global.html#Asset__anchor">Asset</a></h3><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>
-<p><a href="https://bytom.github.io/node-sdk/module-AssetsApi.html">Related API</a></p>
-<h3><a href="https://bytom.github.io/node-sdk/global.html#Transaction__anchor">Transaction</a></h3><p>Blockchain is chain of blocks, while block consists of numbers of transactions.</p>
-<p><a href="https://bytom.github.io/node-sdk/module-TransactionsApi.html">Related API</a></p>
-<h3><a href="https://bytom.github.io/node-sdk/global.html#UnspentOutput__anchor">Unspent Output(UTXO)</a></h3><p>Bytom is UTXO based blockchain. One transaction spend some UTXOs, and produces new UTXOs.</p>
-<p><a href="https://bytom.github.io/node-sdk/module-UnspentOutputsApi.html">Related API</a></p>
-<h3><a href="https://bytom.github.io/node-sdk/global.html#Balance__anchor">Balance</a></h3><p>Any balance on the blockchain is simply a summation of UTXOs. In one bytomd, balance means
+<p><a href="https://bytom.github.io/bytom-node-sdk/module-AssetsApi.html">Related API</a></p>
+<h3><a href="https://bytom.github.io/bytom-node-sdk/global.html#Transaction__anchor">Transaction</a></h3><p>Blockchain is chain of blocks, while block consists of numbers of transactions.</p>
+<p><a href="https://bytom.github.io/bytom-node-sdk/module-TransactionsApi.html">Related API</a></p>
+<h3><a href="https://bytom.github.io/bytom-node-sdk/global.html#UnspentOutput__anchor">Unspent Output(UTXO)</a></h3><p>Bytom is UTXO based blockchain. One transaction spend some UTXOs, and produces new UTXOs.</p>
+<p><a href="https://bytom.github.io/bytom-node-sdk/module-UnspentOutputsApi.html">Related API</a></p>
+<h3><a href="https://bytom.github.io/bytom-node-sdk/global.html#Balance__anchor">Balance</a></h3><p>Any balance on the blockchain is simply a summation of UTXOs. In one bytomd, balance means
 summation of UTXOs of one account.</p>
-<p><a href="https://bytom.github.io/node-sdk/module-BalancesApi.html">Related API</a></p>
+<p><a href="https://bytom.github.io/bytom-node-sdk/module-BalancesApi.html">Related API</a></p>
+<h3><a href="https://bytom.github.io/bytom-node-sdk/global.html#Block__anchor">Block</a></h3><p>​    A block is a container data structure that aggregates transactions for inclusion in the public ledger, the blockchain.
+ It is made of a header, containing metadata, followed by a long list of transactions that make up the bulk of its size.
+  Each block references to the previous block, and all the blocks are linked from the back to the front to grow a blockchain.</p>
+<p><a href="https://bytom.github.io/bytom-node-sdk/module-BlockApi.html">Related API</a></p>
+<h3><a href="https://bytom.github.io/bytom-node-sdk/global.html#Config__anchor">Config</a></h3><p>Config contain the network information that you wanted to know.  </p>
+<p><a href="https://bytom.github.io/bytom-node-sdk/module-ConfigApi.html">Related API</a></p>
 <h2>Usage</h2><h3>In your code</h3><pre class="prettyprint source lang-javascript"><code>const bytom = require('bytom-sdk')
 const url = 'http://localhost:9888'
 
@@ -120,49 +133,68 @@ const url = 'http://localhost:9888'
 const accessToken = ''
 
 const client = new bytom.Client(url, accessToken)</code></pre><h2>Interaction with bytom</h2><p>We will walk you through the process to issue some assets.</p>
-<h3>Step 1: create a key</h3><pre class="prettyprint source lang-javascript"><code>const keyPromise = client.keys.create('alias', 'password')</code></pre><p>It will create a key whose alias is 'alias' while password is 'password'.</p>
+<h3>Step 1: create a key</h3><pre class="prettyprint source lang-javascript"><code>const keyPromise = client.keys.create({ 
+          alias:'key', 
+          password: 'password'
+         })</code></pre><p>It will create a key whose alias is 'alias' while password is 'password'.</p>
 <h3>Step 2: create a account</h3><pre class="prettyprint source lang-javascript"><code>const accountPromise = keyPromise.then(key => {
- client.accounts.create([key.xpub], 1, 'account')
+ client.accounts.create({
+     alias: 'account', 
+     root_xpubs: [key.xpub], 
+     quorum: 1 
+ })
 })</code></pre><h3>Step 3: create account address</h3><pre class="prettyprint source lang-javascript"><code>const addressPromise = accountPromise.then(account => {
-  return client.accounts.createReceiverById(account.id)
+  return client.accounts.createReceiver({
+    account_alias: account.alias
+  })
 })</code></pre><h3>Step 4: create asset</h3><pre class="prettyprint source lang-javascript"><code>const definition = {
   name: &quot;GOLD&quot;,
-  symobol: &quot;GOLD&quot;,
+  symbol: &quot;GOLD&quot;,
   decimals: 8,
   description: {}
 }
+
 const assetPromise = keyPromise.then(key => {
-  return client.assets.create([key.xpub], 1, 'asset', definition)
+  return client.assets.create(
+    {
+     alias: 'asset',
+     definition,
+     root_xpubs: [key.xpub],
+     quorum: 1
+    })
 })</code></pre><h3>Step 5: issue asset</h3><h4>First, build the transaction</h4><pre class="prettyprint source lang-javascript"><code>const buildPromise = Promise.all([
   accountPromise,
   addressPromise,
   assetPromise]
   ).then(([account, address, asset]) => {
   const issueAction = {
-    amount: 10000000000,
+    amount: 100000000,
     asset_alias: asset.alias,
-    type: 'issue'
   }
 
   const gasAction = {
-    type: 'spend_account',
     account_alias: account.alias,
     asset_alias: 'BTM',
     amount: 50000000
   }
 
   const controlAction = {
-    type: 'control_address',
-    amount: 10000000000,
+    amount: 100000000,
     asset_alias: asset.alias,
     address: address.address
   }
 
-  return client.transactions.build(null,
-  [issueAction, gasAction, controlAction])
+  return client.transactions.build(builder => {
+      builder.issue(issueAction)
+      builder.spendFromAccount(gasAction)
+      builder.controlWithAddress(controlAction)
+  })
 })
 </code></pre><h4>Second, sign the transaction</h4><pre class="prettyprint source lang-javascript"><code>const signPromise = buildPromise.then(transactionTemplate => {
-  return client.transactions.sign(transactionTemplate, 'password')
+  return client.transactions.sign({
+    transaction: transactionTemplate, 
+    password: 'password'
+  })
 })</code></pre><h4>Finally, submit the signed transaction to the bytom network</h4><pre class="prettyprint source lang-javascript"><code>signPromise.then(signed => {
   return client.transactions.submit(signed.transaction.raw_transaction)
 })</code></pre></article>
@@ -211,7 +243,7 @@ const assetPromise = keyPromise.then(key => {
 <span class="jsdoc-message">
        Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
        
-               on 2018-05-24T14:05:00+08:00
+               on 2018-11-26T16:28:32+08:00
        
        using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
 </span>
index 58e9c8a..973fefa 100644 (file)
                        <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-KeysApi.html">KeysApi</a></li><li><a href="module-TransactionsApi.html">TransactionsApi</a></li><li><a href="module-UnspentOutputsApi.html">UnspentOutputsApi</a></li>
+                                       <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>
                        
             
 <hr>
 <dt>
-    <h4 class="name" id="~create"><span class="type-signature">&lt;inner> </span>create(id)</h4>
+    <h4 class="name" id="~check"><span class="type-signature">&lt;inner> </span>check(params)</h4>
+    
+    
+</dt>
+<dd>
+
+    
+    <div class="description">
+        <p>Check the target access token.</p>
+    </div>
+    
+
+    
+
+    
+
+    
+    
+        <h5>Parameters:</h5>
+        
+
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>params</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>Parameters for access token check.</p>
+                <h6 class="method-params-label method-subparams-label">Properties</h6>
+                
+
+<table class="params 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 to be deleted token id.</p></td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>secret</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">String</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>secret of token, the second part of the colon division for token.</p></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+            </td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+    
+
+    
+<dl class="details">
+    
+
+       
+
+       
+
+       
+
+    
+
+    
+
+    
+
+    
+
+       
+
+       
+
+       
+
+       
+
+       
+
+
+
+       
+
+       
+
+       
+
+       
+</dl>
+
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+</dd>
+
+        
+            
+<hr>
+<dt>
+    <h4 class="name" id="~create"><span class="type-signature">&lt;inner> </span>create(params)</h4>
     
     
 </dt>
 
         <tr>
             
+                <td class="name"><code>params</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>Access Token Object.</p>
+                <h6 class="method-params-label method-subparams-label">Properties</h6>
+                
+
+<table class="params 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>
             
 
         </tr>
 
     
+
+        <tr>
+            
+                <td class="name"><code>type</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">String</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>type of token.</p></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+            </td>
+        </tr>
+
+    
     </tbody>
 </table>
 
             
 <hr>
 <dt>
-    <h4 class="name" id="~list"><span class="type-signature">&lt;inner> </span>list()</h4>
+    <h4 class="name" id="~listAll"><span class="type-signature">&lt;inner> </span>listAll()</h4>
     
     
 </dt>
 <span class="jsdoc-message">
        Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
        
-               on 2018-05-24T14:05:00+08:00
+               on 2018-11-26T16:28:32+08:00
        
        using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
 </span>
index 489565c..330cf66 100644 (file)
                        <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-KeysApi.html">KeysApi</a></li><li><a href="module-TransactionsApi.html">TransactionsApi</a></li><li><a href="module-UnspentOutputsApi.html">UnspentOutputsApi</a></li>
+                                       <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>
                        
             
 <hr>
 <dt>
-    <h4 class="name" id="~create"><span class="type-signature">&lt;inner> </span>create(xpubs, quorum, alias)</h4>
+    <h4 class="name" id="~create"><span class="type-signature">&lt;inner> </span>create(params)</h4>
     
     
 </dt>
 
         <tr>
             
-                <td class="name"><code>xpubs</code></td>
-            
-
-            <td class="type">
-            
-                
-<span class="param-type"><a href="module-AccountsApi.html#~xpubs">module:AccountsApi~xpubs</a></span>
-
-
-
-            
-            </td>
-
-            
-
-            
-
-            <td class="description last"><p>Xpub of Keys for account creation.</p></td>
-        </tr>
-
-    
-
-        <tr>
-            
-                <td class="name"><code>quorum</code></td>
-            
-
-            <td class="type">
-            
-                
-<span class="param-type"><a href="module-AccountsApi.html#~quorum">module:AccountsApi~quorum</a></span>
-
-
-
-            
-            </td>
-
-            
-
-            
-
-            <td class="description last"><p>The number of keys required to sign transactions for the account.</p></td>
-        </tr>
-
-    
-
-        <tr>
-            
-                <td class="name"><code>alias</code></td>
+                <td class="name"><code>params</code></td>
             
 
             <td class="type">
             
                 
-<span class="param-type"><a href="module-AccountsApi.html#~alias">module:AccountsApi~alias</a></span>
+<span class="param-type"><a href="module-AccountsApi.html#~createRequest">module:AccountsApi~createRequest</a></span>
 
 
 
 
             
 
-            <td class="description last"><p>Account alias.</p></td>
+            <td class="description last"><p>Parameters for account creation.</p></td>
         </tr>
 
     
             
 <hr>
 <dt>
-    <h4 class="name" id="~createReceiverById"><span class="type-signature">&lt;inner> </span>createReceiverById(accountId)</h4>
+    <h4 class="name" id="~createReceiver"><span class="type-signature">&lt;inner> </span>createReceiver(params)</h4>
     
     
 </dt>
 
         <tr>
             
-                <td class="name"><code>accountId</code></td>
+                <td class="name"><code>params</code></td>
             
 
             <td class="type">
             
                 
-<span class="param-type"><a href="module-AccountsApi.html#~id">module:AccountsApi~id</a></span>
+<span class="param-type"><a href="module-AccountsApi.html#~createReceiverRequest">module:AccountsApi~createReceiverRequest</a></span>
 
 
 
 
             
 
-            <td class="description last"><p>Id for the target account.</p></td>
+            <td class="description last"><p>Parameters for receiver creation.</p></td>
         </tr>
 
     
             
 <hr>
 <dt>
-    <h4 class="name" id="~deleteById"><span class="type-signature">&lt;inner> </span>deleteById(id)</h4>
+    <h4 class="name" id="~delete"><span class="type-signature">&lt;inner> </span>delete(params)</h4>
     
     
 </dt>
 
         <tr>
             
-                <td class="name"><code>id</code></td>
+                <td class="name"><code>params</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>Deletion information.</p>
+                <h6 class="method-params-label method-subparams-label">Properties</h6>
+                
+
+<table class="params 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_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"><a href="module-AccountsApi.html#~id">module:AccountsApi~id</a></span>
+<span class="param-type">String</span>
 
 
 
 
             
 
-            <td class="description last"><p>Target account id.</p></td>
+            <td class="description last"><p>Account alias.</p></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+            </td>
         </tr>
 
     
             
 <hr>
 <dt>
-    <h4 class="name" id="~listAddressesById"><span class="type-signature">&lt;inner> </span>listAddressesById(accountId)</h4>
+    <h4 class="name" id="~list"><span class="type-signature">&lt;inner> </span>list(params)</h4>
     
     
 </dt>
 
     
     <div class="description">
-        <p>List all addresses for one account.</p>
+        <p>List accounts whose id is the given one.</p>
     </div>
     
 
 
         <tr>
             
-                <td class="name"><code>accountId</code></td>
+                <td class="name"><code>params</code></td>
             
 
             <td class="type">
             
                 
-<span class="param-type"><a href="module-AccountsApi.html#~id">module:AccountsApi~id</a></span>
+<span class="param-type">Object</span>
 
 
 
 
             
 
-            <td class="description last"><p>Id for the target account.</p></td>
-        </tr>
-
-    
-    </tbody>
-</table>
-
-    
-
-    
-<dl class="details">
-    
-
-       
+            <td class="description last"><p>Filter and pagination information.</p>
+                <h6 class="method-params-label method-subparams-label">Properties</h6>
+                
 
-       
+<table class="params 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>
 
-       
-</dl>
 
 
-    
+            
+            </td>
 
-    
+            
 
-    
+            
 
-    
+            <td class="description last"><p>Account id.</p></td>
+        </tr>
 
     
 
-    
-    <h5>Returns:</h5>
-    
+        <tr>
+            
+                <td class="name"><code>alias</code></td>
             
-<div class="param-desc">
-    <p>target addresses response.</p>
-</div>
-
-
-
-<dl>
-    <dt>
-        Type
-    </dt>
-    <dd>
-        
-<span class="param-type">Promise.&lt;module:AccountApi~AddressInfo></span>
-
 
+            <td class="type">
+            
+                
+<span class="param-type">String</span>
 
-    </dd>
-</dl>
 
 
-        
+            
+            </td>
 
-    
-</dd>
+            
 
-        
             
-<hr>
-<dt>
-    <h4 class="name" id="~listAll"><span class="type-signature">&lt;inner> </span>listAll()</h4>
-    
-    
-</dt>
-<dd>
 
-    
-    <div class="description">
-        <p>List all accounts in the target Bytom node.</p>
-    </div>
-    
+            <td class="description last"><p>Account alias.</p></td>
+        </tr>
 
     
+    </tbody>
+</table>
 
-    
+            </td>
+        </tr>
 
     
+    </tbody>
+</table>
+
     
 
     
     
             
 <div class="param-desc">
-    <p>All accounts promise.</p>
+    <p>Target accounts promise.</p>
 </div>
 
 
             
 <hr>
 <dt>
-    <h4 class="name" id="~listById"><span class="type-signature">&lt;inner> </span>listById(id)</h4>
+    <h4 class="name" id="~listAddresses"><span class="type-signature">&lt;inner> </span>listAddresses(params)</h4>
     
     
 </dt>
 
     
     <div class="description">
-        <p>List accounts whose id is the given one.</p>
+        <p>List all addresses for one account.</p>
     </div>
     
 
 
         <tr>
             
-                <td class="name"><code>id</code></td>
+                <td class="name"><code>params</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>Filter and pagination information.</p>
+                <h6 class="method-params-label method-subparams-label">Properties</h6>
+                
+
+<table class="params 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>alias of account.</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>id of account.</p></td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>from</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Number</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>the start position of first address</p></td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>count</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Number</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>the number of returned.</p></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+            </td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+    
+
+    
+<dl class="details">
+    
+
+       
+
+       
+
+       
+
+    
+
+    
+
+    
+
+    
+
+       
+
+       
+
+       
+
+       
+
+       
+
+
+
+       
+
+       
+
+       
+
+       
+</dl>
+
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <h5>Returns:</h5>
+    
+            
+<div class="param-desc">
+    <p>target addresses response.</p>
+</div>
+
+
+
+<dl>
+    <dt>
+        Type
+    </dt>
+    <dd>
+        
+<span class="param-type">Promise.&lt;module:AccountApi~AddressInfo></span>
+
+
+
+    </dd>
+</dl>
+
+
+        
+
+    
+</dd>
+
+        
+            
+<hr>
+<dt>
+    <h4 class="name" id="~listAll"><span class="type-signature">&lt;inner> </span>listAll()</h4>
+    
+    
+</dt>
+<dd>
+
+    
+    <div class="description">
+        <p>List all accounts in the target Bytom node.</p>
+    </div>
+    
+
+    
+
+    
+
+    
+    
+
+    
+<dl class="details">
+    
+
+       
+
+       
+
+       
+
+    
+
+    
+
+    
+
+    
+
+       
+
+       
+
+       
+
+       
+
+       
+
+
+
+       
+
+       
+
+       
+
+       
+</dl>
+
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <h5>Returns:</h5>
+    
+            
+<div class="param-desc">
+    <p>All accounts promise.</p>
+</div>
+
+
+
+<dl>
+    <dt>
+        Type
+    </dt>
+    <dd>
+        
+<span class="param-type">Promise.&lt;Array.&lt;<a href="global.html#Account">Account</a>>></span>
+
+
+
+    </dd>
+</dl>
+
+
+        
+
+    
+</dd>
+
+        
+            
+<hr>
+<dt>
+    <h4 class="name" id="~updateAlias"><span class="type-signature">&lt;inner> </span>updateAlias(params)</h4>
+    
+    
+</dt>
+<dd>
+
+    
+    <div class="description">
+        <p>Update account alias.</p>
+    </div>
+    
+
+    
+
+    
+
+    
+    
+        <h5>Parameters:</h5>
+        
+
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>params</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">object</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>Parameters for account update.</p>
+                <h6 class="method-params-label method-subparams-label">Properties</h6>
+                
+
+<table class="params 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_id</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">String</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>id of account.</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>alias of account.</p></td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>new_alias</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">String</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>new alias of account.</p></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+            </td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+    
+
+    
+<dl class="details">
+    
+
+       
+
+       
+
+       
+
+    
+
+    
+
+    
+
+    
+
+       
+
+       
+
+       
+
+       
+
+       
+
+
+
+       
+
+       
+
+       
+
+       
+</dl>
+
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+</dd>
+
+        
+            
+<hr>
+<dt>
+    <h4 class="name" id="~validateAddresses"><span class="type-signature">&lt;inner> </span>validateAddresses(address)</h4>
+    
+    
+</dt>
+<dd>
+
+    
+    <div class="description">
+        <p>Validate an address for one account.</p>
+    </div>
+    
+
+    
+
+    
+
+    
+    
+        <h5>Parameters:</h5>
+        
+
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>address</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">string</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>Filter and pagination information.</p></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+    
+
+    
+<dl class="details">
+    
+
+       
+
+       
+
+       
+
+    
+
+    
+
+    
+
+    
+
+       
+
+       
+
+       
+
+       
+
+       
+
+
+
+       
+
+       
+
+       
+
+       
+</dl>
+
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <h5>Returns:</h5>
+    
+            
+<div class="param-desc">
+    <p>weather the address is local and is valid.</p>
+</div>
+
+
+
+<dl>
+    <dt>
+        Type
+    </dt>
+    <dd>
+        
+<span class="param-type">Promise.&lt;Object></span>
+
+
+
+    </dd>
+</dl>
+
+
+        
+
+    
+</dd>
+
+        </dl>
+    
+
+    
+        <h3 class="subsection-title">Type Definitions</h3>
+
+        <dl>
+                
+<hr>
+<dt class="name" id="~AddressInfo">
+    <h4 id="~AddressInfo">AddressInfo</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>account_alias</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">String</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"></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"></td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>adddress</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">String</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"></td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>change</code></td>
             
 
             <td class="type">
             
                 
-<span class="param-type"><a href="module-AccountsApi.html#~id">module:AccountsApi~id</a></span>
+<span class="param-type">Boolean</span>
 
 
 
 
             
 
-            <td class="description last"><p>Account id.</p></td>
+            <td class="description last"><p>Indicate whether this address is for change UTXO.</p></td>
         </tr>
 
     
     </tbody>
 </table>
+</dl>
 
     
 
-    
-<dl class="details">
-    
-
        
 
        
 
 
     
+</dd>
+
+            
+                
+<hr>
+<dt class="name" id="~alias">
+    <h4 id="~alias">alias</h4>
 
     
+</dt>
+<dd>
+    
+    <div class="description">
+        <p>User specified, unique identifier.</p>
+    </div>
+    
 
     
+        <h5>Type:</h5>
+        <ul>
+            <li>
+                
+<span class="param-type">String</span>
+
 
+
+            </li>
+        </ul>
     
 
     
+<dl class="details">
+    
+
+       
+
+       
+
+       
 
     
-    <h5>Returns:</h5>
+
     
-            
-<div class="param-desc">
-    <p>Target accounts promise.</p>
-</div>
 
+    
 
+    
 
-<dl>
-    <dt>
-        Type
-    </dt>
-    <dd>
-        
-<span class="param-type">Promise.&lt;Array.&lt;<a href="global.html#Account">Account</a>>></span>
+       
 
+       
 
+       
 
-    </dd>
-</dl>
+       
 
+       
 
-        
 
-    
-</dd>
 
-        </dl>
-    
+       
+
+       
+
+       
+
+       
+</dl>
+
 
     
-        <h3 class="subsection-title">Type Definitions</h3>
+</dd>
 
-        <dl>
+            
                 
 <hr>
-<dt class="name" id="~AddressInfo">
-    <h4 id="~AddressInfo">AddressInfo</h4>
+<dt class="name" id="~createReceiverRequest">
+    <h4 id="~createReceiverRequest">createReceiverRequest</h4>
 
     
 </dt>
         <th>Type</th>
 
         
+        <th>Argument</th>
+        
 
         
 
             </td>
 
             
-
-            
-
-            <td class="description last"></td>
-        </tr>
-
-    
-
-        <tr>
-            
-                <td class="name"><code>account_id</code></td>
-            
-
-            <td class="type">
-            
+                <td class="attributes">
+                
+                    &lt;optional><br>
                 
-<span class="param-type">String</span>
-
-
-
-            
-            </td>
 
+                
+                </td>
             
 
             
 
-            <td class="description last"></td>
+            <td class="description last"><p>The unique alias of the account. accountAlias or accountId must be
+provided.</p></td>
         </tr>
 
     
 
         <tr>
             
-                <td class="name"><code>adddress</code></td>
+                <td class="name"><code>account_id</code></td>
             
 
             <td class="type">
             </td>
 
             
-
-            
-
-            <td class="description last"></td>
-        </tr>
-
-    
-
-        <tr>
-            
-                <td class="name"><code>change</code></td>
-            
-
-            <td class="type">
-            
+                <td class="attributes">
+                
+                    &lt;optional><br>
                 
-<span class="param-type">Boolean</span>
-
-
-
-            
-            </td>
 
+                
+                </td>
             
 
             
 
-            <td class="description last"><p>Indicate whether this address is for change UTXO.</p></td>
+            <td class="description last"><p>The unique ID of the account. accountAlias or accountId must be
+provided.</p></td>
         </tr>
 
     
             
                 
 <hr>
-<dt class="name" id="~alias">
-    <h4 id="~alias">alias</h4>
+<dt class="name" id="~createRequest">
+    <h4 id="~createRequest">createRequest</h4>
 
     
 </dt>
 <dd>
     
-    <div class="description">
-        <p>User specified, unique identifier.</p>
-    </div>
-    
 
     
         <h5>Type:</h5>
         <ul>
             <li>
                 
-<span class="param-type">String</span>
+<span class="param-type">Object</span>
 
 
 
 <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>Argument</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="attributes">
+                
+                    &lt;optional><br>
+                
+
+                
+                </td>
+            
+
+            
+
+            <td class="description last"><p>User specified, unique identifier.</p></td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>root_xpubs</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Array.&lt;String></span>
+
+
+
+            
+            </td>
+
+            
+                <td class="attributes">
+                
+
+                
+                </td>
+            
+
+            
+
+            <td class="description last"><p>The list of keys used to create control programs under the account.</p></td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>quorum</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Number</span>
+
+
+
+            
+            </td>
+
+            
+                <td class="attributes">
+                
+
+                
+                </td>
+            
+
+            
+
+            <td class="description last"><p>The number of keys required to sign transactions for the account.</p></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+</dl>
+
+    
+
        
 
        
 <span class="jsdoc-message">
        Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
        
-               on 2018-05-24T14:05:00+08:00
+               on 2018-11-26T16:28:32+08:00
        
        using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
 </span>
index 5ace80b..1331c2d 100644 (file)
                        <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-KeysApi.html">KeysApi</a></li><li><a href="module-TransactionsApi.html">TransactionsApi</a></li><li><a href="module-UnspentOutputsApi.html">UnspentOutputsApi</a></li>
+                                       <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>
                        
             
 <hr>
 <dt>
-    <h4 class="name" id="~create"><span class="type-signature">&lt;inner> </span>create(xpubs, quorum, alias, definition)</h4>
+    <h4 class="name" id="~create"><span class="type-signature">&lt;inner> </span>create(params)</h4>
     
     
 </dt>
 
         <tr>
             
-                <td class="name"><code>xpubs</code></td>
+                <td class="name"><code>params</code></td>
             
 
             <td class="type">
             
                 
-<span class="param-type"><a href="module-AssetsApi.html#~xpubs">module:AssetsApi~xpubs</a></span>
+<span class="param-type"><a href="module-AssetsApi.html#~createRequest">module:AssetsApi~createRequest</a></span>
 
 
 
 
             
 
-            <td class="description last"><p>Keys for asseet creation.</p></td>
-        </tr>
-
-    
-
-        <tr>
-            
-                <td class="name"><code>quorum</code></td>
-            
-
-            <td class="type">
-            
-                
-<span class="param-type"><a href="module-AssetsApi.html#~quorum">module:AssetsApi~quorum</a></span>
-
-
-
-            
-            </td>
-
-            
-
-            
-
-            <td class="description last"><p>The number of keys required to sign transactions for the account.</p></td>
-        </tr>
-
-    
-
-        <tr>
-            
-                <td class="name"><code>alias</code></td>
-            
-
-            <td class="type">
-            
-                
-<span class="param-type"><a href="module-AssetsApi.html#~alias">module:AssetsApi~alias</a></span>
-
-
-
-            
-            </td>
-
-            
-
-            
-
-            <td class="description last"><p>Asset alias.</p></td>
-        </tr>
-
-    
-
-        <tr>
-            
-                <td class="name"><code>definition</code></td>
-            
-
-            <td class="type">
-            
-                
-<span class="param-type"><a href="module-AssetsApi.html#~definition">module:AssetsApi~definition</a></span>
-
-
-
-            
-            </td>
-
-            
-
-            
-
-            <td class="description last"><p>Asset definition.</p></td>
+            <td class="description last"><p>Parameters for asset creation.</p></td>
         </tr>
 
     
             
 <hr>
 <dt>
-    <h4 class="name" id="~getById"><span class="type-signature">&lt;inner> </span>getById(id)</h4>
+    <h4 class="name" id="~list"><span class="type-signature">&lt;inner> </span>list(id)</h4>
     
     
 </dt>
             <td class="type">
             
                 
-<span class="param-type"><a href="module-AssetsApi.html#~id">module:AssetsApi~id</a></span>
+<span class="param-type">module:AssetsApi~id</span>
 
 
 
             
 <hr>
 <dt>
-    <h4 class="name" id="~list"><span class="type-signature">&lt;inner> </span>list()</h4>
+    <h4 class="name" id="~listAll"><span class="type-signature">&lt;inner> </span>listAll()</h4>
     
     
 </dt>
             
 <hr>
 <dt>
-    <h4 class="name" id="~updateAlias"><span class="type-signature">&lt;inner> </span>updateAlias(id, newAlias)</h4>
+    <h4 class="name" id="~updateAlias"><span class="type-signature">&lt;inner> </span>updateAlias(params)</h4>
     
     
 </dt>
 
         <tr>
             
+                <td class="name"><code>params</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">object</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>Parameters for asset update.</p>
+                <h6 class="method-params-label method-subparams-label">Properties</h6>
+                
+
+<table class="params 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"><a href="module-AssetsApi.html#~id">module:AssetsApi~id</a></span>
+<span class="param-type">String</span>
 
 
 
 
             
 
-            <td class="description last"><p>Asset id.</p></td>
+            <td class="description last"><p>id of asset.</p></td>
         </tr>
 
     
 
         <tr>
             
-                <td class="name"><code>newAlias</code></td>
+                <td class="name"><code>alias</code></td>
             
 
             <td class="type">
 
             
 
-            <td class="description last"><p>new alias.</p></td>
+            <td class="description last"><p>new alias of asset.</p></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+            </td>
         </tr>
 
     
         <dl>
                 
 <hr>
-<dt class="name" id="~alias">
-    <h4 id="~alias">alias</h4>
+<dt class="name" id="~createRequest">
+    <h4 id="~createRequest">createRequest</h4>
 
     
 </dt>
 <dd>
     
-    <div class="description">
-        <p>User specified, unique identifier.</p>
-    </div>
-    
 
     
         <h5>Type:</h5>
         <ul>
             <li>
                 
-<span class="param-type">String</span>
+<span class="param-type">Object</span>
 
 
 
 <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>Argument</th>
+        
 
-       
-</dl>
+        
 
+        <th class="last">Description</th>
+    </tr>
+    </thead>
 
+    <tbody>
     
-</dd>
 
+        <tr>
+            
+                <td class="name"><code>alias</code></td>
             
-                
-<hr>
-<dt class="name" id="~definition">
-    <h4 id="~definition">definition</h4>
-
-    
-</dt>
-<dd>
-    
-    <div class="description">
-        <p>User-specified, asset attributes accross Bytom blockchain network.</p>
-    </div>
-    
 
-    
-        <h5>Type:</h5>
-        <ul>
-            <li>
+            <td class="type">
+            
                 
-<span class="param-type">Object</span>
-
-
-
-            </li>
-        </ul>
-    
+<span class="param-type">String</span>
 
-    
-<dl class="details">
-    
 
-       
 
-       
+            
+            </td>
 
-       
+            
+                <td class="attributes">
+                
+                    &lt;optional><br>
+                
 
-    
+                
+                </td>
+            
 
-    
+            
 
-    
+            <td class="description last"><p>User specified, unique identifier.</p></td>
+        </tr>
 
     
 
-       
-
-       
-
-       
-
-       
-
-       
-
-
-
-       
-
-       
+        <tr>
+            
+                <td class="name"><code>defintion</code></td>
+            
 
-       
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
 
-       
-</dl>
 
 
-    
-</dd>
+            
+            </td>
 
             
+                <td class="attributes">
                 
-<hr>
-<dt class="name" id="~id">
-    <h4 id="~id">id</h4>
-
-    
-</dt>
-<dd>
-    
-    <div class="description">
-        <p>Unique account identifier in one Bytom node.</p>
-    </div>
-    
-
-    
-        <h5>Type:</h5>
-        <ul>
-            <li>
+                    &lt;optional><br>
                 
-<span class="param-type">String</span>
-
-
-
-            </li>
-        </ul>
-    
-
-    
-<dl class="details">
-    
 
-       
-
-       
-
-       
-
-    
+                
+                </td>
+            
 
-    
+            
 
-    
+            <td class="description last"><p>User-specified, arbitrary/unstructured data visible across blockchain networks.</p></td>
+        </tr>
 
     
 
-       
-
-       
-
-       
-
-       
+        <tr>
+            
+                <td class="name"><code>root_xpubs</code></td>
+            
 
-       
+            <td class="type">
+            
+                
+<span class="param-type">Array.&lt;String></span>
 
 
 
-       
+            
+            </td>
 
-       
+            
+                <td class="attributes">
+                
 
-       
+                
+                </td>
+            
 
-       
-</dl>
+            
 
+            <td class="description last"><p>Optional. The list of keys used to create the asset.</p></td>
+        </tr>
 
     
-</dd>
 
+        <tr>
+            
+                <td class="name"><code>quorum</code></td>
             
-                
-<hr>
-<dt class="name" id="~quorum">
-    <h4 id="~quorum">quorum</h4>
-
-    
-</dt>
-<dd>
-    
-    <div class="description">
-        <p>The number of signatures required to issue new units of the asset.</p>
-    </div>
-    
 
-    
-        <h5>Type:</h5>
-        <ul>
-            <li>
+            <td class="type">
+            
                 
 <span class="param-type">Number</span>
 
 
 
-            </li>
-        </ul>
-    
-
-    
-<dl class="details">
-    
-
-       
-
-       
+            
+            </td>
 
-       
+            
+                <td class="attributes">
+                
 
-    
+                
+                </td>
+            
 
-    
+            
 
-    
+            <td class="description last"><p>Optional. the default value is 1, threshold of keys that must sign a transaction to spend asset units controlled by the account.</p></td>
+        </tr>
 
     
 
-       
-
-       
-
-       
-
-       
-
-       
-
-
-
-       
-
-       
+        <tr>
+            
+                <td class="name"><code>issuance_program</code></td>
+            
 
-       
+            <td class="type">
+            
+                
+<span class="param-type">String</span>
 
-       
-</dl>
 
 
-    
-</dd>
+            
+            </td>
 
             
+                <td class="attributes">
+                
+                    &lt;optional><br>
                 
-<hr>
-<dt class="name" id="~xpubs">
-    <h4 id="~xpubs">xpubs</h4>
-
-    
-</dt>
-<dd>
-    
-    <div class="description">
-        <p>The list of keys used to issue units of the asset.</p>
-    </div>
-    
 
-    
-        <h5>Type:</h5>
-        <ul>
-            <li>
                 
-<span class="param-type">Array.&lt;String></span>
+                </td>
+            
 
+            
 
+            <td class="description last"><p>Optional. User-specified, contract program.</p></td>
+        </tr>
 
-            </li>
-        </ul>
     
+    </tbody>
+</table>
+</dl>
 
     
-<dl class="details">
-    
 
        
 
 <span class="jsdoc-message">
        Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
        
-               on 2018-05-24T14:05:00+08:00
+               on 2018-11-26T16:28:32+08:00
        
        using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
 </span>
index 97b4bd1..aca9d11 100644 (file)
                        <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-KeysApi.html">KeysApi</a></li><li><a href="module-TransactionsApi.html">TransactionsApi</a></li><li><a href="module-UnspentOutputsApi.html">UnspentOutputsApi</a></li>
+                                       <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>
                        
             
 <hr>
 <dt>
-    <h4 class="name" id="~list"><span class="type-signature">&lt;inner> </span>list()</h4>
+    <h4 class="name" id="~list"><span class="type-signature">&lt;inner> </span>list(params)</h4>
+    
+    
+</dt>
+<dd>
+
+    
+    <div class="description">
+        <p>Get asset balances by account.</p>
+    </div>
+    
+
+    
+
+    
+
+    
+    
+        <h5>Parameters:</h5>
+        
+
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>params</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>Filter and pagination information.</p>
+                <h6 class="method-params-label method-subparams-label">Properties</h6>
+                
+
+<table class="params 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_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>
+
+    
+    </tbody>
+</table>
+
+            </td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+    
+
+    
+<dl class="details">
+    
+
+       
+
+       
+
+       
+
+    
+
+    
+
+    
+
+    
+
+       
+
+       
+
+       
+
+       
+
+       
+
+
+
+       
+
+       
+
+       
+
+       
+</dl>
+
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <h5>Returns:</h5>
+    
+            
+<div class="param-desc">
+    <p>The result balances.</p>
+</div>
+
+
+
+<dl>
+    <dt>
+        Type
+    </dt>
+    <dd>
+        
+<span class="param-type">Promise.&lt;Array.&lt;<a href="global.html#Balance">Balance</a>>></span>
+
+
+
+    </dd>
+</dl>
+
+
+        
+
+    
+</dd>
+
+        
+            
+<hr>
+<dt>
+    <h4 class="name" id="~listAll"><span class="type-signature">&lt;inner> </span>listAll()</h4>
     
     
 </dt>
 
     
     <div class="description">
-        <p>Get all asset balances of all accounts.</p>
+        <p>List all assets Balances in one Bytom node.</p>
     </div>
     
 
 <span class="jsdoc-message">
        Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
        
-               on 2018-05-24T14:05:00+08:00
+               on 2018-11-26T16:28:32+08:00
        
        using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
 </span>
diff --git a/docs/module-BlockAPI.html b/docs/module-BlockAPI.html
new file mode 100644 (file)
index 0000000..0bf1691
--- /dev/null
@@ -0,0 +1,1390 @@
+<!DOCTYPE html>
+
+<html lang="en">
+<head>
+       <meta charset="utf-8">
+       <meta name="viewport" content="width=device-width">
+       <title>Bytom Node.js SDK Module: BlockAPI</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">Module: BlockAPI</h1>
+<section>
+
+<header>
+    
+</header>
+
+
+<article>
+    <div class="container-overview">
+    
+        
+            <div class="description"><p>API for interacting with blocks.</p></div>
+        
+
+        
+<dl class="details">
+    
+
+       
+
+       
+
+       
+
+    
+
+    
+
+    
+
+    
+
+       
+
+       
+
+       
+
+       
+
+       
+
+
+
+       
+
+       
+
+       
+
+       
+</dl>
+
+
+        
+    
+    </div>
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+        <h3 class="subsection-title">Methods</h3>
+
+        <dl>
+            
+<hr>
+<dt>
+    <h4 class="name" id="~getBlock"><span class="type-signature">&lt;inner> </span>getBlock(params)</h4>
+    
+    
+</dt>
+<dd>
+
+    
+    <div class="description">
+        <p>Returns the detail block by block height or block hash.</p>
+    </div>
+    
+
+    
+
+    
+
+    
+    
+        <h5>Parameters:</h5>
+        
+
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>params</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last">
+                <h6 class="method-params-label method-subparams-label">Properties</h6>
+                
+
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>block_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>block_height</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Integer</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>height of block.</p></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+            </td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+    
+
+    
+<dl class="details">
+    
+
+       
+
+       
+
+       
+
+    
+
+    
+
+    
+
+    
+
+       
+
+       
+
+       
+
+       
+
+       
+
+
+
+       
+
+       
+
+       
+
+       
+</dl>
+
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <h5>Returns:</h5>
+    
+            
+
+
+<dl>
+    <dt>
+        Type
+    </dt>
+    <dd>
+        
+<span class="param-type">Promise.&lt;<a href="global.html#BlockInfo">BlockInfo</a>></span>
+
+
+
+    </dd>
+</dl>
+
+
+        
+
+    
+</dd>
+
+        
+            
+<hr>
+<dt>
+    <h4 class="name" id="~getBlockCount"><span class="type-signature">&lt;inner> </span>getBlockCount()</h4>
+    
+    
+</dt>
+<dd>
+
+    
+    <div class="description">
+        <p>Returns the current block height for blockchain.</p>
+    </div>
+    
+
+    
+
+    
+
+    
+    
+
+    
+<dl class="details">
+    
+
+       
+
+       
+
+       
+
+    
+
+    
+
+    
+
+    
+
+       
+
+       
+
+       
+
+       
+
+       
+
+
+
+       
+
+       
+
+       
+
+       
+</dl>
+
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <h5>Returns:</h5>
+    
+            
+<div class="param-desc">
+    <p>Promise resolved on success with block_count returned.</p>
+</div>
+
+
+
+<dl>
+    <dt>
+        Type
+    </dt>
+    <dd>
+        
+<span class="param-type">Promise.&lt;Object></span>
+
+
+
+    </dd>
+</dl>
+
+
+        
+
+    
+</dd>
+
+        
+            
+<hr>
+<dt>
+    <h4 class="name" id="~getBlockHash"><span class="type-signature">&lt;inner> </span>getBlockHash()</h4>
+    
+    
+</dt>
+<dd>
+
+    
+    <div class="description">
+        <p>Returns the current block hash for blockchain.</p>
+    </div>
+    
+
+    
+
+    
+
+    
+    
+
+    
+<dl class="details">
+    
+
+       
+
+       
+
+       
+
+    
+
+    
+
+    
+
+    
+
+       
+
+       
+
+       
+
+       
+
+       
+
+
+
+       
+
+       
+
+       
+
+       
+</dl>
+
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <h5>Returns:</h5>
+    
+            
+<div class="param-desc">
+    <p>Requested info of specified Bytom Core with block_hash returned.</p>
+</div>
+
+
+
+<dl>
+    <dt>
+        Type
+    </dt>
+    <dd>
+        
+<span class="param-type">Promise.&lt;Object></span>
+
+
+
+    </dd>
+</dl>
+
+
+        
+
+    
+</dd>
+
+        
+            
+<hr>
+<dt>
+    <h4 class="name" id="~getBlockHeader"><span class="type-signature">&lt;inner> </span>getBlockHeader(params)</h4>
+    
+    
+</dt>
+<dd>
+
+    
+    <div class="description">
+        <p>Returns the detail block header by block height or block hash.</p>
+    </div>
+    
+
+    
+
+    
+
+    
+    
+        <h5>Parameters:</h5>
+        
+
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>params</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last">
+                <h6 class="method-params-label method-subparams-label">Properties</h6>
+                
+
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>block_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>block_height</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Integer</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>height of block.</p></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+            </td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+    
+
+    
+<dl class="details">
+    
+
+       
+
+       
+
+       
+
+    
+
+    
+
+    
+
+    
+
+       
+
+       
+
+       
+
+       
+
+       
+
+
+
+       
+
+       
+
+       
+
+       
+</dl>
+
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <h5>Returns:</h5>
+    
+            
+
+
+<dl>
+    <dt>
+        Type
+    </dt>
+    <dd>
+        
+<span class="param-type">Promise.&lt;Object></span>
+
+
+
+    </dd>
+</dl>
+
+
+        
+
+    
+</dd>
+
+        
+            
+<hr>
+<dt>
+    <h4 class="name" id="~getDifficulty"><span class="type-signature">&lt;inner> </span>getDifficulty(params)</h4>
+    
+    
+</dt>
+<dd>
+
+    
+    <div class="description">
+        <p>Returns the block difficulty by block height or block hash.</p>
+    </div>
+    
+
+    
+
+    
+
+    
+    
+        <h5>Parameters:</h5>
+        
+
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>params</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last">
+                <h6 class="method-params-label method-subparams-label">Properties</h6>
+                
+
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>block_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>block_height</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Integer</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>height of block.</p></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+            </td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+    
+
+    
+<dl class="details">
+    
+
+       
+
+       
+
+       
+
+    
+
+    
+
+    
+
+    
+
+       
+
+       
+
+       
+
+       
+
+       
+
+
+
+       
+
+       
+
+       
+
+       
+</dl>
+
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <h5>Returns:</h5>
+    
+            
+
+
+<dl>
+    <dt>
+        Type
+    </dt>
+    <dd>
+        
+<span class="param-type">Promise.&lt;Object></span>
+
+
+
+    </dd>
+</dl>
+
+
+        
+
+    
+</dd>
+
+        
+            
+<hr>
+<dt>
+    <h4 class="name" id="~getHashRate"><span class="type-signature">&lt;inner> </span>getHashRate(params)</h4>
+    
+    
+</dt>
+<dd>
+
+    
+    <div class="description">
+        <p>Returns the block hash rate by block height or block hash,
+it returns the current block hash rate when request is empty.</p>
+    </div>
+    
+
+    
+
+    
+
+    
+    
+        <h5>Parameters:</h5>
+        
+
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>params</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last">
+                <h6 class="method-params-label method-subparams-label">Properties</h6>
+                
+
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>block_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>block_height</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Integer</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>height of block.</p></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+            </td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+    
+
+    
+<dl class="details">
+    
+
+       
+
+       
+
+       
+
+    
+
+    
+
+    
+
+    
+
+       
+
+       
+
+       
+
+       
+
+       
+
+
+
+       
+
+       
+
+       
+
+       
+</dl>
+
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <h5>Returns:</h5>
+    
+            
+
+
+<dl>
+    <dt>
+        Type
+    </dt>
+    <dd>
+        
+<span class="param-type">Promise.&lt;Object></span>
+
+
+
+    </dd>
+</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>
\ No newline at end of file
diff --git a/docs/module-ConfigApi.html b/docs/module-ConfigApi.html
new file mode 100644 (file)
index 0000000..56536d1
--- /dev/null
@@ -0,0 +1,768 @@
+<!DOCTYPE html>
+
+<html lang="en">
+<head>
+       <meta charset="utf-8">
+       <meta name="viewport" content="width=device-width">
+       <title>Bytom Node.js SDK Module: ConfigApi</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">Module: ConfigApi</h1>
+<section>
+
+<header>
+    
+</header>
+
+
+<article>
+    <div class="container-overview">
+    
+        
+            <div class="description"><p>Bytom Core can be configured as a new blockchain network, or as a node in an
+existing blockchain network.</p>
+<p>More info: {}
+API for interacting with configs.</p></div>
+        
+
+        
+<dl class="details">
+    
+
+       
+
+       
+
+       
+
+    
+
+    
+
+    
+
+    
+
+       
+
+       
+
+       
+
+       
+
+       
+
+
+
+       
+
+       
+
+       
+
+       
+</dl>
+
+
+        
+    
+    </div>
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+        <h3 class="subsection-title">Methods</h3>
+
+        <dl>
+            
+<hr>
+<dt>
+    <h4 class="name" id="~gasRate"><span class="type-signature">&lt;inner> </span>gasRate()</h4>
+    
+    
+</dt>
+<dd>
+
+    
+    <div class="description">
+        <p>get gas rate</p>
+    </div>
+    
+
+    
+
+    
+
+    
+    
+
+    
+<dl class="details">
+    
+
+       
+
+       
+
+       
+
+    
+
+    
+
+    
+
+    
+
+       
+
+       
+
+       
+
+       
+
+       
+
+
+
+       
+
+       
+
+       
+
+       
+</dl>
+
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <h5>Returns:</h5>
+    
+            
+<div class="param-desc">
+    <p>Promise resolved with gas rate on success.</p>
+</div>
+
+
+
+<dl>
+    <dt>
+        Type
+    </dt>
+    <dd>
+        
+<span class="param-type">Promise</span>
+
+
+
+    </dd>
+</dl>
+
+
+        
+
+    
+</dd>
+
+        
+            
+<hr>
+<dt>
+    <h4 class="name" id="~netInfo"><span class="type-signature">&lt;inner> </span>netInfo()</h4>
+    
+    
+</dt>
+<dd>
+
+    
+    <div class="description">
+        <p>Get info on specified Bytom Core.</p>
+    </div>
+    
+
+    
+
+    
+
+    
+    
+
+    
+<dl class="details">
+    
+
+       
+
+       
+
+       
+
+    
+
+    
+
+    
+
+    
+
+       
+
+       
+
+       
+
+       
+
+       
+
+
+
+       
+
+       
+
+       
+
+       
+</dl>
+
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <h5>Returns:</h5>
+    
+            
+<div class="param-desc">
+    <p>Requested Net Info of specified Bytom Core.</p>
+</div>
+
+
+
+<dl>
+    <dt>
+        Type
+    </dt>
+    <dd>
+        
+<span class="param-type">Promise.&lt;<a href="global.html#CoreInfo">CoreInfo</a>></span>
+
+
+
+    </dd>
+</dl>
+
+
+        
+
+    
+</dd>
+
+        
+            
+<hr>
+<dt>
+    <h4 class="name" id="~verifyMessage"><span class="type-signature">&lt;inner> </span>verifyMessage(params)</h4>
+    
+    
+</dt>
+<dd>
+
+    
+
+    
+
+    
+
+    
+    
+        <h5>Parameters:</h5>
+        
+
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>params</code></td>
+            
+
+            <td class="type">
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last">
+                <h6 class="method-params-label method-subparams-label">Properties</h6>
+                
+
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>address</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">String</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>address for account.</p></td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>derived_xpub</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">String</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>derived xpub.</p></td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>message</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">String</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>message for signature by derived_xpub.</p></td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>signature</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">String</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>signature for message.</p></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+            </td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+    
+
+    
+<dl class="details">
+    
+
+       
+
+       
+
+       
+
+    
+
+    
+
+    
+
+    
+
+       
+
+       
+
+       
+
+       
+
+       
+
+
+
+       
+
+       
+
+       
+
+       
+</dl>
+
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <h5>Returns:</h5>
+    
+            
+<div class="param-desc">
+    <p>[Boolean] result, verify result.</p>
+</div>
+
+
+
+<dl>
+    <dt>
+        Type
+    </dt>
+    <dd>
+        
+<span class="param-type">Promise.&lt;Object></span>
+
+
+
+    </dd>
+</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>
\ No newline at end of file
index e74dfb2..b4c0cf0 100644 (file)
                        <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-KeysApi.html">KeysApi</a></li><li><a href="module-TransactionsApi.html">TransactionsApi</a></li><li><a href="module-UnspentOutputsApi.html">UnspentOutputsApi</a></li>
+                                       <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>
                        
             
 <hr>
 <dt>
-    <h4 class="name" id="~create"><span class="type-signature">&lt;inner> </span>create(alias, password)</h4>
+    <h4 class="name" id="~checkPassword"><span class="type-signature">&lt;inner> </span>checkPassword(params)</h4>
     
     
 </dt>
 
     
     <div class="description">
-        <p>Create a new key.</p>
+        <p>Reset key password.</p>
     </div>
     
 
 
         <tr>
             
-                <td class="name"><code>alias</code></td>
+                <td class="name"><code>params</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>Password checking information.</p>
+                <h6 class="method-params-label method-subparams-label">Properties</h6>
+                
+
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>xpub</code></td>
             
 
             <td class="type">
 
             
 
-            <td class="description last"><p>User specified, unique identifier.</p></td>
+            <td class="description last"><p>Hex-encoded string representation of the key.</p></td>
         </tr>
 
     
 
             
 
-            <td class="description last"><p>User specified, key password.</p></td>
+            <td class="description last"><p>password.</p></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+            </td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+    
+
+    
+<dl class="details">
+    
+
+       
+
+       
+
+       
+
+    
+
+    
+
+    
+
+    
+
+       
+
+       
+
+       
+
+       
+
+       
+
+
+
+       
+
+       
+
+       
+
+       
+</dl>
+
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+</dd>
+
+        
+            
+<hr>
+<dt>
+    <h4 class="name" id="~create"><span class="type-signature">&lt;inner> </span>create(params)</h4>
+    
+    
+</dt>
+<dd>
+
+    
+    <div class="description">
+        <p>Create a new key.</p>
+    </div>
+    
+
+    
+
+    
+
+    
+    
+        <h5>Parameters:</h5>
+        
+
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>params</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type"><a href="module-KeysApi.html#~createRequest">module:KeysApi~createRequest</a></span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>Parameters for asset creation.</p></td>
         </tr>
 
     
             
 <hr>
 <dt>
-    <h4 class="name" id="~delete"><span class="type-signature">&lt;inner> </span>delete(xpub, password)</h4>
+    <h4 class="name" id="~delete"><span class="type-signature">&lt;inner> </span>delete(params)</h4>
     
     
 </dt>
 
         <tr>
             
+                <td class="name"><code>params</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>Deletion information.</p>
+                <h6 class="method-params-label method-subparams-label">Properties</h6>
+                
+
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
                 <td class="name"><code>xpub</code></td>
             
 
     </tbody>
 </table>
 
+            </td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
     
 
     
             
 <hr>
 <dt>
-    <h4 class="name" id="~list"><span class="type-signature">&lt;inner> </span>list()</h4>
+    <h4 class="name" id="~listAll"><span class="type-signature">&lt;inner> </span>listAll()</h4>
     
     
 </dt>
             
 <hr>
 <dt>
-    <h4 class="name" id="~resetPassword"><span class="type-signature">&lt;inner> </span>resetPassword(xpub, oldPassword, newPassword)</h4>
+    <h4 class="name" id="~resetPassword"><span class="type-signature">&lt;inner> </span>resetPassword(params)</h4>
     
     
 </dt>
 
         <tr>
             
+                <td class="name"><code>params</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>Key password reset information.</p>
+                <h6 class="method-params-label method-subparams-label">Properties</h6>
+                
+
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
                 <td class="name"><code>xpub</code></td>
             
 
     </tbody>
 </table>
 
+            </td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
     
 
     
     
 
     
+        <h3 class="subsection-title">Type Definitions</h3>
+
+        <dl>
+                
+<hr>
+<dt class="name" id="~createRequest">
+    <h4 id="~createRequest">createRequest</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>Argument</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="attributes">
+                
+                    &lt;optional><br>
+                
+
+                
+                </td>
+            
+
+            
+
+            <td class="description last"><p>User specified, unique identifier.</p></td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>password</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">String</span>
+
+
+
+            
+            </td>
+
+            
+                <td class="attributes">
+                
+                    &lt;optional><br>
+                
+
+                
+                </td>
+            
+
+            
+
+            <td class="description last"><p>password of the key.</p></td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>language</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">String</span>
+
+
+
+            
+            </td>
+
+            
+                <td class="attributes">
+                
+                    &lt;optional><br>
+                
+
+                
+                </td>
+            
+
+            
+
+            <td class="description last"><p>mnemonic language of the key.</p></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+</dl>
+
+    
+
+       
+
+       
+
+       
+
+    
+
+    
+
+    
+
+    
+
+       
+
+       
+
+       
+
+       
+
+       
+
+
+
+       
+
+       
+
+       
+
+       
+</dl>
+
+
+    
+</dd>
+
+            </dl>
+    
 
     
 </article>
 <span class="jsdoc-message">
        Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
        
-               on 2018-05-24T14:05:00+08:00
+               on 2018-11-26T16:28:32+08:00
        
        using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
 </span>
index e65a763..2a17fbc 100644 (file)
                        <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-KeysApi.html">KeysApi</a></li><li><a href="module-TransactionsApi.html">TransactionsApi</a></li><li><a href="module-UnspentOutputsApi.html">UnspentOutputsApi</a></li>
+                                       <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>
                        
             
 <hr>
 <dt>
-    <h4 class="name" id="~build"><span class="type-signature">&lt;inner> </span>build(baseTransaction, actions, ttl)</h4>
+    <h4 class="name" id="~build"><span class="type-signature">&lt;inner> </span>build(builderBlock)</h4>
     
     
 </dt>
 
     
     <div class="description">
-        <p>Build an unsigned transaction from a set of actions and base transction(possibly null).</p>
+        <p>Build an unsigned transaction from a set of actions.</p>
     </div>
     
 
 
         <tr>
             
-                <td class="name"><code>baseTransaction</code></td>
-            
-
-            <td class="type">
-            
-                
-<span class="param-type">String</span>
-
-
-
-            
-            </td>
-
-            
-
-            
-
-            <td class="description last"><p>Encoded base raw transaction.</p></td>
-        </tr>
-
-    
-
-        <tr>
-            
-                <td class="name"><code>actions</code></td>
-            
-
-            <td class="type">
-            
-                
-<span class="param-type">Array.&lt;<a href="module-TransactionsApi.html#~Action">module:TransactionsApi~Action</a>></span>
-
-
-
-            
-            </td>
-
-            
-
-            
-
-            <td class="description last"><p>Set of actions to compose the transaction.</p></td>
-        </tr>
-
-    
-
-        <tr>
-            
-                <td class="name"><code>ttl</code></td>
+                <td class="name"><code>builderBlock</code></td>
             
 
             <td class="type">
             
                 
-<span class="param-type">Number</span>
+<span class="param-type"><a href="module-TransactionsApi.html#~builderCallback">module:TransactionsApi~builderCallback</a></span>
 
 
 
 
             
 
-            <td class="description last"><p>Time duration to spent UTXOs will be reserverd(can't be spent during this time duration).</p></td>
+            <td class="description last"><p>Function that adds desired actions
+                                        to a given builder object.</p></td>
         </tr>
 
     
     
             
 <div class="param-desc">
-    <ul>
-<li>Unsigned transaction template.</li>
-</ul>
+    <p>Unsigned transaction template, or error.</p>
 </div>
 
 
             
 <hr>
 <dt>
-    <h4 class="name" id="~listAll"><span class="type-signature">&lt;inner> </span>listAll()</h4>
+    <h4 class="name" id="~list"><span class="type-signature">&lt;inner> </span>list(params)</h4>
     
     
 </dt>
 
     
     <div class="description">
-        <p>List all local transactions.</p>
+        <p>List local transactions by id or filter condition.</p>
     </div>
     
 
 
     
     
+        <h5>Parameters:</h5>
+        
 
-    
-<dl class="details">
-    
-
-       
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
 
-       
+        <th>Type</th>
 
-       
+        
 
-    
+        
 
-    
+        <th class="last">Description</th>
+    </tr>
+    </thead>
 
+    <tbody>
     
 
-    
+        <tr>
+            
+                <td class="name"><code>params</code></td>
+            
 
-       
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
 
-       
 
-       
 
-       
+            
+            </td>
 
-       
+            
 
+            
 
+            <td class="description last"><p>Transaction filter params.</p>
+                <h6 class="method-params-label method-subparams-label">Properties</h6>
+                
 
-       
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
 
-       
+        <th>Type</th>
 
-       
+        
 
-       
-</dl>
+        
 
+        <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>
 
-    
 
-    
 
-    
-    <h5>Returns:</h5>
-    
             
-<div class="param-desc">
-    <p>All local transactions.</p>
-</div>
+            </td>
 
+            
 
+            
 
-<dl>
-    <dt>
-        Type
-    </dt>
-    <dd>
-        
-<span class="param-type">Promise.&lt;Array.&lt;<a href="global.html#Transaction">Transaction</a>>></span>
+            <td class="description last"><p>transaction id, hash of transaction.</p></td>
+        </tr>
 
+    
 
+        <tr>
+            
+                <td class="name"><code>account_id</code></td>
+            
 
-    </dd>
-</dl>
+            <td class="type">
+            
+                
+<span class="param-type">String</span>
 
 
-        
 
-    
-</dd>
+            
+            </td>
 
-        
             
-<hr>
-<dt>
-    <h4 class="name" id="~listByAccountId"><span class="type-signature">&lt;inner> </span>listByAccountId(accountId)</h4>
-    
-    
-</dt>
-<dd>
 
-    
-    <div class="description">
-        <p>List all local transactions by account id.</p>
-    </div>
-    
+            
 
-    
+            <td class="description last"><p>id of account.</p></td>
+        </tr>
 
     
 
+        <tr>
+            
+                <td class="name"><code>detail</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Boolean</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>flag of detail transactions, default false (only return transaction summary).</p></td>
+        </tr>
+
     
+
+        <tr>
+            
+                <td class="name"><code>unconfirmed</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Boolean</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>flag of unconfirmed transactions(query result include all confirmed
+                 and unconfirmed transactions), default false.</p></td>
+        </tr>
+
     
-        <h5>Parameters:</h5>
-        
 
-<table class="params table table-striped">
-    <thead>
-    <tr>
-        
-        <th>Name</th>
-        
+        <tr>
+            
+                <td class="name"><code>from</code></td>
+            
 
-        <th>Type</th>
+            <td class="type">
+            
+                
+<span class="param-type">Integer</span>
 
-        
 
-        
 
-        <th class="last">Description</th>
-    </tr>
-    </thead>
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>The start position of first transaction.</p></td>
+        </tr>
 
-    <tbody>
     
 
         <tr>
             
-                <td class="name"><code>accountId</code></td>
+                <td class="name"><code>count</code></td>
             
 
             <td class="type">
             
                 
-<span class="param-type">String</span>
+<span class="param-type">Integer</span>
 
 
 
 
             
 
-            <td class="description last"><p>Account id.</p></td>
+            <td class="description last"><p>The number of returned.</p></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+            </td>
         </tr>
 
     
             
 <hr>
 <dt>
-    <h4 class="name" id="~listById"><span class="type-signature">&lt;inner> </span>listById(id)</h4>
+    <h4 class="name" id="~listAll"><span class="type-signature">&lt;inner> </span>listAll()</h4>
     
     
 </dt>
 
     
     <div class="description">
-        <p>List local transactions by id.</p>
+        <p>List all local transactions.</p>
     </div>
     
 
 
     
     
-        <h5>Parameters:</h5>
-        
-
-<table class="params 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 transaction id.</p></td>
-        </tr>
-
-    
-    </tbody>
-</table>
-
-    
 
     
 <dl class="details">
     
             
 <div class="param-desc">
-    <p>The result transactions.</p>
+    <p>All local transactions.</p>
 </div>
 
 
             
 <hr>
 <dt>
-    <h4 class="name" id="~sign"><span class="type-signature">&lt;inner> </span>sign(transaction, password)</h4>
+    <h4 class="name" id="~sign"><span class="type-signature">&lt;inner> </span>sign(params)</h4>
     
     
 </dt>
 
         <tr>
             
-                <td class="name"><code>transaction</code></td>
+                <td class="name"><code>params</code></td>
             
 
             <td class="type">
 
             
 
-            <td class="description last"><p>The built transaction template.</p></td>
-        </tr>
+            <td class="description last"><p>The built transaction template.</p>
+                <h6 class="method-params-label method-subparams-label">Properties</h6>
+                
+
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
 
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
     
 
         <tr>
             <td class="type">
             
                 
+<span class="param-type">String</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>signature of the password.</p></td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>transaction</code></td>
+            
+
+            <td class="type">
+            
+                
 <span class="param-type">Object</span>
 
 
 
             
 
-            <td class="description last"><p>Password of the key which will sign the transaction template.</p></td>
+            <td class="description last"><p>builded transaction.</p></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+            </td>
         </tr>
 
     
@@ -1497,6 +1524,130 @@ Asset info(either asset_id or asset_alias ) is required for all kinds of action.
             
                 
 <hr>
+<dt>
+    <h4 class="name" id="~builderCallback"><span class="type-signature"></span>builderCallback(builder)</h4>
+    
+    
+</dt>
+<dd>
+
+    
+
+    
+
+    
+
+    
+    
+        <h5>Parameters:</h5>
+        
+
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>builder</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type"><a href="TransactionBuilder.html">TransactionBuilder</a></span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+    
+
+    
+<dl class="details">
+    
+
+       
+
+       
+
+       
+
+    
+
+    
+
+    
+
+    
+
+       
+
+       
+
+       
+
+       
+
+       
+
+
+
+       
+
+       
+
+       
+
+       
+</dl>
+
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+</dd>
+
+            
+                
+<hr>
 <dt class="name" id="~SignResult">
     <h4 id="~SignResult">SignResult</h4>
 
@@ -1690,7 +1841,7 @@ Asset info(either asset_id or asset_alias ) is required for all kinds of action.
 <span class="jsdoc-message">
        Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
        
-               on 2018-05-24T14:05:00+08:00
+               on 2018-11-26T16:28:32+08:00
        
        using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
 </span>
index 719ab7a..0dc0e4e 100644 (file)
                        <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-KeysApi.html">KeysApi</a></li><li><a href="module-TransactionsApi.html">TransactionsApi</a></li><li><a href="module-UnspentOutputsApi.html">UnspentOutputsApi</a></li>
+                                       <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>
                        
             
 <hr>
 <dt>
-    <h4 class="name" id="~list"><span class="type-signature">&lt;inner> </span>list()</h4>
+    <h4 class="name" id="~list"><span class="type-signature">&lt;inner> </span>list(params)</h4>
     
     
 </dt>
 
     
     <div class="description">
-        <p>Get all unspent outputs.</p>
+        <p>Get target unspent outputs.</p>
     </div>
     
 
 
     
     
+        <h5>Parameters:</h5>
+        
+
+<table class="params table table-striped">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>params</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>Filter and pagination information.</p>
+                <h6 class="method-params-label method-subparams-label">Properties</h6>
+                
+
+<table class="params 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>Unspent output id.</p></td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>unconfirmed</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Boolean</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>is include unconfirmed utxo</p></td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>smart_contract</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Boolean</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>is contract utxo</p></td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>from</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Integer</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>the start position of first utxo</p></td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>count</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Integer</span>
+
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"><p>the number of returned</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>
+
+    
+    </tbody>
+</table>
+
+            </td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+    
 
     
 <dl class="details">
             
 <hr>
 <dt>
-    <h4 class="name" id="~listById"><span class="type-signature">&lt;inner> </span>listById(id)</h4>
+    <h4 class="name" id="~listAll"><span class="type-signature">&lt;inner> </span>listAll()</h4>
     
     
 </dt>
 
     
     <div class="description">
-        <p>Get target unspent outputs by id.</p>
+        <p>Get all unspent outputs.</p>
     </div>
     
 
 
     
     
-        <h5>Parameters:</h5>
-        
-
-<table class="params 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>Unspent output id.</p></td>
-        </tr>
-
-    
-    </tbody>
-</table>
-
-    
 
     
 <dl class="details">
 <span class="jsdoc-message">
        Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
        
-               on 2018-05-24T14:05:00+08:00
+               on 2018-11-26T16:28:32+08:00
        
        using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
 </span>
index ce90ecd..2c58641 100644 (file)
                        <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-KeysApi.html">KeysApi</a></li><li><a href="module-TransactionsApi.html">TransactionsApi</a></li><li><a href="module-UnspentOutputsApi.html">UnspentOutputsApi</a></li>
+                                       <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>
                        
     
 
     
+        <h3 class="subsection-title">Classes</h3>
+
+        <dl>
+            <dt><a href="TransactionBuilder.html">TransactionBuilder</a></dt>
+            <dd></dd>
+        </dl>
+    
 
     
 
 <span class="jsdoc-message">
        Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
        
-               on 2018-05-24T14:04:59+08:00
+               on 2018-11-26T16:28:32+08:00
        
        using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
 </span>
index 050b7e5..d44ce44 100644 (file)
@@ -7,7 +7,7 @@
     <script src="scripts/fulltext-search.js"></script>
 
     <script type="text/x-docstrap-searchdb">
-    {"global.html":{"id":"global.html","title":"Global","body":" Bytom Node.js SDK Modules AccessTokensApiAccountsApiAssetsApiBalancesApiKeysApiTransactionsApiUnspentOutputsApi Global Global Global Type Definitions AccessToken Access tokens are name:secret-token pairs that are granted authorization for accessing Chain Core features. Type: Object Properties: Name Type Description id String User specified, unique identifier. token String Only returned in the response from AccessTokensApi~create. created_at String Timestamp of token creation, RFC3339 formatted. Account An account is an object in Bytom that tracks ownership of assets on a blockchain. Type: Object Properties: Name Type Description id String Unique account identifier in one Bytom node. alias String User specified, unique identifier in one Bytom node. keys Array.&lt;Key&gt; 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. key_index Number The index of keys. quorum Number The number of keys required to sign transactions for the account. Asset 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. Type: Object Properties: Name Type Description id String Globally unique identifier of the asset. Asset specifies the asset id as the hash of: the asset's issuance program the core's VM version the hash of asset definition alias String User specified, unique identifier in one Bytom node. issuanceProgram String keys Array.&lt;Key&gt; The list of keys used to issue units of the asset. quorum Number The number of signatures required to issue new units of the asset. defintion Object User-specified, arbitrary/unstructured data visible across Bytom blockchain networks. assets specify the definition in their issuance programs, rendering the definition immutable. Balance Any balance on the blockchain is simply a summation of unspent outputs. Type: Object Properties: Name Type Description amount Number Sum of the unspent outputs. account_alias String Account alias. account_id String Account id. asset_id String Asset id. asset_alias String Asset alias. asset_definition Object Asset definition Key Cryptographic private keys are the primary authorization mechanism on a blockchain. Type: Object Properties: Name Type Description alias String User specified, unique identifier of the key. xpub String Hex-encoded string representation of the key. Receiver A receiver is an object that wraps an account control program with the corresponding address. Type: Object Properties: Name Type Description control_program String The underlying control program that will be used in transactions paying to the address. address String The target address one transaction can pay UTXO to. Transaction A blockchain consists of an immutable set of cryptographically linked transactions. Each transaction contains one or more actions. Type: Object Properties: Name Type Description tx_id String Unique transaction identifier. block_time String Time of transaction. inputs Array.&lt;TransactionInput&gt; List of specified inputs for a transaction. outputs Array.&lt;TransactionOutput&gt; List of specified outputs for a transaction. TransactionInput Type: Object Properties: Name Type Description type String The type of the input. Possible values are &quot;issue&quot;, &quot;spend&quot;. asset_id String The id of the asset being issued or spent. asset_alias String The alias of the asset being issued or spent (possibly null). asset_definition Hash The definition of the asset being issued or spent (possibly null). amount Integer The number of units of the asset being issued or spent. spentOutputId String The id of the output consumed by this input. ID is nil if this is an issuance input. account_id String The id of the account transferring the asset (possibly null if the input is an issuance or an unspent output is specified). account_alias String The alias of the account transferring the asset (possibly null if the input is an issuance or an unspent output is specified). issuance_program String A program specifying a predicate for issuing an asset (possibly null if input is not an issuance). control_program String A UTXO control program. address String The UTXO address. TransactionOutput 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. Type: Object Properties: Name Type Description id String The id of the output. type String The type of the output. Possible values are &quot;control&quot; and &quot;retire&quot;. transaction_id String Id of the transaction. position Number The output's position in a transaction's list of outputs. asset_id String The id of the asset being issued or spent. asset_alias String The alias of the asset being issued or spent (possibly null). asset_definition Hash The definition of the asset being issued or spent (possibly null). amount Integer The number of units of the asset being issued or spent. account_id String The id of the account transferring the asset (possibly null). account_alias String The alias of the account transferring the asset (possibly null). control_program String The control program which must be satisfied to transfer this output. UnspentOutput 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. Type: Object Properties: Name Type Description account_alias String The alias of the account transferring the asset (possibly null). account_id String The id of the account transferring the asset (possibly null). address String The output address. id String Unique transaction identifier. amount Number The number of units of the asset being issued or spent. asset_alias String The alias of the asset being issued or spent (possibly null). asset_id String The id of the asset being issued or spent. source_pos Number The output's position in a transaction's list of outputs. change Boolean Whether this output is asset change of one spend. control_program_index Number Control program index. program String The control program which must be satisfied to transfer this output. source_id String The source unspent output id. valid_height Number It means coinbase utxo if valid_height &gt; 0. × Search results Close Documentation generated by JSDoc 3.5.5 on 2018-05-24T14:04:59+08:00 using the DocStrap template. "},"modules.list.html":{"id":"modules.list.html","title":"Modules","body":" Bytom Node.js SDK Modules AccessTokensApiAccountsApiAssetsApiBalancesApiKeysApiTransactionsApiUnspentOutputsApi Global Global Modules × Search results Close Documentation generated by JSDoc 3.5.5 on 2018-05-24T14:04:59+08:00 using the DocStrap template. "},"index.html":{"id":"index.html","title":"Index","body":" Bytom Node.js SDK Modules AccessTokensApiAccountsApiAssetsApiBalancesApiKeysApiTransactionsApiUnspentOutputsApi Global Global Bytom Node.js SDKTerminologyKeysCryptographic keys are the primary authorization mechanism on a blockchain. To create accounts or assets, xpub of keys are required. With this sdk, we can create/delete/list/resetPassword the key. Please check the API doc if you want to operate with keys. AccountAn account is an object in Bytom that tracks ownership of assets on a blockchain. It's defined under one Bytom node created with one or serveral keys. Related API AssetAn 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. Related API TransactionBlockchain is chain of blocks, while block consists of numbers of transactions. Related API Unspent Output(UTXO)Bytom is UTXO based blockchain. One transaction spend some UTXOs, and produces new UTXOs. Related API BalanceAny balance on the blockchain is simply a summation of UTXOs. In one bytomd, balance means summation of UTXOs of one account. Related API UsageIn your codeconst bytom = require('bytom-sdk') const url = 'http://localhost:9888' // access token is required when client is not in same origin // with the request bytom node const accessToken = '' const client = new bytom.Client(url, accessToken)Interaction with bytomWe will walk you through the process to issue some assets. Step 1: create a keyconst keyPromise = client.keys.create('alias', 'password')It will create a key whose alias is 'alias' while password is 'password'. Step 2: create a accountconst accountPromise = keyPromise.then(key =&gt; { client.accounts.create([key.xpub], 1, 'account') })Step 3: create account addressconst addressPromise = accountPromise.then(account =&gt; { return client.accounts.createReceiverById(account.id) })Step 4: create assetconst definition = { name: &quot;GOLD&quot;, symobol: &quot;GOLD&quot;, decimals: 8, description: {} } const assetPromise = keyPromise.then(key =&gt; { return client.assets.create([key.xpub], 1, 'asset', definition) })Step 5: issue assetFirst, build the transactionconst buildPromise = Promise.all([ accountPromise, addressPromise, assetPromise] ).then(([account, address, asset]) =&gt; { const issueAction = { amount: 10000000000, asset_alias: asset.alias, type: 'issue' } const gasAction = { type: 'spend_account', account_alias: account.alias, asset_alias: 'BTM', amount: 50000000 } const controlAction = { type: 'control_address', amount: 10000000000, asset_alias: asset.alias, address: address.address } return client.transactions.build(null, [issueAction, gasAction, controlAction]) }) Second, sign the transactionconst signPromise = buildPromise.then(transactionTemplate =&gt; { return client.transactions.sign(transactionTemplate, 'password') })Finally, submit the signed transaction to the bytom networksignPromise.then(signed =&gt; { return client.transactions.submit(signed.transaction.raw_transaction) }) × Search results Close Documentation generated by JSDoc 3.5.5 on 2018-05-24T14:05:00+08:00 using the DocStrap template. "},"module-AccessTokensApi.html":{"id":"module-AccessTokensApi.html","title":"Module: AccessTokensApi","body":" Bytom Node.js SDK Modules AccessTokensApiAccountsApiAssetsApiBalancesApiKeysApiTransactionsApiUnspentOutputsApi Global Global Module: AccessTokensApi API for interacting with access tokens. Methods &lt;inner&gt; create(id) Create a new access token. Parameters: Name Type Description id String User specified, unique identifier. Returns: Newly created access token. Type Promise.&lt;AccessToken&gt; &lt;inner&gt; delete(id) Delete the target access token. Parameters: Name Type Description id String The to be deleted token id. &lt;inner&gt; list() Get all access tokens. Returns: All access tokens. Type Promise.&lt;Array.&lt;AccessToken&gt;&gt; × Search results Close Documentation generated by JSDoc 3.5.5 on 2018-05-24T14:05:00+08:00 using the DocStrap template. "},"module-AccountsApi.html":{"id":"module-AccountsApi.html","title":"Module: AccountsApi","body":" Bytom Node.js SDK Modules AccessTokensApiAccountsApiAssetsApiBalancesApiKeysApiTransactionsApiUnspentOutputsApi Global Global Module: AccountsApi API for interacting with accounts. Methods &lt;inner&gt; create(xpubs, quorum, alias) Create a new account. Parameters: Name Type Description xpubs module:AccountsApi~xpubs Xpub of Keys for account creation. quorum module:AccountsApi~quorum The number of keys required to sign transactions for the account. alias module:AccountsApi~alias Account alias. Returns: Newly created account response. Type Promise.&lt;Account&gt; &lt;inner&gt; createReceiverById(accountId) Create account receiver. Parameters: Name Type Description accountId module:AccountsApi~id Id for the target account. Returns: Target receiver. Type Promise.&lt;Receiver&gt; &lt;inner&gt; deleteById(id) Delete account. Parameters: Name Type Description id module:AccountsApi~id Target account id. &lt;inner&gt; listAddressesById(accountId) List all addresses for one account. Parameters: Name Type Description accountId module:AccountsApi~id Id for the target account. Returns: target addresses response. Type Promise.&lt;module:AccountApi~AddressInfo&gt; &lt;inner&gt; listAll() List all accounts in the target Bytom node. Returns: All accounts promise. Type Promise.&lt;Array.&lt;Account&gt;&gt; &lt;inner&gt; listById(id) List accounts whose id is the given one. Parameters: Name Type Description id module:AccountsApi~id Account id. Returns: Target accounts promise. Type Promise.&lt;Array.&lt;Account&gt;&gt; Type Definitions AddressInfo Type: Object Properties: Name Type Description account_alias String account_id String adddress String change Boolean Indicate whether this address is for change UTXO. alias User specified, unique identifier. Type: String id Unique account identifier in one Bytom node. Type: String quorum The number of keys required to sign transactions for the account. Type: Number xpubs The list of keys used to create control programs under the account. Type: Array.&lt;String&gt; × Search results Close Documentation generated by JSDoc 3.5.5 on 2018-05-24T14:05:00+08:00 using the DocStrap template. "},"module-AssetsApi.html":{"id":"module-AssetsApi.html","title":"Module: AssetsApi","body":" Bytom Node.js SDK Modules AccessTokensApiAccountsApiAssetsApiBalancesApiKeysApiTransactionsApiUnspentOutputsApi Global Global Module: AssetsApi API for interacting with assets. Methods &lt;inner&gt; create(xpubs, quorum, alias, definition) Create a new asset. Parameters: Name Type Description xpubs module:AssetsApi~xpubs Keys for asseet creation. quorum module:AssetsApi~quorum The number of keys required to sign transactions for the account. alias module:AssetsApi~alias Asset alias. definition module:AssetsApi~definition Asset definition. Returns: Newly created asset. Type Promise.&lt;Asset&gt; &lt;inner&gt; getById(id) Get asset by the asset id. Parameters: Name Type Description id module:AssetsApi~id Asset id. Returns: target asset. Type Promise.&lt;Asset&gt; &lt;inner&gt; list() List all assets in one Bytom node. Returns: target assets. Type Promise.&lt;Array.&lt;Asset&gt;&gt; &lt;inner&gt; updateAlias(id, newAlias) Update asset alias. Parameters: Name Type Description id module:AssetsApi~id Asset id. newAlias String new alias. Type Definitions alias User specified, unique identifier. Type: String definition User-specified, asset attributes accross Bytom blockchain network. Type: Object id Unique account identifier in one Bytom node. Type: String quorum The number of signatures required to issue new units of the asset. Type: Number xpubs The list of keys used to issue units of the asset. Type: Array.&lt;String&gt; × Search results Close Documentation generated by JSDoc 3.5.5 on 2018-05-24T14:05:00+08:00 using the DocStrap template. "},"module-BalancesApi.html":{"id":"module-BalancesApi.html","title":"Module: BalancesApi","body":" Bytom Node.js SDK Modules AccessTokensApiAccountsApiAssetsApiBalancesApiKeysApiTransactionsApiUnspentOutputsApi Global Global Module: BalancesApi API for interacting with balances. Methods &lt;inner&gt; list() Get all asset balances of all accounts. Returns: The result balances. Type Promise.&lt;Array.&lt;Balance&gt;&gt; × Search results Close Documentation generated by JSDoc 3.5.5 on 2018-05-24T14:05:00+08:00 using the DocStrap template. "},"module-KeysApi.html":{"id":"module-KeysApi.html","title":"Module: KeysApi","body":" Bytom Node.js SDK Modules AccessTokensApiAccountsApiAssetsApiBalancesApiKeysApiTransactionsApiUnspentOutputsApi Global Global Module: KeysApi API for interacting with keys. Methods &lt;inner&gt; create(alias, password) Create a new key. Parameters: Name Type Description alias String User specified, unique identifier. password String User specified, key password. Returns: Newly created key. Type Promise.&lt;Key&gt; &lt;inner&gt; delete(xpub, password) Parameters: Name Type Description xpub String Hex-encoded string representation of the key. password String Key password. &lt;inner&gt; list() Got all the keys in one Bytom node. Returns: All keys. Type Promise.&lt;Array.&lt;Key&gt;&gt; &lt;inner&gt; resetPassword(xpub, oldPassword, newPassword) Reset key password. Parameters: Name Type Description xpub String Hex-encoded string representation of the key. oldPassword String Old password. newPassword String New password. × Search results Close Documentation generated by JSDoc 3.5.5 on 2018-05-24T14:05:00+08:00 using the DocStrap template. "},"module-TransactionsApi.html":{"id":"module-TransactionsApi.html","title":"Module: TransactionsApi","body":" Bytom Node.js SDK Modules AccessTokensApiAccountsApiAssetsApiBalancesApiKeysApiTransactionsApiUnspentOutputsApi Global Global Module: TransactionsApi API for interacting with transactions. Methods &lt;inner&gt; build(baseTransaction, actions, ttl) Build an unsigned transaction from a set of actions and base transction(possibly null). Parameters: Name Type Description baseTransaction String Encoded base raw transaction. actions Array.&lt;module:TransactionsApi~Action&gt; Set of actions to compose the transaction. ttl Number Time duration to spent UTXOs will be reserverd(can't be spent during this time duration). Returns: Unsigned transaction template. Type Promise.&lt;Object&gt; &lt;inner&gt; estimateGas(transaction) Estimate how much gas one trasaction may use. Parameters: Name Type Description transaction Object The transaction template to estimate. Returns: Estimation result. Type Object &lt;inner&gt; listAll() List all local transactions. Returns: All local transactions. Type Promise.&lt;Array.&lt;Transaction&gt;&gt; &lt;inner&gt; listByAccountId(accountId) List all local transactions by account id. Parameters: Name Type Description accountId String Account id. Returns: The result transactions. Type Promise.&lt;Array.&lt;Transaction&gt;&gt; &lt;inner&gt; listById(id) List local transactions by id. Parameters: Name Type Description id String The transaction id. Returns: The result transactions. Type Promise.&lt;Array.&lt;Transaction&gt;&gt; &lt;inner&gt; sign(transaction, password) Sign transaction. Parameters: Name Type Description transaction Object The built transaction template. password Object Password of the key which will sign the transaction template. Returns: Sign result. Type Promise.&lt;module:TransactionsApi~SignResult&gt; &lt;inner&gt; submit(raw_transaction) Submit a signed transaction to the blockchain. Parameters: Name Type Description raw_transaction String Encoded fully signed transaction. Returns: Submit result. It will return tx_id if submit successfully else error. Type Promise.&lt;Object&gt; Type Definitions Action Basic unit to build a transaction. For spend transaction, either account_id or account_alias is required to specify account info. Asset info(either asset_id or asset_alias ) is required for all kinds of action. Type: Object Properties: Name Type Description type String Currently 4 types of action is supported: spend_account: action to spend UTXO from account. issue: action to issue asset. retire: action to retire asset. control_address: action to receive asset with address. account_alias String The alias of the account transferring the asset (possibly null). account_id String The id of the account transferring the asset (possibly null). asset_id String The id of the asset being issued or spent (possibly null). asset_alias String The alias of the asset being issued or spent (possibly null). address String Address to receive the transfered asset(possibly null, required for control_address action). SignResult Data structure /sign-transaction api will return. Type: Object Properties: Name Type Description transaction Transaction The signed transaction if sign success. sign_complete Boolean Whether all input actions are signed. It means this transaction can be submit if true, else not. × Search results Close Documentation generated by JSDoc 3.5.5 on 2018-05-24T14:05:00+08:00 using the DocStrap template. "},"module-UnspentOutputsApi.html":{"id":"module-UnspentOutputsApi.html","title":"Module: UnspentOutputsApi","body":" Bytom Node.js SDK Modules AccessTokensApiAccountsApiAssetsApiBalancesApiKeysApiTransactionsApiUnspentOutputsApi Global Global Module: UnspentOutputsApi API for interacting with unspent outputs. Methods &lt;inner&gt; list() Get all unspent outputs. Returns: Target unspent outputs. Type Promise.&lt;Array.&lt;UnspentOutput&gt;&gt; &lt;inner&gt; listById(id) Get target unspent outputs by id. Parameters: Name Type Description id String Unspent output id. Returns: Target unspent outputs. Type Promise.&lt;Array.&lt;UnspentOutput&gt;&gt; × Search results Close Documentation generated by JSDoc 3.5.5 on 2018-05-24T14:05:00+08:00 using the DocStrap template. "}}
+    {"global.html":{"id":"global.html","title":"Global","body":" Bytom Node.js SDK Modules AccessTokensApiAccountsApiAssetsApiBalancesApiBlockAPIConfigApiKeysApiTransactionsApiUnspentOutputsApi Classes TransactionBuilder Global Global Global Type Definitions AccessToken Access tokens are name:secret-token pairs that are granted authorization for accessing Bytom Core features. Type: Object Properties: Name Type Description id String User specified, unique identifier. token String Only returned in the response from AccessTokensApi~create. created_at String Timestamp of token creation, RFC3339 formatted. Account An account is an object in Bytom that tracks ownership of assets on a blockchain. Type: Object Properties: Name Type Description id String Unique account identifier in one Bytom node. alias String User specified, unique identifier in one Bytom node. keys Array.&lt;Key&gt; 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. key_index Number The index of keys. quorum Number The number of keys required to sign transactions for the account. Asset 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. Type: Object Properties: Name Type Description id String Globally unique identifier of the asset. Asset specifies the asset id as the hash of: the asset's issuance program the core's VM version the hash of asset definition alias String User specified, unique identifier in one Bytom node. issuanceProgram String keys Array.&lt;Key&gt; The list of keys used to issue units of the asset. quorum Number The number of signatures required to issue new units of the asset. defintion Object User-specified, arbitrary/unstructured data visible across Bytom blockchain networks. assets specify the definition in their issuance programs, rendering the definition immutable. Balance Any balance on the blockchain is simply a summation of unspent outputs. Type: Object Properties: Name Type Description amount Number Sum of the unspent outputs. account_alias String Account alias. account_id String Account id. asset_id String Asset id. asset_alias String Asset alias. asset_definition Object Asset definition BlockInfo Type: Object Properties: Name Type Description hash String hash of block. size Integer size of block. version Integer version of block. height Integer height of block. previous_block_hash String previous block hash. timestamp Integer timestamp of block. nonce Integer nonce value. bits Integer bits of difficulty. difficulty String difficulty value(String type). transaction_merkle_root String merkle root of transaction. transaction_status_hash String merkle root of transaction status. transactions Array.&lt;Object&gt; transaction object: Properties Name Type Description id String transaction id, hash of the transaction. version Integer version of transaction. size Integer size of transaction. time_range Integer the unix timestamp for when the requst was responsed. status_fail Boolean whether the state of the request has failed. mux_id String the previous transaction mux id(source id of utxo). inputs Array.&lt;Object&gt; object of inputs for the transaction. Properties Name Type Description type String the type of input action, available option include: 'spend', 'issue', 'coinbase'. asset_id String asset id. asset_alias String name of asset. asset_definition Object definition of asset(json object). amount Integer amount of asset. issuance_program Object issuance program, it only exist when type is 'issue'. control_program Object control program of account, it only exist when type is 'spend'. address String address of account, it only exist when type is 'spend'. spent_output_id String the front of outputID to be spent in this input, it only exist when type is 'spend'. account_id String account id. account_alias String name of account. arbitrary Object arbitrary infomation can be set by miner, it only exist when type is 'coinbase'. input_id String hash of input action. witness_arguments Array.&lt;String&gt; witness arguments. outputs Array.&lt;Object&gt; object of outputs for the transaction. Properties Name Type Description type String the type of output action, available option include: 'retire', 'control'. id String outputid related to utxo. position Integer position of outputs. asset_id String asset id. asset_alias String name of asset. asset_definition Object definition of asset(json object). amount Integer amount of asset. account_id String account id. account_alias String name of account. control_program Object control program of account. address String address of account. CoreInfo Basic information about the configuration of Bytom Core, as well as any errors encountered when updating the local state of the blockchain More info: {} Type: Object Properties: Name Type Description listening Boolean whether the node is listening. syncing Boolean whether the node is syncing. mining Boolean whether the node is mining. peer_count Integer current count of connected peers. current_block Integer current block height in the node's blockchain. highest_block Integer current highest block of the connected peers. network_id String network id. version_info Object bytomd version information: version String current version of the running bytomd. update uint16 whether there exists an update. 0: no update; 1: small update; 2: significant update. new_version String the newest version of bytomd if there is one. Key Cryptographic private keys are the primary authorization mechanism on a blockchain. Type: Object Properties: Name Type Description alias String User specified, unique identifier of the key. xpub String Hex-encoded string representation of the key. Receiver A receiver is an object that wraps an account control program with the corresponding address. Type: Object Properties: Name Type Description control_program String The underlying control program that will be used in transactions paying to the address. address String The target address one transaction can pay UTXO to. Transaction A blockchain consists of an immutable set of cryptographically linked transactions. Each transaction contains one or more actions. Type: Object Properties: Name Type Description tx_id String Unique transaction identifier. block_time String Time of transaction. inputs Array.&lt;TransactionInput&gt; List of specified inputs for a transaction. outputs Array.&lt;TransactionOutput&gt; List of specified outputs for a transaction. TransactionInput Type: Object Properties: Name Type Description type String The type of the input. Possible values are &quot;issue&quot;, &quot;spend&quot;. asset_id String The id of the asset being issued or spent. asset_alias String The alias of the asset being issued or spent (possibly null). asset_definition Hash The definition of the asset being issued or spent (possibly null). amount Integer The number of units of the asset being issued or spent. spentOutputId String The id of the output consumed by this input. ID is nil if this is an issuance input. account_id String The id of the account transferring the asset (possibly null if the input is an issuance or an unspent output is specified). account_alias String The alias of the account transferring the asset (possibly null if the input is an issuance or an unspent output is specified). issuance_program String A program specifying a predicate for issuing an asset (possibly null if input is not an issuance). control_program String A UTXO control program. address String The UTXO address. TransactionOutput 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. Type: Object Properties: Name Type Description id String The id of the output. type String The type of the output. Possible values are &quot;control&quot; and &quot;retire&quot;. transaction_id String Id of the transaction. position Number The output's position in a transaction's list of outputs. asset_id String The id of the asset being issued or spent. asset_alias String The alias of the asset being issued or spent (possibly null). asset_definition Hash The definition of the asset being issued or spent (possibly null). amount Integer The number of units of the asset being issued or spent. account_id String The id of the account transferring the asset (possibly null). account_alias String The alias of the account transferring the asset (possibly null). control_program String The control program which must be satisfied to transfer this output. UnspentOutput 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. Type: Object Properties: Name Type Description account_alias String The alias of the account transferring the asset (possibly null). account_id String The id of the account transferring the asset (possibly null). address String The output address. id String Unique transaction identifier. amount Number The number of units of the asset being issued or spent. asset_alias String The alias of the asset being issued or spent (possibly null). asset_id String The id of the asset being issued or spent. source_pos Number The output's position in a transaction's list of outputs. change Boolean Whether this output is asset change of one spend. control_program_index Number Control program index. program String The control program which must be satisfied to transfer this output. source_id String The source unspent output id. valid_height Number It means coinbase utxo if valid_height &gt; 0. × Search results Close Documentation generated by JSDoc 3.5.5 on 2018-11-26T16:28:32+08:00 using the DocStrap template. "},"modules.list.html":{"id":"modules.list.html","title":"Modules","body":" Bytom Node.js SDK Modules AccessTokensApiAccountsApiAssetsApiBalancesApiBlockAPIConfigApiKeysApiTransactionsApiUnspentOutputsApi Classes TransactionBuilder Global Global Modules Classes TransactionBuilder × Search results Close Documentation generated by JSDoc 3.5.5 on 2018-11-26T16:28:32+08:00 using the DocStrap template. "},"classes.list.html":{"id":"classes.list.html","title":"Classes","body":" Bytom Node.js SDK Modules AccessTokensApiAccountsApiAssetsApiBalancesApiBlockAPIConfigApiKeysApiTransactionsApiUnspentOutputsApi Classes TransactionBuilder Global Global Classes Classes TransactionBuilder × Search results Close Documentation generated by JSDoc 3.5.5 on 2018-11-26T16:28:32+08:00 using the DocStrap template. "},"index.html":{"id":"index.html","title":"Index","body":" Bytom Node.js SDK Modules AccessTokensApiAccountsApiAssetsApiBalancesApiBlockAPIConfigApiKeysApiTransactionsApiUnspentOutputsApi Classes TransactionBuilder Global Global Bytom Node.js SDKTerminologyKeysCryptographic keys are the primary authorization mechanism on a blockchain. To create accounts or assets, xpub of keys are required. With this sdk, we can create/delete/listAll/resetPassword/checkPassword the key. Please check the API doc if you want to operate with keys. AccountAn account is an object in Bytom that tracks ownership of assets on a blockchain. It's defined under one Bytom node created with one or serveral keys. Related API AssetAn 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. Related API TransactionBlockchain is chain of blocks, while block consists of numbers of transactions. Related API Unspent Output(UTXO)Bytom is UTXO based blockchain. One transaction spend some UTXOs, and produces new UTXOs. Related API BalanceAny balance on the blockchain is simply a summation of UTXOs. In one bytomd, balance means summation of UTXOs of one account. Related API Block​ A block is a container data structure that aggregates transactions for inclusion in the public ledger, the blockchain. It is made of a header, containing metadata, followed by a long list of transactions that make up the bulk of its size. Each block references to the previous block, and all the blocks are linked from the back to the front to grow a blockchain. Related API ConfigConfig contain the network information that you wanted to know. Related API UsageIn your codeconst bytom = require('bytom-sdk') const url = 'http://localhost:9888' // access token is required when client is not in same origin // with the request bytom node const accessToken = '' const client = new bytom.Client(url, accessToken)Interaction with bytomWe will walk you through the process to issue some assets. Step 1: create a keyconst keyPromise = client.keys.create({ alias:'key', password: 'password' })It will create a key whose alias is 'alias' while password is 'password'. Step 2: create a accountconst accountPromise = keyPromise.then(key =&gt; { client.accounts.create({ alias: 'account', root_xpubs: [key.xpub], quorum: 1 }) })Step 3: create account addressconst addressPromise = accountPromise.then(account =&gt; { return client.accounts.createReceiver({ account_alias: account.alias }) })Step 4: create assetconst definition = { name: &quot;GOLD&quot;, symbol: &quot;GOLD&quot;, decimals: 8, description: {} } const assetPromise = keyPromise.then(key =&gt; { return client.assets.create( { alias: 'asset', definition, root_xpubs: [key.xpub], quorum: 1 }) })Step 5: issue assetFirst, build the transactionconst buildPromise = Promise.all([ accountPromise, addressPromise, assetPromise] ).then(([account, address, asset]) =&gt; { const issueAction = { amount: 100000000, asset_alias: asset.alias, } const gasAction = { account_alias: account.alias, asset_alias: 'BTM', amount: 50000000 } const controlAction = { amount: 100000000, asset_alias: asset.alias, address: address.address } return client.transactions.build(builder =&gt; { builder.issue(issueAction) builder.spendFromAccount(gasAction) builder.controlWithAddress(controlAction) }) }) Second, sign the transactionconst signPromise = buildPromise.then(transactionTemplate =&gt; { return client.transactions.sign({ transaction: transactionTemplate, password: 'password' }) })Finally, submit the signed transaction to the bytom networksignPromise.then(signed =&gt; { return client.transactions.submit(signed.transaction.raw_transaction) }) × Search results Close Documentation generated by JSDoc 3.5.5 on 2018-11-26T16:28:32+08:00 using the DocStrap template. "},"module-AccessTokensApi.html":{"id":"module-AccessTokensApi.html","title":"Module: AccessTokensApi","body":" Bytom Node.js SDK Modules AccessTokensApiAccountsApiAssetsApiBalancesApiBlockAPIConfigApiKeysApiTransactionsApiUnspentOutputsApi Classes TransactionBuilder Global Global Module: AccessTokensApi API for interacting with access tokens. Methods &lt;inner&gt; check(params) Check the target access token. Parameters: Name Type Description params Object Parameters for access token check. Properties Name Type Description id String The to be deleted token id. secret String secret of token, the second part of the colon division for token. &lt;inner&gt; create(params) Create a new access token. Parameters: Name Type Description params Object Access Token Object. Properties Name Type Description id String User specified, unique identifier. type String type of token. Returns: Newly created access token. Type Promise.&lt;AccessToken&gt; &lt;inner&gt; delete(id) Delete the target access token. Parameters: Name Type Description id String The to be deleted token id. &lt;inner&gt; listAll() Get all access tokens. Returns: All access tokens. Type Promise.&lt;Array.&lt;AccessToken&gt;&gt; × Search results Close Documentation generated by JSDoc 3.5.5 on 2018-11-26T16:28:32+08:00 using the DocStrap template. "},"module-AccountsApi.html":{"id":"module-AccountsApi.html","title":"Module: AccountsApi","body":" Bytom Node.js SDK Modules AccessTokensApiAccountsApiAssetsApiBalancesApiBlockAPIConfigApiKeysApiTransactionsApiUnspentOutputsApi Classes TransactionBuilder Global Global Module: AccountsApi API for interacting with accounts. Methods &lt;inner&gt; create(params) Create a new account. Parameters: Name Type Description params module:AccountsApi~createRequest Parameters for account creation. Returns: Newly created account response. Type Promise.&lt;Account&gt; &lt;inner&gt; createReceiver(params) Create account receiver. Parameters: Name Type Description params module:AccountsApi~createReceiverRequest Parameters for receiver creation. Returns: Target receiver. Type Promise.&lt;Receiver&gt; &lt;inner&gt; delete(params) Delete account. Parameters: Name Type Description params Object Deletion information. Properties Name Type Description account_id String Account id. account_alias String Account alias. &lt;inner&gt; list(params) List accounts whose id is the given one. Parameters: Name Type Description params Object Filter and pagination information. Properties Name Type Description id String Account id. alias String Account alias. Returns: Target accounts promise. Type Promise.&lt;Array.&lt;Account&gt;&gt; &lt;inner&gt; listAddresses(params) List all addresses for one account. Parameters: Name Type Description params Object Filter and pagination information. Properties Name Type Description account_alias String alias of account. account_id String id of account. from Number the start position of first address count Number the number of returned. Returns: target addresses response. Type Promise.&lt;module:AccountApi~AddressInfo&gt; &lt;inner&gt; listAll() List all accounts in the target Bytom node. Returns: All accounts promise. Type Promise.&lt;Array.&lt;Account&gt;&gt; &lt;inner&gt; updateAlias(params) Update account alias. Parameters: Name Type Description params object Parameters for account update. Properties Name Type Description account_id String id of account. account_alias String alias of account. new_alias String new alias of account. &lt;inner&gt; validateAddresses(address) Validate an address for one account. Parameters: Name Type Description address string Filter and pagination information. Returns: weather the address is local and is valid. Type Promise.&lt;Object&gt; Type Definitions AddressInfo Type: Object Properties: Name Type Description account_alias String account_id String adddress String change Boolean Indicate whether this address is for change UTXO. alias User specified, unique identifier. Type: String createReceiverRequest Type: Object Properties: Name Type Argument Description account_alias String &lt;optional&gt; The unique alias of the account. accountAlias or accountId must be provided. account_id String &lt;optional&gt; The unique ID of the account. accountAlias or accountId must be provided. createRequest Type: Object Properties: Name Type Argument Description alias String &lt;optional&gt; User specified, unique identifier. root_xpubs Array.&lt;String&gt; The list of keys used to create control programs under the account. quorum Number The number of keys required to sign transactions for the account. id Unique account identifier in one Bytom node. Type: String quorum The number of keys required to sign transactions for the account. Type: Number xpubs The list of keys used to create control programs under the account. Type: Array.&lt;String&gt; × Search results Close Documentation generated by JSDoc 3.5.5 on 2018-11-26T16:28:32+08:00 using the DocStrap template. "},"module-AssetsApi.html":{"id":"module-AssetsApi.html","title":"Module: AssetsApi","body":" Bytom Node.js SDK Modules AccessTokensApiAccountsApiAssetsApiBalancesApiBlockAPIConfigApiKeysApiTransactionsApiUnspentOutputsApi Classes TransactionBuilder Global Global Module: AssetsApi API for interacting with assets. Methods &lt;inner&gt; create(params) Create a new asset. Parameters: Name Type Description params module:AssetsApi~createRequest Parameters for asset creation. Returns: Newly created asset. Type Promise.&lt;Asset&gt; &lt;inner&gt; list(id) Get asset by the asset id. Parameters: Name Type Description id module:AssetsApi~id Asset id. Returns: target asset. Type Promise.&lt;Asset&gt; &lt;inner&gt; listAll() List all assets in one Bytom node. Returns: target assets. Type Promise.&lt;Array.&lt;Asset&gt;&gt; &lt;inner&gt; updateAlias(params) Update asset alias. Parameters: Name Type Description params object Parameters for asset update. Properties Name Type Description id String id of asset. alias String new alias of asset. Type Definitions createRequest Type: Object Properties: Name Type Argument Description alias String &lt;optional&gt; User specified, unique identifier. defintion Object &lt;optional&gt; User-specified, arbitrary/unstructured data visible across blockchain networks. root_xpubs Array.&lt;String&gt; Optional. The list of keys used to create the asset. quorum Number Optional. the default value is 1, threshold of keys that must sign a transaction to spend asset units controlled by the account. issuance_program String &lt;optional&gt; Optional. User-specified, contract program. × Search results Close Documentation generated by JSDoc 3.5.5 on 2018-11-26T16:28:32+08:00 using the DocStrap template. "},"module-BalancesApi.html":{"id":"module-BalancesApi.html","title":"Module: BalancesApi","body":" Bytom Node.js SDK Modules AccessTokensApiAccountsApiAssetsApiBalancesApiBlockAPIConfigApiKeysApiTransactionsApiUnspentOutputsApi Classes TransactionBuilder Global Global Module: BalancesApi API for interacting with balances. Methods &lt;inner&gt; list(params) Get asset balances by account. Parameters: Name Type Description params Object Filter and pagination information. Properties Name Type Description account_id String account id. account_alias String name of account. Returns: The result balances. Type Promise.&lt;Array.&lt;Balance&gt;&gt; &lt;inner&gt; listAll() List all assets Balances in one Bytom node. Returns: The result balances. Type Promise.&lt;Array.&lt;Balance&gt;&gt; × Search results Close Documentation generated by JSDoc 3.5.5 on 2018-11-26T16:28:32+08:00 using the DocStrap template. "},"module-BlockAPI.html":{"id":"module-BlockAPI.html","title":"Module: BlockAPI","body":" Bytom Node.js SDK Modules AccessTokensApiAccountsApiAssetsApiBalancesApiBlockAPIConfigApiKeysApiTransactionsApiUnspentOutputsApi Classes TransactionBuilder Global Global Module: BlockAPI API for interacting with blocks. Methods &lt;inner&gt; getBlock(params) Returns the detail block by block height or block hash. Parameters: Name Type Description params Object Properties Name Type Description block_hash String hash of block. block_height Integer height of block. Returns: Type Promise.&lt;BlockInfo&gt; &lt;inner&gt; getBlockCount() Returns the current block height for blockchain. Returns: Promise resolved on success with block_count returned. Type Promise.&lt;Object&gt; &lt;inner&gt; getBlockHash() Returns the current block hash for blockchain. Returns: Requested info of specified Bytom Core with block_hash returned. Type Promise.&lt;Object&gt; &lt;inner&gt; getBlockHeader(params) Returns the detail block header by block height or block hash. Parameters: Name Type Description params Object Properties Name Type Description block_hash String hash of block. block_height Integer height of block. Returns: Type Promise.&lt;Object&gt; &lt;inner&gt; getDifficulty(params) Returns the block difficulty by block height or block hash. Parameters: Name Type Description params Object Properties Name Type Description block_hash String hash of block. block_height Integer height of block. Returns: Type Promise.&lt;Object&gt; &lt;inner&gt; getHashRate(params) Returns the block hash rate by block height or block hash, it returns the current block hash rate when request is empty. Parameters: Name Type Description params Object Properties Name Type Description block_hash String hash of block. block_height Integer height of block. Returns: Type Promise.&lt;Object&gt; × Search results Close Documentation generated by JSDoc 3.5.5 on 2018-11-26T16:28:32+08:00 using the DocStrap template. "},"module-ConfigApi.html":{"id":"module-ConfigApi.html","title":"Module: ConfigApi","body":" Bytom Node.js SDK Modules AccessTokensApiAccountsApiAssetsApiBalancesApiBlockAPIConfigApiKeysApiTransactionsApiUnspentOutputsApi Classes TransactionBuilder Global Global Module: ConfigApi Bytom Core can be configured as a new blockchain network, or as a node in an existing blockchain network. More info: {} API for interacting with configs. Methods &lt;inner&gt; gasRate() get gas rate Returns: Promise resolved with gas rate on success. Type Promise &lt;inner&gt; netInfo() Get info on specified Bytom Core. Returns: Requested Net Info of specified Bytom Core. Type Promise.&lt;CoreInfo&gt; &lt;inner&gt; verifyMessage(params) Parameters: Name Type Description params Properties Name Type Description address String address for account. derived_xpub String derived xpub. message String message for signature by derived_xpub. signature String signature for message. Returns: [Boolean] result, verify result. Type Promise.&lt;Object&gt; × Search results Close Documentation generated by JSDoc 3.5.5 on 2018-11-26T16:28:32+08:00 using the DocStrap template. "},"module-KeysApi.html":{"id":"module-KeysApi.html","title":"Module: KeysApi","body":" Bytom Node.js SDK Modules AccessTokensApiAccountsApiAssetsApiBalancesApiBlockAPIConfigApiKeysApiTransactionsApiUnspentOutputsApi Classes TransactionBuilder Global Global Module: KeysApi API for interacting with keys. Methods &lt;inner&gt; checkPassword(params) Reset key password. Parameters: Name Type Description params Object Password checking information. Properties Name Type Description xpub String Hex-encoded string representation of the key. password String password. &lt;inner&gt; create(params) Create a new key. Parameters: Name Type Description params module:KeysApi~createRequest Parameters for asset creation. Returns: Newly created key. Type Promise.&lt;Key&gt; &lt;inner&gt; delete(params) Parameters: Name Type Description params Object Deletion information. Properties Name Type Description xpub String Hex-encoded string representation of the key. password String Key password. &lt;inner&gt; listAll() Got all the keys in one Bytom node. Returns: All keys. Type Promise.&lt;Array.&lt;Key&gt;&gt; &lt;inner&gt; resetPassword(params) Reset key password. Parameters: Name Type Description params Object Key password reset information. Properties Name Type Description xpub String Hex-encoded string representation of the key. oldPassword String Old password. newPassword String New password. Type Definitions createRequest Type: Object Properties: Name Type Argument Description alias String &lt;optional&gt; User specified, unique identifier. password String &lt;optional&gt; password of the key. language String &lt;optional&gt; mnemonic language of the key. × Search results Close Documentation generated by JSDoc 3.5.5 on 2018-11-26T16:28:32+08:00 using the DocStrap template. "},"module-TransactionsApi.html":{"id":"module-TransactionsApi.html","title":"Module: TransactionsApi","body":" Bytom Node.js SDK Modules AccessTokensApiAccountsApiAssetsApiBalancesApiBlockAPIConfigApiKeysApiTransactionsApiUnspentOutputsApi Classes TransactionBuilder Global Global Module: TransactionsApi API for interacting with transactions. Methods &lt;inner&gt; build(builderBlock) Build an unsigned transaction from a set of actions. Parameters: Name Type Description builderBlock module:TransactionsApi~builderCallback Function that adds desired actions to a given builder object. Returns: Unsigned transaction template, or error. Type Promise.&lt;Object&gt; &lt;inner&gt; estimateGas(transaction) Estimate how much gas one trasaction may use. Parameters: Name Type Description transaction Object The transaction template to estimate. Returns: Estimation result. Type Object &lt;inner&gt; list(params) List local transactions by id or filter condition. Parameters: Name Type Description params Object Transaction filter params. Properties Name Type Description id String transaction id, hash of transaction. account_id String id of account. detail Boolean flag of detail transactions, default false (only return transaction summary). unconfirmed Boolean flag of unconfirmed transactions(query result include all confirmed and unconfirmed transactions), default false. from Integer The start position of first transaction. count Integer The number of returned. Returns: The result transactions. Type Promise.&lt;Array.&lt;Transaction&gt;&gt; &lt;inner&gt; listAll() List all local transactions. Returns: All local transactions. Type Promise.&lt;Array.&lt;Transaction&gt;&gt; &lt;inner&gt; sign(params) Sign transaction. Parameters: Name Type Description params Object The built transaction template. Properties Name Type Description password String signature of the password. transaction Object builded transaction. Returns: Sign result. Type Promise.&lt;module:TransactionsApi~SignResult&gt; &lt;inner&gt; submit(raw_transaction) Submit a signed transaction to the blockchain. Parameters: Name Type Description raw_transaction String Encoded fully signed transaction. Returns: Submit result. It will return tx_id if submit successfully else error. Type Promise.&lt;Object&gt; Type Definitions Action Basic unit to build a transaction. For spend transaction, either account_id or account_alias is required to specify account info. Asset info(either asset_id or asset_alias ) is required for all kinds of action. Type: Object Properties: Name Type Description type String Currently 4 types of action is supported: spend_account: action to spend UTXO from account. issue: action to issue asset. retire: action to retire asset. control_address: action to receive asset with address. account_alias String The alias of the account transferring the asset (possibly null). account_id String The id of the account transferring the asset (possibly null). asset_id String The id of the asset being issued or spent (possibly null). asset_alias String The alias of the asset being issued or spent (possibly null). address String Address to receive the transfered asset(possibly null, required for control_address action). builderCallback(builder) Parameters: Name Type Description builder TransactionBuilder SignResult Data structure /sign-transaction api will return. Type: Object Properties: Name Type Description transaction Transaction The signed transaction if sign success. sign_complete Boolean Whether all input actions are signed. It means this transaction can be submit if true, else not. × Search results Close Documentation generated by JSDoc 3.5.5 on 2018-11-26T16:28:32+08:00 using the DocStrap template. "},"module-UnspentOutputsApi.html":{"id":"module-UnspentOutputsApi.html","title":"Module: UnspentOutputsApi","body":" Bytom Node.js SDK Modules AccessTokensApiAccountsApiAssetsApiBalancesApiBlockAPIConfigApiKeysApiTransactionsApiUnspentOutputsApi Classes TransactionBuilder Global Global Module: UnspentOutputsApi API for interacting with unspent outputs. Methods &lt;inner&gt; list(params) Get target unspent outputs. Parameters: Name Type Description params Object Filter and pagination information. Properties Name Type Description id String Unspent output id. unconfirmed Boolean is include unconfirmed utxo smart_contract Boolean is contract utxo from Integer the start position of first utxo count Integer the number of returned account_id String account id. account_alias String name of account. Returns: Target unspent outputs. Type Promise.&lt;Array.&lt;UnspentOutput&gt;&gt; &lt;inner&gt; listAll() Get all unspent outputs. Returns: Target unspent outputs. Type Promise.&lt;Array.&lt;UnspentOutput&gt;&gt; × Search results Close Documentation generated by JSDoc 3.5.5 on 2018-11-26T16:28:32+08:00 using the DocStrap template. "},"TransactionBuilder.html":{"id":"TransactionBuilder.html","title":"Class: TransactionBuilder","body":" Bytom Node.js SDK Modules AccessTokensApiAccountsApiAssetsApiBalancesApiBlockAPIConfigApiKeysApiTransactionsApiUnspentOutputsApi Classes TransactionBuilder Global Global Class: TransactionBuilder TransactionBuilder A convenience class for building transaction template objects. new TransactionBuilder() constructor - return a new object used for constructing a transaction. Members baseTransaction :Object Base data for the transaction, default is null. Type: Object ttl :Integer Integer of the time to live in milliseconds, it means utxo will be reserved(locked) for builded transaction in this time range, if the transaction will not to be submitted into block, it will be auto unlocked for build transaction again after this ttl time. it will be set to 5 minutes(300 seconds) defaultly when ttl is 0. Type: Integer Methods controlWithAddress(params) Add an action that controls assets with an account specified by identifier. Parameters: Name Type Description params Object Action parameters. Properties Name Type Description asset_alias String Asset alias specifying the asset to be controlled. You must specify either an ID or an alias. asset_id String Asset ID specifying the account controlling the asset. You must specify either an ID or an alias. address String Account address specifying the account controlling the asset. You must specify either an ID or an alias. amount Number Amount of the asset to be controlled. controlWithControlProgram(params) Add an action that controls assets with a receiver. Parameters: Name Type Description params Object Action parameters. Properties Name Type Description control_program Object The receiver object in which assets will be controlled. asset_id String Asset ID specifying the asset to be controlled. You must specify either an ID or an alias. asset_alias String Asset alias specifying the asset to be controlled. You must specify either an ID or an alias. amount Number Amount of the asset to be controlled. issue(params) Add an action that issues assets. Parameters: Name Type Description params Object Action parameters. Properties Name Type Description assetId String Asset ID specifying the asset to be issued. You must specify either an ID or an alias. assetAlias String Asset alias specifying the asset to be issued. You must specify either an ID or an alias. amount String Amount of the asset to be issued. retire(params) Add an action that retires units of an asset. Parameters: Name Type Description params Object Action parameters. Properties Name Type Description asset_id String Asset ID specifying the asset to be retired. You must specify either an ID or an alias. asset_alias String Asset alias specifying the asset to be retired. You must specify either an ID or an alias. amount Number Amount of the asset to be retired. spendAccountUnspentOutput(params) Add an action that spends an account unspent output. Parameters: Name Type Description params Object Action parameters. Properties Name Type Description output_id String ID of the transaction output to be spent. spendFromAccount(params) Add an action that spends assets from an account specified by identifier. Parameters: Name Type Description params Object Action parameters. Properties Name Type Description asset_id String Asset ID specifying the asset to be spent. You must specify either an ID or an alias. asset_alias String Asset alias specifying the asset to be spent. You must specify either an ID or an alias. account_id String Account ID specifying the account spending the asset. You must specify either an ID or an alias. account_alias String Account alias specifying the account spending the asset. You must specify either an ID or an alias. amount Number Amount of the asset to be spent. × Search results Close Documentation generated by JSDoc 3.5.5 on 2018-11-26T16:28:32+08:00 using the DocStrap template. "}}
     </script>
 
     <script type="text/javascript">