• R/O
  • HTTP
  • SSH
  • HTTPS

bytom-node-sdk: Commit

Node.js SDK for Bytom protocol


Commit MetaInfo

Revision2a12f6abd8f3a4b667e04424b8fd54570e16da19 (tree)
Time2018-11-26 18:02:52
AuthorZhiting Lin <zlin035@uott...>
CommiterZhiting Lin

Log Message

update the document

Change Summary

Incremental Difference

--- a/README.md
+++ b/README.md
@@ -2,48 +2,62 @@
22
33 ## Terminology
44
5-### [Keys](https://bytom.github.io/node-sdk/global.html#Key__anchor)
5+### [Keys](https://bytom.github.io/bytom-node-sdk/global.html#Key__anchor)
66
77 Cryptographic keys are the primary authorization mechanism on a blockchain.
88
99 To create accounts or assets, xpub of keys are required. With this sdk, we can
10-`create/delete/list/resetPassword` the key. Please check the
11-[API doc](https://bytom.github.io/node-sdk/module-KeysApi.html) if you want
10+`create/delete/listAll/resetPassword/checkPassword` the key. Please check the
11+[API doc](https://bytom.github.io/bytom-node-sdk/module-KeysApi.html) if you want
1212 to operate with keys.
1313
14-### [Account](https://bytom.github.io/node-sdk/global.html#Account__anchor)
14+### [Account](https://bytom.github.io/bytom-node-sdk/global.html#Account__anchor)
1515
1616 An account is an object in Bytom that tracks ownership of assets on a blockchain.
1717 It's defined under one Bytom node created with one or serveral keys.
1818
19-[Related API](https://bytom.github.io/node-sdk/module-AccountsApi.html)
19+[Related API](https://bytom.github.io/bytom-node-sdk/module-AccountsApi.html)
2020
21-### [Asset](https://bytom.github.io/node-sdk/global.html#Asset__anchor)
21+### [Asset](https://bytom.github.io/bytom-node-sdk/global.html#Asset__anchor)
2222
2323 An asset is a type of value that can be issued on a blockchain. All units of
2424 a given asset are fungible. Units of an asset can be transacted directly
2525 between parties without the involvement of the issuer.
2626
27-[Related API](https://bytom.github.io/node-sdk/module-AssetsApi.html)
27+[Related API](https://bytom.github.io/bytom-node-sdk/module-AssetsApi.html)
2828
29-### [Transaction](https://bytom.github.io/node-sdk/global.html#Transaction__anchor)
29+### [Transaction](https://bytom.github.io/bytom-node-sdk/global.html#Transaction__anchor)
3030
3131 Blockchain is chain of blocks, while block consists of numbers of transactions.
3232
33-[Related API](https://bytom.github.io/node-sdk/module-TransactionsApi.html)
33+[Related API](https://bytom.github.io/bytom-node-sdk/module-TransactionsApi.html)
3434
35-### [Unspent Output(UTXO)](https://bytom.github.io/node-sdk/global.html#UnspentOutput__anchor)
35+### [Unspent Output(UTXO)](https://bytom.github.io/bytom-node-sdk/global.html#UnspentOutput__anchor)
3636
3737 Bytom is UTXO based blockchain. One transaction spend some UTXOs, and produces new UTXOs.
3838
39-[Related API](https://bytom.github.io/node-sdk/module-UnspentOutputsApi.html)
39+[Related API](https://bytom.github.io/bytom-node-sdk/module-UnspentOutputsApi.html)
4040
41-### [Balance](https://bytom.github.io/node-sdk/global.html#Balance__anchor)
41+### [Balance](https://bytom.github.io/bytom-node-sdk/global.html#Balance__anchor)
4242
4343 Any balance on the blockchain is simply a summation of UTXOs. In one bytomd, balance means
4444 summation of UTXOs of one account.
4545
46-[Related API](https://bytom.github.io/node-sdk/module-BalancesApi.html)
46+[Related API](https://bytom.github.io/bytom-node-sdk/module-BalancesApi.html)
47+
48+### [Block](https://bytom.github.io/bytom-node-sdk/global.html#Block__anchor)
49+
50+​ A block is a container data structure that aggregates transactions for inclusion in the public ledger, the blockchain.
51+ It is made of a header, containing metadata, followed by a long list of transactions that make up the bulk of its size.
52+ Each block references to the previous block, and all the blocks are linked from the back to the front to grow a blockchain.
53+
54+[Related API](https://bytom.github.io/bytom-node-sdk/module-BlockApi.html)
55+
56+### [Config](https://bytom.github.io/bytom-node-sdk/global.html#Config__anchor)
57+
58+Config contain the network information that you wanted to know.
59+
60+[Related API](https://bytom.github.io/bytom-node-sdk/module-ConfigApi.html)
4761
4862 ## Usage
4963
@@ -67,7 +81,10 @@ We will walk you through the process to issue some assets.
6781 ### Step 1: create a key
6882
6983 ```javascript
70-const keyPromise = client.keys.create('alias', 'password')
84+const keyPromise = client.keys.create({
85+ alias:'key',
86+ password: 'password'
87+ })
7188 ```
7289
7390 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'.
7693
7794 ```javascript
7895 const accountPromise = keyPromise.then(key => {
79- client.accounts.create([key.xpub], 1, 'account')
96+ client.accounts.create({
97+ alias: 'account',
98+ root_xpubs: [key.xpub],
99+ quorum: 1
100+ })
80101 })
81102 ```
82103
@@ -84,7 +105,9 @@ const accountPromise = keyPromise.then(key => {
84105
85106 ```javascript
86107 const addressPromise = accountPromise.then(account => {
87- return client.accounts.createReceiverById(account.id)
108+ return client.accounts.createReceiver({
109+ account_alias: account.alias
110+ })
88111 })
89112 ```
90113
@@ -93,12 +116,19 @@ const addressPromise = accountPromise.then(account => {
93116 ```javascript
94117 const definition = {
95118 name: "GOLD",
96- symobol: "GOLD",
119+ symbol: "GOLD",
97120 decimals: 8,
98121 description: {}
99122 }
123+
100124 const assetPromise = keyPromise.then(key => {
101- return client.assets.create([key.xpub], 1, 'asset', definition)
125+ return client.assets.create(
126+ {
127+ alias: 'asset',
128+ definition,
129+ root_xpubs: [key.xpub],
130+ quorum: 1
131+ })
102132 })
103133 ```
104134
@@ -113,27 +143,27 @@ const buildPromise = Promise.all([
113143 assetPromise]
114144 ).then(([account, address, asset]) => {
115145 const issueAction = {
116- amount: 10000000000,
146+ amount: 100000000,
117147 asset_alias: asset.alias,
118- type: 'issue'
119148 }
120149
121150 const gasAction = {
122- type: 'spend_account',
123151 account_alias: account.alias,
124152 asset_alias: 'BTM',
125153 amount: 50000000
126154 }
127155
128156 const controlAction = {
129- type: 'control_address',
130- amount: 10000000000,
157+ amount: 100000000,
131158 asset_alias: asset.alias,
132159 address: address.address
133160 }
134161
135- return client.transactions.build(null,
136- [issueAction, gasAction, controlAction])
162+ return client.transactions.build(builder => {
163+ builder.issue(issueAction)
164+ builder.spendFromAccount(gasAction)
165+ builder.controlWithAddress(controlAction)
166+ })
137167 })
138168
139169 ```
@@ -142,7 +172,10 @@ const buildPromise = Promise.all([
142172
143173 ```javascript
144174 const signPromise = buildPromise.then(transactionTemplate => {
145- return client.transactions.sign(transactionTemplate, 'password')
175+ return client.transactions.sign({
176+ transaction: transactionTemplate,
177+ password: 'password'
178+ })
146179 })
147180 ```
148181
--- /dev/null
+++ b/docs/TransactionBuilder.html
@@ -0,0 +1,1902 @@
1+<!DOCTYPE html>
2+
3+<html lang="en">
4+<head>
5+ <meta charset="utf-8">
6+ <meta name="viewport" content="width=device-width">
7+ <title>Bytom Node.js SDK Class: TransactionBuilder</title>
8+
9+ <!--[if lt IE 9]>
10+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11+ <![endif]-->
12+ <link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
13+
14+ <link type="text/css" rel="stylesheet" href="styles/site.cosmo.css">
15+
16+</head>
17+
18+<body>
19+
20+<div class="navbar navbar-default navbar-fixed-top ">
21+<div class="container">
22+ <div class="navbar-header">
23+ <a class="navbar-brand" href="index.html">Bytom Node.js SDK</a>
24+ <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
25+ <span class="icon-bar"></span>
26+ <span class="icon-bar"></span>
27+ <span class="icon-bar"></span>
28+ </button>
29+ </div>
30+ <div class="navbar-collapse collapse" id="topNavigation">
31+ <ul class="nav navbar-nav">
32+
33+ <li class="dropdown">
34+ <a href="modules.list.html" class="dropdown-toggle" data-toggle="dropdown">Modules<b class="caret"></b></a>
35+ <ul class="dropdown-menu ">
36+ <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>
37+ </ul>
38+ </li>
39+
40+ <li class="dropdown">
41+ <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
42+ <ul class="dropdown-menu ">
43+ <li><a href="TransactionBuilder.html">TransactionBuilder</a></li>
44+ </ul>
45+ </li>
46+
47+ <li class="dropdown">
48+ <a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
49+ <ul class="dropdown-menu ">
50+ <li><a href="global.html">Global</a></li>
51+ </ul>
52+ </li>
53+
54+ </ul>
55+
56+ <div class="col-sm-3 col-md-3">
57+ <form class="navbar-form" role="search">
58+ <div class="input-group">
59+ <input type="text" class="form-control" placeholder="Search" name="q" id="search-input">
60+ <div class="input-group-btn">
61+ <button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button>
62+ </div>
63+ </div>
64+ </form>
65+ </div>
66+
67+ </div>
68+
69+</div>
70+</div>
71+
72+
73+<div class="container" id="toc-content">
74+<div class="row">
75+
76+
77+ <div class="col-md-8">
78+
79+ <div id="main">
80+
81+
82+ <h1 class="page-title">Class: TransactionBuilder</h1>
83+<section>
84+
85+<header>
86+
87+ <h2>
88+ TransactionBuilder
89+ </h2>
90+
91+ <div class="class-description"><p>A convenience class for building transaction template objects.</p></div>
92+
93+
94+</header>
95+
96+
97+<article>
98+ <div class="container-overview">
99+
100+
101+<hr>
102+<dt>
103+ <h4 class="name" id="TransactionBuilder"><span class="type-signature"></span>new TransactionBuilder()</h4>
104+
105+
106+</dt>
107+<dd>
108+
109+
110+ <div class="description">
111+ <p>constructor - return a new object used for constructing a transaction.</p>
112+ </div>
113+
114+
115+
116+
117+
118+
119+
120+
121+
122+
123+<dl class="details">
124+
125+
126+
127+
128+
129+
130+
131+
132+
133+
134+
135+
136+
137+
138+
139+
140+
141+
142+
143+
144+
145+
146+
147+
148+
149+
150+
151+
152+
153+
154+
155+
156+
157+
158+
159+</dl>
160+
161+
162+
163+
164+
165+
166+
167+
168+
169+
170+
171+
172+
173+
174+
175+</dd>
176+
177+
178+ </div>
179+
180+
181+
182+
183+
184+
185+
186+
187+
188+
189+
190+
191+ <h3 class="subsection-title">Members</h3>
192+
193+ <dl>
194+
195+<hr>
196+<dt class="name" id="baseTransaction">
197+ <h4 id="baseTransaction"><span class="type-signature"></span>baseTransaction<span class="type-signature"> :Object</span></h4>
198+
199+
200+</dt>
201+<dd>
202+
203+ <div class="description">
204+ <p>Base data for the transaction, default is null.</p>
205+ </div>
206+
207+
208+
209+ <h5>Type:</h5>
210+ <ul>
211+ <li>
212+
213+<span class="param-type">Object</span>
214+
215+
216+
217+ </li>
218+ </ul>
219+
220+
221+
222+<dl class="details">
223+
224+
225+
226+
227+
228+
229+
230+
231+
232+
233+
234+
235+
236+
237+
238+
239+
240+
241+
242+
243+
244+
245+
246+
247+
248+
249+
250+
251+
252+
253+
254+
255+
256+
257+
258+</dl>
259+
260+
261+
262+</dd>
263+
264+
265+
266+<hr>
267+<dt class="name" id="ttl">
268+ <h4 id="ttl"><span class="type-signature"></span>ttl<span class="type-signature"> :Integer</span></h4>
269+
270+
271+</dt>
272+<dd>
273+
274+ <div class="description">
275+ <p>Integer of the time to live in milliseconds, it means utxo will be reserved(locked) for
276+builded transaction in this time range, if the transaction will not to be submitted into block,
277+it will be auto unlocked for build transaction again after this ttl time. it will be set to
278+5 minutes(300 seconds) defaultly when ttl is 0.</p>
279+ </div>
280+
281+
282+
283+ <h5>Type:</h5>
284+ <ul>
285+ <li>
286+
287+<span class="param-type">Integer</span>
288+
289+
290+
291+ </li>
292+ </ul>
293+
294+
295+
296+<dl class="details">
297+
298+
299+
300+
301+
302+
303+
304+
305+
306+
307+
308+
309+
310+
311+
312+
313+
314+
315+
316+
317+
318+
319+
320+
321+
322+
323+
324+
325+
326+
327+
328+
329+
330+
331+
332+</dl>
333+
334+
335+
336+</dd>
337+
338+ </dl>
339+
340+
341+
342+ <h3 class="subsection-title">Methods</h3>
343+
344+ <dl>
345+
346+<hr>
347+<dt>
348+ <h4 class="name" id="controlWithAddress"><span class="type-signature"></span>controlWithAddress(params)</h4>
349+
350+
351+</dt>
352+<dd>
353+
354+
355+ <div class="description">
356+ <p>Add an action that controls assets with an account specified by identifier.</p>
357+ </div>
358+
359+
360+
361+
362+
363+
364+
365+
366+ <h5>Parameters:</h5>
367+
368+
369+<table class="params table table-striped">
370+ <thead>
371+ <tr>
372+
373+ <th>Name</th>
374+
375+
376+ <th>Type</th>
377+
378+
379+
380+
381+
382+ <th class="last">Description</th>
383+ </tr>
384+ </thead>
385+
386+ <tbody>
387+
388+
389+ <tr>
390+
391+ <td class="name"><code>params</code></td>
392+
393+
394+ <td class="type">
395+
396+
397+<span class="param-type">Object</span>
398+
399+
400+
401+
402+ </td>
403+
404+
405+
406+
407+
408+ <td class="description last"><p>Action parameters.</p>
409+ <h6 class="method-params-label method-subparams-label">Properties</h6>
410+
411+
412+<table class="params table table-striped">
413+ <thead>
414+ <tr>
415+
416+ <th>Name</th>
417+
418+
419+ <th>Type</th>
420+
421+
422+
423+
424+
425+ <th class="last">Description</th>
426+ </tr>
427+ </thead>
428+
429+ <tbody>
430+
431+
432+ <tr>
433+
434+ <td class="name"><code>asset_alias</code></td>
435+
436+
437+ <td class="type">
438+
439+
440+<span class="param-type">String</span>
441+
442+
443+
444+
445+ </td>
446+
447+
448+
449+
450+
451+ <td class="description last"><p>Asset alias specifying the asset to be controlled.
452+ You must specify either an ID or an alias.</p></td>
453+ </tr>
454+
455+
456+
457+ <tr>
458+
459+ <td class="name"><code>asset_id</code></td>
460+
461+
462+ <td class="type">
463+
464+
465+<span class="param-type">String</span>
466+
467+
468+
469+
470+ </td>
471+
472+
473+
474+
475+
476+ <td class="description last"><p>Asset ID specifying the account controlling the asset.
477+ You must specify either an ID or an alias.</p></td>
478+ </tr>
479+
480+
481+
482+ <tr>
483+
484+ <td class="name"><code>address</code></td>
485+
486+
487+ <td class="type">
488+
489+
490+<span class="param-type">String</span>
491+
492+
493+
494+
495+ </td>
496+
497+
498+
499+
500+
501+ <td class="description last"><p>Account address specifying the account controlling the asset.
502+ You must specify either an ID or an alias.</p></td>
503+ </tr>
504+
505+
506+
507+ <tr>
508+
509+ <td class="name"><code>amount</code></td>
510+
511+
512+ <td class="type">
513+
514+
515+<span class="param-type">Number</span>
516+
517+
518+
519+
520+ </td>
521+
522+
523+
524+
525+
526+ <td class="description last"><p>Amount of the asset to be controlled.</p></td>
527+ </tr>
528+
529+
530+ </tbody>
531+</table>
532+
533+ </td>
534+ </tr>
535+
536+
537+ </tbody>
538+</table>
539+
540+
541+
542+
543+<dl class="details">
544+
545+
546+
547+
548+
549+
550+
551+
552+
553+
554+
555+
556+
557+
558+
559+
560+
561+
562+
563+
564+
565+
566+
567+
568+
569+
570+
571+
572+
573+
574+
575+
576+
577+
578+
579+</dl>
580+
581+
582+
583+
584+
585+
586+
587+
588+
589+
590+
591+
592+
593+
594+
595+</dd>
596+
597+
598+
599+<hr>
600+<dt>
601+ <h4 class="name" id="controlWithControlProgram"><span class="type-signature"></span>controlWithControlProgram(params)</h4>
602+
603+
604+</dt>
605+<dd>
606+
607+
608+ <div class="description">
609+ <p>Add an action that controls assets with a receiver.</p>
610+ </div>
611+
612+
613+
614+
615+
616+
617+
618+
619+ <h5>Parameters:</h5>
620+
621+
622+<table class="params table table-striped">
623+ <thead>
624+ <tr>
625+
626+ <th>Name</th>
627+
628+
629+ <th>Type</th>
630+
631+
632+
633+
634+
635+ <th class="last">Description</th>
636+ </tr>
637+ </thead>
638+
639+ <tbody>
640+
641+
642+ <tr>
643+
644+ <td class="name"><code>params</code></td>
645+
646+
647+ <td class="type">
648+
649+
650+<span class="param-type">Object</span>
651+
652+
653+
654+
655+ </td>
656+
657+
658+
659+
660+
661+ <td class="description last"><p>Action parameters.</p>
662+ <h6 class="method-params-label method-subparams-label">Properties</h6>
663+
664+
665+<table class="params table table-striped">
666+ <thead>
667+ <tr>
668+
669+ <th>Name</th>
670+
671+
672+ <th>Type</th>
673+
674+
675+
676+
677+
678+ <th class="last">Description</th>
679+ </tr>
680+ </thead>
681+
682+ <tbody>
683+
684+
685+ <tr>
686+
687+ <td class="name"><code>control_program</code></td>
688+
689+
690+ <td class="type">
691+
692+
693+<span class="param-type">Object</span>
694+
695+
696+
697+
698+ </td>
699+
700+
701+
702+
703+
704+ <td class="description last"><p>The receiver object in which assets will be controlled.</p></td>
705+ </tr>
706+
707+
708+
709+ <tr>
710+
711+ <td class="name"><code>asset_id</code></td>
712+
713+
714+ <td class="type">
715+
716+
717+<span class="param-type">String</span>
718+
719+
720+
721+
722+ </td>
723+
724+
725+
726+
727+
728+ <td class="description last"><p>Asset ID specifying the asset to be controlled.
729+ You must specify either an ID or an alias.</p></td>
730+ </tr>
731+
732+
733+
734+ <tr>
735+
736+ <td class="name"><code>asset_alias</code></td>
737+
738+
739+ <td class="type">
740+
741+
742+<span class="param-type">String</span>
743+
744+
745+
746+
747+ </td>
748+
749+
750+
751+
752+
753+ <td class="description last"><p>Asset alias specifying the asset to be controlled.
754+ You must specify either an ID or an alias.</p></td>
755+ </tr>
756+
757+
758+
759+ <tr>
760+
761+ <td class="name"><code>amount</code></td>
762+
763+
764+ <td class="type">
765+
766+
767+<span class="param-type">Number</span>
768+
769+
770+
771+
772+ </td>
773+
774+
775+
776+
777+
778+ <td class="description last"><p>Amount of the asset to be controlled.</p></td>
779+ </tr>
780+
781+
782+ </tbody>
783+</table>
784+
785+ </td>
786+ </tr>
787+
788+
789+ </tbody>
790+</table>
791+
792+
793+
794+
795+<dl class="details">
796+
797+
798+
799+
800+
801+
802+
803+
804+
805+
806+
807+
808+
809+
810+
811+
812+
813+
814+
815+
816+
817+
818+
819+
820+
821+
822+
823+
824+
825+
826+
827+
828+
829+
830+
831+</dl>
832+
833+
834+
835+
836+
837+
838+
839+
840+
841+
842+
843+
844+
845+
846+
847+</dd>
848+
849+
850+
851+<hr>
852+<dt>
853+ <h4 class="name" id="issue"><span class="type-signature"></span>issue(params)</h4>
854+
855+
856+</dt>
857+<dd>
858+
859+
860+ <div class="description">
861+ <p>Add an action that issues assets.</p>
862+ </div>
863+
864+
865+
866+
867+
868+
869+
870+
871+ <h5>Parameters:</h5>
872+
873+
874+<table class="params table table-striped">
875+ <thead>
876+ <tr>
877+
878+ <th>Name</th>
879+
880+
881+ <th>Type</th>
882+
883+
884+
885+
886+
887+ <th class="last">Description</th>
888+ </tr>
889+ </thead>
890+
891+ <tbody>
892+
893+
894+ <tr>
895+
896+ <td class="name"><code>params</code></td>
897+
898+
899+ <td class="type">
900+
901+
902+<span class="param-type">Object</span>
903+
904+
905+
906+
907+ </td>
908+
909+
910+
911+
912+
913+ <td class="description last"><p>Action parameters.</p>
914+ <h6 class="method-params-label method-subparams-label">Properties</h6>
915+
916+
917+<table class="params table table-striped">
918+ <thead>
919+ <tr>
920+
921+ <th>Name</th>
922+
923+
924+ <th>Type</th>
925+
926+
927+
928+
929+
930+ <th class="last">Description</th>
931+ </tr>
932+ </thead>
933+
934+ <tbody>
935+
936+
937+ <tr>
938+
939+ <td class="name"><code>assetId</code></td>
940+
941+
942+ <td class="type">
943+
944+
945+<span class="param-type">String</span>
946+
947+
948+
949+
950+ </td>
951+
952+
953+
954+
955+
956+ <td class="description last"><p>Asset ID specifying the asset to be issued.
957+ You must specify either an ID or an alias.</p></td>
958+ </tr>
959+
960+
961+
962+ <tr>
963+
964+ <td class="name"><code>assetAlias</code></td>
965+
966+
967+ <td class="type">
968+
969+
970+<span class="param-type">String</span>
971+
972+
973+
974+
975+ </td>
976+
977+
978+
979+
980+
981+ <td class="description last"><p>Asset alias specifying the asset to be issued.
982+ You must specify either an ID or an alias.</p></td>
983+ </tr>
984+
985+
986+
987+ <tr>
988+
989+ <td class="name"><code>amount</code></td>
990+
991+
992+ <td class="type">
993+
994+
995+<span class="param-type">String</span>
996+
997+
998+
999+
1000+ </td>
1001+
1002+
1003+
1004+
1005+
1006+ <td class="description last"><p>Amount of the asset to be issued.</p></td>
1007+ </tr>
1008+
1009+
1010+ </tbody>
1011+</table>
1012+
1013+ </td>
1014+ </tr>
1015+
1016+
1017+ </tbody>
1018+</table>
1019+
1020+
1021+
1022+
1023+<dl class="details">
1024+
1025+
1026+
1027+
1028+
1029+
1030+
1031+
1032+
1033+
1034+
1035+
1036+
1037+
1038+
1039+
1040+
1041+
1042+
1043+
1044+
1045+
1046+
1047+
1048+
1049+
1050+
1051+
1052+
1053+
1054+
1055+
1056+
1057+
1058+
1059+</dl>
1060+
1061+
1062+
1063+
1064+
1065+
1066+
1067+
1068+
1069+
1070+
1071+
1072+
1073+
1074+
1075+</dd>
1076+
1077+
1078+
1079+<hr>
1080+<dt>
1081+ <h4 class="name" id="retire"><span class="type-signature"></span>retire(params)</h4>
1082+
1083+
1084+</dt>
1085+<dd>
1086+
1087+
1088+ <div class="description">
1089+ <p>Add an action that retires units of an asset.</p>
1090+ </div>
1091+
1092+
1093+
1094+
1095+
1096+
1097+
1098+
1099+ <h5>Parameters:</h5>
1100+
1101+
1102+<table class="params table table-striped">
1103+ <thead>
1104+ <tr>
1105+
1106+ <th>Name</th>
1107+
1108+
1109+ <th>Type</th>
1110+
1111+
1112+
1113+
1114+
1115+ <th class="last">Description</th>
1116+ </tr>
1117+ </thead>
1118+
1119+ <tbody>
1120+
1121+
1122+ <tr>
1123+
1124+ <td class="name"><code>params</code></td>
1125+
1126+
1127+ <td class="type">
1128+
1129+
1130+<span class="param-type">Object</span>
1131+
1132+
1133+
1134+
1135+ </td>
1136+
1137+
1138+
1139+
1140+
1141+ <td class="description last"><p>Action parameters.</p>
1142+ <h6 class="method-params-label method-subparams-label">Properties</h6>
1143+
1144+
1145+<table class="params table table-striped">
1146+ <thead>
1147+ <tr>
1148+
1149+ <th>Name</th>
1150+
1151+
1152+ <th>Type</th>
1153+
1154+
1155+
1156+
1157+
1158+ <th class="last">Description</th>
1159+ </tr>
1160+ </thead>
1161+
1162+ <tbody>
1163+
1164+
1165+ <tr>
1166+
1167+ <td class="name"><code>asset_id</code></td>
1168+
1169+
1170+ <td class="type">
1171+
1172+
1173+<span class="param-type">String</span>
1174+
1175+
1176+
1177+
1178+ </td>
1179+
1180+
1181+
1182+
1183+
1184+ <td class="description last"><p>Asset ID specifying the asset to be retired.
1185+ You must specify either an ID or an alias.</p></td>
1186+ </tr>
1187+
1188+
1189+
1190+ <tr>
1191+
1192+ <td class="name"><code>asset_alias</code></td>
1193+
1194+
1195+ <td class="type">
1196+
1197+
1198+<span class="param-type">String</span>
1199+
1200+
1201+
1202+
1203+ </td>
1204+
1205+
1206+
1207+
1208+
1209+ <td class="description last"><p>Asset alias specifying the asset to be retired.
1210+ You must specify either an ID or an alias.</p></td>
1211+ </tr>
1212+
1213+
1214+
1215+ <tr>
1216+
1217+ <td class="name"><code>amount</code></td>
1218+
1219+
1220+ <td class="type">
1221+
1222+
1223+<span class="param-type">Number</span>
1224+
1225+
1226+
1227+
1228+ </td>
1229+
1230+
1231+
1232+
1233+
1234+ <td class="description last"><p>Amount of the asset to be retired.</p></td>
1235+ </tr>
1236+
1237+
1238+ </tbody>
1239+</table>
1240+
1241+ </td>
1242+ </tr>
1243+
1244+
1245+ </tbody>
1246+</table>
1247+
1248+
1249+
1250+
1251+<dl class="details">
1252+
1253+
1254+
1255+
1256+
1257+
1258+
1259+
1260+
1261+
1262+
1263+
1264+
1265+
1266+
1267+
1268+
1269+
1270+
1271+
1272+
1273+
1274+
1275+
1276+
1277+
1278+
1279+
1280+
1281+
1282+
1283+
1284+
1285+
1286+
1287+</dl>
1288+
1289+
1290+
1291+
1292+
1293+
1294+
1295+
1296+
1297+
1298+
1299+
1300+
1301+
1302+
1303+</dd>
1304+
1305+
1306+
1307+<hr>
1308+<dt>
1309+ <h4 class="name" id="spendAccountUnspentOutput"><span class="type-signature"></span>spendAccountUnspentOutput(params)</h4>
1310+
1311+
1312+</dt>
1313+<dd>
1314+
1315+
1316+ <div class="description">
1317+ <p>Add an action that spends an account unspent output.</p>
1318+ </div>
1319+
1320+
1321+
1322+
1323+
1324+
1325+
1326+
1327+ <h5>Parameters:</h5>
1328+
1329+
1330+<table class="params table table-striped">
1331+ <thead>
1332+ <tr>
1333+
1334+ <th>Name</th>
1335+
1336+
1337+ <th>Type</th>
1338+
1339+
1340+
1341+
1342+
1343+ <th class="last">Description</th>
1344+ </tr>
1345+ </thead>
1346+
1347+ <tbody>
1348+
1349+
1350+ <tr>
1351+
1352+ <td class="name"><code>params</code></td>
1353+
1354+
1355+ <td class="type">
1356+
1357+
1358+<span class="param-type">Object</span>
1359+
1360+
1361+
1362+
1363+ </td>
1364+
1365+
1366+
1367+
1368+
1369+ <td class="description last"><p>Action parameters.</p>
1370+ <h6 class="method-params-label method-subparams-label">Properties</h6>
1371+
1372+
1373+<table class="params table table-striped">
1374+ <thead>
1375+ <tr>
1376+
1377+ <th>Name</th>
1378+
1379+
1380+ <th>Type</th>
1381+
1382+
1383+
1384+
1385+
1386+ <th class="last">Description</th>
1387+ </tr>
1388+ </thead>
1389+
1390+ <tbody>
1391+
1392+
1393+ <tr>
1394+
1395+ <td class="name"><code>output_id</code></td>
1396+
1397+
1398+ <td class="type">
1399+
1400+
1401+<span class="param-type">String</span>
1402+
1403+
1404+
1405+
1406+ </td>
1407+
1408+
1409+
1410+
1411+
1412+ <td class="description last"><p>ID of the transaction output to be spent.</p></td>
1413+ </tr>
1414+
1415+
1416+ </tbody>
1417+</table>
1418+
1419+ </td>
1420+ </tr>
1421+
1422+
1423+ </tbody>
1424+</table>
1425+
1426+
1427+
1428+
1429+<dl class="details">
1430+
1431+
1432+
1433+
1434+
1435+
1436+
1437+
1438+
1439+
1440+
1441+
1442+
1443+
1444+
1445+
1446+
1447+
1448+
1449+
1450+
1451+
1452+
1453+
1454+
1455+
1456+
1457+
1458+
1459+
1460+
1461+
1462+
1463+
1464+
1465+</dl>
1466+
1467+
1468+
1469+
1470+
1471+
1472+
1473+
1474+
1475+
1476+
1477+
1478+
1479+
1480+
1481+</dd>
1482+
1483+
1484+
1485+<hr>
1486+<dt>
1487+ <h4 class="name" id="spendFromAccount"><span class="type-signature"></span>spendFromAccount(params)</h4>
1488+
1489+
1490+</dt>
1491+<dd>
1492+
1493+
1494+ <div class="description">
1495+ <p>Add an action that spends assets from an account specified by identifier.</p>
1496+ </div>
1497+
1498+
1499+
1500+
1501+
1502+
1503+
1504+
1505+ <h5>Parameters:</h5>
1506+
1507+
1508+<table class="params table table-striped">
1509+ <thead>
1510+ <tr>
1511+
1512+ <th>Name</th>
1513+
1514+
1515+ <th>Type</th>
1516+
1517+
1518+
1519+
1520+
1521+ <th class="last">Description</th>
1522+ </tr>
1523+ </thead>
1524+
1525+ <tbody>
1526+
1527+
1528+ <tr>
1529+
1530+ <td class="name"><code>params</code></td>
1531+
1532+
1533+ <td class="type">
1534+
1535+
1536+<span class="param-type">Object</span>
1537+
1538+
1539+
1540+
1541+ </td>
1542+
1543+
1544+
1545+
1546+
1547+ <td class="description last"><p>Action parameters.</p>
1548+ <h6 class="method-params-label method-subparams-label">Properties</h6>
1549+
1550+
1551+<table class="params table table-striped">
1552+ <thead>
1553+ <tr>
1554+
1555+ <th>Name</th>
1556+
1557+
1558+ <th>Type</th>
1559+
1560+
1561+
1562+
1563+
1564+ <th class="last">Description</th>
1565+ </tr>
1566+ </thead>
1567+
1568+ <tbody>
1569+
1570+
1571+ <tr>
1572+
1573+ <td class="name"><code>asset_id</code></td>
1574+
1575+
1576+ <td class="type">
1577+
1578+
1579+<span class="param-type">String</span>
1580+
1581+
1582+
1583+
1584+ </td>
1585+
1586+
1587+
1588+
1589+
1590+ <td class="description last"><p>Asset ID specifying the asset to be spent.
1591+ You must specify either an ID or an alias.</p></td>
1592+ </tr>
1593+
1594+
1595+
1596+ <tr>
1597+
1598+ <td class="name"><code>asset_alias</code></td>
1599+
1600+
1601+ <td class="type">
1602+
1603+
1604+<span class="param-type">String</span>
1605+
1606+
1607+
1608+
1609+ </td>
1610+
1611+
1612+
1613+
1614+
1615+ <td class="description last"><p>Asset alias specifying the asset to be spent.
1616+ You must specify either an ID or an alias.</p></td>
1617+ </tr>
1618+
1619+
1620+
1621+ <tr>
1622+
1623+ <td class="name"><code>account_id</code></td>
1624+
1625+
1626+ <td class="type">
1627+
1628+
1629+<span class="param-type">String</span>
1630+
1631+
1632+
1633+
1634+ </td>
1635+
1636+
1637+
1638+
1639+
1640+ <td class="description last"><p>Account ID specifying the account spending the asset.
1641+ You must specify either an ID or an alias.</p></td>
1642+ </tr>
1643+
1644+
1645+
1646+ <tr>
1647+
1648+ <td class="name"><code>account_alias</code></td>
1649+
1650+
1651+ <td class="type">
1652+
1653+
1654+<span class="param-type">String</span>
1655+
1656+
1657+
1658+
1659+ </td>
1660+
1661+
1662+
1663+
1664+
1665+ <td class="description last"><p>Account alias specifying the account spending the asset.
1666+ You must specify either an ID or an alias.</p></td>
1667+ </tr>
1668+
1669+
1670+
1671+ <tr>
1672+
1673+ <td class="name"><code>amount</code></td>
1674+
1675+
1676+ <td class="type">
1677+
1678+
1679+<span class="param-type">Number</span>
1680+
1681+
1682+
1683+
1684+ </td>
1685+
1686+
1687+
1688+
1689+
1690+ <td class="description last"><p>Amount of the asset to be spent.</p></td>
1691+ </tr>
1692+
1693+
1694+ </tbody>
1695+</table>
1696+
1697+ </td>
1698+ </tr>
1699+
1700+
1701+ </tbody>
1702+</table>
1703+
1704+
1705+
1706+
1707+<dl class="details">
1708+
1709+
1710+
1711+
1712+
1713+
1714+
1715+
1716+
1717+
1718+
1719+
1720+
1721+
1722+
1723+
1724+
1725+
1726+
1727+
1728+
1729+
1730+
1731+
1732+
1733+
1734+
1735+
1736+
1737+
1738+
1739+
1740+
1741+
1742+
1743+</dl>
1744+
1745+
1746+
1747+
1748+
1749+
1750+
1751+
1752+
1753+
1754+
1755+
1756+
1757+
1758+
1759+</dd>
1760+
1761+ </dl>
1762+
1763+
1764+
1765+
1766+
1767+</article>
1768+
1769+</section>
1770+
1771+
1772+
1773+
1774+ </div>
1775+ </div>
1776+
1777+ <div class="clearfix"></div>
1778+
1779+
1780+ <div class="col-md-3">
1781+ <div id="toc" class="col-md-3 hidden-xs hidden-sm hidden-md"></div>
1782+ </div>
1783+
1784+
1785+</div>
1786+</div>
1787+
1788+
1789+ <div class="modal fade" id="searchResults">
1790+ <div class="modal-dialog">
1791+ <div class="modal-content">
1792+ <div class="modal-header">
1793+ <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
1794+ <h4 class="modal-title">Search results</h4>
1795+ </div>
1796+ <div class="modal-body"></div>
1797+ <div class="modal-footer">
1798+ <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
1799+ </div>
1800+ </div><!-- /.modal-content -->
1801+ </div><!-- /.modal-dialog -->
1802+ </div>
1803+
1804+
1805+<footer>
1806+
1807+
1808+<span class="jsdoc-message">
1809+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
1810+
1811+ on 2018-11-26T16:28:32+08:00
1812+
1813+ using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
1814+</span>
1815+</footer>
1816+
1817+<script src="scripts/docstrap.lib.js"></script>
1818+<script src="scripts/toc.js"></script>
1819+
1820+ <script type="text/javascript" src="scripts/fulltext-search-ui.js"></script>
1821+
1822+
1823+<script>
1824+$( function () {
1825+ $( "[id*='$']" ).each( function () {
1826+ var $this = $( this );
1827+
1828+ $this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
1829+ } );
1830+
1831+ $( ".tutorial-section pre, .readme-section pre, pre.prettyprint.source" ).each( function () {
1832+ var $this = $( this );
1833+
1834+ var example = $this.find( "code" );
1835+ exampleText = example.html();
1836+ var lang = /{@lang (.*?)}/.exec( exampleText );
1837+ if ( lang && lang[1] ) {
1838+ exampleText = exampleText.replace( lang[0], "" );
1839+ example.html( exampleText );
1840+ lang = lang[1];
1841+ } else {
1842+ var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
1843+ lang = langClassMatch ? langClassMatch[1] : "javascript";
1844+ }
1845+
1846+ if ( lang ) {
1847+
1848+ $this
1849+ .addClass( "sunlight-highlight-" + lang )
1850+ .addClass( "linenums" )
1851+ .html( example.html() );
1852+
1853+ }
1854+ } );
1855+
1856+ Sunlight.highlightAll( {
1857+ lineNumbers : true,
1858+ showMenu : true,
1859+ enableDoclinks : true
1860+ } );
1861+
1862+ $.catchAnchorLinks( {
1863+ navbarOffset: 10
1864+ } );
1865+ $( "#toc" ).toc( {
1866+ anchorName : function ( i, heading, prefix ) {
1867+ return $( heading ).attr( "id" ) || ( prefix + i );
1868+ },
1869+ selectors : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4",
1870+ showAndHide : false,
1871+ smoothScrolling: true
1872+ } );
1873+
1874+ $( "#main span[id^='toc']" ).addClass( "toc-shim" );
1875+ $( '.dropdown-toggle' ).dropdown();
1876+
1877+ $( "table" ).each( function () {
1878+ var $this = $( this );
1879+ $this.addClass('table');
1880+ } );
1881+
1882+} );
1883+</script>
1884+
1885+
1886+
1887+<!--Navigation and Symbol Display-->
1888+
1889+
1890+<!--Google Analytics-->
1891+
1892+
1893+
1894+ <script type="text/javascript">
1895+ $(document).ready(function() {
1896+ SearcherDisplay.init();
1897+ });
1898+ </script>
1899+
1900+
1901+</body>
1902+</html>
\ No newline at end of file
--- /dev/null
+++ b/docs/classes.list.html
@@ -0,0 +1,303 @@
1+<!DOCTYPE html>
2+
3+<html lang="en">
4+<head>
5+ <meta charset="utf-8">
6+ <meta name="viewport" content="width=device-width">
7+ <title>Bytom Node.js SDK Classes</title>
8+
9+ <!--[if lt IE 9]>
10+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11+ <![endif]-->
12+ <link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
13+
14+ <link type="text/css" rel="stylesheet" href="styles/site.cosmo.css">
15+
16+</head>
17+
18+<body>
19+
20+<div class="navbar navbar-default navbar-fixed-top ">
21+<div class="container">
22+ <div class="navbar-header">
23+ <a class="navbar-brand" href="index.html">Bytom Node.js SDK</a>
24+ <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
25+ <span class="icon-bar"></span>
26+ <span class="icon-bar"></span>
27+ <span class="icon-bar"></span>
28+ </button>
29+ </div>
30+ <div class="navbar-collapse collapse" id="topNavigation">
31+ <ul class="nav navbar-nav">
32+
33+ <li class="dropdown">
34+ <a href="modules.list.html" class="dropdown-toggle" data-toggle="dropdown">Modules<b class="caret"></b></a>
35+ <ul class="dropdown-menu ">
36+ <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>
37+ </ul>
38+ </li>
39+
40+ <li class="dropdown">
41+ <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
42+ <ul class="dropdown-menu ">
43+ <li><a href="TransactionBuilder.html">TransactionBuilder</a></li>
44+ </ul>
45+ </li>
46+
47+ <li class="dropdown">
48+ <a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
49+ <ul class="dropdown-menu ">
50+ <li><a href="global.html">Global</a></li>
51+ </ul>
52+ </li>
53+
54+ </ul>
55+
56+ <div class="col-sm-3 col-md-3">
57+ <form class="navbar-form" role="search">
58+ <div class="input-group">
59+ <input type="text" class="form-control" placeholder="Search" name="q" id="search-input">
60+ <div class="input-group-btn">
61+ <button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button>
62+ </div>
63+ </div>
64+ </form>
65+ </div>
66+
67+ </div>
68+
69+</div>
70+</div>
71+
72+
73+<div class="container" id="toc-content">
74+<div class="row">
75+
76+
77+ <div class="col-md-8">
78+
79+ <div id="main">
80+
81+
82+ <h1 class="page-title">Classes</h1>
83+<section>
84+
85+<header>
86+
87+ <h2>
88+
89+ </h2>
90+
91+
92+</header>
93+
94+
95+<article>
96+ <div class="container-overview">
97+
98+
99+
100+
101+<dl class="details">
102+
103+
104+
105+
106+
107+
108+
109+
110+
111+
112+
113+
114+
115+
116+
117+
118+
119+
120+
121+
122+
123+
124+
125+
126+
127+
128+
129+
130+
131+
132+
133+
134+
135+
136+
137+</dl>
138+
139+
140+
141+
142+ </div>
143+
144+
145+
146+
147+
148+
149+ <h3 class="subsection-title">Classes</h3>
150+
151+ <dl>
152+ <dt><a href="TransactionBuilder.html">TransactionBuilder</a></dt>
153+ <dd></dd>
154+ </dl>
155+
156+
157+
158+
159+
160+
161+
162+
163+
164+
165+
166+
167+
168+</article>
169+
170+</section>
171+
172+
173+
174+
175+ </div>
176+ </div>
177+
178+ <div class="clearfix"></div>
179+
180+
181+ <div class="col-md-3">
182+ <div id="toc" class="col-md-3 hidden-xs hidden-sm hidden-md"></div>
183+ </div>
184+
185+
186+</div>
187+</div>
188+
189+
190+ <div class="modal fade" id="searchResults">
191+ <div class="modal-dialog">
192+ <div class="modal-content">
193+ <div class="modal-header">
194+ <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
195+ <h4 class="modal-title">Search results</h4>
196+ </div>
197+ <div class="modal-body"></div>
198+ <div class="modal-footer">
199+ <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
200+ </div>
201+ </div><!-- /.modal-content -->
202+ </div><!-- /.modal-dialog -->
203+ </div>
204+
205+
206+<footer>
207+
208+
209+<span class="jsdoc-message">
210+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
211+
212+ on 2018-11-26T16:28:32+08:00
213+
214+ using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
215+</span>
216+</footer>
217+
218+<script src="scripts/docstrap.lib.js"></script>
219+<script src="scripts/toc.js"></script>
220+
221+ <script type="text/javascript" src="scripts/fulltext-search-ui.js"></script>
222+
223+
224+<script>
225+$( function () {
226+ $( "[id*='$']" ).each( function () {
227+ var $this = $( this );
228+
229+ $this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
230+ } );
231+
232+ $( ".tutorial-section pre, .readme-section pre, pre.prettyprint.source" ).each( function () {
233+ var $this = $( this );
234+
235+ var example = $this.find( "code" );
236+ exampleText = example.html();
237+ var lang = /{@lang (.*?)}/.exec( exampleText );
238+ if ( lang && lang[1] ) {
239+ exampleText = exampleText.replace( lang[0], "" );
240+ example.html( exampleText );
241+ lang = lang[1];
242+ } else {
243+ var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
244+ lang = langClassMatch ? langClassMatch[1] : "javascript";
245+ }
246+
247+ if ( lang ) {
248+
249+ $this
250+ .addClass( "sunlight-highlight-" + lang )
251+ .addClass( "linenums" )
252+ .html( example.html() );
253+
254+ }
255+ } );
256+
257+ Sunlight.highlightAll( {
258+ lineNumbers : true,
259+ showMenu : true,
260+ enableDoclinks : true
261+ } );
262+
263+ $.catchAnchorLinks( {
264+ navbarOffset: 10
265+ } );
266+ $( "#toc" ).toc( {
267+ anchorName : function ( i, heading, prefix ) {
268+ return $( heading ).attr( "id" ) || ( prefix + i );
269+ },
270+ selectors : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4",
271+ showAndHide : false,
272+ smoothScrolling: true
273+ } );
274+
275+ $( "#main span[id^='toc']" ).addClass( "toc-shim" );
276+ $( '.dropdown-toggle' ).dropdown();
277+
278+ $( "table" ).each( function () {
279+ var $this = $( this );
280+ $this.addClass('table');
281+ } );
282+
283+} );
284+</script>
285+
286+
287+
288+<!--Navigation and Symbol Display-->
289+
290+
291+<!--Google Analytics-->
292+
293+
294+
295+ <script type="text/javascript">
296+ $(document).ready(function() {
297+ SearcherDisplay.init();
298+ });
299+ </script>
300+
301+
302+</body>
303+</html>
\ No newline at end of file
--- a/docs/global.html
+++ b/docs/global.html
@@ -33,7 +33,14 @@
3333 <li class="dropdown">
3434 <a href="modules.list.html" class="dropdown-toggle" data-toggle="dropdown">Modules<b class="caret"></b></a>
3535 <ul class="dropdown-menu ">
36- <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>
36+ <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>
37+ </ul>
38+ </li>
39+
40+ <li class="dropdown">
41+ <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
42+ <ul class="dropdown-menu ">
43+ <li><a href="TransactionBuilder.html">TransactionBuilder</a></li>
3744 </ul>
3845 </li>
3946
@@ -162,7 +169,7 @@
162169 <dd>
163170
164171 <div class="description">
165- <p>Access tokens are <code>name:secret-token</code> pairs that are granted authorization for accessing Chain Core features.</p>
172+ <p>Access tokens are <code>name:secret-token</code> pairs that are granted authorization for accessing Bytom Core features.</p>
166173 </div>
167174
168175
@@ -1046,6 +1053,1626 @@ issuance programs, rendering the definition immutable.</p></td>
10461053
10471054
10481055 <hr>
1056+<dt class="name" id="BlockInfo">
1057+ <h4 id="BlockInfo">BlockInfo</h4>
1058+
1059+
1060+</dt>
1061+<dd>
1062+
1063+
1064+
1065+ <h5>Type:</h5>
1066+ <ul>
1067+ <li>
1068+
1069+<span class="param-type">Object</span>
1070+
1071+
1072+
1073+ </li>
1074+ </ul>
1075+
1076+
1077+
1078+<dl class="details">
1079+
1080+
1081+ <h5 class="subsection-title">Properties:</h5>
1082+
1083+ <dl>
1084+
1085+<table class="props table table-striped">
1086+ <thead>
1087+ <tr>
1088+
1089+ <th>Name</th>
1090+
1091+
1092+ <th>Type</th>
1093+
1094+
1095+
1096+
1097+
1098+ <th class="last">Description</th>
1099+ </tr>
1100+ </thead>
1101+
1102+ <tbody>
1103+
1104+
1105+ <tr>
1106+
1107+ <td class="name"><code>hash</code></td>
1108+
1109+
1110+ <td class="type">
1111+
1112+
1113+<span class="param-type">String</span>
1114+
1115+
1116+
1117+
1118+ </td>
1119+
1120+
1121+
1122+
1123+
1124+ <td class="description last"><p>hash of block.</p></td>
1125+ </tr>
1126+
1127+
1128+
1129+ <tr>
1130+
1131+ <td class="name"><code>size</code></td>
1132+
1133+
1134+ <td class="type">
1135+
1136+
1137+<span class="param-type">Integer</span>
1138+
1139+
1140+
1141+
1142+ </td>
1143+
1144+
1145+
1146+
1147+
1148+ <td class="description last"><p>size of block.</p></td>
1149+ </tr>
1150+
1151+
1152+
1153+ <tr>
1154+
1155+ <td class="name"><code>version</code></td>
1156+
1157+
1158+ <td class="type">
1159+
1160+
1161+<span class="param-type">Integer</span>
1162+
1163+
1164+
1165+
1166+ </td>
1167+
1168+
1169+
1170+
1171+
1172+ <td class="description last"><p>version of block.</p></td>
1173+ </tr>
1174+
1175+
1176+
1177+ <tr>
1178+
1179+ <td class="name"><code>height</code></td>
1180+
1181+
1182+ <td class="type">
1183+
1184+
1185+<span class="param-type">Integer</span>
1186+
1187+
1188+
1189+
1190+ </td>
1191+
1192+
1193+
1194+
1195+
1196+ <td class="description last"><p>height of block.</p></td>
1197+ </tr>
1198+
1199+
1200+
1201+ <tr>
1202+
1203+ <td class="name"><code>previous_block_hash</code></td>
1204+
1205+
1206+ <td class="type">
1207+
1208+
1209+<span class="param-type">String</span>
1210+
1211+
1212+
1213+
1214+ </td>
1215+
1216+
1217+
1218+
1219+
1220+ <td class="description last"><p>previous block hash.</p></td>
1221+ </tr>
1222+
1223+
1224+
1225+ <tr>
1226+
1227+ <td class="name"><code>timestamp</code></td>
1228+
1229+
1230+ <td class="type">
1231+
1232+
1233+<span class="param-type">Integer</span>
1234+
1235+
1236+
1237+
1238+ </td>
1239+
1240+
1241+
1242+
1243+
1244+ <td class="description last"><p>timestamp of block.</p></td>
1245+ </tr>
1246+
1247+
1248+
1249+ <tr>
1250+
1251+ <td class="name"><code>nonce</code></td>
1252+
1253+
1254+ <td class="type">
1255+
1256+
1257+<span class="param-type">Integer</span>
1258+
1259+
1260+
1261+
1262+ </td>
1263+
1264+
1265+
1266+
1267+
1268+ <td class="description last"><p>nonce value.</p></td>
1269+ </tr>
1270+
1271+
1272+
1273+ <tr>
1274+
1275+ <td class="name"><code>bits</code></td>
1276+
1277+
1278+ <td class="type">
1279+
1280+
1281+<span class="param-type">Integer</span>
1282+
1283+
1284+
1285+
1286+ </td>
1287+
1288+
1289+
1290+
1291+
1292+ <td class="description last"><p>bits of difficulty.</p></td>
1293+ </tr>
1294+
1295+
1296+
1297+ <tr>
1298+
1299+ <td class="name"><code>difficulty</code></td>
1300+
1301+
1302+ <td class="type">
1303+
1304+
1305+<span class="param-type">String</span>
1306+
1307+
1308+
1309+
1310+ </td>
1311+
1312+
1313+
1314+
1315+
1316+ <td class="description last"><p>difficulty value(String type).</p></td>
1317+ </tr>
1318+
1319+
1320+
1321+ <tr>
1322+
1323+ <td class="name"><code>transaction_merkle_root</code></td>
1324+
1325+
1326+ <td class="type">
1327+
1328+
1329+<span class="param-type">String</span>
1330+
1331+
1332+
1333+
1334+ </td>
1335+
1336+
1337+
1338+
1339+
1340+ <td class="description last"><p>merkle root of transaction.</p></td>
1341+ </tr>
1342+
1343+
1344+
1345+ <tr>
1346+
1347+ <td class="name"><code>transaction_status_hash</code></td>
1348+
1349+
1350+ <td class="type">
1351+
1352+
1353+<span class="param-type">String</span>
1354+
1355+
1356+
1357+
1358+ </td>
1359+
1360+
1361+
1362+
1363+
1364+ <td class="description last"><p>merkle root of transaction status.</p></td>
1365+ </tr>
1366+
1367+
1368+
1369+ <tr>
1370+
1371+ <td class="name"><code>transactions</code></td>
1372+
1373+
1374+ <td class="type">
1375+
1376+
1377+<span class="param-type">Array.&lt;Object></span>
1378+
1379+
1380+
1381+
1382+ </td>
1383+
1384+
1385+
1386+
1387+
1388+ <td class="description last"><p>transaction object:</p>
1389+ <h6>Properties</h6>
1390+
1391+<table class="props table table-striped">
1392+ <thead>
1393+ <tr>
1394+
1395+ <th>Name</th>
1396+
1397+
1398+ <th>Type</th>
1399+
1400+
1401+
1402+
1403+
1404+ <th class="last">Description</th>
1405+ </tr>
1406+ </thead>
1407+
1408+ <tbody>
1409+
1410+
1411+ <tr>
1412+
1413+ <td class="name"><code>id</code></td>
1414+
1415+
1416+ <td class="type">
1417+
1418+
1419+<span class="param-type">String</span>
1420+
1421+
1422+
1423+
1424+ </td>
1425+
1426+
1427+
1428+
1429+
1430+ <td class="description last"><p>transaction id, hash of the transaction.</p></td>
1431+ </tr>
1432+
1433+
1434+
1435+ <tr>
1436+
1437+ <td class="name"><code>version</code></td>
1438+
1439+
1440+ <td class="type">
1441+
1442+
1443+<span class="param-type">Integer</span>
1444+
1445+
1446+
1447+
1448+ </td>
1449+
1450+
1451+
1452+
1453+
1454+ <td class="description last"><p>version of transaction.</p></td>
1455+ </tr>
1456+
1457+
1458+
1459+ <tr>
1460+
1461+ <td class="name"><code>size</code></td>
1462+
1463+
1464+ <td class="type">
1465+
1466+
1467+<span class="param-type">Integer</span>
1468+
1469+
1470+
1471+
1472+ </td>
1473+
1474+
1475+
1476+
1477+
1478+ <td class="description last"><p>size of transaction.</p></td>
1479+ </tr>
1480+
1481+
1482+
1483+ <tr>
1484+
1485+ <td class="name"><code>time_range</code></td>
1486+
1487+
1488+ <td class="type">
1489+
1490+
1491+<span class="param-type">Integer</span>
1492+
1493+
1494+
1495+
1496+ </td>
1497+
1498+
1499+
1500+
1501+
1502+ <td class="description last"><p>the unix timestamp for when the requst was responsed.</p></td>
1503+ </tr>
1504+
1505+
1506+
1507+ <tr>
1508+
1509+ <td class="name"><code>status_fail</code></td>
1510+
1511+
1512+ <td class="type">
1513+
1514+
1515+<span class="param-type">Boolean</span>
1516+
1517+
1518+
1519+
1520+ </td>
1521+
1522+
1523+
1524+
1525+
1526+ <td class="description last"><p>whether the state of the request has failed.</p></td>
1527+ </tr>
1528+
1529+
1530+
1531+ <tr>
1532+
1533+ <td class="name"><code>mux_id</code></td>
1534+
1535+
1536+ <td class="type">
1537+
1538+
1539+<span class="param-type">String</span>
1540+
1541+
1542+
1543+
1544+ </td>
1545+
1546+
1547+
1548+
1549+
1550+ <td class="description last"><p>the previous transaction mux id(source id of utxo).</p></td>
1551+ </tr>
1552+
1553+
1554+ </tbody>
1555+</table>
1556+
1557+ </td>
1558+ </tr>
1559+
1560+
1561+
1562+ <tr>
1563+
1564+ <td class="name"><code>inputs</code></td>
1565+
1566+
1567+ <td class="type">
1568+
1569+
1570+<span class="param-type">Array.&lt;Object></span>
1571+
1572+
1573+
1574+
1575+ </td>
1576+
1577+
1578+
1579+
1580+
1581+ <td class="description last"><p>object of inputs for the transaction.</p>
1582+ <h6>Properties</h6>
1583+
1584+<table class="props table table-striped">
1585+ <thead>
1586+ <tr>
1587+
1588+ <th>Name</th>
1589+
1590+
1591+ <th>Type</th>
1592+
1593+
1594+
1595+
1596+
1597+ <th class="last">Description</th>
1598+ </tr>
1599+ </thead>
1600+
1601+ <tbody>
1602+
1603+
1604+ <tr>
1605+
1606+ <td class="name"><code>type</code></td>
1607+
1608+
1609+ <td class="type">
1610+
1611+
1612+<span class="param-type">String</span>
1613+
1614+
1615+
1616+
1617+ </td>
1618+
1619+
1620+
1621+
1622+
1623+ <td class="description last"><p>the type of input action, available option include: 'spend', 'issue', 'coinbase'.</p></td>
1624+ </tr>
1625+
1626+
1627+
1628+ <tr>
1629+
1630+ <td class="name"><code>asset_id</code></td>
1631+
1632+
1633+ <td class="type">
1634+
1635+
1636+<span class="param-type">String</span>
1637+
1638+
1639+
1640+
1641+ </td>
1642+
1643+
1644+
1645+
1646+
1647+ <td class="description last"><p>asset id.</p></td>
1648+ </tr>
1649+
1650+
1651+
1652+ <tr>
1653+
1654+ <td class="name"><code>asset_alias</code></td>
1655+
1656+
1657+ <td class="type">
1658+
1659+
1660+<span class="param-type">String</span>
1661+
1662+
1663+
1664+
1665+ </td>
1666+
1667+
1668+
1669+
1670+
1671+ <td class="description last"><p>name of asset.</p></td>
1672+ </tr>
1673+
1674+
1675+
1676+ <tr>
1677+
1678+ <td class="name"><code>asset_definition</code></td>
1679+
1680+
1681+ <td class="type">
1682+
1683+
1684+<span class="param-type">Object</span>
1685+
1686+
1687+
1688+
1689+ </td>
1690+
1691+
1692+
1693+
1694+
1695+ <td class="description last"><p>definition of asset(json object).</p></td>
1696+ </tr>
1697+
1698+
1699+
1700+ <tr>
1701+
1702+ <td class="name"><code>amount</code></td>
1703+
1704+
1705+ <td class="type">
1706+
1707+
1708+<span class="param-type">Integer</span>
1709+
1710+
1711+
1712+
1713+ </td>
1714+
1715+
1716+
1717+
1718+
1719+ <td class="description last"><p>amount of asset.</p></td>
1720+ </tr>
1721+
1722+
1723+
1724+ <tr>
1725+
1726+ <td class="name"><code>issuance_program</code></td>
1727+
1728+
1729+ <td class="type">
1730+
1731+
1732+<span class="param-type">Object</span>
1733+
1734+
1735+
1736+
1737+ </td>
1738+
1739+
1740+
1741+
1742+
1743+ <td class="description last"><p>issuance program, it only exist when type is 'issue'.</p></td>
1744+ </tr>
1745+
1746+
1747+
1748+ <tr>
1749+
1750+ <td class="name"><code>control_program</code></td>
1751+
1752+
1753+ <td class="type">
1754+
1755+
1756+<span class="param-type">Object</span>
1757+
1758+
1759+
1760+
1761+ </td>
1762+
1763+
1764+
1765+
1766+
1767+ <td class="description last"><p>control program of account, it only exist when type is 'spend'.</p></td>
1768+ </tr>
1769+
1770+
1771+
1772+ <tr>
1773+
1774+ <td class="name"><code>address</code></td>
1775+
1776+
1777+ <td class="type">
1778+
1779+
1780+<span class="param-type">String</span>
1781+
1782+
1783+
1784+
1785+ </td>
1786+
1787+
1788+
1789+
1790+
1791+ <td class="description last"><p>address of account, it only exist when type is 'spend'.</p></td>
1792+ </tr>
1793+
1794+
1795+
1796+ <tr>
1797+
1798+ <td class="name"><code>spent_output_id</code></td>
1799+
1800+
1801+ <td class="type">
1802+
1803+
1804+<span class="param-type">String</span>
1805+
1806+
1807+
1808+
1809+ </td>
1810+
1811+
1812+
1813+
1814+
1815+ <td class="description last"><p>the front of outputID to be spent in this input, it only exist when type is 'spend'.</p></td>
1816+ </tr>
1817+
1818+
1819+
1820+ <tr>
1821+
1822+ <td class="name"><code>account_id</code></td>
1823+
1824+
1825+ <td class="type">
1826+
1827+
1828+<span class="param-type">String</span>
1829+
1830+
1831+
1832+
1833+ </td>
1834+
1835+
1836+
1837+
1838+
1839+ <td class="description last"><p>account id.</p></td>
1840+ </tr>
1841+
1842+
1843+
1844+ <tr>
1845+
1846+ <td class="name"><code>account_alias</code></td>
1847+
1848+
1849+ <td class="type">
1850+
1851+
1852+<span class="param-type">String</span>
1853+
1854+
1855+
1856+
1857+ </td>
1858+
1859+
1860+
1861+
1862+
1863+ <td class="description last"><p>name of account.</p></td>
1864+ </tr>
1865+
1866+
1867+
1868+ <tr>
1869+
1870+ <td class="name"><code>arbitrary</code></td>
1871+
1872+
1873+ <td class="type">
1874+
1875+
1876+<span class="param-type">Object</span>
1877+
1878+
1879+
1880+
1881+ </td>
1882+
1883+
1884+
1885+
1886+
1887+ <td class="description last"><p>arbitrary infomation can be set by miner, it only exist when type is 'coinbase'.</p></td>
1888+ </tr>
1889+
1890+
1891+
1892+ <tr>
1893+
1894+ <td class="name"><code>input_id</code></td>
1895+
1896+
1897+ <td class="type">
1898+
1899+
1900+<span class="param-type">String</span>
1901+
1902+
1903+
1904+
1905+ </td>
1906+
1907+
1908+
1909+
1910+
1911+ <td class="description last"><p>hash of input action.</p></td>
1912+ </tr>
1913+
1914+
1915+
1916+ <tr>
1917+
1918+ <td class="name"><code>witness_arguments</code></td>
1919+
1920+
1921+ <td class="type">
1922+
1923+
1924+<span class="param-type">Array.&lt;String></span>
1925+
1926+
1927+
1928+
1929+ </td>
1930+
1931+
1932+
1933+
1934+
1935+ <td class="description last"><p>witness arguments.</p></td>
1936+ </tr>
1937+
1938+
1939+ </tbody>
1940+</table>
1941+
1942+ </td>
1943+ </tr>
1944+
1945+
1946+
1947+ <tr>
1948+
1949+ <td class="name"><code>outputs</code></td>
1950+
1951+
1952+ <td class="type">
1953+
1954+
1955+<span class="param-type">Array.&lt;Object></span>
1956+
1957+
1958+
1959+
1960+ </td>
1961+
1962+
1963+
1964+
1965+
1966+ <td class="description last"><p>object of outputs for the transaction.</p>
1967+ <h6>Properties</h6>
1968+
1969+<table class="props table table-striped">
1970+ <thead>
1971+ <tr>
1972+
1973+ <th>Name</th>
1974+
1975+
1976+ <th>Type</th>
1977+
1978+
1979+
1980+
1981+
1982+ <th class="last">Description</th>
1983+ </tr>
1984+ </thead>
1985+
1986+ <tbody>
1987+
1988+
1989+ <tr>
1990+
1991+ <td class="name"><code>type</code></td>
1992+
1993+
1994+ <td class="type">
1995+
1996+
1997+<span class="param-type">String</span>
1998+
1999+
2000+
2001+
2002+ </td>
2003+
2004+
2005+
2006+
2007+
2008+ <td class="description last"><p>the type of output action, available option include: 'retire', 'control'.</p></td>
2009+ </tr>
2010+
2011+
2012+
2013+ <tr>
2014+
2015+ <td class="name"><code>id</code></td>
2016+
2017+
2018+ <td class="type">
2019+
2020+
2021+<span class="param-type">String</span>
2022+
2023+
2024+
2025+
2026+ </td>
2027+
2028+
2029+
2030+
2031+
2032+ <td class="description last"><p>outputid related to utxo.</p></td>
2033+ </tr>
2034+
2035+
2036+
2037+ <tr>
2038+
2039+ <td class="name"><code>position</code></td>
2040+
2041+
2042+ <td class="type">
2043+
2044+
2045+<span class="param-type">Integer</span>
2046+
2047+
2048+
2049+
2050+ </td>
2051+
2052+
2053+
2054+
2055+
2056+ <td class="description last"><p>position of outputs.</p></td>
2057+ </tr>
2058+
2059+
2060+
2061+ <tr>
2062+
2063+ <td class="name"><code>asset_id</code></td>
2064+
2065+
2066+ <td class="type">
2067+
2068+
2069+<span class="param-type">String</span>
2070+
2071+
2072+
2073+
2074+ </td>
2075+
2076+
2077+
2078+
2079+
2080+ <td class="description last"><p>asset id.</p></td>
2081+ </tr>
2082+
2083+
2084+
2085+ <tr>
2086+
2087+ <td class="name"><code>asset_alias</code></td>
2088+
2089+
2090+ <td class="type">
2091+
2092+
2093+<span class="param-type">String</span>
2094+
2095+
2096+
2097+
2098+ </td>
2099+
2100+
2101+
2102+
2103+
2104+ <td class="description last"><p>name of asset.</p></td>
2105+ </tr>
2106+
2107+
2108+
2109+ <tr>
2110+
2111+ <td class="name"><code>asset_definition</code></td>
2112+
2113+
2114+ <td class="type">
2115+
2116+
2117+<span class="param-type">Object</span>
2118+
2119+
2120+
2121+
2122+ </td>
2123+
2124+
2125+
2126+
2127+
2128+ <td class="description last"><p>definition of asset(json object).</p></td>
2129+ </tr>
2130+
2131+
2132+
2133+ <tr>
2134+
2135+ <td class="name"><code>amount</code></td>
2136+
2137+
2138+ <td class="type">
2139+
2140+
2141+<span class="param-type">Integer</span>
2142+
2143+
2144+
2145+
2146+ </td>
2147+
2148+
2149+
2150+
2151+
2152+ <td class="description last"><p>amount of asset.</p></td>
2153+ </tr>
2154+
2155+
2156+
2157+ <tr>
2158+
2159+ <td class="name"><code>account_id</code></td>
2160+
2161+
2162+ <td class="type">
2163+
2164+
2165+<span class="param-type">String</span>
2166+
2167+
2168+
2169+
2170+ </td>
2171+
2172+
2173+
2174+
2175+
2176+ <td class="description last"><p>account id.</p></td>
2177+ </tr>
2178+
2179+
2180+
2181+ <tr>
2182+
2183+ <td class="name"><code>account_alias</code></td>
2184+
2185+
2186+ <td class="type">
2187+
2188+
2189+<span class="param-type">String</span>
2190+
2191+
2192+
2193+
2194+ </td>
2195+
2196+
2197+
2198+
2199+
2200+ <td class="description last"><p>name of account.</p></td>
2201+ </tr>
2202+
2203+
2204+
2205+ <tr>
2206+
2207+ <td class="name"><code>control_program</code></td>
2208+
2209+
2210+ <td class="type">
2211+
2212+
2213+<span class="param-type">Object</span>
2214+
2215+
2216+
2217+
2218+ </td>
2219+
2220+
2221+
2222+
2223+
2224+ <td class="description last"><p>control program of account.</p></td>
2225+ </tr>
2226+
2227+
2228+
2229+ <tr>
2230+
2231+ <td class="name"><code>address</code></td>
2232+
2233+
2234+ <td class="type">
2235+
2236+
2237+<span class="param-type">String</span>
2238+
2239+
2240+
2241+
2242+ </td>
2243+
2244+
2245+
2246+
2247+
2248+ <td class="description last"><p>address of account.</p></td>
2249+ </tr>
2250+
2251+
2252+ </tbody>
2253+</table>
2254+
2255+ </td>
2256+ </tr>
2257+
2258+
2259+ </tbody>
2260+</table>
2261+</dl>
2262+
2263+
2264+
2265+
2266+
2267+
2268+
2269+
2270+
2271+
2272+
2273+
2274+
2275+
2276+
2277+
2278+
2279+
2280+
2281+
2282+
2283+
2284+
2285+
2286+
2287+
2288+
2289+
2290+
2291+
2292+
2293+
2294+
2295+
2296+
2297+
2298+</dl>
2299+
2300+
2301+
2302+</dd>
2303+
2304+
2305+
2306+<hr>
2307+<dt class="name" id="CoreInfo">
2308+ <h4 id="CoreInfo">CoreInfo</h4>
2309+
2310+
2311+</dt>
2312+<dd>
2313+
2314+ <div class="description">
2315+ <p>Basic information about the configuration of Bytom Core, as well as any
2316+errors encountered when updating the local state of the blockchain</p>
2317+<p>More info: {}</p>
2318+ </div>
2319+
2320+
2321+
2322+ <h5>Type:</h5>
2323+ <ul>
2324+ <li>
2325+
2326+<span class="param-type">Object</span>
2327+
2328+
2329+
2330+ </li>
2331+ </ul>
2332+
2333+
2334+
2335+<dl class="details">
2336+
2337+
2338+ <h5 class="subsection-title">Properties:</h5>
2339+
2340+ <dl>
2341+
2342+<table class="props table table-striped">
2343+ <thead>
2344+ <tr>
2345+
2346+ <th>Name</th>
2347+
2348+
2349+ <th>Type</th>
2350+
2351+
2352+
2353+
2354+
2355+ <th class="last">Description</th>
2356+ </tr>
2357+ </thead>
2358+
2359+ <tbody>
2360+
2361+
2362+ <tr>
2363+
2364+ <td class="name"><code>listening</code></td>
2365+
2366+
2367+ <td class="type">
2368+
2369+
2370+<span class="param-type">Boolean</span>
2371+
2372+
2373+
2374+
2375+ </td>
2376+
2377+
2378+
2379+
2380+
2381+ <td class="description last"><p>whether the node is listening.</p></td>
2382+ </tr>
2383+
2384+
2385+
2386+ <tr>
2387+
2388+ <td class="name"><code>syncing</code></td>
2389+
2390+
2391+ <td class="type">
2392+
2393+
2394+<span class="param-type">Boolean</span>
2395+
2396+
2397+
2398+
2399+ </td>
2400+
2401+
2402+
2403+
2404+
2405+ <td class="description last"><p>whether the node is syncing.</p></td>
2406+ </tr>
2407+
2408+
2409+
2410+ <tr>
2411+
2412+ <td class="name"><code>mining</code></td>
2413+
2414+
2415+ <td class="type">
2416+
2417+
2418+<span class="param-type">Boolean</span>
2419+
2420+
2421+
2422+
2423+ </td>
2424+
2425+
2426+
2427+
2428+
2429+ <td class="description last"><p>whether the node is mining.</p></td>
2430+ </tr>
2431+
2432+
2433+
2434+ <tr>
2435+
2436+ <td class="name"><code>peer_count</code></td>
2437+
2438+
2439+ <td class="type">
2440+
2441+
2442+<span class="param-type">Integer</span>
2443+
2444+
2445+
2446+
2447+ </td>
2448+
2449+
2450+
2451+
2452+
2453+ <td class="description last"><p>current count of connected peers.</p></td>
2454+ </tr>
2455+
2456+
2457+
2458+ <tr>
2459+
2460+ <td class="name"><code>current_block</code></td>
2461+
2462+
2463+ <td class="type">
2464+
2465+
2466+<span class="param-type">Integer</span>
2467+
2468+
2469+
2470+
2471+ </td>
2472+
2473+
2474+
2475+
2476+
2477+ <td class="description last"><p>current block height in the node's blockchain.</p></td>
2478+ </tr>
2479+
2480+
2481+
2482+ <tr>
2483+
2484+ <td class="name"><code>highest_block</code></td>
2485+
2486+
2487+ <td class="type">
2488+
2489+
2490+<span class="param-type">Integer</span>
2491+
2492+
2493+
2494+
2495+ </td>
2496+
2497+
2498+
2499+
2500+
2501+ <td class="description last"><p>current highest block of the connected peers.</p></td>
2502+ </tr>
2503+
2504+
2505+
2506+ <tr>
2507+
2508+ <td class="name"><code>network_id</code></td>
2509+
2510+
2511+ <td class="type">
2512+
2513+
2514+<span class="param-type">String</span>
2515+
2516+
2517+
2518+
2519+ </td>
2520+
2521+
2522+
2523+
2524+
2525+ <td class="description last"><p>network id.</p></td>
2526+ </tr>
2527+
2528+
2529+
2530+ <tr>
2531+
2532+ <td class="name"><code>version_info</code></td>
2533+
2534+
2535+ <td class="type">
2536+
2537+
2538+<span class="param-type">Object</span>
2539+
2540+
2541+
2542+
2543+ </td>
2544+
2545+
2546+
2547+
2548+
2549+ <td class="description last"><p>bytomd version information:</p></td>
2550+ </tr>
2551+
2552+
2553+
2554+ <tr>
2555+
2556+ <td class="name"><code>version</code></td>
2557+
2558+
2559+ <td class="type">
2560+
2561+
2562+<span class="param-type">String</span>
2563+
2564+
2565+
2566+
2567+ </td>
2568+
2569+
2570+
2571+
2572+
2573+ <td class="description last"><p>current version of the running bytomd.</p></td>
2574+ </tr>
2575+
2576+
2577+
2578+ <tr>
2579+
2580+ <td class="name"><code>update</code></td>
2581+
2582+
2583+ <td class="type">
2584+
2585+
2586+<span class="param-type">uint16</span>
2587+
2588+
2589+
2590+
2591+ </td>
2592+
2593+
2594+
2595+
2596+
2597+ <td class="description last"><p>whether there exists an update.
2598+ 0: no update;
2599+ 1: small update;
2600+ 2: significant update.</p></td>
2601+ </tr>
2602+
2603+
2604+
2605+ <tr>
2606+
2607+ <td class="name"><code>new_version</code></td>
2608+
2609+
2610+ <td class="type">
2611+
2612+
2613+<span class="param-type">String</span>
2614+
2615+
2616+
2617+
2618+ </td>
2619+
2620+
2621+
2622+
2623+
2624+ <td class="description last"><p>the newest version of bytomd if there is one.</p></td>
2625+ </tr>
2626+
2627+
2628+ </tbody>
2629+</table>
2630+</dl>
2631+
2632+
2633+
2634+
2635+
2636+
2637+
2638+
2639+
2640+
2641+
2642+
2643+
2644+
2645+
2646+
2647+
2648+
2649+
2650+
2651+
2652+
2653+
2654+
2655+
2656+
2657+
2658+
2659+
2660+
2661+
2662+
2663+
2664+
2665+
2666+
2667+</dl>
2668+
2669+
2670+
2671+</dd>
2672+
2673+
2674+
2675+<hr>
10492676 <dt class="name" id="Key">
10502677 <h4 id="Key">Key</h4>
10512678
@@ -2730,7 +4357,7 @@ the unspent output set.</p>
27304357 <span class="jsdoc-message">
27314358 Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
27324359
2733- on 2018-05-24T14:04:59+08:00
4360+ on 2018-11-26T16:28:32+08:00
27344361
27354362 using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
27364363 </span>
--- a/docs/index.html
+++ b/docs/index.html
@@ -33,7 +33,14 @@
3333 <li class="dropdown">
3434 <a href="modules.list.html" class="dropdown-toggle" data-toggle="dropdown">Modules<b class="caret"></b></a>
3535 <ul class="dropdown-menu ">
36- <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>
36+ <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>
37+ </ul>
38+ </li>
39+
40+ <li class="dropdown">
41+ <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
42+ <ul class="dropdown-menu ">
43+ <li><a href="TransactionBuilder.html">TransactionBuilder</a></li>
3744 </ul>
3845 </li>
3946
@@ -93,25 +100,31 @@
93100
94101
95102 <section class="readme-section">
96- <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>
103+ <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>
97104 <p>To create accounts or assets, xpub of keys are required. With this sdk, we can
98-<code>create/delete/list/resetPassword</code> the key. Please check the
99-<a href="https://bytom.github.io/node-sdk/module-KeysApi.html">API doc</a> if you want
105+<code>create/delete/listAll/resetPassword/checkPassword</code> the key. Please check the
106+<a href="https://bytom.github.io/bytom-node-sdk/module-KeysApi.html">API doc</a> if you want
100107 to operate with keys.</p>
101-<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.
108+<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.
102109 It's defined under one Bytom node created with one or serveral keys. </p>
103-<p><a href="https://bytom.github.io/node-sdk/module-AccountsApi.html">Related API</a></p>
104-<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
110+<p><a href="https://bytom.github.io/bytom-node-sdk/module-AccountsApi.html">Related API</a></p>
111+<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
105112 a given asset are fungible. Units of an asset can be transacted directly
106113 between parties without the involvement of the issuer.</p>
107-<p><a href="https://bytom.github.io/node-sdk/module-AssetsApi.html">Related API</a></p>
108-<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>
109-<p><a href="https://bytom.github.io/node-sdk/module-TransactionsApi.html">Related API</a></p>
110-<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>
111-<p><a href="https://bytom.github.io/node-sdk/module-UnspentOutputsApi.html">Related API</a></p>
112-<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
114+<p><a href="https://bytom.github.io/bytom-node-sdk/module-AssetsApi.html">Related API</a></p>
115+<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>
116+<p><a href="https://bytom.github.io/bytom-node-sdk/module-TransactionsApi.html">Related API</a></p>
117+<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>
118+<p><a href="https://bytom.github.io/bytom-node-sdk/module-UnspentOutputsApi.html">Related API</a></p>
119+<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
113120 summation of UTXOs of one account.</p>
114-<p><a href="https://bytom.github.io/node-sdk/module-BalancesApi.html">Related API</a></p>
121+<p><a href="https://bytom.github.io/bytom-node-sdk/module-BalancesApi.html">Related API</a></p>
122+<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.
123+ It is made of a header, containing metadata, followed by a long list of transactions that make up the bulk of its size.
124+ Each block references to the previous block, and all the blocks are linked from the back to the front to grow a blockchain.</p>
125+<p><a href="https://bytom.github.io/bytom-node-sdk/module-BlockApi.html">Related API</a></p>
126+<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>
127+<p><a href="https://bytom.github.io/bytom-node-sdk/module-ConfigApi.html">Related API</a></p>
115128 <h2>Usage</h2><h3>In your code</h3><pre class="prettyprint source lang-javascript"><code>const bytom = require('bytom-sdk')
116129 const url = 'http://localhost:9888'
117130
@@ -120,49 +133,68 @@ const url = 'http://localhost:9888'
120133 const accessToken = ''
121134
122135 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>
123-<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>
136+<h3>Step 1: create a key</h3><pre class="prettyprint source lang-javascript"><code>const keyPromise = client.keys.create({
137+ alias:'key',
138+ password: 'password'
139+ })</code></pre><p>It will create a key whose alias is 'alias' while password is 'password'.</p>
124140 <h3>Step 2: create a account</h3><pre class="prettyprint source lang-javascript"><code>const accountPromise = keyPromise.then(key => {
125- client.accounts.create([key.xpub], 1, 'account')
141+ client.accounts.create({
142+ alias: 'account',
143+ root_xpubs: [key.xpub],
144+ quorum: 1
145+ })
126146 })</code></pre><h3>Step 3: create account address</h3><pre class="prettyprint source lang-javascript"><code>const addressPromise = accountPromise.then(account => {
127- return client.accounts.createReceiverById(account.id)
147+ return client.accounts.createReceiver({
148+ account_alias: account.alias
149+ })
128150 })</code></pre><h3>Step 4: create asset</h3><pre class="prettyprint source lang-javascript"><code>const definition = {
129151 name: &quot;GOLD&quot;,
130- symobol: &quot;GOLD&quot;,
152+ symbol: &quot;GOLD&quot;,
131153 decimals: 8,
132154 description: {}
133155 }
156+
134157 const assetPromise = keyPromise.then(key => {
135- return client.assets.create([key.xpub], 1, 'asset', definition)
158+ return client.assets.create(
159+ {
160+ alias: 'asset',
161+ definition,
162+ root_xpubs: [key.xpub],
163+ quorum: 1
164+ })
136165 })</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([
137166 accountPromise,
138167 addressPromise,
139168 assetPromise]
140169 ).then(([account, address, asset]) => {
141170 const issueAction = {
142- amount: 10000000000,
171+ amount: 100000000,
143172 asset_alias: asset.alias,
144- type: 'issue'
145173 }
146174
147175 const gasAction = {
148- type: 'spend_account',
149176 account_alias: account.alias,
150177 asset_alias: 'BTM',
151178 amount: 50000000
152179 }
153180
154181 const controlAction = {
155- type: 'control_address',
156- amount: 10000000000,
182+ amount: 100000000,
157183 asset_alias: asset.alias,
158184 address: address.address
159185 }
160186
161- return client.transactions.build(null,
162- [issueAction, gasAction, controlAction])
187+ return client.transactions.build(builder => {
188+ builder.issue(issueAction)
189+ builder.spendFromAccount(gasAction)
190+ builder.controlWithAddress(controlAction)
191+ })
163192 })
164193 </code></pre><h4>Second, sign the transaction</h4><pre class="prettyprint source lang-javascript"><code>const signPromise = buildPromise.then(transactionTemplate => {
165- return client.transactions.sign(transactionTemplate, 'password')
194+ return client.transactions.sign({
195+ transaction: transactionTemplate,
196+ password: 'password'
197+ })
166198 })</code></pre><h4>Finally, submit the signed transaction to the bytom network</h4><pre class="prettyprint source lang-javascript"><code>signPromise.then(signed => {
167199 return client.transactions.submit(signed.transaction.raw_transaction)
168200 })</code></pre></article>
@@ -211,7 +243,7 @@ const assetPromise = keyPromise.then(key => {
211243 <span class="jsdoc-message">
212244 Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
213245
214- on 2018-05-24T14:05:00+08:00
246+ on 2018-11-26T16:28:32+08:00
215247
216248 using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
217249 </span>
--- a/docs/module-AccessTokensApi.html
+++ b/docs/module-AccessTokensApi.html
@@ -33,7 +33,14 @@
3333 <li class="dropdown">
3434 <a href="modules.list.html" class="dropdown-toggle" data-toggle="dropdown">Modules<b class="caret"></b></a>
3535 <ul class="dropdown-menu ">
36- <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>
36+ <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>
37+ </ul>
38+ </li>
39+
40+ <li class="dropdown">
41+ <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
42+ <ul class="dropdown-menu ">
43+ <li><a href="TransactionBuilder.html">TransactionBuilder</a></li>
3744 </ul>
3845 </li>
3946
@@ -150,7 +157,209 @@
150157
151158 <hr>
152159 <dt>
153- <h4 class="name" id="~create"><span class="type-signature">&lt;inner> </span>create(id)</h4>
160+ <h4 class="name" id="~check"><span class="type-signature">&lt;inner> </span>check(params)</h4>
161+
162+
163+</dt>
164+<dd>
165+
166+
167+ <div class="description">
168+ <p>Check the target access token.</p>
169+ </div>
170+
171+
172+
173+
174+
175+
176+
177+
178+ <h5>Parameters:</h5>
179+
180+
181+<table class="params table table-striped">
182+ <thead>
183+ <tr>
184+
185+ <th>Name</th>
186+
187+
188+ <th>Type</th>
189+
190+
191+
192+
193+
194+ <th class="last">Description</th>
195+ </tr>
196+ </thead>
197+
198+ <tbody>
199+
200+
201+ <tr>
202+
203+ <td class="name"><code>params</code></td>
204+
205+
206+ <td class="type">
207+
208+
209+<span class="param-type">Object</span>
210+
211+
212+
213+
214+ </td>
215+
216+
217+
218+
219+
220+ <td class="description last"><p>Parameters for access token check.</p>
221+ <h6 class="method-params-label method-subparams-label">Properties</h6>
222+
223+
224+<table class="params table table-striped">
225+ <thead>
226+ <tr>
227+
228+ <th>Name</th>
229+
230+
231+ <th>Type</th>
232+
233+
234+
235+
236+
237+ <th class="last">Description</th>
238+ </tr>
239+ </thead>
240+
241+ <tbody>
242+
243+
244+ <tr>
245+
246+ <td class="name"><code>id</code></td>
247+
248+
249+ <td class="type">
250+
251+
252+<span class="param-type">String</span>
253+
254+
255+
256+
257+ </td>
258+
259+
260+
261+
262+
263+ <td class="description last"><p>The to be deleted token id.</p></td>
264+ </tr>
265+
266+
267+
268+ <tr>
269+
270+ <td class="name"><code>secret</code></td>
271+
272+
273+ <td class="type">
274+
275+
276+<span class="param-type">String</span>
277+
278+
279+
280+
281+ </td>
282+
283+
284+
285+
286+
287+ <td class="description last"><p>secret of token, the second part of the colon division for token.</p></td>
288+ </tr>
289+
290+
291+ </tbody>
292+</table>
293+
294+ </td>
295+ </tr>
296+
297+
298+ </tbody>
299+</table>
300+
301+
302+
303+
304+<dl class="details">
305+
306+
307+
308+
309+
310+
311+
312+
313+
314+
315+
316+
317+
318+
319+
320+
321+
322+
323+
324+
325+
326+
327+
328+
329+
330+
331+
332+
333+
334+
335+
336+
337+
338+
339+
340+</dl>
341+
342+
343+
344+
345+
346+
347+
348+
349+
350+
351+
352+
353+
354+
355+
356+</dd>
357+
358+
359+
360+<hr>
361+<dt>
362+ <h4 class="name" id="~create"><span class="type-signature">&lt;inner> </span>create(params)</h4>
154363
155364
156365 </dt>
@@ -193,6 +402,49 @@
193402
194403 <tr>
195404
405+ <td class="name"><code>params</code></td>
406+
407+
408+ <td class="type">
409+
410+
411+<span class="param-type">Object</span>
412+
413+
414+
415+
416+ </td>
417+
418+
419+
420+
421+
422+ <td class="description last"><p>Access Token Object.</p>
423+ <h6 class="method-params-label method-subparams-label">Properties</h6>
424+
425+
426+<table class="params table table-striped">
427+ <thead>
428+ <tr>
429+
430+ <th>Name</th>
431+
432+
433+ <th>Type</th>
434+
435+
436+
437+
438+
439+ <th class="last">Description</th>
440+ </tr>
441+ </thead>
442+
443+ <tbody>
444+
445+
446+ <tr>
447+
196448 <td class="name"><code>id</code></td>
197449
198450
@@ -214,6 +466,37 @@
214466 </tr>
215467
216468
469+
470+ <tr>
471+
472+ <td class="name"><code>type</code></td>
473+
474+
475+ <td class="type">
476+
477+
478+<span class="param-type">String</span>
479+
480+
481+
482+
483+ </td>
484+
485+
486+
487+
488+
489+ <td class="description last"><p>type of token.</p></td>
490+ </tr>
491+
492+
493+ </tbody>
494+</table>
495+
496+ </td>
497+ </tr>
498+
499+
217500 </tbody>
218501 </table>
219502
@@ -430,7 +713,7 @@
430713
431714 <hr>
432715 <dt>
433- <h4 class="name" id="~list"><span class="type-signature">&lt;inner> </span>list()</h4>
716+ <h4 class="name" id="~listAll"><span class="type-signature">&lt;inner> </span>listAll()</h4>
434717
435718
436719 </dt>
@@ -578,7 +861,7 @@
578861 <span class="jsdoc-message">
579862 Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
580863
581- on 2018-05-24T14:05:00+08:00
864+ on 2018-11-26T16:28:32+08:00
582865
583866 using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
584867 </span>
--- a/docs/module-AccountsApi.html
+++ b/docs/module-AccountsApi.html
@@ -33,7 +33,14 @@
3333 <li class="dropdown">
3434 <a href="modules.list.html" class="dropdown-toggle" data-toggle="dropdown">Modules<b class="caret"></b></a>
3535 <ul class="dropdown-menu ">
36- <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>
36+ <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>
37+ </ul>
38+ </li>
39+
40+ <li class="dropdown">
41+ <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
42+ <ul class="dropdown-menu ">
43+ <li><a href="TransactionBuilder.html">TransactionBuilder</a></li>
3744 </ul>
3845 </li>
3946
@@ -150,7 +157,7 @@
150157
151158 <hr>
152159 <dt>
153- <h4 class="name" id="~create"><span class="type-signature">&lt;inner> </span>create(xpubs, quorum, alias)</h4>
160+ <h4 class="name" id="~create"><span class="type-signature">&lt;inner> </span>create(params)</h4>
154161
155162
156163 </dt>
@@ -193,61 +200,13 @@
193200
194201 <tr>
195202
196- <td class="name"><code>xpubs</code></td>
197-
198-
199- <td class="type">
200-
201-
202-<span class="param-type"><a href="module-AccountsApi.html#~xpubs">module:AccountsApi~xpubs</a></span>
203-
204-
205-
206-
207- </td>
208-
209-
210-
211-
212-
213- <td class="description last"><p>Xpub of Keys for account creation.</p></td>
214- </tr>
215-
216-
217-
218- <tr>
219-
220- <td class="name"><code>quorum</code></td>
221-
222-
223- <td class="type">
224-
225-
226-<span class="param-type"><a href="module-AccountsApi.html#~quorum">module:AccountsApi~quorum</a></span>
227-
228-
229-
230-
231- </td>
232-
233-
234-
235-
236-
237- <td class="description last"><p>The number of keys required to sign transactions for the account.</p></td>
238- </tr>
239-
240-
241-
242- <tr>
243-
244- <td class="name"><code>alias</code></td>
203+ <td class="name"><code>params</code></td>
245204
246205
247206 <td class="type">
248207
249208
250-<span class="param-type"><a href="module-AccountsApi.html#~alias">module:AccountsApi~alias</a></span>
209+<span class="param-type"><a href="module-AccountsApi.html#~createRequest">module:AccountsApi~createRequest</a></span>
251210
252211
253212
@@ -258,7 +217,7 @@
258217
259218
260219
261- <td class="description last"><p>Account alias.</p></td>
220+ <td class="description last"><p>Parameters for account creation.</p></td>
262221 </tr>
263222
264223
@@ -350,7 +309,7 @@
350309
351310 <hr>
352311 <dt>
353- <h4 class="name" id="~createReceiverById"><span class="type-signature">&lt;inner> </span>createReceiverById(accountId)</h4>
312+ <h4 class="name" id="~createReceiver"><span class="type-signature">&lt;inner> </span>createReceiver(params)</h4>
354313
355314
356315 </dt>
@@ -393,13 +352,13 @@
393352
394353 <tr>
395354
396- <td class="name"><code>accountId</code></td>
355+ <td class="name"><code>params</code></td>
397356
398357
399358 <td class="type">
400359
401360
402-<span class="param-type"><a href="module-AccountsApi.html#~id">module:AccountsApi~id</a></span>
361+<span class="param-type"><a href="module-AccountsApi.html#~createReceiverRequest">module:AccountsApi~createReceiverRequest</a></span>
403362
404363
405364
@@ -410,7 +369,7 @@
410369
411370
412371
413- <td class="description last"><p>Id for the target account.</p></td>
372+ <td class="description last"><p>Parameters for receiver creation.</p></td>
414373 </tr>
415374
416375
@@ -502,7 +461,7 @@
502461
503462 <hr>
504463 <dt>
505- <h4 class="name" id="~deleteById"><span class="type-signature">&lt;inner> </span>deleteById(id)</h4>
464+ <h4 class="name" id="~delete"><span class="type-signature">&lt;inner> </span>delete(params)</h4>
506465
507466
508467 </dt>
@@ -545,13 +504,80 @@
545504
546505 <tr>
547506
548- <td class="name"><code>id</code></td>
507+ <td class="name"><code>params</code></td>
508+
509+
510+ <td class="type">
511+
512+
513+<span class="param-type">Object</span>
514+
515+
516+
517+
518+ </td>
519+
520+
521+
522+
523+
524+ <td class="description last"><p>Deletion information.</p>
525+ <h6 class="method-params-label method-subparams-label">Properties</h6>
526+
527+
528+<table class="params table table-striped">
529+ <thead>
530+ <tr>
531+
532+ <th>Name</th>
533+
534+
535+ <th>Type</th>
536+
537+
538+
539+
540+
541+ <th class="last">Description</th>
542+ </tr>
543+ </thead>
544+
545+ <tbody>
546+
547+
548+ <tr>
549+
550+ <td class="name"><code>account_id</code></td>
551+
552+
553+ <td class="type">
554+
555+
556+<span class="param-type">String</span>
557+
558+
559+
560+
561+ </td>
562+
563+
564+
565+
566+
567+ <td class="description last"><p>Account id.</p></td>
568+ </tr>
569+
570+
571+
572+ <tr>
573+
574+ <td class="name"><code>account_alias</code></td>
549575
550576
551577 <td class="type">
552578
553579
554-<span class="param-type"><a href="module-AccountsApi.html#~id">module:AccountsApi~id</a></span>
580+<span class="param-type">String</span>
555581
556582
557583
@@ -562,7 +588,14 @@
562588
563589
564590
565- <td class="description last"><p>Target account id.</p></td>
591+ <td class="description last"><p>Account alias.</p></td>
592+ </tr>
593+
594+
595+ </tbody>
596+</table>
597+
598+ </td>
566599 </tr>
567600
568601
@@ -630,7 +663,7 @@
630663
631664 <hr>
632665 <dt>
633- <h4 class="name" id="~listAddressesById"><span class="type-signature">&lt;inner> </span>listAddressesById(accountId)</h4>
666+ <h4 class="name" id="~list"><span class="type-signature">&lt;inner> </span>list(params)</h4>
634667
635668
636669 </dt>
@@ -638,7 +671,7 @@
638671
639672
640673 <div class="description">
641- <p>List all addresses for one account.</p>
674+ <p>List accounts whose id is the given one.</p>
642675 </div>
643676
644677
@@ -673,13 +706,13 @@
673706
674707 <tr>
675708
676- <td class="name"><code>accountId</code></td>
709+ <td class="name"><code>params</code></td>
677710
678711
679712 <td class="type">
680713
681714
682-<span class="param-type"><a href="module-AccountsApi.html#~id">module:AccountsApi~id</a></span>
715+<span class="param-type">Object</span>
683716
684717
685718
@@ -690,115 +723,87 @@
690723
691724
692725
693- <td class="description last"><p>Id for the target account.</p></td>
694- </tr>
695-
696-
697- </tbody>
698-</table>
699-
700-
701-
702-
703-<dl class="details">
704-
705-
706-
726+ <td class="description last"><p>Filter and pagination information.</p>
727+ <h6 class="method-params-label method-subparams-label">Properties</h6>
728+
707729
708-
730+<table class="params table table-striped">
731+ <thead>
732+ <tr>
733+
734+ <th>Name</th>
735+
709736
710-
737+ <th>Type</th>
711738
712-
739+
713740
714-
741+
715742
716-
743+ <th class="last">Description</th>
744+ </tr>
745+ </thead>
717746
747+ <tbody>
718748
719749
720-
721-
722-
723-
724-
725-
726-
727-
728-
729-
730-
731-
732-
733-
734-
750+ <tr>
751+
752+ <td class="name"><code>id</code></td>
753+
735754
736-
755+ <td class="type">
756+
757+
758+<span class="param-type">String</span>
737759
738-
739-</dl>
740760
741761
742-
762+
763+ </td>
743764
744-
765+
745766
746-
767+
747768
748-
769+ <td class="description last"><p>Account id.</p></td>
770+ </tr>
749771
750772
751773
752-
753- <h5>Returns:</h5>
754-
774+ <tr>
775+
776+ <td class="name"><code>alias</code></td>
755777
756-<div class="param-desc">
757- <p>target addresses response.</p>
758-</div>
759-
760-
761-
762-<dl>
763- <dt>
764- Type
765- </dt>
766- <dd>
767-
768-<span class="param-type">Promise.&lt;module:AccountApi~AddressInfo></span>
769-
770778
779+ <td class="type">
780+
781+
782+<span class="param-type">String</span>
771783
772- </dd>
773-</dl>
774784
775785
776-
786+
787+ </td>
777788
778-
779-</dd>
789+
780790
781-
782791
783-<hr>
784-<dt>
785- <h4 class="name" id="~listAll"><span class="type-signature">&lt;inner> </span>listAll()</h4>
786-
787-
788-</dt>
789-<dd>
790792
791-
792- <div class="description">
793- <p>List all accounts in the target Bytom node.</p>
794- </div>
795-
793+ <td class="description last"><p>Account alias.</p></td>
794+ </tr>
796795
797796
797+ </tbody>
798+</table>
798799
799-
800+ </td>
801+ </tr>
800802
801803
804+ </tbody>
805+</table>
806+
802807
803808
804809
@@ -856,7 +861,7 @@
856861
857862
858863 <div class="param-desc">
859- <p>All accounts promise.</p>
864+ <p>Target accounts promise.</p>
860865 </div>
861866
862867
@@ -884,7 +889,7 @@
884889
885890 <hr>
886891 <dt>
887- <h4 class="name" id="~listById"><span class="type-signature">&lt;inner> </span>listById(id)</h4>
892+ <h4 class="name" id="~listAddresses"><span class="type-signature">&lt;inner> </span>listAddresses(params)</h4>
888893
889894
890895 </dt>
@@ -892,7 +897,7 @@
892897
893898
894899 <div class="description">
895- <p>List accounts whose id is the given one.</p>
900+ <p>List all addresses for one account.</p>
896901 </div>
897902
898903
@@ -927,13 +932,852 @@
927932
928933 <tr>
929934
930- <td class="name"><code>id</code></td>
935+ <td class="name"><code>params</code></td>
936+
937+
938+ <td class="type">
939+
940+
941+<span class="param-type">Object</span>
942+
943+
944+
945+
946+ </td>
947+
948+
949+
950+
951+
952+ <td class="description last"><p>Filter and pagination information.</p>
953+ <h6 class="method-params-label method-subparams-label">Properties</h6>
954+
955+
956+<table class="params table table-striped">
957+ <thead>
958+ <tr>
959+
960+ <th>Name</th>
961+
962+
963+ <th>Type</th>
964+
965+
966+
967+
968+
969+ <th class="last">Description</th>
970+ </tr>
971+ </thead>
972+
973+ <tbody>
974+
975+
976+ <tr>
977+
978+ <td class="name"><code>account_alias</code></td>
979+
980+
981+ <td class="type">
982+
983+
984+<span class="param-type">String</span>
985+
986+
987+
988+
989+ </td>
990+
991+
992+
993+
994+
995+ <td class="description last"><p>alias of account.</p></td>
996+ </tr>
997+
998+
999+
1000+ <tr>
1001+
1002+ <td class="name"><code>account_id</code></td>
1003+
1004+
1005+ <td class="type">
1006+
1007+
1008+<span class="param-type">String</span>
1009+
1010+
1011+
1012+
1013+ </td>
1014+
1015+
1016+
1017+
1018+
1019+ <td class="description last"><p>id of account.</p></td>
1020+ </tr>
1021+
1022+
1023+
1024+ <tr>
1025+
1026+ <td class="name"><code>from</code></td>
1027+
1028+
1029+ <td class="type">
1030+
1031+
1032+<span class="param-type">Number</span>
1033+
1034+
1035+
1036+
1037+ </td>
1038+
1039+
1040+
1041+
1042+
1043+ <td class="description last"><p>the start position of first address</p></td>
1044+ </tr>
1045+
1046+
1047+
1048+ <tr>
1049+
1050+ <td class="name"><code>count</code></td>
1051+
1052+
1053+ <td class="type">
1054+
1055+
1056+<span class="param-type">Number</span>
1057+
1058+
1059+
1060+
1061+ </td>
1062+
1063+
1064+
1065+
1066+
1067+ <td class="description last"><p>the number of returned.</p></td>
1068+ </tr>
1069+
1070+
1071+ </tbody>
1072+</table>
1073+
1074+ </td>
1075+ </tr>
1076+
1077+
1078+ </tbody>
1079+</table>
1080+
1081+
1082+
1083+
1084+<dl class="details">
1085+
1086+
1087+
1088+
1089+
1090+
1091+
1092+
1093+
1094+
1095+
1096+
1097+
1098+
1099+
1100+
1101+
1102+
1103+
1104+
1105+
1106+
1107+
1108+
1109+
1110+
1111+
1112+
1113+
1114+
1115+
1116+
1117+
1118+
1119+
1120+</dl>
1121+
1122+
1123+
1124+
1125+
1126+
1127+
1128+
1129+
1130+
1131+
1132+
1133+
1134+ <h5>Returns:</h5>
1135+
1136+
1137+<div class="param-desc">
1138+ <p>target addresses response.</p>
1139+</div>
1140+
1141+
1142+
1143+<dl>
1144+ <dt>
1145+ Type
1146+ </dt>
1147+ <dd>
1148+
1149+<span class="param-type">Promise.&lt;module:AccountApi~AddressInfo></span>
1150+
1151+
1152+
1153+ </dd>
1154+</dl>
1155+
1156+
1157+
1158+
1159+
1160+</dd>
1161+
1162+
1163+
1164+<hr>
1165+<dt>
1166+ <h4 class="name" id="~listAll"><span class="type-signature">&lt;inner> </span>listAll()</h4>
1167+
1168+
1169+</dt>
1170+<dd>
1171+
1172+
1173+ <div class="description">
1174+ <p>List all accounts in the target Bytom node.</p>
1175+ </div>
1176+
1177+
1178+
1179+
1180+
1181+
1182+
1183+
1184+
1185+
1186+<dl class="details">
1187+
1188+
1189+
1190+
1191+
1192+
1193+
1194+
1195+
1196+
1197+
1198+
1199+
1200+
1201+
1202+
1203+
1204+
1205+
1206+
1207+
1208+
1209+
1210+
1211+
1212+
1213+
1214+
1215+
1216+
1217+
1218+
1219+
1220+
1221+
1222+</dl>
1223+
1224+
1225+
1226+
1227+
1228+
1229+
1230+
1231+
1232+
1233+
1234+
1235+
1236+ <h5>Returns:</h5>
1237+
1238+
1239+<div class="param-desc">
1240+ <p>All accounts promise.</p>
1241+</div>
1242+
1243+
1244+
1245+<dl>
1246+ <dt>
1247+ Type
1248+ </dt>
1249+ <dd>
1250+
1251+<span class="param-type">Promise.&lt;Array.&lt;<a href="global.html#Account">Account</a>>></span>
1252+
1253+
1254+
1255+ </dd>
1256+</dl>
1257+
1258+
1259+
1260+
1261+
1262+</dd>
1263+
1264+
1265+
1266+<hr>
1267+<dt>
1268+ <h4 class="name" id="~updateAlias"><span class="type-signature">&lt;inner> </span>updateAlias(params)</h4>
1269+
1270+
1271+</dt>
1272+<dd>
1273+
1274+
1275+ <div class="description">
1276+ <p>Update account alias.</p>
1277+ </div>
1278+
1279+
1280+
1281+
1282+
1283+
1284+
1285+
1286+ <h5>Parameters:</h5>
1287+
1288+
1289+<table class="params table table-striped">
1290+ <thead>
1291+ <tr>
1292+
1293+ <th>Name</th>
1294+
1295+
1296+ <th>Type</th>
1297+
1298+
1299+
1300+
1301+
1302+ <th class="last">Description</th>
1303+ </tr>
1304+ </thead>
1305+
1306+ <tbody>
1307+
1308+
1309+ <tr>
1310+
1311+ <td class="name"><code>params</code></td>
1312+
1313+
1314+ <td class="type">
1315+
1316+
1317+<span class="param-type">object</span>
1318+
1319+
1320+
1321+
1322+ </td>
1323+
1324+
1325+
1326+
1327+
1328+ <td class="description last"><p>Parameters for account update.</p>
1329+ <h6 class="method-params-label method-subparams-label">Properties</h6>
1330+
1331+
1332+<table class="params table table-striped">
1333+ <thead>
1334+ <tr>
1335+
1336+ <th>Name</th>
1337+
1338+
1339+ <th>Type</th>
1340+
1341+
1342+
1343+
1344+
1345+ <th class="last">Description</th>
1346+ </tr>
1347+ </thead>
1348+
1349+ <tbody>
1350+
1351+
1352+ <tr>
1353+
1354+ <td class="name"><code>account_id</code></td>
1355+
1356+
1357+ <td class="type">
1358+
1359+
1360+<span class="param-type">String</span>
1361+
1362+
1363+
1364+
1365+ </td>
1366+
1367+
1368+
1369+
1370+
1371+ <td class="description last"><p>id of account.</p></td>
1372+ </tr>
1373+
1374+
1375+
1376+ <tr>
1377+
1378+ <td class="name"><code>account_alias</code></td>
1379+
1380+
1381+ <td class="type">
1382+
1383+
1384+<span class="param-type">String</span>
1385+
1386+
1387+
1388+
1389+ </td>
1390+
1391+
1392+
1393+
1394+
1395+ <td class="description last"><p>alias of account.</p></td>
1396+ </tr>
1397+
1398+
1399+
1400+ <tr>
1401+
1402+ <td class="name"><code>new_alias</code></td>
1403+
1404+
1405+ <td class="type">
1406+
1407+
1408+<span class="param-type">String</span>
1409+
1410+
1411+
1412+
1413+ </td>
1414+
1415+
1416+
1417+
1418+
1419+ <td class="description last"><p>new alias of account.</p></td>
1420+ </tr>
1421+
1422+
1423+ </tbody>
1424+</table>
1425+
1426+ </td>
1427+ </tr>
1428+
1429+
1430+ </tbody>
1431+</table>
1432+
1433+
1434+
1435+
1436+<dl class="details">
1437+
1438+
1439+
1440+
1441+
1442+
1443+
1444+
1445+
1446+
1447+
1448+
1449+
1450+
1451+
1452+
1453+
1454+
1455+
1456+
1457+
1458+
1459+
1460+
1461+
1462+
1463+
1464+
1465+
1466+
1467+
1468+
1469+
1470+
1471+
1472+</dl>
1473+
1474+
1475+
1476+
1477+
1478+
1479+
1480+
1481+
1482+
1483+
1484+
1485+
1486+
1487+
1488+</dd>
1489+
1490+
1491+
1492+<hr>
1493+<dt>
1494+ <h4 class="name" id="~validateAddresses"><span class="type-signature">&lt;inner> </span>validateAddresses(address)</h4>
1495+
1496+
1497+</dt>
1498+<dd>
1499+
1500+
1501+ <div class="description">
1502+ <p>Validate an address for one account.</p>
1503+ </div>
1504+
1505+
1506+
1507+
1508+
1509+
1510+
1511+
1512+ <h5>Parameters:</h5>
1513+
1514+
1515+<table class="params table table-striped">
1516+ <thead>
1517+ <tr>
1518+
1519+ <th>Name</th>
1520+
1521+
1522+ <th>Type</th>
1523+
1524+
1525+
1526+
1527+
1528+ <th class="last">Description</th>
1529+ </tr>
1530+ </thead>
1531+
1532+ <tbody>
1533+
1534+
1535+ <tr>
1536+
1537+ <td class="name"><code>address</code></td>
1538+
1539+
1540+ <td class="type">
1541+
1542+
1543+<span class="param-type">string</span>
1544+
1545+
1546+
1547+
1548+ </td>
1549+
1550+
1551+
1552+
1553+
1554+ <td class="description last"><p>Filter and pagination information.</p></td>
1555+ </tr>
1556+
1557+
1558+ </tbody>
1559+</table>
1560+
1561+
1562+
1563+
1564+<dl class="details">
1565+
1566+
1567+
1568+
1569+
1570+
1571+
1572+
1573+
1574+
1575+
1576+
1577+
1578+
1579+
1580+
1581+
1582+
1583+
1584+
1585+
1586+
1587+
1588+
1589+
1590+
1591+
1592+
1593+
1594+
1595+
1596+
1597+
1598+
1599+
1600+</dl>
1601+
1602+
1603+
1604+
1605+
1606+
1607+
1608+
1609+
1610+
1611+
1612+
1613+
1614+ <h5>Returns:</h5>
1615+
1616+
1617+<div class="param-desc">
1618+ <p>weather the address is local and is valid.</p>
1619+</div>
1620+
1621+
1622+
1623+<dl>
1624+ <dt>
1625+ Type
1626+ </dt>
1627+ <dd>
1628+
1629+<span class="param-type">Promise.&lt;Object></span>
1630+
1631+
1632+
1633+ </dd>
1634+</dl>
1635+
1636+
1637+
1638+
1639+
1640+</dd>
1641+
1642+ </dl>
1643+
1644+
1645+
1646+ <h3 class="subsection-title">Type Definitions</h3>
1647+
1648+ <dl>
1649+
1650+<hr>
1651+<dt class="name" id="~AddressInfo">
1652+ <h4 id="~AddressInfo">AddressInfo</h4>
1653+
1654+
1655+</dt>
1656+<dd>
1657+
1658+
1659+
1660+ <h5>Type:</h5>
1661+ <ul>
1662+ <li>
1663+
1664+<span class="param-type">Object</span>
1665+
1666+
1667+
1668+ </li>
1669+ </ul>
1670+
1671+
1672+
1673+<dl class="details">
1674+
1675+
1676+ <h5 class="subsection-title">Properties:</h5>
1677+
1678+ <dl>
1679+
1680+<table class="props table table-striped">
1681+ <thead>
1682+ <tr>
1683+
1684+ <th>Name</th>
1685+
1686+
1687+ <th>Type</th>
1688+
1689+
1690+
1691+
1692+
1693+ <th class="last">Description</th>
1694+ </tr>
1695+ </thead>
1696+
1697+ <tbody>
1698+
1699+
1700+ <tr>
1701+
1702+ <td class="name"><code>account_alias</code></td>
1703+
1704+
1705+ <td class="type">
1706+
1707+
1708+<span class="param-type">String</span>
1709+
1710+
1711+
1712+
1713+ </td>
1714+
1715+
1716+
1717+
1718+
1719+ <td class="description last"></td>
1720+ </tr>
1721+
1722+
1723+
1724+ <tr>
1725+
1726+ <td class="name"><code>account_id</code></td>
1727+
1728+
1729+ <td class="type">
1730+
1731+
1732+<span class="param-type">String</span>
1733+
1734+
1735+
1736+
1737+ </td>
1738+
1739+
1740+
1741+
1742+
1743+ <td class="description last"></td>
1744+ </tr>
1745+
1746+
1747+
1748+ <tr>
1749+
1750+ <td class="name"><code>adddress</code></td>
1751+
1752+
1753+ <td class="type">
1754+
1755+
1756+<span class="param-type">String</span>
1757+
1758+
1759+
1760+
1761+ </td>
1762+
1763+
1764+
1765+
1766+
1767+ <td class="description last"></td>
1768+ </tr>
1769+
1770+
1771+
1772+ <tr>
1773+
1774+ <td class="name"><code>change</code></td>
9311775
9321776
9331777 <td class="type">
9341778
9351779
936-<span class="param-type"><a href="module-AccountsApi.html#~id">module:AccountsApi~id</a></span>
1780+<span class="param-type">Boolean</span>
9371781
9381782
9391783
@@ -944,19 +1788,16 @@
9441788
9451789
9461790
947- <td class="description last"><p>Account id.</p></td>
1791+ <td class="description last"><p>Indicate whether this address is for change UTXO.</p></td>
9481792 </tr>
9491793
9501794
9511795 </tbody>
9521796 </table>
1797+</dl>
9531798
9541799
9551800
956-
957-<dl class="details">
958-
959-
9601801
9611802
9621803
@@ -994,55 +1835,84 @@
9941835
9951836
9961837
1838+</dd>
1839+
1840+
1841+
1842+<hr>
1843+<dt class="name" id="~alias">
1844+ <h4 id="~alias">alias</h4>
9971845
9981846
1847+</dt>
1848+<dd>
1849+
1850+ <div class="description">
1851+ <p>User specified, unique identifier.</p>
1852+ </div>
1853+
9991854
10001855
1856+ <h5>Type:</h5>
1857+ <ul>
1858+ <li>
1859+
1860+<span class="param-type">String</span>
1861+
10011862
1863+
1864+ </li>
1865+ </ul>
10021866
10031867
10041868
1869+<dl class="details">
1870+
1871+
1872+
1873+
1874+
1875+
1876+
10051877
10061878
1007- <h5>Returns:</h5>
1879+
10081880
1009-
1010-<div class="param-desc">
1011- <p>Target accounts promise.</p>
1012-</div>
10131881
1882+
10141883
1884+
10151885
1016-<dl>
1017- <dt>
1018- Type
1019- </dt>
1020- <dd>
1021-
1022-<span class="param-type">Promise.&lt;Array.&lt;<a href="global.html#Account">Account</a>>></span>
1886+
10231887
1888+
10241889
1890+
10251891
1026- </dd>
1027-</dl>
1892+
10281893
1894+
10291895
1030-
10311896
1032-
1033-</dd>
10341897
1035- </dl>
1036-
1898+
1899+
1900+
1901+
1902+
1903+
1904+
1905+</dl>
1906+
10371907
10381908
1039- <h3 class="subsection-title">Type Definitions</h3>
1909+</dd>
10401910
1041- <dl>
1911+
10421912
10431913 <hr>
1044-<dt class="name" id="~AddressInfo">
1045- <h4 id="~AddressInfo">AddressInfo</h4>
1914+<dt class="name" id="~createReceiverRequest">
1915+ <h4 id="~createReceiverRequest">createReceiverRequest</h4>
10461916
10471917
10481918 </dt>
@@ -1080,6 +1950,8 @@
10801950 <th>Type</th>
10811951
10821952
1953+ <th>Argument</th>
1954+
10831955
10841956
10851957
@@ -1106,41 +1978,26 @@
11061978 </td>
11071979
11081980
1109-
1110-
1111-
1112- <td class="description last"></td>
1113- </tr>
1114-
1115-
1116-
1117- <tr>
1118-
1119- <td class="name"><code>account_id</code></td>
1120-
1121-
1122- <td class="type">
1123-
1981+ <td class="attributes">
1982+
1983+ &lt;optional><br>
11241984
1125-<span class="param-type">String</span>
1126-
1127-
1128-
1129-
1130- </td>
11311985
1986+
1987+ </td>
11321988
11331989
11341990
11351991
1136- <td class="description last"></td>
1992+ <td class="description last"><p>The unique alias of the account. accountAlias or accountId must be
1993+provided.</p></td>
11371994 </tr>
11381995
11391996
11401997
11411998 <tr>
11421999
1143- <td class="name"><code>adddress</code></td>
2000+ <td class="name"><code>account_id</code></td>
11442001
11452002
11462003 <td class="type">
@@ -1154,34 +2011,19 @@
11542011 </td>
11552012
11562013
1157-
1158-
1159-
1160- <td class="description last"></td>
1161- </tr>
1162-
1163-
1164-
1165- <tr>
1166-
1167- <td class="name"><code>change</code></td>
1168-
1169-
1170- <td class="type">
1171-
2014+ <td class="attributes">
2015+
2016+ &lt;optional><br>
11722017
1173-<span class="param-type">Boolean</span>
1174-
1175-
1176-
1177-
1178- </td>
11792018
2019+
2020+ </td>
11802021
11812022
11822023
11832024
1184- <td class="description last"><p>Indicate whether this address is for change UTXO.</p></td>
2025+ <td class="description last"><p>The unique ID of the account. accountAlias or accountId must be
2026+provided.</p></td>
11852027 </tr>
11862028
11872029
@@ -1233,24 +2075,20 @@
12332075
12342076
12352077 <hr>
1236-<dt class="name" id="~alias">
1237- <h4 id="~alias">alias</h4>
2078+<dt class="name" id="~createRequest">
2079+ <h4 id="~createRequest">createRequest</h4>
12382080
12392081
12402082 </dt>
12412083 <dd>
12422084
1243- <div class="description">
1244- <p>User specified, unique identifier.</p>
1245- </div>
1246-
12472085
12482086
12492087 <h5>Type:</h5>
12502088 <ul>
12512089 <li>
12522090
1253-<span class="param-type">String</span>
2091+<span class="param-type">Object</span>
12542092
12552093
12562094
@@ -1262,6 +2100,129 @@
12622100 <dl class="details">
12632101
12642102
2103+ <h5 class="subsection-title">Properties:</h5>
2104+
2105+ <dl>
2106+
2107+<table class="props table table-striped">
2108+ <thead>
2109+ <tr>
2110+
2111+ <th>Name</th>
2112+
2113+
2114+ <th>Type</th>
2115+
2116+
2117+ <th>Argument</th>
2118+
2119+
2120+
2121+
2122+ <th class="last">Description</th>
2123+ </tr>
2124+ </thead>
2125+
2126+ <tbody>
2127+
2128+
2129+ <tr>
2130+
2131+ <td class="name"><code>alias</code></td>
2132+
2133+
2134+ <td class="type">
2135+
2136+
2137+<span class="param-type">String</span>
2138+
2139+
2140+
2141+
2142+ </td>
2143+
2144+
2145+ <td class="attributes">
2146+
2147+ &lt;optional><br>
2148+
2149+
2150+
2151+ </td>
2152+
2153+
2154+
2155+
2156+ <td class="description last"><p>User specified, unique identifier.</p></td>
2157+ </tr>
2158+
2159+
2160+
2161+ <tr>
2162+
2163+ <td class="name"><code>root_xpubs</code></td>
2164+
2165+
2166+ <td class="type">
2167+
2168+
2169+<span class="param-type">Array.&lt;String></span>
2170+
2171+
2172+
2173+
2174+ </td>
2175+
2176+
2177+ <td class="attributes">
2178+
2179+
2180+
2181+ </td>
2182+
2183+
2184+
2185+
2186+ <td class="description last"><p>The list of keys used to create control programs under the account.</p></td>
2187+ </tr>
2188+
2189+
2190+
2191+ <tr>
2192+
2193+ <td class="name"><code>quorum</code></td>
2194+
2195+
2196+ <td class="type">
2197+
2198+
2199+<span class="param-type">Number</span>
2200+
2201+
2202+
2203+
2204+ </td>
2205+
2206+
2207+ <td class="attributes">
2208+
2209+
2210+
2211+ </td>
2212+
2213+
2214+
2215+
2216+ <td class="description last"><p>The number of keys required to sign transactions for the account.</p></td>
2217+ </tr>
2218+
2219+
2220+ </tbody>
2221+</table>
2222+</dl>
2223+
2224+
2225+
12652226
12662227
12672228
@@ -1562,7 +2523,7 @@
15622523 <span class="jsdoc-message">
15632524 Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
15642525
1565- on 2018-05-24T14:05:00+08:00
2526+ on 2018-11-26T16:28:32+08:00
15662527
15672528 using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
15682529 </span>
--- a/docs/module-AssetsApi.html
+++ b/docs/module-AssetsApi.html
@@ -33,7 +33,14 @@
3333 <li class="dropdown">
3434 <a href="modules.list.html" class="dropdown-toggle" data-toggle="dropdown">Modules<b class="caret"></b></a>
3535 <ul class="dropdown-menu ">
36- <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>
36+ <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>
37+ </ul>
38+ </li>
39+
40+ <li class="dropdown">
41+ <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
42+ <ul class="dropdown-menu ">
43+ <li><a href="TransactionBuilder.html">TransactionBuilder</a></li>
3744 </ul>
3845 </li>
3946
@@ -150,7 +157,7 @@
150157
151158 <hr>
152159 <dt>
153- <h4 class="name" id="~create"><span class="type-signature">&lt;inner> </span>create(xpubs, quorum, alias, definition)</h4>
160+ <h4 class="name" id="~create"><span class="type-signature">&lt;inner> </span>create(params)</h4>
154161
155162
156163 </dt>
@@ -193,13 +200,13 @@
193200
194201 <tr>
195202
196- <td class="name"><code>xpubs</code></td>
203+ <td class="name"><code>params</code></td>
197204
198205
199206 <td class="type">
200207
201208
202-<span class="param-type"><a href="module-AssetsApi.html#~xpubs">module:AssetsApi~xpubs</a></span>
209+<span class="param-type"><a href="module-AssetsApi.html#~createRequest">module:AssetsApi~createRequest</a></span>
203210
204211
205212
@@ -210,79 +217,7 @@
210217
211218
212219
213- <td class="description last"><p>Keys for asseet creation.</p></td>
214- </tr>
215-
216-
217-
218- <tr>
219-
220- <td class="name"><code>quorum</code></td>
221-
222-
223- <td class="type">
224-
225-
226-<span class="param-type"><a href="module-AssetsApi.html#~quorum">module:AssetsApi~quorum</a></span>
227-
228-
229-
230-
231- </td>
232-
233-
234-
235-
236-
237- <td class="description last"><p>The number of keys required to sign transactions for the account.</p></td>
238- </tr>
239-
240-
241-
242- <tr>
243-
244- <td class="name"><code>alias</code></td>
245-
246-
247- <td class="type">
248-
249-
250-<span class="param-type"><a href="module-AssetsApi.html#~alias">module:AssetsApi~alias</a></span>
251-
252-
253-
254-
255- </td>
256-
257-
258-
259-
260-
261- <td class="description last"><p>Asset alias.</p></td>
262- </tr>
263-
264-
265-
266- <tr>
267-
268- <td class="name"><code>definition</code></td>
269-
270-
271- <td class="type">
272-
273-
274-<span class="param-type"><a href="module-AssetsApi.html#~definition">module:AssetsApi~definition</a></span>
275-
276-
277-
278-
279- </td>
280-
281-
282-
283-
284-
285- <td class="description last"><p>Asset definition.</p></td>
220+ <td class="description last"><p>Parameters for asset creation.</p></td>
286221 </tr>
287222
288223
@@ -374,7 +309,7 @@
374309
375310 <hr>
376311 <dt>
377- <h4 class="name" id="~getById"><span class="type-signature">&lt;inner> </span>getById(id)</h4>
312+ <h4 class="name" id="~list"><span class="type-signature">&lt;inner> </span>list(id)</h4>
378313
379314
380315 </dt>
@@ -423,7 +358,7 @@
423358 <td class="type">
424359
425360
426-<span class="param-type"><a href="module-AssetsApi.html#~id">module:AssetsApi~id</a></span>
361+<span class="param-type">module:AssetsApi~id</span>
427362
428363
429364
@@ -526,7 +461,7 @@
526461
527462 <hr>
528463 <dt>
529- <h4 class="name" id="~list"><span class="type-signature">&lt;inner> </span>list()</h4>
464+ <h4 class="name" id="~listAll"><span class="type-signature">&lt;inner> </span>listAll()</h4>
530465
531466
532467 </dt>
@@ -628,7 +563,7 @@
628563
629564 <hr>
630565 <dt>
631- <h4 class="name" id="~updateAlias"><span class="type-signature">&lt;inner> </span>updateAlias(id, newAlias)</h4>
566+ <h4 class="name" id="~updateAlias"><span class="type-signature">&lt;inner> </span>updateAlias(params)</h4>
632567
633568
634569 </dt>
@@ -671,13 +606,56 @@
671606
672607 <tr>
673608
609+ <td class="name"><code>params</code></td>
610+
611+
612+ <td class="type">
613+
614+
615+<span class="param-type">object</span>
616+
617+
618+
619+
620+ </td>
621+
622+
623+
624+
625+
626+ <td class="description last"><p>Parameters for asset update.</p>
627+ <h6 class="method-params-label method-subparams-label">Properties</h6>
628+
629+
630+<table class="params table table-striped">
631+ <thead>
632+ <tr>
633+
634+ <th>Name</th>
635+
636+
637+ <th>Type</th>
638+
639+
640+
641+
642+
643+ <th class="last">Description</th>
644+ </tr>
645+ </thead>
646+
647+ <tbody>
648+
649+
650+ <tr>
651+
674652 <td class="name"><code>id</code></td>
675653
676654
677655 <td class="type">
678656
679657
680-<span class="param-type"><a href="module-AssetsApi.html#~id">module:AssetsApi~id</a></span>
658+<span class="param-type">String</span>
681659
682660
683661
@@ -688,14 +666,14 @@
688666
689667
690668
691- <td class="description last"><p>Asset id.</p></td>
669+ <td class="description last"><p>id of asset.</p></td>
692670 </tr>
693671
694672
695673
696674 <tr>
697675
698- <td class="name"><code>newAlias</code></td>
676+ <td class="name"><code>alias</code></td>
699677
700678
701679 <td class="type">
@@ -712,7 +690,14 @@
712690
713691
714692
715- <td class="description last"><p>new alias.</p></td>
693+ <td class="description last"><p>new alias of asset.</p></td>
694+ </tr>
695+
696+
697+ </tbody>
698+</table>
699+
700+ </td>
716701 </tr>
717702
718703
@@ -785,24 +770,20 @@
785770 <dl>
786771
787772 <hr>
788-<dt class="name" id="~alias">
789- <h4 id="~alias">alias</h4>
773+<dt class="name" id="~createRequest">
774+ <h4 id="~createRequest">createRequest</h4>
790775
791776
792777 </dt>
793778 <dd>
794779
795- <div class="description">
796- <p>User specified, unique identifier.</p>
797- </div>
798-
799780
800781
801782 <h5>Type:</h5>
802783 <ul>
803784 <li>
804785
805-<span class="param-type">String</span>
786+<span class="param-type">Object</span>
806787
807788
808789
@@ -814,289 +795,192 @@
814795 <dl class="details">
815796
816797
817-
798+ <h5 class="subsection-title">Properties:</h5>
818799
819-
800+ <dl>
820801
821-
822-
823-
824-
825-
826-
827-
828-
829-
830-
831-
832-
833-
834-
835-
836-
837-
838-
839-
840-
841-
842-
843-
802+<table class="props table table-striped">
803+ <thead>
804+ <tr>
805+
806+ <th>Name</th>
807+
844808
845-
809+ <th>Type</th>
846810
847-
811+
812+ <th>Argument</th>
813+
848814
849-
850-</dl>
815+
851816
817+ <th class="last">Description</th>
818+ </tr>
819+ </thead>
852820
821+ <tbody>
853822
854-</dd>
855823
824+ <tr>
825+
826+ <td class="name"><code>alias</code></td>
856827
857-
858-<hr>
859-<dt class="name" id="~definition">
860- <h4 id="~definition">definition</h4>
861-
862-
863-</dt>
864-<dd>
865-
866- <div class="description">
867- <p>User-specified, asset attributes accross Bytom blockchain network.</p>
868- </div>
869-
870828
871-
872- <h5>Type:</h5>
873- <ul>
874- <li>
829+ <td class="type">
830+
875831
876-<span class="param-type">Object</span>
877-
878-
879-
880- </li>
881- </ul>
882-
832+<span class="param-type">String</span>
883833
884-
885-<dl class="details">
886-
887834
888-
889835
890-
836+
837+ </td>
891838
892-
839+
840+ <td class="attributes">
841+
842+ &lt;optional><br>
843+
893844
894-
845+
846+ </td>
847+
895848
896-
849+
897850
898-
851+ <td class="description last"><p>User specified, unique identifier.</p></td>
852+ </tr>
899853
900854
901855
902-
903-
904-
905-
906-
907-
908-
909-
910-
911-
912-
913-
914-
915-
916-
856+ <tr>
857+
858+ <td class="name"><code>defintion</code></td>
859+
917860
918-
861+ <td class="type">
862+
863+
864+<span class="param-type">Object</span>
919865
920-
921-</dl>
922866
923867
924-
925-</dd>
868+
869+ </td>
926870
927871
872+ <td class="attributes">
928873
929-<hr>
930-<dt class="name" id="~id">
931- <h4 id="~id">id</h4>
932-
933-
934-</dt>
935-<dd>
936-
937- <div class="description">
938- <p>Unique account identifier in one Bytom node.</p>
939- </div>
940-
941-
942-
943- <h5>Type:</h5>
944- <ul>
945- <li>
874+ &lt;optional><br>
946875
947-<span class="param-type">String</span>
948-
949-
950-
951- </li>
952- </ul>
953-
954-
955-
956-<dl class="details">
957-
958876
959-
960-
961-
962-
963-
964-
965-
877+
878+ </td>
879+
966880
967-
881+
968882
969-
883+ <td class="description last"><p>User-specified, arbitrary/unstructured data visible across blockchain networks.</p></td>
884+ </tr>
970885
971886
972887
973-
974-
975-
976-
977-
978-
979-
888+ <tr>
889+
890+ <td class="name"><code>root_xpubs</code></td>
891+
980892
981-
893+ <td class="type">
894+
895+
896+<span class="param-type">Array.&lt;String></span>
982897
983898
984899
985-
900+
901+ </td>
986902
987-
903+
904+ <td class="attributes">
905+
988906
989-
907+
908+ </td>
909+
990910
991-
992-</dl>
911+
993912
913+ <td class="description last"><p>Optional. The list of keys used to create the asset.</p></td>
914+ </tr>
994915
995916
996-</dd>
997917
918+ <tr>
919+
920+ <td class="name"><code>quorum</code></td>
998921
999-
1000-<hr>
1001-<dt class="name" id="~quorum">
1002- <h4 id="~quorum">quorum</h4>
1003-
1004-
1005-</dt>
1006-<dd>
1007-
1008- <div class="description">
1009- <p>The number of signatures required to issue new units of the asset.</p>
1010- </div>
1011-
1012922
1013-
1014- <h5>Type:</h5>
1015- <ul>
1016- <li>
923+ <td class="type">
924+
1017925
1018926 <span class="param-type">Number</span>
1019927
1020928
1021929
1022- </li>
1023- </ul>
1024-
1025-
1026-
1027-<dl class="details">
1028-
1029-
1030-
1031-
1032-
930+
931+ </td>
1033932
1034-
933+
934+ <td class="attributes">
935+
1035936
1036-
937+
938+ </td>
939+
1037940
1038-
941+
1039942
1040-
943+ <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>
944+ </tr>
1041945
1042946
1043947
1044-
1045-
1046-
1047-
1048-
1049-
1050-
1051-
1052-
1053-
1054-
1055-
1056-
1057-
1058-
948+ <tr>
949+
950+ <td class="name"><code>issuance_program</code></td>
951+
1059952
1060-
953+ <td class="type">
954+
955+
956+<span class="param-type">String</span>
1061957
1062-
1063-</dl>
1064958
1065959
1066-
1067-</dd>
960+
961+ </td>
1068962
1069963
964+ <td class="attributes">
965+
966+ &lt;optional><br>
1070967
1071-<hr>
1072-<dt class="name" id="~xpubs">
1073- <h4 id="~xpubs">xpubs</h4>
1074-
1075-
1076-</dt>
1077-<dd>
1078-
1079- <div class="description">
1080- <p>The list of keys used to issue units of the asset.</p>
1081- </div>
1082-
1083968
1084-
1085- <h5>Type:</h5>
1086- <ul>
1087- <li>
1088969
1089-<span class="param-type">Array.&lt;String></span>
970+ </td>
971+
1090972
973+
1091974
975+ <td class="description last"><p>Optional. User-specified, contract program.</p></td>
976+ </tr>
1092977
1093- </li>
1094- </ul>
1095978
979+ </tbody>
980+</table>
981+</dl>
1096982
1097983
1098-<dl class="details">
1099-
1100984
1101985
1102986
@@ -1185,7 +1069,7 @@
11851069 <span class="jsdoc-message">
11861070 Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
11871071
1188- on 2018-05-24T14:05:00+08:00
1072+ on 2018-11-26T16:28:32+08:00
11891073
11901074 using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
11911075 </span>
--- a/docs/module-BalancesApi.html
+++ b/docs/module-BalancesApi.html
@@ -33,7 +33,14 @@
3333 <li class="dropdown">
3434 <a href="modules.list.html" class="dropdown-toggle" data-toggle="dropdown">Modules<b class="caret"></b></a>
3535 <ul class="dropdown-menu ">
36- <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>
36+ <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>
37+ </ul>
38+ </li>
39+
40+ <li class="dropdown">
41+ <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
42+ <ul class="dropdown-menu ">
43+ <li><a href="TransactionBuilder.html">TransactionBuilder</a></li>
3744 </ul>
3845 </li>
3946
@@ -150,7 +157,233 @@
150157
151158 <hr>
152159 <dt>
153- <h4 class="name" id="~list"><span class="type-signature">&lt;inner> </span>list()</h4>
160+ <h4 class="name" id="~list"><span class="type-signature">&lt;inner> </span>list(params)</h4>
161+
162+
163+</dt>
164+<dd>
165+
166+
167+ <div class="description">
168+ <p>Get asset balances by account.</p>
169+ </div>
170+
171+
172+
173+
174+
175+
176+
177+
178+ <h5>Parameters:</h5>
179+
180+
181+<table class="params table table-striped">
182+ <thead>
183+ <tr>
184+
185+ <th>Name</th>
186+
187+
188+ <th>Type</th>
189+
190+
191+
192+
193+
194+ <th class="last">Description</th>
195+ </tr>
196+ </thead>
197+
198+ <tbody>
199+
200+
201+ <tr>
202+
203+ <td class="name"><code>params</code></td>
204+
205+
206+ <td class="type">
207+
208+
209+<span class="param-type">Object</span>
210+
211+
212+
213+
214+ </td>
215+
216+
217+
218+
219+
220+ <td class="description last"><p>Filter and pagination information.</p>
221+ <h6 class="method-params-label method-subparams-label">Properties</h6>
222+
223+
224+<table class="params table table-striped">
225+ <thead>
226+ <tr>
227+
228+ <th>Name</th>
229+
230+
231+ <th>Type</th>
232+
233+
234+
235+
236+
237+ <th class="last">Description</th>
238+ </tr>
239+ </thead>
240+
241+ <tbody>
242+
243+
244+ <tr>
245+
246+ <td class="name"><code>account_id</code></td>
247+
248+
249+ <td class="type">
250+
251+
252+<span class="param-type">String</span>
253+
254+
255+
256+
257+ </td>
258+
259+
260+
261+
262+
263+ <td class="description last"><p>account id.</p></td>
264+ </tr>
265+
266+
267+
268+ <tr>
269+
270+ <td class="name"><code>account_alias</code></td>
271+
272+
273+ <td class="type">
274+
275+
276+<span class="param-type">String</span>
277+
278+
279+
280+
281+ </td>
282+
283+
284+
285+
286+
287+ <td class="description last"><p>name of account.</p></td>
288+ </tr>
289+
290+
291+ </tbody>
292+</table>
293+
294+ </td>
295+ </tr>
296+
297+
298+ </tbody>
299+</table>
300+
301+
302+
303+
304+<dl class="details">
305+
306+
307+
308+
309+
310+
311+
312+
313+
314+
315+
316+
317+
318+
319+
320+
321+
322+
323+
324+
325+
326+
327+
328+
329+
330+
331+
332+
333+
334+
335+
336+
337+
338+
339+
340+</dl>
341+
342+
343+
344+
345+
346+
347+
348+
349+
350+
351+
352+
353+
354+ <h5>Returns:</h5>
355+
356+
357+<div class="param-desc">
358+ <p>The result balances.</p>
359+</div>
360+
361+
362+
363+<dl>
364+ <dt>
365+ Type
366+ </dt>
367+ <dd>
368+
369+<span class="param-type">Promise.&lt;Array.&lt;<a href="global.html#Balance">Balance</a>>></span>
370+
371+
372+
373+ </dd>
374+</dl>
375+
376+
377+
378+
379+
380+</dd>
381+
382+
383+
384+<hr>
385+<dt>
386+ <h4 class="name" id="~listAll"><span class="type-signature">&lt;inner> </span>listAll()</h4>
154387
155388
156389 </dt>
@@ -158,7 +391,7 @@
158391
159392
160393 <div class="description">
161- <p>Get all asset balances of all accounts.</p>
394+ <p>List all assets Balances in one Bytom node.</p>
162395 </div>
163396
164397
@@ -298,7 +531,7 @@
298531 <span class="jsdoc-message">
299532 Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
300533
301- on 2018-05-24T14:05:00+08:00
534+ on 2018-11-26T16:28:32+08:00
302535
303536 using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
304537 </span>
--- /dev/null
+++ b/docs/module-BlockAPI.html
@@ -0,0 +1,1390 @@
1+<!DOCTYPE html>
2+
3+<html lang="en">
4+<head>
5+ <meta charset="utf-8">
6+ <meta name="viewport" content="width=device-width">
7+ <title>Bytom Node.js SDK Module: BlockAPI</title>
8+
9+ <!--[if lt IE 9]>
10+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11+ <![endif]-->
12+ <link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
13+
14+ <link type="text/css" rel="stylesheet" href="styles/site.cosmo.css">
15+
16+</head>
17+
18+<body>
19+
20+<div class="navbar navbar-default navbar-fixed-top ">
21+<div class="container">
22+ <div class="navbar-header">
23+ <a class="navbar-brand" href="index.html">Bytom Node.js SDK</a>
24+ <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
25+ <span class="icon-bar"></span>
26+ <span class="icon-bar"></span>
27+ <span class="icon-bar"></span>
28+ </button>
29+ </div>
30+ <div class="navbar-collapse collapse" id="topNavigation">
31+ <ul class="nav navbar-nav">
32+
33+ <li class="dropdown">
34+ <a href="modules.list.html" class="dropdown-toggle" data-toggle="dropdown">Modules<b class="caret"></b></a>
35+ <ul class="dropdown-menu ">
36+ <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>
37+ </ul>
38+ </li>
39+
40+ <li class="dropdown">
41+ <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
42+ <ul class="dropdown-menu ">
43+ <li><a href="TransactionBuilder.html">TransactionBuilder</a></li>
44+ </ul>
45+ </li>
46+
47+ <li class="dropdown">
48+ <a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
49+ <ul class="dropdown-menu ">
50+ <li><a href="global.html">Global</a></li>
51+ </ul>
52+ </li>
53+
54+ </ul>
55+
56+ <div class="col-sm-3 col-md-3">
57+ <form class="navbar-form" role="search">
58+ <div class="input-group">
59+ <input type="text" class="form-control" placeholder="Search" name="q" id="search-input">
60+ <div class="input-group-btn">
61+ <button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button>
62+ </div>
63+ </div>
64+ </form>
65+ </div>
66+
67+ </div>
68+
69+</div>
70+</div>
71+
72+
73+<div class="container" id="toc-content">
74+<div class="row">
75+
76+
77+ <div class="col-md-8">
78+
79+ <div id="main">
80+
81+
82+ <h1 class="page-title">Module: BlockAPI</h1>
83+<section>
84+
85+<header>
86+
87+</header>
88+
89+
90+<article>
91+ <div class="container-overview">
92+
93+
94+ <div class="description"><p>API for interacting with blocks.</p></div>
95+
96+
97+
98+<dl class="details">
99+
100+
101+
102+
103+
104+
105+
106+
107+
108+
109+
110+
111+
112+
113+
114+
115+
116+
117+
118+
119+
120+
121+
122+
123+
124+
125+
126+
127+
128+
129+
130+
131+
132+
133+
134+</dl>
135+
136+
137+
138+
139+ </div>
140+
141+
142+
143+
144+
145+
146+
147+
148+
149+
150+
151+
152+
153+
154+ <h3 class="subsection-title">Methods</h3>
155+
156+ <dl>
157+
158+<hr>
159+<dt>
160+ <h4 class="name" id="~getBlock"><span class="type-signature">&lt;inner> </span>getBlock(params)</h4>
161+
162+
163+</dt>
164+<dd>
165+
166+
167+ <div class="description">
168+ <p>Returns the detail block by block height or block hash.</p>
169+ </div>
170+
171+
172+
173+
174+
175+
176+
177+
178+ <h5>Parameters:</h5>
179+
180+
181+<table class="params table table-striped">
182+ <thead>
183+ <tr>
184+
185+ <th>Name</th>
186+
187+
188+ <th>Type</th>
189+
190+
191+
192+
193+
194+ <th class="last">Description</th>
195+ </tr>
196+ </thead>
197+
198+ <tbody>
199+
200+
201+ <tr>
202+
203+ <td class="name"><code>params</code></td>
204+
205+
206+ <td class="type">
207+
208+
209+<span class="param-type">Object</span>
210+
211+
212+
213+
214+ </td>
215+
216+
217+
218+
219+
220+ <td class="description last">
221+ <h6 class="method-params-label method-subparams-label">Properties</h6>
222+
223+
224+<table class="params table table-striped">
225+ <thead>
226+ <tr>
227+
228+ <th>Name</th>
229+
230+
231+ <th>Type</th>
232+
233+
234+
235+
236+
237+ <th class="last">Description</th>
238+ </tr>
239+ </thead>
240+
241+ <tbody>
242+
243+
244+ <tr>
245+
246+ <td class="name"><code>block_hash</code></td>
247+
248+
249+ <td class="type">
250+
251+
252+<span class="param-type">String</span>
253+
254+
255+
256+
257+ </td>
258+
259+
260+
261+
262+
263+ <td class="description last"><p>hash of block.</p></td>
264+ </tr>
265+
266+
267+
268+ <tr>
269+
270+ <td class="name"><code>block_height</code></td>
271+
272+
273+ <td class="type">
274+
275+
276+<span class="param-type">Integer</span>
277+
278+
279+
280+
281+ </td>
282+
283+
284+
285+
286+
287+ <td class="description last"><p>height of block.</p></td>
288+ </tr>
289+
290+
291+ </tbody>
292+</table>
293+
294+ </td>
295+ </tr>
296+
297+
298+ </tbody>
299+</table>
300+
301+
302+
303+
304+<dl class="details">
305+
306+
307+
308+
309+
310+
311+
312+
313+
314+
315+
316+
317+
318+
319+
320+
321+
322+
323+
324+
325+
326+
327+
328+
329+
330+
331+
332+
333+
334+
335+
336+
337+
338+
339+
340+</dl>
341+
342+
343+
344+
345+
346+
347+
348+
349+
350+
351+
352+
353+
354+ <h5>Returns:</h5>
355+
356+
357+
358+
359+<dl>
360+ <dt>
361+ Type
362+ </dt>
363+ <dd>
364+
365+<span class="param-type">Promise.&lt;<a href="global.html#BlockInfo">BlockInfo</a>></span>
366+
367+
368+
369+ </dd>
370+</dl>
371+
372+
373+
374+
375+
376+</dd>
377+
378+
379+
380+<hr>
381+<dt>
382+ <h4 class="name" id="~getBlockCount"><span class="type-signature">&lt;inner> </span>getBlockCount()</h4>
383+
384+
385+</dt>
386+<dd>
387+
388+
389+ <div class="description">
390+ <p>Returns the current block height for blockchain.</p>
391+ </div>
392+
393+
394+
395+
396+
397+
398+
399+
400+
401+
402+<dl class="details">
403+
404+
405+
406+
407+
408+
409+
410+
411+
412+
413+
414+
415+
416+
417+
418+
419+
420+
421+
422+
423+
424+
425+
426+
427+
428+
429+
430+
431+
432+
433+
434+
435+
436+
437+
438+</dl>
439+
440+
441+
442+
443+
444+
445+
446+
447+
448+
449+
450+
451+
452+ <h5>Returns:</h5>
453+
454+
455+<div class="param-desc">
456+ <p>Promise resolved on success with block_count returned.</p>
457+</div>
458+
459+
460+
461+<dl>
462+ <dt>
463+ Type
464+ </dt>
465+ <dd>
466+
467+<span class="param-type">Promise.&lt;Object></span>
468+
469+
470+
471+ </dd>
472+</dl>
473+
474+
475+
476+
477+
478+</dd>
479+
480+
481+
482+<hr>
483+<dt>
484+ <h4 class="name" id="~getBlockHash"><span class="type-signature">&lt;inner> </span>getBlockHash()</h4>
485+
486+
487+</dt>
488+<dd>
489+
490+
491+ <div class="description">
492+ <p>Returns the current block hash for blockchain.</p>
493+ </div>
494+
495+
496+
497+
498+
499+
500+
501+
502+
503+
504+<dl class="details">
505+
506+
507+
508+
509+
510+
511+
512+
513+
514+
515+
516+
517+
518+
519+
520+
521+
522+
523+
524+
525+
526+
527+
528+
529+
530+
531+
532+
533+
534+
535+
536+
537+
538+
539+
540+</dl>
541+
542+
543+
544+
545+
546+
547+
548+
549+
550+
551+
552+
553+
554+ <h5>Returns:</h5>
555+
556+
557+<div class="param-desc">
558+ <p>Requested info of specified Bytom Core with block_hash returned.</p>
559+</div>
560+
561+
562+
563+<dl>
564+ <dt>
565+ Type
566+ </dt>
567+ <dd>
568+
569+<span class="param-type">Promise.&lt;Object></span>
570+
571+
572+
573+ </dd>
574+</dl>
575+
576+
577+
578+
579+
580+</dd>
581+
582+
583+
584+<hr>
585+<dt>
586+ <h4 class="name" id="~getBlockHeader"><span class="type-signature">&lt;inner> </span>getBlockHeader(params)</h4>
587+
588+
589+</dt>
590+<dd>
591+
592+
593+ <div class="description">
594+ <p>Returns the detail block header by block height or block hash.</p>
595+ </div>
596+
597+
598+
599+
600+
601+
602+
603+
604+ <h5>Parameters:</h5>
605+
606+
607+<table class="params table table-striped">
608+ <thead>
609+ <tr>
610+
611+ <th>Name</th>
612+
613+
614+ <th>Type</th>
615+
616+
617+
618+
619+
620+ <th class="last">Description</th>
621+ </tr>
622+ </thead>
623+
624+ <tbody>
625+
626+
627+ <tr>
628+
629+ <td class="name"><code>params</code></td>
630+
631+
632+ <td class="type">
633+
634+
635+<span class="param-type">Object</span>
636+
637+
638+
639+
640+ </td>
641+
642+
643+
644+
645+
646+ <td class="description last">
647+ <h6 class="method-params-label method-subparams-label">Properties</h6>
648+
649+
650+<table class="params table table-striped">
651+ <thead>
652+ <tr>
653+
654+ <th>Name</th>
655+
656+
657+ <th>Type</th>
658+
659+
660+
661+
662+
663+ <th class="last">Description</th>
664+ </tr>
665+ </thead>
666+
667+ <tbody>
668+
669+
670+ <tr>
671+
672+ <td class="name"><code>block_hash</code></td>
673+
674+
675+ <td class="type">
676+
677+
678+<span class="param-type">String</span>
679+
680+
681+
682+
683+ </td>
684+
685+
686+
687+
688+
689+ <td class="description last"><p>hash of block.</p></td>
690+ </tr>
691+
692+
693+
694+ <tr>
695+
696+ <td class="name"><code>block_height</code></td>
697+
698+
699+ <td class="type">
700+
701+
702+<span class="param-type">Integer</span>
703+
704+
705+
706+
707+ </td>
708+
709+
710+
711+
712+
713+ <td class="description last"><p>height of block.</p></td>
714+ </tr>
715+
716+
717+ </tbody>
718+</table>
719+
720+ </td>
721+ </tr>
722+
723+
724+ </tbody>
725+</table>
726+
727+
728+
729+
730+<dl class="details">
731+
732+
733+
734+
735+
736+
737+
738+
739+
740+
741+
742+
743+
744+
745+
746+
747+
748+
749+
750+
751+
752+
753+
754+
755+
756+
757+
758+
759+
760+
761+
762+
763+
764+
765+
766+</dl>
767+
768+
769+
770+
771+
772+
773+
774+
775+
776+
777+
778+
779+
780+ <h5>Returns:</h5>
781+
782+
783+
784+
785+<dl>
786+ <dt>
787+ Type
788+ </dt>
789+ <dd>
790+
791+<span class="param-type">Promise.&lt;Object></span>
792+
793+
794+
795+ </dd>
796+</dl>
797+
798+
799+
800+
801+
802+</dd>
803+
804+
805+
806+<hr>
807+<dt>
808+ <h4 class="name" id="~getDifficulty"><span class="type-signature">&lt;inner> </span>getDifficulty(params)</h4>
809+
810+
811+</dt>
812+<dd>
813+
814+
815+ <div class="description">
816+ <p>Returns the block difficulty by block height or block hash.</p>
817+ </div>
818+
819+
820+
821+
822+
823+
824+
825+
826+ <h5>Parameters:</h5>
827+
828+
829+<table class="params table table-striped">
830+ <thead>
831+ <tr>
832+
833+ <th>Name</th>
834+
835+
836+ <th>Type</th>
837+
838+
839+
840+
841+
842+ <th class="last">Description</th>
843+ </tr>
844+ </thead>
845+
846+ <tbody>
847+
848+
849+ <tr>
850+
851+ <td class="name"><code>params</code></td>
852+
853+
854+ <td class="type">
855+
856+
857+<span class="param-type">Object</span>
858+
859+
860+
861+
862+ </td>
863+
864+
865+
866+
867+
868+ <td class="description last">
869+ <h6 class="method-params-label method-subparams-label">Properties</h6>
870+
871+
872+<table class="params table table-striped">
873+ <thead>
874+ <tr>
875+
876+ <th>Name</th>
877+
878+
879+ <th>Type</th>
880+
881+
882+
883+
884+
885+ <th class="last">Description</th>
886+ </tr>
887+ </thead>
888+
889+ <tbody>
890+
891+
892+ <tr>
893+
894+ <td class="name"><code>block_hash</code></td>
895+
896+
897+ <td class="type">
898+
899+
900+<span class="param-type">String</span>
901+
902+
903+
904+
905+ </td>
906+
907+
908+
909+
910+
911+ <td class="description last"><p>hash of block.</p></td>
912+ </tr>
913+
914+
915+
916+ <tr>
917+
918+ <td class="name"><code>block_height</code></td>
919+
920+
921+ <td class="type">
922+
923+
924+<span class="param-type">Integer</span>
925+
926+
927+
928+
929+ </td>
930+
931+
932+
933+
934+
935+ <td class="description last"><p>height of block.</p></td>
936+ </tr>
937+
938+
939+ </tbody>
940+</table>
941+
942+ </td>
943+ </tr>
944+
945+
946+ </tbody>
947+</table>
948+
949+
950+
951+
952+<dl class="details">
953+
954+
955+
956+
957+
958+
959+
960+
961+
962+
963+
964+
965+
966+
967+
968+
969+
970+
971+
972+
973+
974+
975+
976+
977+
978+
979+
980+
981+
982+
983+
984+
985+
986+
987+
988+</dl>
989+
990+
991+
992+
993+
994+
995+
996+
997+
998+
999+
1000+
1001+
1002+ <h5>Returns:</h5>
1003+
1004+
1005+
1006+
1007+<dl>
1008+ <dt>
1009+ Type
1010+ </dt>
1011+ <dd>
1012+
1013+<span class="param-type">Promise.&lt;Object></span>
1014+
1015+
1016+
1017+ </dd>
1018+</dl>
1019+
1020+
1021+
1022+
1023+
1024+</dd>
1025+
1026+
1027+
1028+<hr>
1029+<dt>
1030+ <h4 class="name" id="~getHashRate"><span class="type-signature">&lt;inner> </span>getHashRate(params)</h4>
1031+
1032+
1033+</dt>
1034+<dd>
1035+
1036+
1037+ <div class="description">
1038+ <p>Returns the block hash rate by block height or block hash,
1039+it returns the current block hash rate when request is empty.</p>
1040+ </div>
1041+
1042+
1043+
1044+
1045+
1046+
1047+
1048+
1049+ <h5>Parameters:</h5>
1050+
1051+
1052+<table class="params table table-striped">
1053+ <thead>
1054+ <tr>
1055+
1056+ <th>Name</th>
1057+
1058+
1059+ <th>Type</th>
1060+
1061+
1062+
1063+
1064+
1065+ <th class="last">Description</th>
1066+ </tr>
1067+ </thead>
1068+
1069+ <tbody>
1070+
1071+
1072+ <tr>
1073+
1074+ <td class="name"><code>params</code></td>
1075+
1076+
1077+ <td class="type">
1078+
1079+
1080+<span class="param-type">Object</span>
1081+
1082+
1083+
1084+
1085+ </td>
1086+
1087+
1088+
1089+
1090+
1091+ <td class="description last">
1092+ <h6 class="method-params-label method-subparams-label">Properties</h6>
1093+
1094+
1095+<table class="params table table-striped">
1096+ <thead>
1097+ <tr>
1098+
1099+ <th>Name</th>
1100+
1101+
1102+ <th>Type</th>
1103+
1104+
1105+
1106+
1107+
1108+ <th class="last">Description</th>
1109+ </tr>
1110+ </thead>
1111+
1112+ <tbody>
1113+
1114+
1115+ <tr>
1116+
1117+ <td class="name"><code>block_hash</code></td>
1118+
1119+
1120+ <td class="type">
1121+
1122+
1123+<span class="param-type">String</span>
1124+
1125+
1126+
1127+
1128+ </td>
1129+
1130+
1131+
1132+
1133+
1134+ <td class="description last"><p>hash of block.</p></td>
1135+ </tr>
1136+
1137+
1138+
1139+ <tr>
1140+
1141+ <td class="name"><code>block_height</code></td>
1142+
1143+
1144+ <td class="type">
1145+
1146+
1147+<span class="param-type">Integer</span>
1148+
1149+
1150+
1151+
1152+ </td>
1153+
1154+
1155+
1156+
1157+
1158+ <td class="description last"><p>height of block.</p></td>
1159+ </tr>
1160+
1161+
1162+ </tbody>
1163+</table>
1164+
1165+ </td>
1166+ </tr>
1167+
1168+
1169+ </tbody>
1170+</table>
1171+
1172+
1173+
1174+
1175+<dl class="details">
1176+
1177+
1178+
1179+
1180+
1181+
1182+
1183+
1184+
1185+
1186+
1187+
1188+
1189+
1190+
1191+
1192+
1193+
1194+
1195+
1196+
1197+
1198+
1199+
1200+
1201+
1202+
1203+
1204+
1205+
1206+
1207+
1208+
1209+
1210+
1211+</dl>
1212+
1213+
1214+
1215+
1216+
1217+
1218+
1219+
1220+
1221+
1222+
1223+
1224+
1225+ <h5>Returns:</h5>
1226+
1227+
1228+
1229+
1230+<dl>
1231+ <dt>
1232+ Type
1233+ </dt>
1234+ <dd>
1235+
1236+<span class="param-type">Promise.&lt;Object></span>
1237+
1238+
1239+
1240+ </dd>
1241+</dl>
1242+
1243+
1244+
1245+
1246+
1247+</dd>
1248+
1249+ </dl>
1250+
1251+
1252+
1253+
1254+
1255+</article>
1256+
1257+</section>
1258+
1259+
1260+
1261+
1262+ </div>
1263+ </div>
1264+
1265+ <div class="clearfix"></div>
1266+
1267+
1268+ <div class="col-md-3">
1269+ <div id="toc" class="col-md-3 hidden-xs hidden-sm hidden-md"></div>
1270+ </div>
1271+
1272+
1273+</div>
1274+</div>
1275+
1276+
1277+ <div class="modal fade" id="searchResults">
1278+ <div class="modal-dialog">
1279+ <div class="modal-content">
1280+ <div class="modal-header">
1281+ <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
1282+ <h4 class="modal-title">Search results</h4>
1283+ </div>
1284+ <div class="modal-body"></div>
1285+ <div class="modal-footer">
1286+ <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
1287+ </div>
1288+ </div><!-- /.modal-content -->
1289+ </div><!-- /.modal-dialog -->
1290+ </div>
1291+
1292+
1293+<footer>
1294+
1295+
1296+<span class="jsdoc-message">
1297+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
1298+
1299+ on 2018-11-26T16:28:32+08:00
1300+
1301+ using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
1302+</span>
1303+</footer>
1304+
1305+<script src="scripts/docstrap.lib.js"></script>
1306+<script src="scripts/toc.js"></script>
1307+
1308+ <script type="text/javascript" src="scripts/fulltext-search-ui.js"></script>
1309+
1310+
1311+<script>
1312+$( function () {
1313+ $( "[id*='$']" ).each( function () {
1314+ var $this = $( this );
1315+
1316+ $this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
1317+ } );
1318+
1319+ $( ".tutorial-section pre, .readme-section pre, pre.prettyprint.source" ).each( function () {
1320+ var $this = $( this );
1321+
1322+ var example = $this.find( "code" );
1323+ exampleText = example.html();
1324+ var lang = /{@lang (.*?)}/.exec( exampleText );
1325+ if ( lang && lang[1] ) {
1326+ exampleText = exampleText.replace( lang[0], "" );
1327+ example.html( exampleText );
1328+ lang = lang[1];
1329+ } else {
1330+ var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
1331+ lang = langClassMatch ? langClassMatch[1] : "javascript";
1332+ }
1333+
1334+ if ( lang ) {
1335+
1336+ $this
1337+ .addClass( "sunlight-highlight-" + lang )
1338+ .addClass( "linenums" )
1339+ .html( example.html() );
1340+
1341+ }
1342+ } );
1343+
1344+ Sunlight.highlightAll( {
1345+ lineNumbers : true,
1346+ showMenu : true,
1347+ enableDoclinks : true
1348+ } );
1349+
1350+ $.catchAnchorLinks( {
1351+ navbarOffset: 10
1352+ } );
1353+ $( "#toc" ).toc( {
1354+ anchorName : function ( i, heading, prefix ) {
1355+ return $( heading ).attr( "id" ) || ( prefix + i );
1356+ },
1357+ selectors : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4",
1358+ showAndHide : false,
1359+ smoothScrolling: true
1360+ } );
1361+
1362+ $( "#main span[id^='toc']" ).addClass( "toc-shim" );
1363+ $( '.dropdown-toggle' ).dropdown();
1364+
1365+ $( "table" ).each( function () {
1366+ var $this = $( this );
1367+ $this.addClass('table');
1368+ } );
1369+
1370+} );
1371+</script>
1372+
1373+
1374+
1375+<!--Navigation and Symbol Display-->
1376+
1377+
1378+<!--Google Analytics-->
1379+
1380+
1381+
1382+ <script type="text/javascript">
1383+ $(document).ready(function() {
1384+ SearcherDisplay.init();
1385+ });
1386+ </script>
1387+
1388+
1389+</body>
1390+</html>
\ No newline at end of file
--- /dev/null
+++ b/docs/module-ConfigApi.html
@@ -0,0 +1,768 @@
1+<!DOCTYPE html>
2+
3+<html lang="en">
4+<head>
5+ <meta charset="utf-8">
6+ <meta name="viewport" content="width=device-width">
7+ <title>Bytom Node.js SDK Module: ConfigApi</title>
8+
9+ <!--[if lt IE 9]>
10+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11+ <![endif]-->
12+ <link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
13+
14+ <link type="text/css" rel="stylesheet" href="styles/site.cosmo.css">
15+
16+</head>
17+
18+<body>
19+
20+<div class="navbar navbar-default navbar-fixed-top ">
21+<div class="container">
22+ <div class="navbar-header">
23+ <a class="navbar-brand" href="index.html">Bytom Node.js SDK</a>
24+ <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
25+ <span class="icon-bar"></span>
26+ <span class="icon-bar"></span>
27+ <span class="icon-bar"></span>
28+ </button>
29+ </div>
30+ <div class="navbar-collapse collapse" id="topNavigation">
31+ <ul class="nav navbar-nav">
32+
33+ <li class="dropdown">
34+ <a href="modules.list.html" class="dropdown-toggle" data-toggle="dropdown">Modules<b class="caret"></b></a>
35+ <ul class="dropdown-menu ">
36+ <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>
37+ </ul>
38+ </li>
39+
40+ <li class="dropdown">
41+ <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
42+ <ul class="dropdown-menu ">
43+ <li><a href="TransactionBuilder.html">TransactionBuilder</a></li>
44+ </ul>
45+ </li>
46+
47+ <li class="dropdown">
48+ <a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
49+ <ul class="dropdown-menu ">
50+ <li><a href="global.html">Global</a></li>
51+ </ul>
52+ </li>
53+
54+ </ul>
55+
56+ <div class="col-sm-3 col-md-3">
57+ <form class="navbar-form" role="search">
58+ <div class="input-group">
59+ <input type="text" class="form-control" placeholder="Search" name="q" id="search-input">
60+ <div class="input-group-btn">
61+ <button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button>
62+ </div>
63+ </div>
64+ </form>
65+ </div>
66+
67+ </div>
68+
69+</div>
70+</div>
71+
72+
73+<div class="container" id="toc-content">
74+<div class="row">
75+
76+
77+ <div class="col-md-8">
78+
79+ <div id="main">
80+
81+
82+ <h1 class="page-title">Module: ConfigApi</h1>
83+<section>
84+
85+<header>
86+
87+</header>
88+
89+
90+<article>
91+ <div class="container-overview">
92+
93+
94+ <div class="description"><p>Bytom Core can be configured as a new blockchain network, or as a node in an
95+existing blockchain network.</p>
96+<p>More info: {}
97+API for interacting with configs.</p></div>
98+
99+
100+
101+<dl class="details">
102+
103+
104+
105+
106+
107+
108+
109+
110+
111+
112+
113+
114+
115+
116+
117+
118+
119+
120+
121+
122+
123+
124+
125+
126+
127+
128+
129+
130+
131+
132+
133+
134+
135+
136+
137+</dl>
138+
139+
140+
141+
142+ </div>
143+
144+
145+
146+
147+
148+
149+
150+
151+
152+
153+
154+
155+
156+
157+ <h3 class="subsection-title">Methods</h3>
158+
159+ <dl>
160+
161+<hr>
162+<dt>
163+ <h4 class="name" id="~gasRate"><span class="type-signature">&lt;inner> </span>gasRate()</h4>
164+
165+
166+</dt>
167+<dd>
168+
169+
170+ <div class="description">
171+ <p>get gas rate</p>
172+ </div>
173+
174+
175+
176+
177+
178+
179+
180+
181+
182+
183+<dl class="details">
184+
185+
186+
187+
188+
189+
190+
191+
192+
193+
194+
195+
196+
197+
198+
199+
200+
201+
202+
203+
204+
205+
206+
207+
208+
209+
210+
211+
212+
213+
214+
215+
216+
217+
218+
219+</dl>
220+
221+
222+
223+
224+
225+
226+
227+
228+
229+
230+
231+
232+
233+ <h5>Returns:</h5>
234+
235+
236+<div class="param-desc">
237+ <p>Promise resolved with gas rate on success.</p>
238+</div>
239+
240+
241+
242+<dl>
243+ <dt>
244+ Type
245+ </dt>
246+ <dd>
247+
248+<span class="param-type">Promise</span>
249+
250+
251+
252+ </dd>
253+</dl>
254+
255+
256+
257+
258+
259+</dd>
260+
261+
262+
263+<hr>
264+<dt>
265+ <h4 class="name" id="~netInfo"><span class="type-signature">&lt;inner> </span>netInfo()</h4>
266+
267+
268+</dt>
269+<dd>
270+
271+
272+ <div class="description">
273+ <p>Get info on specified Bytom Core.</p>
274+ </div>
275+
276+
277+
278+
279+
280+
281+
282+
283+
284+
285+<dl class="details">
286+
287+
288+
289+
290+
291+
292+
293+
294+
295+
296+
297+
298+
299+
300+
301+
302+
303+
304+
305+
306+
307+
308+
309+
310+
311+
312+
313+
314+
315+
316+
317+
318+
319+
320+
321+</dl>
322+
323+
324+
325+
326+
327+
328+
329+
330+
331+
332+
333+
334+
335+ <h5>Returns:</h5>
336+
337+
338+<div class="param-desc">
339+ <p>Requested Net Info of specified Bytom Core.</p>
340+</div>
341+
342+
343+
344+<dl>
345+ <dt>
346+ Type
347+ </dt>
348+ <dd>
349+
350+<span class="param-type">Promise.&lt;<a href="global.html#CoreInfo">CoreInfo</a>></span>
351+
352+
353+
354+ </dd>
355+</dl>
356+
357+
358+
359+
360+
361+</dd>
362+
363+
364+
365+<hr>
366+<dt>
367+ <h4 class="name" id="~verifyMessage"><span class="type-signature">&lt;inner> </span>verifyMessage(params)</h4>
368+
369+
370+</dt>
371+<dd>
372+
373+
374+
375+
376+
377+
378+
379+
380+
381+ <h5>Parameters:</h5>
382+
383+
384+<table class="params table table-striped">
385+ <thead>
386+ <tr>
387+
388+ <th>Name</th>
389+
390+
391+ <th>Type</th>
392+
393+
394+
395+
396+
397+ <th class="last">Description</th>
398+ </tr>
399+ </thead>
400+
401+ <tbody>
402+
403+
404+ <tr>
405+
406+ <td class="name"><code>params</code></td>
407+
408+
409+ <td class="type">
410+
411+ </td>
412+
413+
414+
415+
416+
417+ <td class="description last">
418+ <h6 class="method-params-label method-subparams-label">Properties</h6>
419+
420+
421+<table class="params table table-striped">
422+ <thead>
423+ <tr>
424+
425+ <th>Name</th>
426+
427+
428+ <th>Type</th>
429+
430+
431+
432+
433+
434+ <th class="last">Description</th>
435+ </tr>
436+ </thead>
437+
438+ <tbody>
439+
440+
441+ <tr>
442+
443+ <td class="name"><code>address</code></td>
444+
445+
446+ <td class="type">
447+
448+
449+<span class="param-type">String</span>
450+
451+
452+
453+
454+ </td>
455+
456+
457+
458+
459+
460+ <td class="description last"><p>address for account.</p></td>
461+ </tr>
462+
463+
464+
465+ <tr>
466+
467+ <td class="name"><code>derived_xpub</code></td>
468+
469+
470+ <td class="type">
471+
472+
473+<span class="param-type">String</span>
474+
475+
476+
477+
478+ </td>
479+
480+
481+
482+
483+
484+ <td class="description last"><p>derived xpub.</p></td>
485+ </tr>
486+
487+
488+
489+ <tr>
490+
491+ <td class="name"><code>message</code></td>
492+
493+
494+ <td class="type">
495+
496+
497+<span class="param-type">String</span>
498+
499+
500+
501+
502+ </td>
503+
504+
505+
506+
507+
508+ <td class="description last"><p>message for signature by derived_xpub.</p></td>
509+ </tr>
510+
511+
512+
513+ <tr>
514+
515+ <td class="name"><code>signature</code></td>
516+
517+
518+ <td class="type">
519+
520+
521+<span class="param-type">String</span>
522+
523+
524+
525+
526+ </td>
527+
528+
529+
530+
531+
532+ <td class="description last"><p>signature for message.</p></td>
533+ </tr>
534+
535+
536+ </tbody>
537+</table>
538+
539+ </td>
540+ </tr>
541+
542+
543+ </tbody>
544+</table>
545+
546+
547+
548+
549+<dl class="details">
550+
551+
552+
553+
554+
555+
556+
557+
558+
559+
560+
561+
562+
563+
564+
565+
566+
567+
568+
569+
570+
571+
572+
573+
574+
575+
576+
577+
578+
579+
580+
581+
582+
583+
584+
585+</dl>
586+
587+
588+
589+
590+
591+
592+
593+
594+
595+
596+
597+
598+
599+ <h5>Returns:</h5>
600+
601+
602+<div class="param-desc">
603+ <p>[Boolean] result, verify result.</p>
604+</div>
605+
606+
607+
608+<dl>
609+ <dt>
610+ Type
611+ </dt>
612+ <dd>
613+
614+<span class="param-type">Promise.&lt;Object></span>
615+
616+
617+
618+ </dd>
619+</dl>
620+
621+
622+
623+
624+
625+</dd>
626+
627+ </dl>
628+
629+
630+
631+
632+
633+</article>
634+
635+</section>
636+
637+
638+
639+
640+ </div>
641+ </div>
642+
643+ <div class="clearfix"></div>
644+
645+
646+ <div class="col-md-3">
647+ <div id="toc" class="col-md-3 hidden-xs hidden-sm hidden-md"></div>
648+ </div>
649+
650+
651+</div>
652+</div>
653+
654+
655+ <div class="modal fade" id="searchResults">
656+ <div class="modal-dialog">
657+ <div class="modal-content">
658+ <div class="modal-header">
659+ <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
660+ <h4 class="modal-title">Search results</h4>
661+ </div>
662+ <div class="modal-body"></div>
663+ <div class="modal-footer">
664+ <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
665+ </div>
666+ </div><!-- /.modal-content -->
667+ </div><!-- /.modal-dialog -->
668+ </div>
669+
670+
671+<footer>
672+
673+
674+<span class="jsdoc-message">
675+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
676+
677+ on 2018-11-26T16:28:32+08:00
678+
679+ using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
680+</span>
681+</footer>
682+
683+<script src="scripts/docstrap.lib.js"></script>
684+<script src="scripts/toc.js"></script>
685+
686+ <script type="text/javascript" src="scripts/fulltext-search-ui.js"></script>
687+
688+
689+<script>
690+$( function () {
691+ $( "[id*='$']" ).each( function () {
692+ var $this = $( this );
693+
694+ $this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
695+ } );
696+
697+ $( ".tutorial-section pre, .readme-section pre, pre.prettyprint.source" ).each( function () {
698+ var $this = $( this );
699+
700+ var example = $this.find( "code" );
701+ exampleText = example.html();
702+ var lang = /{@lang (.*?)}/.exec( exampleText );
703+ if ( lang && lang[1] ) {
704+ exampleText = exampleText.replace( lang[0], "" );
705+ example.html( exampleText );
706+ lang = lang[1];
707+ } else {
708+ var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
709+ lang = langClassMatch ? langClassMatch[1] : "javascript";
710+ }
711+
712+ if ( lang ) {
713+
714+ $this
715+ .addClass( "sunlight-highlight-" + lang )
716+ .addClass( "linenums" )
717+ .html( example.html() );
718+
719+ }
720+ } );
721+
722+ Sunlight.highlightAll( {
723+ lineNumbers : true,
724+ showMenu : true,
725+ enableDoclinks : true
726+ } );
727+
728+ $.catchAnchorLinks( {
729+ navbarOffset: 10
730+ } );
731+ $( "#toc" ).toc( {
732+ anchorName : function ( i, heading, prefix ) {
733+ return $( heading ).attr( "id" ) || ( prefix + i );
734+ },
735+ selectors : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4",
736+ showAndHide : false,
737+ smoothScrolling: true
738+ } );
739+
740+ $( "#main span[id^='toc']" ).addClass( "toc-shim" );
741+ $( '.dropdown-toggle' ).dropdown();
742+
743+ $( "table" ).each( function () {
744+ var $this = $( this );
745+ $this.addClass('table');
746+ } );
747+
748+} );
749+</script>
750+
751+
752+
753+<!--Navigation and Symbol Display-->
754+
755+
756+<!--Google Analytics-->
757+
758+
759+
760+ <script type="text/javascript">
761+ $(document).ready(function() {
762+ SearcherDisplay.init();
763+ });
764+ </script>
765+
766+
767+</body>
768+</html>
\ No newline at end of file
--- a/docs/module-KeysApi.html
+++ b/docs/module-KeysApi.html
@@ -33,7 +33,14 @@
3333 <li class="dropdown">
3434 <a href="modules.list.html" class="dropdown-toggle" data-toggle="dropdown">Modules<b class="caret"></b></a>
3535 <ul class="dropdown-menu ">
36- <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>
36+ <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>
37+ </ul>
38+ </li>
39+
40+ <li class="dropdown">
41+ <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
42+ <ul class="dropdown-menu ">
43+ <li><a href="TransactionBuilder.html">TransactionBuilder</a></li>
3744 </ul>
3845 </li>
3946
@@ -150,7 +157,7 @@
150157
151158 <hr>
152159 <dt>
153- <h4 class="name" id="~create"><span class="type-signature">&lt;inner> </span>create(alias, password)</h4>
160+ <h4 class="name" id="~checkPassword"><span class="type-signature">&lt;inner> </span>checkPassword(params)</h4>
154161
155162
156163 </dt>
@@ -158,7 +165,7 @@
158165
159166
160167 <div class="description">
161- <p>Create a new key.</p>
168+ <p>Reset key password.</p>
162169 </div>
163170
164171
@@ -193,7 +200,50 @@
193200
194201 <tr>
195202
196- <td class="name"><code>alias</code></td>
203+ <td class="name"><code>params</code></td>
204+
205+
206+ <td class="type">
207+
208+
209+<span class="param-type">Object</span>
210+
211+
212+
213+
214+ </td>
215+
216+
217+
218+
219+
220+ <td class="description last"><p>Password checking information.</p>
221+ <h6 class="method-params-label method-subparams-label">Properties</h6>
222+
223+
224+<table class="params table table-striped">
225+ <thead>
226+ <tr>
227+
228+ <th>Name</th>
229+
230+
231+ <th>Type</th>
232+
233+
234+
235+
236+
237+ <th class="last">Description</th>
238+ </tr>
239+ </thead>
240+
241+ <tbody>
242+
243+
244+ <tr>
245+
246+ <td class="name"><code>xpub</code></td>
197247
198248
199249 <td class="type">
@@ -210,7 +260,7 @@
210260
211261
212262
213- <td class="description last"><p>User specified, unique identifier.</p></td>
263+ <td class="description last"><p>Hex-encoded string representation of the key.</p></td>
214264 </tr>
215265
216266
@@ -234,7 +284,142 @@
234284
235285
236286
237- <td class="description last"><p>User specified, key password.</p></td>
287+ <td class="description last"><p>password.</p></td>
288+ </tr>
289+
290+
291+ </tbody>
292+</table>
293+
294+ </td>
295+ </tr>
296+
297+
298+ </tbody>
299+</table>
300+
301+
302+
303+
304+<dl class="details">
305+
306+
307+
308+
309+
310+
311+
312+
313+
314+
315+
316+
317+
318+
319+
320+
321+
322+
323+
324+
325+
326+
327+
328+
329+
330+
331+
332+
333+
334+
335+
336+
337+
338+
339+
340+</dl>
341+
342+
343+
344+
345+
346+
347+
348+
349+
350+
351+
352+
353+
354+
355+
356+</dd>
357+
358+
359+
360+<hr>
361+<dt>
362+ <h4 class="name" id="~create"><span class="type-signature">&lt;inner> </span>create(params)</h4>
363+
364+
365+</dt>
366+<dd>
367+
368+
369+ <div class="description">
370+ <p>Create a new key.</p>
371+ </div>
372+
373+
374+
375+
376+
377+
378+
379+
380+ <h5>Parameters:</h5>
381+
382+
383+<table class="params table table-striped">
384+ <thead>
385+ <tr>
386+
387+ <th>Name</th>
388+
389+
390+ <th>Type</th>
391+
392+
393+
394+
395+
396+ <th class="last">Description</th>
397+ </tr>
398+ </thead>
399+
400+ <tbody>
401+
402+
403+ <tr>
404+
405+ <td class="name"><code>params</code></td>
406+
407+
408+ <td class="type">
409+
410+
411+<span class="param-type"><a href="module-KeysApi.html#~createRequest">module:KeysApi~createRequest</a></span>
412+
413+
414+
415+
416+ </td>
417+
418+
419+
420+
421+
422+ <td class="description last"><p>Parameters for asset creation.</p></td>
238423 </tr>
239424
240425
@@ -326,7 +511,7 @@
326511
327512 <hr>
328513 <dt>
329- <h4 class="name" id="~delete"><span class="type-signature">&lt;inner> </span>delete(xpub, password)</h4>
514+ <h4 class="name" id="~delete"><span class="type-signature">&lt;inner> </span>delete(params)</h4>
330515
331516
332517 </dt>
@@ -365,6 +550,49 @@
365550
366551 <tr>
367552
553+ <td class="name"><code>params</code></td>
554+
555+
556+ <td class="type">
557+
558+
559+<span class="param-type">Object</span>
560+
561+
562+
563+
564+ </td>
565+
566+
567+
568+
569+
570+ <td class="description last"><p>Deletion information.</p>
571+ <h6 class="method-params-label method-subparams-label">Properties</h6>
572+
573+
574+<table class="params table table-striped">
575+ <thead>
576+ <tr>
577+
578+ <th>Name</th>
579+
580+
581+ <th>Type</th>
582+
583+
584+
585+
586+
587+ <th class="last">Description</th>
588+ </tr>
589+ </thead>
590+
591+ <tbody>
592+
593+
594+ <tr>
595+
368596 <td class="name"><code>xpub</code></td>
369597
370598
@@ -413,6 +641,13 @@
413641 </tbody>
414642 </table>
415643
644+ </td>
645+ </tr>
646+
647+
648+ </tbody>
649+</table>
650+
416651
417652
418653
@@ -474,7 +709,7 @@
474709
475710 <hr>
476711 <dt>
477- <h4 class="name" id="~list"><span class="type-signature">&lt;inner> </span>list()</h4>
712+ <h4 class="name" id="~listAll"><span class="type-signature">&lt;inner> </span>listAll()</h4>
478713
479714
480715 </dt>
@@ -576,7 +811,7 @@
576811
577812 <hr>
578813 <dt>
579- <h4 class="name" id="~resetPassword"><span class="type-signature">&lt;inner> </span>resetPassword(xpub, oldPassword, newPassword)</h4>
814+ <h4 class="name" id="~resetPassword"><span class="type-signature">&lt;inner> </span>resetPassword(params)</h4>
580815
581816
582817 </dt>
@@ -619,6 +854,49 @@
619854
620855 <tr>
621856
857+ <td class="name"><code>params</code></td>
858+
859+
860+ <td class="type">
861+
862+
863+<span class="param-type">Object</span>
864+
865+
866+
867+
868+ </td>
869+
870+
871+
872+
873+
874+ <td class="description last"><p>Key password reset information.</p>
875+ <h6 class="method-params-label method-subparams-label">Properties</h6>
876+
877+
878+<table class="params table table-striped">
879+ <thead>
880+ <tr>
881+
882+ <th>Name</th>
883+
884+
885+ <th>Type</th>
886+
887+
888+
889+
890+
891+ <th class="last">Description</th>
892+ </tr>
893+ </thead>
894+
895+ <tbody>
896+
897+
898+ <tr>
899+
622900 <td class="name"><code>xpub</code></td>
623901
624902
@@ -691,6 +969,13 @@
691969 </tbody>
692970 </table>
693971
972+ </td>
973+ </tr>
974+
975+
976+ </tbody>
977+</table>
978+
694979
695980
696981
@@ -752,6 +1037,204 @@
7521037
7531038
7541039
1040+ <h3 class="subsection-title">Type Definitions</h3>
1041+
1042+ <dl>
1043+
1044+<hr>
1045+<dt class="name" id="~createRequest">
1046+ <h4 id="~createRequest">createRequest</h4>
1047+
1048+
1049+</dt>
1050+<dd>
1051+
1052+
1053+
1054+ <h5>Type:</h5>
1055+ <ul>
1056+ <li>
1057+
1058+<span class="param-type">Object</span>
1059+
1060+
1061+
1062+ </li>
1063+ </ul>
1064+
1065+
1066+
1067+<dl class="details">
1068+
1069+
1070+ <h5 class="subsection-title">Properties:</h5>
1071+
1072+ <dl>
1073+
1074+<table class="props table table-striped">
1075+ <thead>
1076+ <tr>
1077+
1078+ <th>Name</th>
1079+
1080+
1081+ <th>Type</th>
1082+
1083+
1084+ <th>Argument</th>
1085+
1086+
1087+
1088+
1089+ <th class="last">Description</th>
1090+ </tr>
1091+ </thead>
1092+
1093+ <tbody>
1094+
1095+
1096+ <tr>
1097+
1098+ <td class="name"><code>alias</code></td>
1099+
1100+
1101+ <td class="type">
1102+
1103+
1104+<span class="param-type">String</span>
1105+
1106+
1107+
1108+
1109+ </td>
1110+
1111+
1112+ <td class="attributes">
1113+
1114+ &lt;optional><br>
1115+
1116+
1117+
1118+ </td>
1119+
1120+
1121+
1122+
1123+ <td class="description last"><p>User specified, unique identifier.</p></td>
1124+ </tr>
1125+
1126+
1127+
1128+ <tr>
1129+
1130+ <td class="name"><code>password</code></td>
1131+
1132+
1133+ <td class="type">
1134+
1135+
1136+<span class="param-type">String</span>
1137+
1138+
1139+
1140+
1141+ </td>
1142+
1143+
1144+ <td class="attributes">
1145+
1146+ &lt;optional><br>
1147+
1148+
1149+
1150+ </td>
1151+
1152+
1153+
1154+
1155+ <td class="description last"><p>password of the key.</p></td>
1156+ </tr>
1157+
1158+
1159+
1160+ <tr>
1161+
1162+ <td class="name"><code>language</code></td>
1163+
1164+
1165+ <td class="type">
1166+
1167+
1168+<span class="param-type">String</span>
1169+
1170+
1171+
1172+
1173+ </td>
1174+
1175+
1176+ <td class="attributes">
1177+
1178+ &lt;optional><br>
1179+
1180+
1181+
1182+ </td>
1183+
1184+
1185+
1186+
1187+ <td class="description last"><p>mnemonic language of the key.</p></td>
1188+ </tr>
1189+
1190+
1191+ </tbody>
1192+</table>
1193+</dl>
1194+
1195+
1196+
1197+
1198+
1199+
1200+
1201+
1202+
1203+
1204+
1205+
1206+
1207+
1208+
1209+
1210+
1211+
1212+
1213+
1214+
1215+
1216+
1217+
1218+
1219+
1220+
1221+
1222+
1223+
1224+
1225+
1226+
1227+
1228+
1229+
1230+</dl>
1231+
1232+
1233+
1234+</dd>
1235+
1236+ </dl>
1237+
7551238
7561239
7571240 </article>
@@ -798,7 +1281,7 @@
7981281 <span class="jsdoc-message">
7991282 Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
8001283
801- on 2018-05-24T14:05:00+08:00
1284+ on 2018-11-26T16:28:32+08:00
8021285
8031286 using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
8041287 </span>
--- a/docs/module-TransactionsApi.html
+++ b/docs/module-TransactionsApi.html
@@ -33,7 +33,14 @@
3333 <li class="dropdown">
3434 <a href="modules.list.html" class="dropdown-toggle" data-toggle="dropdown">Modules<b class="caret"></b></a>
3535 <ul class="dropdown-menu ">
36- <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>
36+ <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>
37+ </ul>
38+ </li>
39+
40+ <li class="dropdown">
41+ <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
42+ <ul class="dropdown-menu ">
43+ <li><a href="TransactionBuilder.html">TransactionBuilder</a></li>
3744 </ul>
3845 </li>
3946
@@ -150,7 +157,7 @@
150157
151158 <hr>
152159 <dt>
153- <h4 class="name" id="~build"><span class="type-signature">&lt;inner> </span>build(baseTransaction, actions, ttl)</h4>
160+ <h4 class="name" id="~build"><span class="type-signature">&lt;inner> </span>build(builderBlock)</h4>
154161
155162
156163 </dt>
@@ -158,7 +165,7 @@
158165
159166
160167 <div class="description">
161- <p>Build an unsigned transaction from a set of actions and base transction(possibly null).</p>
168+ <p>Build an unsigned transaction from a set of actions.</p>
162169 </div>
163170
164171
@@ -193,61 +200,13 @@
193200
194201 <tr>
195202
196- <td class="name"><code>baseTransaction</code></td>
197-
198-
199- <td class="type">
200-
201-
202-<span class="param-type">String</span>
203-
204-
205-
206-
207- </td>
208-
209-
210-
211-
212-
213- <td class="description last"><p>Encoded base raw transaction.</p></td>
214- </tr>
215-
216-
217-
218- <tr>
219-
220- <td class="name"><code>actions</code></td>
221-
222-
223- <td class="type">
224-
225-
226-<span class="param-type">Array.&lt;<a href="module-TransactionsApi.html#~Action">module:TransactionsApi~Action</a>></span>
227-
228-
229-
230-
231- </td>
232-
233-
234-
235-
236-
237- <td class="description last"><p>Set of actions to compose the transaction.</p></td>
238- </tr>
239-
240-
241-
242- <tr>
243-
244- <td class="name"><code>ttl</code></td>
203+ <td class="name"><code>builderBlock</code></td>
245204
246205
247206 <td class="type">
248207
249208
250-<span class="param-type">Number</span>
209+<span class="param-type"><a href="module-TransactionsApi.html#~builderCallback">module:TransactionsApi~builderCallback</a></span>
251210
252211
253212
@@ -258,7 +217,8 @@
258217
259218
260219
261- <td class="description last"><p>Time duration to spent UTXOs will be reserverd(can't be spent during this time duration).</p></td>
220+ <td class="description last"><p>Function that adds desired actions
221+ to a given builder object.</p></td>
262222 </tr>
263223
264224
@@ -322,9 +282,7 @@
322282
323283
324284 <div class="param-desc">
325- <ul>
326-<li>Unsigned transaction template.</li>
327-</ul>
285+ <p>Unsigned transaction template, or error.</p>
328286 </div>
329287
330288
@@ -504,7 +462,7 @@
504462
505463 <hr>
506464 <dt>
507- <h4 class="name" id="~listAll"><span class="type-signature">&lt;inner> </span>listAll()</h4>
465+ <h4 class="name" id="~list"><span class="type-signature">&lt;inner> </span>list(params)</h4>
508466
509467
510468 </dt>
@@ -512,7 +470,7 @@
512470
513471
514472 <div class="description">
515- <p>List all local transactions.</p>
473+ <p>List local transactions by id or filter condition.</p>
516474 </div>
517475
518476
@@ -522,140 +480,202 @@
522480
523481
524482
483+ <h5>Parameters:</h5>
484+
525485
526-
527-<dl class="details">
528-
529-
530-
486+<table class="params table table-striped">
487+ <thead>
488+ <tr>
489+
490+ <th>Name</th>
491+
531492
532-
493+ <th>Type</th>
533494
534-
495+
535496
536-
497+
537498
538-
499+ <th class="last">Description</th>
500+ </tr>
501+ </thead>
539502
503+ <tbody>
540504
541505
542-
506+ <tr>
507+
508+ <td class="name"><code>params</code></td>
509+
543510
544-
511+ <td class="type">
512+
513+
514+<span class="param-type">Object</span>
545515
546-
547516
548-
549517
550-
518+
519+ </td>
551520
552-
521+
553522
523+
554524
525+ <td class="description last"><p>Transaction filter params.</p>
526+ <h6 class="method-params-label method-subparams-label">Properties</h6>
527+
555528
556-
529+<table class="params table table-striped">
530+ <thead>
531+ <tr>
532+
533+ <th>Name</th>
534+
557535
558-
536+ <th>Type</th>
559537
560-
538+
561539
562-
563-</dl>
540+
564541
542+ <th class="last">Description</th>
543+ </tr>
544+ </thead>
565545
546+ <tbody>
566547
567548
568-
549+ <tr>
550+
551+ <td class="name"><code>id</code></td>
552+
569553
570-
554+ <td class="type">
555+
556+
557+<span class="param-type">String</span>
571558
572-
573559
574-
575560
576-
577- <h5>Returns:</h5>
578-
579561
580-<div class="param-desc">
581- <p>All local transactions.</p>
582-</div>
562+ </td>
583563
564+
584565
566+
585567
586-<dl>
587- <dt>
588- Type
589- </dt>
590- <dd>
591-
592-<span class="param-type">Promise.&lt;Array.&lt;<a href="global.html#Transaction">Transaction</a>>></span>
568+ <td class="description last"><p>transaction id, hash of transaction.</p></td>
569+ </tr>
593570
571+
594572
573+ <tr>
574+
575+ <td class="name"><code>account_id</code></td>
576+
595577
596- </dd>
597-</dl>
578+ <td class="type">
579+
580+
581+<span class="param-type">String</span>
598582
599583
600-
601584
602-
603-</dd>
585+
586+ </td>
604587
605-
606588
607-<hr>
608-<dt>
609- <h4 class="name" id="~listByAccountId"><span class="type-signature">&lt;inner> </span>listByAccountId(accountId)</h4>
610-
611-
612-</dt>
613-<dd>
614589
615-
616- <div class="description">
617- <p>List all local transactions by account id.</p>
618- </div>
619-
590+
620591
621-
592+ <td class="description last"><p>id of account.</p></td>
593+ </tr>
622594
623595
624596
597+ <tr>
598+
599+ <td class="name"><code>detail</code></td>
600+
601+
602+ <td class="type">
603+
604+
605+<span class="param-type">Boolean</span>
606+
607+
608+
609+
610+ </td>
611+
612+
613+
614+
615+
616+ <td class="description last"><p>flag of detail transactions, default false (only return transaction summary).</p></td>
617+ </tr>
618+
625619
620+
621+ <tr>
622+
623+ <td class="name"><code>unconfirmed</code></td>
624+
625+
626+ <td class="type">
627+
628+
629+<span class="param-type">Boolean</span>
630+
631+
632+
633+
634+ </td>
635+
636+
637+
638+
639+
640+ <td class="description last"><p>flag of unconfirmed transactions(query result include all confirmed
641+ and unconfirmed transactions), default false.</p></td>
642+ </tr>
643+
626644
627- <h5>Parameters:</h5>
628-
629645
630-<table class="params table table-striped">
631- <thead>
632- <tr>
633-
634- <th>Name</th>
635-
646+ <tr>
647+
648+ <td class="name"><code>from</code></td>
649+
636650
637- <th>Type</th>
651+ <td class="type">
652+
653+
654+<span class="param-type">Integer</span>
638655
639-
640656
641-
642657
643- <th class="last">Description</th>
644- </tr>
645- </thead>
658+
659+ </td>
660+
661+
662+
663+
664+
665+ <td class="description last"><p>The start position of first transaction.</p></td>
666+ </tr>
646667
647- <tbody>
648668
649669
650670 <tr>
651671
652- <td class="name"><code>accountId</code></td>
672+ <td class="name"><code>count</code></td>
653673
654674
655675 <td class="type">
656676
657677
658-<span class="param-type">String</span>
678+<span class="param-type">Integer</span>
659679
660680
661681
@@ -666,7 +686,14 @@
666686
667687
668688
669- <td class="description last"><p>Account id.</p></td>
689+ <td class="description last"><p>The number of returned.</p></td>
690+ </tr>
691+
692+
693+ </tbody>
694+</table>
695+
696+ </td>
670697 </tr>
671698
672699
@@ -758,7 +785,7 @@
758785
759786 <hr>
760787 <dt>
761- <h4 class="name" id="~listById"><span class="type-signature">&lt;inner> </span>listById(id)</h4>
788+ <h4 class="name" id="~listAll"><span class="type-signature">&lt;inner> </span>listAll()</h4>
762789
763790
764791 </dt>
@@ -766,7 +793,7 @@
766793
767794
768795 <div class="description">
769- <p>List local transactions by id.</p>
796+ <p>List all local transactions.</p>
770797 </div>
771798
772799
@@ -776,56 +803,6 @@
776803
777804
778805
779- <h5>Parameters:</h5>
780-
781-
782-<table class="params table table-striped">
783- <thead>
784- <tr>
785-
786- <th>Name</th>
787-
788-
789- <th>Type</th>
790-
791-
792-
793-
794-
795- <th class="last">Description</th>
796- </tr>
797- </thead>
798-
799- <tbody>
800-
801-
802- <tr>
803-
804- <td class="name"><code>id</code></td>
805-
806-
807- <td class="type">
808-
809-
810-<span class="param-type">String</span>
811-
812-
813-
814-
815- </td>
816-
817-
818-
819-
820-
821- <td class="description last"><p>The transaction id.</p></td>
822- </tr>
823-
824-
825- </tbody>
826-</table>
827-
828-
829806
830807
831808 <dl class="details">
@@ -882,7 +859,7 @@
882859
883860
884861 <div class="param-desc">
885- <p>The result transactions.</p>
862+ <p>All local transactions.</p>
886863 </div>
887864
888865
@@ -910,7 +887,7 @@
910887
911888 <hr>
912889 <dt>
913- <h4 class="name" id="~sign"><span class="type-signature">&lt;inner> </span>sign(transaction, password)</h4>
890+ <h4 class="name" id="~sign"><span class="type-signature">&lt;inner> </span>sign(params)</h4>
914891
915892
916893 </dt>
@@ -953,7 +930,7 @@
953930
954931 <tr>
955932
956- <td class="name"><code>transaction</code></td>
933+ <td class="name"><code>params</code></td>
957934
958935
959936 <td class="type">
@@ -970,9 +947,28 @@
970947
971948
972949
973- <td class="description last"><p>The built transaction template.</p></td>
974- </tr>
950+ <td class="description last"><p>The built transaction template.</p>
951+ <h6 class="method-params-label method-subparams-label">Properties</h6>
952+
953+
954+<table class="params table table-striped">
955+ <thead>
956+ <tr>
957+
958+ <th>Name</th>
959+
960+
961+ <th>Type</th>
962+
963+
964+
965+
975966
967+ <th class="last">Description</th>
968+ </tr>
969+ </thead>
970+
971+ <tbody>
976972
977973
978974 <tr>
@@ -983,6 +979,30 @@
983979 <td class="type">
984980
985981
982+<span class="param-type">String</span>
983+
984+
985+
986+
987+ </td>
988+
989+
990+
991+
992+
993+ <td class="description last"><p>signature of the password.</p></td>
994+ </tr>
995+
996+
997+
998+ <tr>
999+
1000+ <td class="name"><code>transaction</code></td>
1001+
1002+
1003+ <td class="type">
1004+
1005+
9861006 <span class="param-type">Object</span>
9871007
9881008
@@ -994,7 +1014,14 @@
9941014
9951015
9961016
997- <td class="description last"><p>Password of the key which will sign the transaction template.</p></td>
1017+ <td class="description last"><p>builded transaction.</p></td>
1018+ </tr>
1019+
1020+
1021+ </tbody>
1022+</table>
1023+
1024+ </td>
9981025 </tr>
9991026
10001027
@@ -1497,6 +1524,130 @@ Asset info(either asset_id or asset_alias ) is required for all kinds of action.
14971524
14981525
14991526 <hr>
1527+<dt>
1528+ <h4 class="name" id="~builderCallback"><span class="type-signature"></span>builderCallback(builder)</h4>
1529+
1530+
1531+</dt>
1532+<dd>
1533+
1534+
1535+
1536+
1537+
1538+
1539+
1540+
1541+
1542+ <h5>Parameters:</h5>
1543+
1544+
1545+<table class="params table table-striped">
1546+ <thead>
1547+ <tr>
1548+
1549+ <th>Name</th>
1550+
1551+
1552+ <th>Type</th>
1553+
1554+
1555+
1556+
1557+
1558+ <th class="last">Description</th>
1559+ </tr>
1560+ </thead>
1561+
1562+ <tbody>
1563+
1564+
1565+ <tr>
1566+
1567+ <td class="name"><code>builder</code></td>
1568+
1569+
1570+ <td class="type">
1571+
1572+
1573+<span class="param-type"><a href="TransactionBuilder.html">TransactionBuilder</a></span>
1574+
1575+
1576+
1577+
1578+ </td>
1579+
1580+
1581+
1582+
1583+
1584+ <td class="description last"></td>
1585+ </tr>
1586+
1587+
1588+ </tbody>
1589+</table>
1590+
1591+
1592+
1593+
1594+<dl class="details">
1595+
1596+
1597+
1598+
1599+
1600+
1601+
1602+
1603+
1604+
1605+
1606+
1607+
1608+
1609+
1610+
1611+
1612+
1613+
1614+
1615+
1616+
1617+
1618+
1619+
1620+
1621+
1622+
1623+
1624+
1625+
1626+
1627+
1628+
1629+
1630+</dl>
1631+
1632+
1633+
1634+
1635+
1636+
1637+
1638+
1639+
1640+
1641+
1642+
1643+
1644+
1645+
1646+</dd>
1647+
1648+
1649+
1650+<hr>
15001651 <dt class="name" id="~SignResult">
15011652 <h4 id="~SignResult">SignResult</h4>
15021653
@@ -1690,7 +1841,7 @@ Asset info(either asset_id or asset_alias ) is required for all kinds of action.
16901841 <span class="jsdoc-message">
16911842 Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
16921843
1693- on 2018-05-24T14:05:00+08:00
1844+ on 2018-11-26T16:28:32+08:00
16941845
16951846 using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
16961847 </span>
--- a/docs/module-UnspentOutputsApi.html
+++ b/docs/module-UnspentOutputsApi.html
@@ -33,7 +33,14 @@
3333 <li class="dropdown">
3434 <a href="modules.list.html" class="dropdown-toggle" data-toggle="dropdown">Modules<b class="caret"></b></a>
3535 <ul class="dropdown-menu ">
36- <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>
36+ <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>
37+ </ul>
38+ </li>
39+
40+ <li class="dropdown">
41+ <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
42+ <ul class="dropdown-menu ">
43+ <li><a href="TransactionBuilder.html">TransactionBuilder</a></li>
3744 </ul>
3845 </li>
3946
@@ -150,7 +157,7 @@
150157
151158 <hr>
152159 <dt>
153- <h4 class="name" id="~list"><span class="type-signature">&lt;inner> </span>list()</h4>
160+ <h4 class="name" id="~list"><span class="type-signature">&lt;inner> </span>list(params)</h4>
154161
155162
156163 </dt>
@@ -158,7 +165,7 @@
158165
159166
160167 <div class="description">
161- <p>Get all unspent outputs.</p>
168+ <p>Get target unspent outputs.</p>
162169 </div>
163170
164171
@@ -168,6 +175,250 @@
168175
169176
170177
178+ <h5>Parameters:</h5>
179+
180+
181+<table class="params table table-striped">
182+ <thead>
183+ <tr>
184+
185+ <th>Name</th>
186+
187+
188+ <th>Type</th>
189+
190+
191+
192+
193+
194+ <th class="last">Description</th>
195+ </tr>
196+ </thead>
197+
198+ <tbody>
199+
200+
201+ <tr>
202+
203+ <td class="name"><code>params</code></td>
204+
205+
206+ <td class="type">
207+
208+
209+<span class="param-type">Object</span>
210+
211+
212+
213+
214+ </td>
215+
216+
217+
218+
219+
220+ <td class="description last"><p>Filter and pagination information.</p>
221+ <h6 class="method-params-label method-subparams-label">Properties</h6>
222+
223+
224+<table class="params table table-striped">
225+ <thead>
226+ <tr>
227+
228+ <th>Name</th>
229+
230+
231+ <th>Type</th>
232+
233+
234+
235+
236+
237+ <th class="last">Description</th>
238+ </tr>
239+ </thead>
240+
241+ <tbody>
242+
243+
244+ <tr>
245+
246+ <td class="name"><code>id</code></td>
247+
248+
249+ <td class="type">
250+
251+
252+<span class="param-type">String</span>
253+
254+
255+
256+
257+ </td>
258+
259+
260+
261+
262+
263+ <td class="description last"><p>Unspent output id.</p></td>
264+ </tr>
265+
266+
267+
268+ <tr>
269+
270+ <td class="name"><code>unconfirmed</code></td>
271+
272+
273+ <td class="type">
274+
275+
276+<span class="param-type">Boolean</span>
277+
278+
279+
280+
281+ </td>
282+
283+
284+
285+
286+
287+ <td class="description last"><p>is include unconfirmed utxo</p></td>
288+ </tr>
289+
290+
291+
292+ <tr>
293+
294+ <td class="name"><code>smart_contract</code></td>
295+
296+
297+ <td class="type">
298+
299+
300+<span class="param-type">Boolean</span>
301+
302+
303+
304+
305+ </td>
306+
307+
308+
309+
310+
311+ <td class="description last"><p>is contract utxo</p></td>
312+ </tr>
313+
314+
315+
316+ <tr>
317+
318+ <td class="name"><code>from</code></td>
319+
320+
321+ <td class="type">
322+
323+
324+<span class="param-type">Integer</span>
325+
326+
327+
328+
329+ </td>
330+
331+
332+
333+
334+
335+ <td class="description last"><p>the start position of first utxo</p></td>
336+ </tr>
337+
338+
339+
340+ <tr>
341+
342+ <td class="name"><code>count</code></td>
343+
344+
345+ <td class="type">
346+
347+
348+<span class="param-type">Integer</span>
349+
350+
351+
352+
353+ </td>
354+
355+
356+
357+
358+
359+ <td class="description last"><p>the number of returned</p></td>
360+ </tr>
361+
362+
363+
364+ <tr>
365+
366+ <td class="name"><code>account_id</code></td>
367+
368+
369+ <td class="type">
370+
371+
372+<span class="param-type">String</span>
373+
374+
375+
376+
377+ </td>
378+
379+
380+
381+
382+
383+ <td class="description last"><p>account id.</p></td>
384+ </tr>
385+
386+
387+
388+ <tr>
389+
390+ <td class="name"><code>account_alias</code></td>
391+
392+
393+ <td class="type">
394+
395+
396+<span class="param-type">String</span>
397+
398+
399+
400+
401+ </td>
402+
403+
404+
405+
406+
407+ <td class="description last"><p>name of account.</p></td>
408+ </tr>
409+
410+
411+ </tbody>
412+</table>
413+
414+ </td>
415+ </tr>
416+
417+
418+ </tbody>
419+</table>
420+
421+
171422
172423
173424 <dl class="details">
@@ -252,7 +503,7 @@
252503
253504 <hr>
254505 <dt>
255- <h4 class="name" id="~listById"><span class="type-signature">&lt;inner> </span>listById(id)</h4>
506+ <h4 class="name" id="~listAll"><span class="type-signature">&lt;inner> </span>listAll()</h4>
256507
257508
258509 </dt>
@@ -260,7 +511,7 @@
260511
261512
262513 <div class="description">
263- <p>Get target unspent outputs by id.</p>
514+ <p>Get all unspent outputs.</p>
264515 </div>
265516
266517
@@ -270,56 +521,6 @@
270521
271522
272523
273- <h5>Parameters:</h5>
274-
275-
276-<table class="params table table-striped">
277- <thead>
278- <tr>
279-
280- <th>Name</th>
281-
282-
283- <th>Type</th>
284-
285-
286-
287-
288-
289- <th class="last">Description</th>
290- </tr>
291- </thead>
292-
293- <tbody>
294-
295-
296- <tr>
297-
298- <td class="name"><code>id</code></td>
299-
300-
301- <td class="type">
302-
303-
304-<span class="param-type">String</span>
305-
306-
307-
308-
309- </td>
310-
311-
312-
313-
314-
315- <td class="description last"><p>Unspent output id.</p></td>
316- </tr>
317-
318-
319- </tbody>
320-</table>
321-
322-
323524
324525
325526 <dl class="details">
@@ -450,7 +651,7 @@
450651 <span class="jsdoc-message">
451652 Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
452653
453- on 2018-05-24T14:05:00+08:00
654+ on 2018-11-26T16:28:32+08:00
454655
455656 using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
456657 </span>
--- a/docs/modules.list.html
+++ b/docs/modules.list.html
@@ -33,7 +33,14 @@
3333 <li class="dropdown">
3434 <a href="modules.list.html" class="dropdown-toggle" data-toggle="dropdown">Modules<b class="caret"></b></a>
3535 <ul class="dropdown-menu ">
36- <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>
36+ <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>
37+ </ul>
38+ </li>
39+
40+ <li class="dropdown">
41+ <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
42+ <ul class="dropdown-menu ">
43+ <li><a href="TransactionBuilder.html">TransactionBuilder</a></li>
3744 </ul>
3845 </li>
3946
@@ -139,6 +146,13 @@
139146
140147
141148
149+ <h3 class="subsection-title">Classes</h3>
150+
151+ <dl>
152+ <dt><a href="TransactionBuilder.html">TransactionBuilder</a></dt>
153+ <dd></dd>
154+ </dl>
155+
142156
143157
144158
@@ -195,7 +209,7 @@
195209 <span class="jsdoc-message">
196210 Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
197211
198- on 2018-05-24T14:04:59+08:00
212+ on 2018-11-26T16:28:32+08:00
199213
200214 using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
201215 </span>
--- a/docs/quicksearch.html
+++ b/docs/quicksearch.html
@@ -7,7 +7,7 @@
77 <script src="scripts/fulltext-search.js"></script>
88
99 <script type="text/x-docstrap-searchdb">
10- {"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. "}}
10+ {"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. "}}
1111 </script>
1212
1313 <script type="text/javascript">
Show on old repository browser