• R/O
  • HTTP
  • SSH
  • HTTPS

bytom-node-sdk: 提交

Node.js SDK for Bytom protocol


Commit MetaInfo

修订版4d454354e6e9c91d2bcf31a2aec36d01ed0dcd30 (tree)
时间2018-05-15 19:34:31
作者Yongfeng LI <wliyongfeng@gmai...>
CommiterYongfeng LI

Log Message

add balances api doc

更改概述

差异

--- a/src/api/balances.js
+++ b/src/api/balances.js
@@ -1,5 +1,40 @@
1+/**
2+ * Any balance on the blockchain is simply a summation of unspent outputs.
3+ *
4+ * @typedef {Object} Balance
5+ * @global
6+ *
7+ * @property {Number} amount
8+ * Sum of the unspent outputs.
9+ *
10+ * @property {String} account_alias
11+ * Account alias.
12+ *
13+ * @property {String} account_id
14+ * Account id.
15+ *
16+ * @property {String} asset_id
17+ * Asset id.
18+ *
19+ * @property {String} asset_alias
20+ * Asset alias.
21+ *
22+ * @property {Object} asset_definition
23+ * Asset definition
24+ */
25+
26+/**
27+ * API for interacting with {@link Balance balances}.
28+ *
29+ * @module BalancesApi
30+ */
131 const balancesApi = (connection) => {
232 return {
33+ /**
34+ * Get all asset balances of all accounts.
35+ *
36+ * @returns {Promise<Array<Balance>>} The result balances.
37+ */
338 list: () => connection.request('/list-balances', {})
439 }
540 }
Show on old repository browser