It is a project for Bytom Chrome extension JS SDK https://bytom.github.io/Bytom-JS-SDK
Revision | eaab80d0799c01d289ad7e6ada1767a38722fac8 (tree) |
---|---|
Time | 2020-11-03 15:51:29 |
Author | Zhiting Lin <zlin035@uott...> |
Commiter | Zhiting Lin |
update list delay transactions.
@@ -1,6 +1,8 @@ | ||
1 | 1 | import {signTransaction as signJs} from '../utils/transaction/signTransaction'; |
2 | 2 | import { camelize } from '../utils/utils'; |
3 | 3 | import {convertArgument} from '../utils/convertArguement'; |
4 | +import {http} from '../http.js'; | |
5 | + | |
4 | 6 | |
5 | 7 | |
6 | 8 | function transactionSDK(bytom) { |
@@ -48,6 +50,35 @@ transactionSDK.prototype.list = function(address, filter,sort, start, limit) { | ||
48 | 50 | }; |
49 | 51 | |
50 | 52 | /** |
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 | +/** | |
51 | 82 | * Submit a signed transaction to the chain. |
52 | 83 | * |
53 | 84 | * @see https://gist.github.com/HAOYUatHZ/0c7446b8f33e7cddd590256b3824b08f#apiv1btmmerchantsubmit-payment |