OSDN Git Service

9c743b9f85714706cc0cf7e649bbd8e4b76cd41c
[bytom/bytom-node-sdk.git] / docs / global.html
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 Global</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-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="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
42                                 <ul class="dropdown-menu ">
43                                         <li><a href="global.html">Global</a></li>
44                                 </ul>
45                         </li>
46                         
47                 </ul>
48         
49             <div class="col-sm-3 col-md-3">
50                 <form class="navbar-form" role="search">
51                     <div class="input-group">
52                         <input type="text" class="form-control" placeholder="Search" name="q" id="search-input">
53                         <div class="input-group-btn">
54                             <button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button>
55                         </div>
56                     </div>
57                 </form>
58             </div>
59         
60         </div>
61
62 </div>
63 </div>
64
65
66 <div class="container" id="toc-content">
67 <div class="row">
68
69         
70         <div class="col-md-8">
71         
72                 <div id="main">
73                         
74
75         <h1 class="page-title">Global</h1>
76 <section>
77
78 <header>
79     
80         <h2>
81         
82         </h2>
83         
84     
85 </header>
86
87
88 <article>
89     <div class="container-overview">
90     
91         
92
93         
94 <dl class="details">
95     
96
97         
98
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 </dl>
131
132
133         
134     
135     </div>
136
137     
138
139     
140
141     
142
143     
144
145     
146
147     
148
149     
150
151     
152         <h3 class="subsection-title">Type Definitions</h3>
153
154         <dl>
155                 
156 <hr>
157 <dt class="name" id="AccessToken">
158     <h4 id="AccessToken">AccessToken</h4>
159
160     
161 </dt>
162 <dd>
163     
164     <div class="description">
165         <p>Access tokens are <code>name:secret-token</code> pairs that are granted authorization for accessing Chain Core features.</p>
166     </div>
167     
168
169     
170         <h5>Type:</h5>
171         <ul>
172             <li>
173                 
174 <span class="param-type">Object</span>
175
176
177
178             </li>
179         </ul>
180     
181
182     
183 <dl class="details">
184     
185
186     <h5 class="subsection-title">Properties:</h5>
187
188     <dl>
189
190 <table class="props table table-striped">
191     <thead>
192     <tr>
193         
194         <th>Name</th>
195         
196
197         <th>Type</th>
198
199         
200
201         
202
203         <th class="last">Description</th>
204     </tr>
205     </thead>
206
207     <tbody>
208     
209
210         <tr>
211             
212                 <td class="name"><code>id</code></td>
213             
214
215             <td class="type">
216             
217                 
218 <span class="param-type">String</span>
219
220
221
222             
223             </td>
224
225             
226
227             
228
229             <td class="description last"><p>User specified, unique identifier.</p></td>
230         </tr>
231
232     
233
234         <tr>
235             
236                 <td class="name"><code>token</code></td>
237             
238
239             <td class="type">
240             
241                 
242 <span class="param-type">String</span>
243
244
245
246             
247             </td>
248
249             
250
251             
252
253             <td class="description last"><p>Only returned in the response from AccessTokensApi~create.</p></td>
254         </tr>
255
256     
257
258         <tr>
259             
260                 <td class="name"><code>created_at</code></td>
261             
262
263             <td class="type">
264             
265                 
266 <span class="param-type">String</span>
267
268
269
270             
271             </td>
272
273             
274
275             
276
277             <td class="description last"><p>Timestamp of token creation, RFC3339 formatted.</p></td>
278         </tr>
279
280     
281     </tbody>
282 </table>
283 </dl>
284
285     
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 </dl>
321
322
323     
324 </dd>
325
326             
327                 
328 <hr>
329 <dt class="name" id="Account">
330     <h4 id="Account">Account</h4>
331
332     
333 </dt>
334 <dd>
335     
336     <div class="description">
337         <p>An account is an object in Bytom that tracks ownership of assets on a
338 blockchain.</p>
339     </div>
340     
341
342     
343         <h5>Type:</h5>
344         <ul>
345             <li>
346                 
347 <span class="param-type">Object</span>
348
349
350
351             </li>
352         </ul>
353     
354
355     
356 <dl class="details">
357     
358
359     <h5 class="subsection-title">Properties:</h5>
360
361     <dl>
362
363 <table class="props table table-striped">
364     <thead>
365     <tr>
366         
367         <th>Name</th>
368         
369
370         <th>Type</th>
371
372         
373
374         
375
376         <th class="last">Description</th>
377     </tr>
378     </thead>
379
380     <tbody>
381     
382
383         <tr>
384             
385                 <td class="name"><code>id</code></td>
386             
387
388             <td class="type">
389             
390                 
391 <span class="param-type">String</span>
392
393
394
395             
396             </td>
397
398             
399
400             
401
402             <td class="description last"><p>Unique account identifier in one Bytom node.</p></td>
403         </tr>
404
405     
406
407         <tr>
408             
409                 <td class="name"><code>alias</code></td>
410             
411
412             <td class="type">
413             
414                 
415 <span class="param-type">String</span>
416
417
418
419             
420             </td>
421
422             
423
424             
425
426             <td class="description last"><p>User specified, unique identifier in one Bytom node.</p></td>
427         </tr>
428
429     
430
431         <tr>
432             
433                 <td class="name"><code>keys</code></td>
434             
435
436             <td class="type">
437             
438                 
439 <span class="param-type">Array.&lt;<a href="global.html#Key">Key</a>></span>
440
441
442
443             
444             </td>
445
446             
447
448             
449
450             <td class="description last"><p>The list of keys used to create control programs under the account.
451 Signatures from these keys are required for spending funds held in the account.</p></td>
452         </tr>
453
454     
455
456         <tr>
457             
458                 <td class="name"><code>key_index</code></td>
459             
460
461             <td class="type">
462             
463                 
464 <span class="param-type">Number</span>
465
466
467
468             
469             </td>
470
471             
472
473             
474
475             <td class="description last"><p>The index of keys.</p></td>
476         </tr>
477
478     
479
480         <tr>
481             
482                 <td class="name"><code>quorum</code></td>
483             
484
485             <td class="type">
486             
487                 
488 <span class="param-type">Number</span>
489
490
491
492             
493             </td>
494
495             
496
497             
498
499             <td class="description last"><p>The number of keys required to sign transactions for the account.</p></td>
500         </tr>
501
502     
503     </tbody>
504 </table>
505 </dl>
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
541         
542 </dl>
543
544
545     
546 </dd>
547
548             
549                 
550 <hr>
551 <dt class="name" id="Asset">
552     <h4 id="Asset">Asset</h4>
553
554     
555 </dt>
556 <dd>
557     
558     <div class="description">
559         <p>An asset is a type of value that can be issued on a blockchain. All units of
560 a given asset are fungible. Units of an asset can be transacted directly
561 between parties without the involvement of the issuer.</p>
562     </div>
563     
564
565     
566         <h5>Type:</h5>
567         <ul>
568             <li>
569                 
570 <span class="param-type">Object</span>
571
572
573
574             </li>
575         </ul>
576     
577
578     
579 <dl class="details">
580     
581
582     <h5 class="subsection-title">Properties:</h5>
583
584     <dl>
585
586 <table class="props table table-striped">
587     <thead>
588     <tr>
589         
590         <th>Name</th>
591         
592
593         <th>Type</th>
594
595         
596
597         
598
599         <th class="last">Description</th>
600     </tr>
601     </thead>
602
603     <tbody>
604     
605
606         <tr>
607             
608                 <td class="name"><code>id</code></td>
609             
610
611             <td class="type">
612             
613                 
614 <span class="param-type">String</span>
615
616
617
618             
619             </td>
620
621             
622
623             
624
625             <td class="description last"><p>Globally unique identifier of the asset.
626 Asset specifies the asset id as the hash of:</p>
627 <ul>
628 <li>the asset's issuance program</li>
629 <li>the core's VM version</li>
630 <li>the hash of asset definition</li>
631 </ul></td>
632         </tr>
633
634     
635
636         <tr>
637             
638                 <td class="name"><code>alias</code></td>
639             
640
641             <td class="type">
642             
643                 
644 <span class="param-type">String</span>
645
646
647
648             
649             </td>
650
651             
652
653             
654
655             <td class="description last"><p>User specified, unique identifier in one Bytom node.</p></td>
656         </tr>
657
658     
659
660         <tr>
661             
662                 <td class="name"><code>issuanceProgram</code></td>
663             
664
665             <td class="type">
666             
667                 
668 <span class="param-type">String</span>
669
670
671
672             
673             </td>
674
675             
676
677             
678
679             <td class="description last"></td>
680         </tr>
681
682     
683
684         <tr>
685             
686                 <td class="name"><code>keys</code></td>
687             
688
689             <td class="type">
690             
691                 
692 <span class="param-type">Array.&lt;<a href="global.html#Key">Key</a>></span>
693
694
695
696             
697             </td>
698
699             
700
701             
702
703             <td class="description last"><p>The list of keys used to issue units of the asset.</p></td>
704         </tr>
705
706     
707
708         <tr>
709             
710                 <td class="name"><code>quorum</code></td>
711             
712
713             <td class="type">
714             
715                 
716 <span class="param-type">Number</span>
717
718
719
720             
721             </td>
722
723             
724
725             
726
727             <td class="description last"><p>The number of signatures required to issue new units of the asset.</p></td>
728         </tr>
729
730     
731
732         <tr>
733             
734                 <td class="name"><code>defintion</code></td>
735             
736
737             <td class="type">
738             
739                 
740 <span class="param-type">Object</span>
741
742
743
744             
745             </td>
746
747             
748
749             
750
751             <td class="description last"><p>User-specified, arbitrary/unstructured data visible across Bytom
752 blockchain networks. assets specify the definition in their
753 issuance programs, rendering the definition immutable.</p></td>
754         </tr>
755
756     
757     </tbody>
758 </table>
759 </dl>
760
761     
762
763         
764
765         
766
767         
768
769     
770
771     
772
773     
774
775     
776
777         
778
779         
780
781         
782
783         
784
785         
786
787
788
789         
790
791         
792
793         
794
795         
796 </dl>
797
798
799     
800 </dd>
801
802             
803                 
804 <hr>
805 <dt class="name" id="Balance">
806     <h4 id="Balance">Balance</h4>
807
808     
809 </dt>
810 <dd>
811     
812     <div class="description">
813         <p>Any balance on the blockchain is simply a summation of unspent outputs.</p>
814     </div>
815     
816
817     
818         <h5>Type:</h5>
819         <ul>
820             <li>
821                 
822 <span class="param-type">Object</span>
823
824
825
826             </li>
827         </ul>
828     
829
830     
831 <dl class="details">
832     
833
834     <h5 class="subsection-title">Properties:</h5>
835
836     <dl>
837
838 <table class="props table table-striped">
839     <thead>
840     <tr>
841         
842         <th>Name</th>
843         
844
845         <th>Type</th>
846
847         
848
849         
850
851         <th class="last">Description</th>
852     </tr>
853     </thead>
854
855     <tbody>
856     
857
858         <tr>
859             
860                 <td class="name"><code>amount</code></td>
861             
862
863             <td class="type">
864             
865                 
866 <span class="param-type">Number</span>
867
868
869
870             
871             </td>
872
873             
874
875             
876
877             <td class="description last"><p>Sum of the unspent outputs.</p></td>
878         </tr>
879
880     
881
882         <tr>
883             
884                 <td class="name"><code>account_alias</code></td>
885             
886
887             <td class="type">
888             
889                 
890 <span class="param-type">String</span>
891
892
893
894             
895             </td>
896
897             
898
899             
900
901             <td class="description last"><p>Account alias.</p></td>
902         </tr>
903
904     
905
906         <tr>
907             
908                 <td class="name"><code>account_id</code></td>
909             
910
911             <td class="type">
912             
913                 
914 <span class="param-type">String</span>
915
916
917
918             
919             </td>
920
921             
922
923             
924
925             <td class="description last"><p>Account id.</p></td>
926         </tr>
927
928     
929
930         <tr>
931             
932                 <td class="name"><code>asset_id</code></td>
933             
934
935             <td class="type">
936             
937                 
938 <span class="param-type">String</span>
939
940
941
942             
943             </td>
944
945             
946
947             
948
949             <td class="description last"><p>Asset id.</p></td>
950         </tr>
951
952     
953
954         <tr>
955             
956                 <td class="name"><code>asset_alias</code></td>
957             
958
959             <td class="type">
960             
961                 
962 <span class="param-type">String</span>
963
964
965
966             
967             </td>
968
969             
970
971             
972
973             <td class="description last"><p>Asset alias.</p></td>
974         </tr>
975
976     
977
978         <tr>
979             
980                 <td class="name"><code>asset_definition</code></td>
981             
982
983             <td class="type">
984             
985                 
986 <span class="param-type">Object</span>
987
988
989
990             
991             </td>
992
993             
994
995             
996
997             <td class="description last"><p>Asset definition</p></td>
998         </tr>
999
1000     
1001     </tbody>
1002 </table>
1003 </dl>
1004
1005     
1006
1007         
1008
1009         
1010
1011         
1012
1013     
1014
1015     
1016
1017     
1018
1019     
1020
1021         
1022
1023         
1024
1025         
1026
1027         
1028
1029         
1030
1031
1032
1033         
1034
1035         
1036
1037         
1038
1039         
1040 </dl>
1041
1042
1043     
1044 </dd>
1045
1046             
1047                 
1048 <hr>
1049 <dt class="name" id="Key">
1050     <h4 id="Key">Key</h4>
1051
1052     
1053 </dt>
1054 <dd>
1055     
1056     <div class="description">
1057         <p>Cryptographic private keys are the primary authorization mechanism on a
1058 blockchain.</p>
1059     </div>
1060     
1061
1062     
1063         <h5>Type:</h5>
1064         <ul>
1065             <li>
1066                 
1067 <span class="param-type">Object</span>
1068
1069
1070
1071             </li>
1072         </ul>
1073     
1074
1075     
1076 <dl class="details">
1077     
1078
1079     <h5 class="subsection-title">Properties:</h5>
1080
1081     <dl>
1082
1083 <table class="props table table-striped">
1084     <thead>
1085     <tr>
1086         
1087         <th>Name</th>
1088         
1089
1090         <th>Type</th>
1091
1092         
1093
1094         
1095
1096         <th class="last">Description</th>
1097     </tr>
1098     </thead>
1099
1100     <tbody>
1101     
1102
1103         <tr>
1104             
1105                 <td class="name"><code>alias</code></td>
1106             
1107
1108             <td class="type">
1109             
1110                 
1111 <span class="param-type">String</span>
1112
1113
1114
1115             
1116             </td>
1117
1118             
1119
1120             
1121
1122             <td class="description last"><p>User specified, unique identifier of the key.</p></td>
1123         </tr>
1124
1125     
1126
1127         <tr>
1128             
1129                 <td class="name"><code>xpub</code></td>
1130             
1131
1132             <td class="type">
1133             
1134                 
1135 <span class="param-type">String</span>
1136
1137
1138
1139             
1140             </td>
1141
1142             
1143
1144             
1145
1146             <td class="description last"><p>Hex-encoded string representation of the key.</p></td>
1147         </tr>
1148
1149     
1150     </tbody>
1151 </table>
1152 </dl>
1153
1154     
1155
1156         
1157
1158         
1159
1160         
1161
1162     
1163
1164     
1165
1166     
1167
1168     
1169
1170         
1171
1172         
1173
1174         
1175
1176         
1177
1178         
1179
1180
1181
1182         
1183
1184         
1185
1186         
1187
1188         
1189 </dl>
1190
1191
1192     
1193 </dd>
1194
1195             
1196                 
1197 <hr>
1198 <dt class="name" id="Receiver">
1199     <h4 id="Receiver">Receiver</h4>
1200
1201     
1202 </dt>
1203 <dd>
1204     
1205     <div class="description">
1206         <p>A receiver is an object that wraps an account control program with the corresponding address.</p>
1207     </div>
1208     
1209
1210     
1211         <h5>Type:</h5>
1212         <ul>
1213             <li>
1214                 
1215 <span class="param-type">Object</span>
1216
1217
1218
1219             </li>
1220         </ul>
1221     
1222
1223     
1224 <dl class="details">
1225     
1226
1227     <h5 class="subsection-title">Properties:</h5>
1228
1229     <dl>
1230
1231 <table class="props table table-striped">
1232     <thead>
1233     <tr>
1234         
1235         <th>Name</th>
1236         
1237
1238         <th>Type</th>
1239
1240         
1241
1242         
1243
1244         <th class="last">Description</th>
1245     </tr>
1246     </thead>
1247
1248     <tbody>
1249     
1250
1251         <tr>
1252             
1253                 <td class="name"><code>control_program</code></td>
1254             
1255
1256             <td class="type">
1257             
1258                 
1259 <span class="param-type">String</span>
1260
1261
1262
1263             
1264             </td>
1265
1266             
1267
1268             
1269
1270             <td class="description last"><p>The underlying control program that will be used in transactions paying to the address.</p></td>
1271         </tr>
1272
1273     
1274
1275         <tr>
1276             
1277                 <td class="name"><code>address</code></td>
1278             
1279
1280             <td class="type">
1281             
1282                 
1283 <span class="param-type">String</span>
1284
1285
1286
1287             
1288             </td>
1289
1290             
1291
1292             
1293
1294             <td class="description last"><p>The target address one transaction can pay UTXO to.</p></td>
1295         </tr>
1296
1297     
1298     </tbody>
1299 </table>
1300 </dl>
1301
1302     
1303
1304         
1305
1306         
1307
1308         
1309
1310     
1311
1312     
1313
1314     
1315
1316     
1317
1318         
1319
1320         
1321
1322         
1323
1324         
1325
1326         
1327
1328
1329
1330         
1331
1332         
1333
1334         
1335
1336         
1337 </dl>
1338
1339
1340     
1341 </dd>
1342
1343             
1344                 
1345 <hr>
1346 <dt class="name" id="Transaction">
1347     <h4 id="Transaction">Transaction</h4>
1348
1349     
1350 </dt>
1351 <dd>
1352     
1353     <div class="description">
1354         <p>A blockchain consists of an immutable set of cryptographically linked
1355 transactions. Each transaction contains one or more actions.</p>
1356     </div>
1357     
1358
1359     
1360         <h5>Type:</h5>
1361         <ul>
1362             <li>
1363                 
1364 <span class="param-type">Object</span>
1365
1366
1367
1368             </li>
1369         </ul>
1370     
1371
1372     
1373 <dl class="details">
1374     
1375
1376     <h5 class="subsection-title">Properties:</h5>
1377
1378     <dl>
1379
1380 <table class="props table table-striped">
1381     <thead>
1382     <tr>
1383         
1384         <th>Name</th>
1385         
1386
1387         <th>Type</th>
1388
1389         
1390
1391         
1392
1393         <th class="last">Description</th>
1394     </tr>
1395     </thead>
1396
1397     <tbody>
1398     
1399
1400         <tr>
1401             
1402                 <td class="name"><code>tx_id</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>Unique transaction identifier.</p></td>
1420         </tr>
1421
1422     
1423
1424         <tr>
1425             
1426                 <td class="name"><code>block_time</code></td>
1427             
1428
1429             <td class="type">
1430             
1431                 
1432 <span class="param-type">String</span>
1433
1434
1435
1436             
1437             </td>
1438
1439             
1440
1441             
1442
1443             <td class="description last"><p>Time of transaction.</p></td>
1444         </tr>
1445
1446     
1447
1448         <tr>
1449             
1450                 <td class="name"><code>inputs</code></td>
1451             
1452
1453             <td class="type">
1454             
1455                 
1456 <span class="param-type">Array.&lt;<a href="global.html#TransactionInput">TransactionInput</a>></span>
1457
1458
1459
1460             
1461             </td>
1462
1463             
1464
1465             
1466
1467             <td class="description last"><p>List of specified inputs for a transaction.</p></td>
1468         </tr>
1469
1470     
1471
1472         <tr>
1473             
1474                 <td class="name"><code>outputs</code></td>
1475             
1476
1477             <td class="type">
1478             
1479                 
1480 <span class="param-type">Array.&lt;<a href="global.html#TransactionOutput">TransactionOutput</a>></span>
1481
1482
1483
1484             
1485             </td>
1486
1487             
1488
1489             
1490
1491             <td class="description last"><p>List of specified outputs for a transaction.</p></td>
1492         </tr>
1493
1494     
1495     </tbody>
1496 </table>
1497 </dl>
1498
1499     
1500
1501         
1502
1503         
1504
1505         
1506
1507     
1508
1509     
1510
1511     
1512
1513     
1514
1515         
1516
1517         
1518
1519         
1520
1521         
1522
1523         
1524
1525
1526
1527         
1528
1529         
1530
1531         
1532
1533         
1534 </dl>
1535
1536
1537     
1538 </dd>
1539
1540             
1541                 
1542 <hr>
1543 <dt class="name" id="TransactionInput">
1544     <h4 id="TransactionInput">TransactionInput</h4>
1545
1546     
1547 </dt>
1548 <dd>
1549     
1550
1551     
1552         <h5>Type:</h5>
1553         <ul>
1554             <li>
1555                 
1556 <span class="param-type">Object</span>
1557
1558
1559
1560             </li>
1561         </ul>
1562     
1563
1564     
1565 <dl class="details">
1566     
1567
1568     <h5 class="subsection-title">Properties:</h5>
1569
1570     <dl>
1571
1572 <table class="props table table-striped">
1573     <thead>
1574     <tr>
1575         
1576         <th>Name</th>
1577         
1578
1579         <th>Type</th>
1580
1581         
1582
1583         
1584
1585         <th class="last">Description</th>
1586     </tr>
1587     </thead>
1588
1589     <tbody>
1590     
1591
1592         <tr>
1593             
1594                 <td class="name"><code>type</code></td>
1595             
1596
1597             <td class="type">
1598             
1599                 
1600 <span class="param-type">String</span>
1601
1602
1603
1604             
1605             </td>
1606
1607             
1608
1609             
1610
1611             <td class="description last"><p>The type of the input. Possible values are &quot;issue&quot;, &quot;spend&quot;.</p></td>
1612         </tr>
1613
1614     
1615
1616         <tr>
1617             
1618                 <td class="name"><code>asset_id</code></td>
1619             
1620
1621             <td class="type">
1622             
1623                 
1624 <span class="param-type">String</span>
1625
1626
1627
1628             
1629             </td>
1630
1631             
1632
1633             
1634
1635             <td class="description last"><p>The id of the asset being issued or spent.</p></td>
1636         </tr>
1637
1638     
1639
1640         <tr>
1641             
1642                 <td class="name"><code>asset_alias</code></td>
1643             
1644
1645             <td class="type">
1646             
1647                 
1648 <span class="param-type">String</span>
1649
1650
1651
1652             
1653             </td>
1654
1655             
1656
1657             
1658
1659             <td class="description last"><p>The alias of the asset being issued or spent (possibly null).</p></td>
1660         </tr>
1661
1662     
1663
1664         <tr>
1665             
1666                 <td class="name"><code>asset_definition</code></td>
1667             
1668
1669             <td class="type">
1670             
1671                 
1672 <span class="param-type">Hash</span>
1673
1674
1675
1676             
1677             </td>
1678
1679             
1680
1681             
1682
1683             <td class="description last"><p>The definition of the asset being issued or spent (possibly null).</p></td>
1684         </tr>
1685
1686     
1687
1688         <tr>
1689             
1690                 <td class="name"><code>amount</code></td>
1691             
1692
1693             <td class="type">
1694             
1695                 
1696 <span class="param-type">Integer</span>
1697
1698
1699
1700             
1701             </td>
1702
1703             
1704
1705             
1706
1707             <td class="description last"><p>The number of units of the asset being issued or spent.</p></td>
1708         </tr>
1709
1710     
1711
1712         <tr>
1713             
1714                 <td class="name"><code>spentOutputId</code></td>
1715             
1716
1717             <td class="type">
1718             
1719                 
1720 <span class="param-type">String</span>
1721
1722
1723
1724             
1725             </td>
1726
1727             
1728
1729             
1730
1731             <td class="description last"><p>The id of the output consumed by this input. ID is nil if this is an issuance input.</p></td>
1732         </tr>
1733
1734     
1735
1736         <tr>
1737             
1738                 <td class="name"><code>account_id</code></td>
1739             
1740
1741             <td class="type">
1742             
1743                 
1744 <span class="param-type">String</span>
1745
1746
1747
1748             
1749             </td>
1750
1751             
1752
1753             
1754
1755             <td class="description last"><p>The id of the account transferring the asset (possibly null if the
1756 input is an issuance or an unspent output is specified).</p></td>
1757         </tr>
1758
1759     
1760
1761         <tr>
1762             
1763                 <td class="name"><code>account_alias</code></td>
1764             
1765
1766             <td class="type">
1767             
1768                 
1769 <span class="param-type">String</span>
1770
1771
1772
1773             
1774             </td>
1775
1776             
1777
1778             
1779
1780             <td class="description last"><p>The alias of the account transferring the asset (possibly null if the
1781 input is an issuance or an unspent output is specified).</p></td>
1782         </tr>
1783
1784     
1785
1786         <tr>
1787             
1788                 <td class="name"><code>issuance_program</code></td>
1789             
1790
1791             <td class="type">
1792             
1793                 
1794 <span class="param-type">String</span>
1795
1796
1797
1798             
1799             </td>
1800
1801             
1802
1803             
1804
1805             <td class="description last"><p>A program specifying a predicate for issuing an asset (possibly null
1806 if input is not an issuance).</p></td>
1807         </tr>
1808
1809     
1810
1811         <tr>
1812             
1813                 <td class="name"><code>control_program</code></td>
1814             
1815
1816             <td class="type">
1817             
1818                 
1819 <span class="param-type">String</span>
1820
1821
1822
1823             
1824             </td>
1825
1826             
1827
1828             
1829
1830             <td class="description last"><p>A UTXO control program.</p></td>
1831         </tr>
1832
1833     
1834
1835         <tr>
1836             
1837                 <td class="name"><code>address</code></td>
1838             
1839
1840             <td class="type">
1841             
1842                 
1843 <span class="param-type">String</span>
1844
1845
1846
1847             
1848             </td>
1849
1850             
1851
1852             
1853
1854             <td class="description last"><p>The UTXO address.</p></td>
1855         </tr>
1856
1857     
1858     </tbody>
1859 </table>
1860 </dl>
1861
1862     
1863
1864         
1865
1866         
1867
1868         
1869
1870     
1871
1872     
1873
1874     
1875
1876     
1877
1878         
1879
1880         
1881
1882         
1883
1884         
1885
1886         
1887
1888
1889
1890         
1891
1892         
1893
1894         
1895
1896         
1897 </dl>
1898
1899
1900     
1901 </dd>
1902
1903             
1904                 
1905 <hr>
1906 <dt class="name" id="TransactionOutput">
1907     <h4 id="TransactionOutput">TransactionOutput</h4>
1908
1909     
1910 </dt>
1911 <dd>
1912     
1913     <div class="description">
1914         <p>Each new transaction in the blockchain consumes some unspent outputs and
1915 creates others. An output is considered unspent when it has not yet been used
1916 as an input to a new transaction. All asset units on a blockchain exist in
1917 the unspent output set.</p>
1918     </div>
1919     
1920
1921     
1922         <h5>Type:</h5>
1923         <ul>
1924             <li>
1925                 
1926 <span class="param-type">Object</span>
1927
1928
1929
1930             </li>
1931         </ul>
1932     
1933
1934     
1935 <dl class="details">
1936     
1937
1938     <h5 class="subsection-title">Properties:</h5>
1939
1940     <dl>
1941
1942 <table class="props table table-striped">
1943     <thead>
1944     <tr>
1945         
1946         <th>Name</th>
1947         
1948
1949         <th>Type</th>
1950
1951         
1952
1953         
1954
1955         <th class="last">Description</th>
1956     </tr>
1957     </thead>
1958
1959     <tbody>
1960     
1961
1962         <tr>
1963             
1964                 <td class="name"><code>id</code></td>
1965             
1966
1967             <td class="type">
1968             
1969                 
1970 <span class="param-type">String</span>
1971
1972
1973
1974             
1975             </td>
1976
1977             
1978
1979             
1980
1981             <td class="description last"><p>The id of the output.</p></td>
1982         </tr>
1983
1984     
1985
1986         <tr>
1987             
1988                 <td class="name"><code>type</code></td>
1989             
1990
1991             <td class="type">
1992             
1993                 
1994 <span class="param-type">String</span>
1995
1996
1997
1998             
1999             </td>
2000
2001             
2002
2003             
2004
2005             <td class="description last"><p>The type of the output. Possible values are &quot;control&quot; and &quot;retire&quot;.</p></td>
2006         </tr>
2007
2008     
2009
2010         <tr>
2011             
2012                 <td class="name"><code>transaction_id</code></td>
2013             
2014
2015             <td class="type">
2016             
2017                 
2018 <span class="param-type">String</span>
2019
2020
2021
2022             
2023             </td>
2024
2025             
2026
2027             
2028
2029             <td class="description last"><p>Id of the transaction.</p></td>
2030         </tr>
2031
2032     
2033
2034         <tr>
2035             
2036                 <td class="name"><code>position</code></td>
2037             
2038
2039             <td class="type">
2040             
2041                 
2042 <span class="param-type">Number</span>
2043
2044
2045
2046             
2047             </td>
2048
2049             
2050
2051             
2052
2053             <td class="description last"><p>The output's position in a transaction's list of outputs.</p></td>
2054         </tr>
2055
2056     
2057
2058         <tr>
2059             
2060                 <td class="name"><code>asset_id</code></td>
2061             
2062
2063             <td class="type">
2064             
2065                 
2066 <span class="param-type">String</span>
2067
2068
2069
2070             
2071             </td>
2072
2073             
2074
2075             
2076
2077             <td class="description last"><p>The id of the asset being issued or spent.</p></td>
2078         </tr>
2079
2080     
2081
2082         <tr>
2083             
2084                 <td class="name"><code>asset_alias</code></td>
2085             
2086
2087             <td class="type">
2088             
2089                 
2090 <span class="param-type">String</span>
2091
2092
2093
2094             
2095             </td>
2096
2097             
2098
2099             
2100
2101             <td class="description last"><p>The alias of the asset being issued or spent (possibly null).</p></td>
2102         </tr>
2103
2104     
2105
2106         <tr>
2107             
2108                 <td class="name"><code>asset_definition</code></td>
2109             
2110
2111             <td class="type">
2112             
2113                 
2114 <span class="param-type">Hash</span>
2115
2116
2117
2118             
2119             </td>
2120
2121             
2122
2123             
2124
2125             <td class="description last"><p>The definition of the asset being issued or spent (possibly null).</p></td>
2126         </tr>
2127
2128     
2129
2130         <tr>
2131             
2132                 <td class="name"><code>amount</code></td>
2133             
2134
2135             <td class="type">
2136             
2137                 
2138 <span class="param-type">Integer</span>
2139
2140
2141
2142             
2143             </td>
2144
2145             
2146
2147             
2148
2149             <td class="description last"><p>The number of units of the asset being issued or spent.</p></td>
2150         </tr>
2151
2152     
2153
2154         <tr>
2155             
2156                 <td class="name"><code>account_id</code></td>
2157             
2158
2159             <td class="type">
2160             
2161                 
2162 <span class="param-type">String</span>
2163
2164
2165
2166             
2167             </td>
2168
2169             
2170
2171             
2172
2173             <td class="description last"><p>The id of the account transferring the asset (possibly null).</p></td>
2174         </tr>
2175
2176     
2177
2178         <tr>
2179             
2180                 <td class="name"><code>account_alias</code></td>
2181             
2182
2183             <td class="type">
2184             
2185                 
2186 <span class="param-type">String</span>
2187
2188
2189
2190             
2191             </td>
2192
2193             
2194
2195             
2196
2197             <td class="description last"><p>The alias of the account transferring the asset (possibly null).</p></td>
2198         </tr>
2199
2200     
2201
2202         <tr>
2203             
2204                 <td class="name"><code>control_program</code></td>
2205             
2206
2207             <td class="type">
2208             
2209                 
2210 <span class="param-type">String</span>
2211
2212
2213
2214             
2215             </td>
2216
2217             
2218
2219             
2220
2221             <td class="description last"><p>The control program which must be satisfied to transfer this output.</p></td>
2222         </tr>
2223
2224     
2225     </tbody>
2226 </table>
2227 </dl>
2228
2229     
2230
2231         
2232
2233         
2234
2235         
2236
2237     
2238
2239     
2240
2241     
2242
2243     
2244
2245         
2246
2247         
2248
2249         
2250
2251         
2252
2253         
2254
2255
2256
2257         
2258
2259         
2260
2261         
2262
2263         
2264 </dl>
2265
2266
2267     
2268 </dd>
2269
2270             
2271                 
2272 <hr>
2273 <dt class="name" id="UnspentOutput">
2274     <h4 id="UnspentOutput">UnspentOutput</h4>
2275
2276     
2277 </dt>
2278 <dd>
2279     
2280     <div class="description">
2281         <p>Each new transaction in the blockchain consumes some unspent outputs and
2282 creates others. An output is considered unspent when it has not yet been used
2283 as an input to a new transaction. All asset units on a blockchain exist in
2284 the unspent output set.</p>
2285     </div>
2286     
2287
2288     
2289         <h5>Type:</h5>
2290         <ul>
2291             <li>
2292                 
2293 <span class="param-type">Object</span>
2294
2295
2296
2297             </li>
2298         </ul>
2299     
2300
2301     
2302 <dl class="details">
2303     
2304
2305     <h5 class="subsection-title">Properties:</h5>
2306
2307     <dl>
2308
2309 <table class="props table table-striped">
2310     <thead>
2311     <tr>
2312         
2313         <th>Name</th>
2314         
2315
2316         <th>Type</th>
2317
2318         
2319
2320         
2321
2322         <th class="last">Description</th>
2323     </tr>
2324     </thead>
2325
2326     <tbody>
2327     
2328
2329         <tr>
2330             
2331                 <td class="name"><code>account_alias</code></td>
2332             
2333
2334             <td class="type">
2335             
2336                 
2337 <span class="param-type">String</span>
2338
2339
2340
2341             
2342             </td>
2343
2344             
2345
2346             
2347
2348             <td class="description last"><p>The alias of the account transferring the asset (possibly null).</p></td>
2349         </tr>
2350
2351     
2352
2353         <tr>
2354             
2355                 <td class="name"><code>account_id</code></td>
2356             
2357
2358             <td class="type">
2359             
2360                 
2361 <span class="param-type">String</span>
2362
2363
2364
2365             
2366             </td>
2367
2368             
2369
2370             
2371
2372             <td class="description last"><p>The id of the account transferring the asset (possibly null).</p></td>
2373         </tr>
2374
2375     
2376
2377         <tr>
2378             
2379                 <td class="name"><code>address</code></td>
2380             
2381
2382             <td class="type">
2383             
2384                 
2385 <span class="param-type">String</span>
2386
2387
2388
2389             
2390             </td>
2391
2392             
2393
2394             
2395
2396             <td class="description last"><p>The output address.</p></td>
2397         </tr>
2398
2399     
2400
2401         <tr>
2402             
2403                 <td class="name"><code>id</code></td>
2404             
2405
2406             <td class="type">
2407             
2408                 
2409 <span class="param-type">String</span>
2410
2411
2412
2413             
2414             </td>
2415
2416             
2417
2418             
2419
2420             <td class="description last"><p>Unique transaction identifier.</p></td>
2421         </tr>
2422
2423     
2424
2425         <tr>
2426             
2427                 <td class="name"><code>amount</code></td>
2428             
2429
2430             <td class="type">
2431             
2432                 
2433 <span class="param-type">Number</span>
2434
2435
2436
2437             
2438             </td>
2439
2440             
2441
2442             
2443
2444             <td class="description last"><p>The number of units of the asset being issued or spent.</p></td>
2445         </tr>
2446
2447     
2448
2449         <tr>
2450             
2451                 <td class="name"><code>asset_alias</code></td>
2452             
2453
2454             <td class="type">
2455             
2456                 
2457 <span class="param-type">String</span>
2458
2459
2460
2461             
2462             </td>
2463
2464             
2465
2466             
2467
2468             <td class="description last"><p>The alias of the asset being issued or spent (possibly null).</p></td>
2469         </tr>
2470
2471     
2472
2473         <tr>
2474             
2475                 <td class="name"><code>asset_id</code></td>
2476             
2477
2478             <td class="type">
2479             
2480                 
2481 <span class="param-type">String</span>
2482
2483
2484
2485             
2486             </td>
2487
2488             
2489
2490             
2491
2492             <td class="description last"><p>The id of the asset being issued or spent.</p></td>
2493         </tr>
2494
2495     
2496
2497         <tr>
2498             
2499                 <td class="name"><code>source_pos</code></td>
2500             
2501
2502             <td class="type">
2503             
2504                 
2505 <span class="param-type">Number</span>
2506
2507
2508
2509             
2510             </td>
2511
2512             
2513
2514             
2515
2516             <td class="description last"><p>The output's position in a transaction's list of outputs.</p></td>
2517         </tr>
2518
2519     
2520
2521         <tr>
2522             
2523                 <td class="name"><code>change</code></td>
2524             
2525
2526             <td class="type">
2527             
2528                 
2529 <span class="param-type">Boolean</span>
2530
2531
2532
2533             
2534             </td>
2535
2536             
2537
2538             
2539
2540             <td class="description last"><p>Whether this output is asset change of one spend.</p></td>
2541         </tr>
2542
2543     
2544
2545         <tr>
2546             
2547                 <td class="name"><code>control_program_index</code></td>
2548             
2549
2550             <td class="type">
2551             
2552                 
2553 <span class="param-type">Number</span>
2554
2555
2556
2557             
2558             </td>
2559
2560             
2561
2562             
2563
2564             <td class="description last"><p>Control program index.</p></td>
2565         </tr>
2566
2567     
2568
2569         <tr>
2570             
2571                 <td class="name"><code>program</code></td>
2572             
2573
2574             <td class="type">
2575             
2576                 
2577 <span class="param-type">String</span>
2578
2579
2580
2581             
2582             </td>
2583
2584             
2585
2586             
2587
2588             <td class="description last"><p>The control program which must be satisfied to transfer this output.</p></td>
2589         </tr>
2590
2591     
2592
2593         <tr>
2594             
2595                 <td class="name"><code>source_id</code></td>
2596             
2597
2598             <td class="type">
2599             
2600                 
2601 <span class="param-type">String</span>
2602
2603
2604
2605             
2606             </td>
2607
2608             
2609
2610             
2611
2612             <td class="description last"><p>The source unspent output id.</p></td>
2613         </tr>
2614
2615     
2616
2617         <tr>
2618             
2619                 <td class="name"><code>valid_height</code></td>
2620             
2621
2622             <td class="type">
2623             
2624                 
2625 <span class="param-type">Number</span>
2626
2627
2628
2629             
2630             </td>
2631
2632             
2633
2634             
2635
2636             <td class="description last"><p>It means coinbase utxo if valid_height &gt; 0.</p></td>
2637         </tr>
2638
2639     
2640     </tbody>
2641 </table>
2642 </dl>
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
2668         
2669
2670
2671
2672         
2673
2674         
2675
2676         
2677
2678         
2679 </dl>
2680
2681
2682     
2683 </dd>
2684
2685             </dl>
2686     
2687
2688     
2689 </article>
2690
2691 </section>
2692
2693
2694
2695
2696                 </div>
2697         </div>
2698
2699         <div class="clearfix"></div>
2700
2701         
2702                 <div class="col-md-3">
2703                         <div id="toc" class="col-md-3 hidden-xs hidden-sm hidden-md"></div>
2704                 </div>
2705         
2706
2707 </div>
2708 </div>
2709
2710
2711     <div class="modal fade" id="searchResults">
2712       <div class="modal-dialog">
2713         <div class="modal-content">
2714           <div class="modal-header">
2715             <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
2716             <h4 class="modal-title">Search results</h4>
2717           </div>
2718           <div class="modal-body"></div>
2719           <div class="modal-footer">
2720             <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
2721           </div>
2722         </div><!-- /.modal-content -->
2723       </div><!-- /.modal-dialog -->
2724     </div>
2725
2726
2727 <footer>
2728
2729
2730 <span class="jsdoc-message">
2731         Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
2732         
2733                 on 2018-05-24T14:04:59+08:00
2734         
2735         using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
2736 </span>
2737 </footer>
2738
2739 <script src="scripts/docstrap.lib.js"></script>
2740 <script src="scripts/toc.js"></script>
2741
2742     <script type="text/javascript" src="scripts/fulltext-search-ui.js"></script>
2743
2744
2745 <script>
2746 $( function () {
2747         $( "[id*='$']" ).each( function () {
2748                 var $this = $( this );
2749
2750                 $this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
2751         } );
2752
2753         $( ".tutorial-section pre, .readme-section pre, pre.prettyprint.source" ).each( function () {
2754                 var $this = $( this );
2755
2756                 var example = $this.find( "code" );
2757                 exampleText = example.html();
2758                 var lang = /{@lang (.*?)}/.exec( exampleText );
2759                 if ( lang && lang[1] ) {
2760                         exampleText = exampleText.replace( lang[0], "" );
2761                         example.html( exampleText );
2762                         lang = lang[1];
2763                 } else {
2764                         var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
2765                         lang = langClassMatch ? langClassMatch[1] : "javascript";
2766                 }
2767
2768                 if ( lang ) {
2769
2770                         $this
2771                         .addClass( "sunlight-highlight-" + lang )
2772                         .addClass( "linenums" )
2773                         .html( example.html() );
2774
2775                 }
2776         } );
2777
2778         Sunlight.highlightAll( {
2779                 lineNumbers : true,
2780                 showMenu : true,
2781                 enableDoclinks : true
2782         } );
2783
2784         $.catchAnchorLinks( {
2785         navbarOffset: 10
2786         } );
2787         $( "#toc" ).toc( {
2788                 anchorName  : function ( i, heading, prefix ) {
2789                         return $( heading ).attr( "id" ) || ( prefix + i );
2790                 },
2791                 selectors   : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4",
2792                 showAndHide : false,
2793                 smoothScrolling: true
2794         } );
2795
2796         $( "#main span[id^='toc']" ).addClass( "toc-shim" );
2797         $( '.dropdown-toggle' ).dropdown();
2798
2799     $( "table" ).each( function () {
2800       var $this = $( this );
2801       $this.addClass('table');
2802     } );
2803
2804 } );
2805 </script>
2806
2807
2808
2809 <!--Navigation and Symbol Display-->
2810
2811
2812 <!--Google Analytics-->
2813
2814
2815
2816     <script type="text/javascript">
2817         $(document).ready(function() {
2818             SearcherDisplay.init();
2819         });
2820     </script>
2821
2822
2823 </body>
2824 </html>