• R/O
  • HTTP
  • SSH
  • HTTPS

Bytom-JS-SDK: Commit

It is a project for Bytom Chrome extension JS SDK https://bytom.github.io/Bytom-JS-SDK


Commit MetaInfo

Revisioneaab80d0799c01d289ad7e6ada1767a38722fac8 (tree)
Zeit2020-11-03 15:51:29
AutorZhiting Lin <zlin035@uott...>
CommiterZhiting Lin

Log Message

update list delay transactions.

Ändern Zusammenfassung

Diff

--- a/src/sdk/transaction.js
+++ b/src/sdk/transaction.js
@@ -1,6 +1,8 @@
11 import {signTransaction as signJs} from '../utils/transaction/signTransaction';
22 import { camelize } from '../utils/utils';
33 import {convertArgument} from '../utils/convertArguement';
4+import {http} from '../http.js';
5+
46
57
68 function transactionSDK(bytom) {
@@ -48,6 +50,35 @@ transactionSDK.prototype.list = function(address, filter,sort, start, limit) {
4850 };
4951
5052 /**
53+ * List all the transactions related to a wallet or an address.
54+ *
55+ * @see https://gist.github.com/HAOYUatHZ/0c7446b8f33e7cddd590256b3824b08f#apiv1btmmerchantlist-transactions
56+ * @param {String} baseUrl request url,
57+ * @param {String} address transaction address
58+ * @param {Number} start page start
59+ * @param {Number} limit page limit
60+ * @returns {Promise}
61+ */
62+transactionSDK.prototype.listDelayTransaction = function(baseUrl, address, start, limit) {
63+ const _http = new http(baseUrl)
64+ let pm = {};
65+
66+ let path = '/lingerdesire/v1/list-delay-transfers';
67+ let args = new URLSearchParams();
68+ if (typeof start !== 'undefined') {
69+ args.append('start', start);
70+ }
71+ if (limit) {
72+ args.append('limit', limit);
73+ }
74+ if (address) {
75+ args.append('address', address);
76+ }
77+ path = path + '?' + args.toString();
78+ return _http.request(path, pm);
79+};
80+
81+/**
5182 * Submit a signed transaction to the chain.
5283 *
5384 * @see https://gist.github.com/HAOYUatHZ/0c7446b8f33e7cddd590256b3824b08f#apiv1btmmerchantsubmit-payment
Show on old repository browser