6 <meta name="viewport" content="width=device-width">
7 <title>Bytom Node.js SDK Module: AssetsApi</title>
10 <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
12 <link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
14 <link type="text/css" rel="stylesheet" href="styles/site.cosmo.css">
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>
30 <div class="navbar-collapse collapse" id="topNavigation">
31 <ul class="nav navbar-nav">
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>
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>
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>
66 <div class="container" id="toc-content">
70 <div class="col-md-8">
75 <h1 class="page-title">Module: AssetsApi</h1>
84 <div class="container-overview">
87 <div class="description"><p>API for interacting with <a href="global.html#Asset">assets</a>.</p></div>
147 <h3 class="subsection-title">Methods</h3>
153 <h4 class="name" id="~create"><span class="type-signature"><inner> </span>create(xpubs, quorum, alias, definition)</h4>
160 <div class="description">
161 <p>Create a new asset.</p>
174 <table class="params table table-striped">
187 <th class="last">Description</th>
196 <td class="name"><code>xpubs</code></td>
202 <span class="param-type"><a href="module-AssetsApi.html#~xpubs">module:AssetsApi~xpubs</a></span>
213 <td class="description last"><p>Keys for asseet creation.</p></td>
220 <td class="name"><code>quorum</code></td>
226 <span class="param-type"><a href="module-AssetsApi.html#~quorum">module:AssetsApi~quorum</a></span>
237 <td class="description last"><p>The number of keys required to sign transactions for the account.</p></td>
244 <td class="name"><code>alias</code></td>
250 <span class="param-type"><a href="module-AssetsApi.html#~alias">module:AssetsApi~alias</a></span>
261 <td class="description last"><p>Asset alias.</p></td>
268 <td class="name"><code>definition</code></td>
274 <span class="param-type"><a href="module-AssetsApi.html#~definition">module:AssetsApi~definition</a></span>
285 <td class="description last"><p>Asset definition.</p></td>
348 <div class="param-desc">
349 <p>Newly created asset.</p>
360 <span class="param-type">Promise.<<a href="global.html#Asset">Asset</a>></span>
377 <h4 class="name" id="~getById"><span class="type-signature"><inner> </span>getById(id)</h4>
384 <div class="description">
385 <p>Get asset by the asset id.</p>
398 <table class="params table table-striped">
411 <th class="last">Description</th>
420 <td class="name"><code>id</code></td>
426 <span class="param-type"><a href="module-AssetsApi.html#~id">module:AssetsApi~id</a></span>
437 <td class="description last"><p>Asset id.</p></td>
500 <div class="param-desc">
512 <span class="param-type">Promise.<<a href="global.html#Asset">Asset</a>></span>
529 <h4 class="name" id="~list"><span class="type-signature"><inner> </span>list()</h4>
536 <div class="description">
537 <p>List all assets in one Bytom node.</p>
602 <div class="param-desc">
603 <p>target assets.</p>
614 <span class="param-type">Promise.<Array.<<a href="global.html#Asset">Asset</a>>></span>
631 <h4 class="name" id="~updateAlias"><span class="type-signature"><inner> </span>updateAlias(id, newAlias)</h4>
638 <div class="description">
639 <p>Update asset alias.</p>
652 <table class="params table table-striped">
665 <th class="last">Description</th>
674 <td class="name"><code>id</code></td>
680 <span class="param-type"><a href="module-AssetsApi.html#~id">module:AssetsApi~id</a></span>
691 <td class="description last"><p>Asset id.</p></td>
698 <td class="name"><code>newAlias</code></td>
704 <span class="param-type">String</span>
715 <td class="description last"><p>new alias.</p></td>
783 <h3 class="subsection-title">Type Definitions</h3>
788 <dt class="name" id="~alias">
789 <h4 id="~alias">alias</h4>
795 <div class="description">
796 <p>User specified, unique identifier.</p>
805 <span class="param-type">String</span>
859 <dt class="name" id="~definition">
860 <h4 id="~definition">definition</h4>
866 <div class="description">
867 <p>User-specified, asset attributes accross Bytom blockchain network.</p>
876 <span class="param-type">Object</span>
930 <dt class="name" id="~id">
937 <div class="description">
938 <p>Unique account identifier in one Bytom node.</p>
947 <span class="param-type">String</span>
1001 <dt class="name" id="~quorum">
1002 <h4 id="~quorum">quorum</h4>
1008 <div class="description">
1009 <p>The number of signatures required to issue new units of the asset.</p>
1018 <span class="param-type">Number</span>
1027 <dl class="details">
1072 <dt class="name" id="~xpubs">
1073 <h4 id="~xpubs">xpubs</h4>
1079 <div class="description">
1080 <p>The list of keys used to issue units of the asset.</p>
1089 <span class="param-type">Array.<String></span>
1098 <dl class="details">
1154 <div class="clearfix"></div>
1157 <div class="col-md-3">
1158 <div id="toc" class="col-md-3 hidden-xs hidden-sm hidden-md"></div>
1166 <div class="modal fade" id="searchResults">
1167 <div class="modal-dialog">
1168 <div class="modal-content">
1169 <div class="modal-header">
1170 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
1171 <h4 class="modal-title">Search results</h4>
1173 <div class="modal-body"></div>
1174 <div class="modal-footer">
1175 <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
1177 </div><!-- /.modal-content -->
1178 </div><!-- /.modal-dialog -->
1185 <span class="jsdoc-message">
1186 Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
1188 on 2018-05-24T14:05:00+08:00
1190 using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
1194 <script src="scripts/docstrap.lib.js"></script>
1195 <script src="scripts/toc.js"></script>
1197 <script type="text/javascript" src="scripts/fulltext-search-ui.js"></script>
1202 $( "[id*='$']" ).each( function () {
1203 var $this = $( this );
1205 $this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
1208 $( ".tutorial-section pre, .readme-section pre, pre.prettyprint.source" ).each( function () {
1209 var $this = $( this );
1211 var example = $this.find( "code" );
1212 exampleText = example.html();
1213 var lang = /{@lang (.*?)}/.exec( exampleText );
1214 if ( lang && lang[1] ) {
1215 exampleText = exampleText.replace( lang[0], "" );
1216 example.html( exampleText );
1219 var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
1220 lang = langClassMatch ? langClassMatch[1] : "javascript";
1226 .addClass( "sunlight-highlight-" + lang )
1227 .addClass( "linenums" )
1228 .html( example.html() );
1233 Sunlight.highlightAll( {
1236 enableDoclinks : true
1239 $.catchAnchorLinks( {
1243 anchorName : function ( i, heading, prefix ) {
1244 return $( heading ).attr( "id" ) || ( prefix + i );
1246 selectors : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4",
1247 showAndHide : false,
1248 smoothScrolling: true
1251 $( "#main span[id^='toc']" ).addClass( "toc-shim" );
1252 $( '.dropdown-toggle' ).dropdown();
1254 $( "table" ).each( function () {
1255 var $this = $( this );
1256 $this.addClass('table');
1264 <!--Navigation and Symbol Display-->
1267 <!--Google Analytics-->
1271 <script type="text/javascript">
1272 $(document).ready(function() {
1273 SearcherDisplay.init();