@@ -109,12 +109,14 @@ module.exports = function(getRequest, apiKey) {
109
109
* @param {string } address - Transaction address
110
110
* @param {string } startblock - start looking here
111
111
* @param {string } endblock - end looking there
112
+ * @param {string } page - page number to display (default: 1)
113
+ * @param {string } offset - number of results per page (default: 100)
112
114
* @param {string } sort - Sort asc/desc
113
115
* @example
114
116
* var txlist = api.account.txlist('0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae', 1, 'latest', 'asc');
115
117
* @returns {Promise.<object> }
116
118
*/
117
- txlist ( address , startblock , endblock , sort ) {
119
+ txlist ( address , startblock , endblock , page , offset , sort ) {
118
120
const module = 'account' ;
119
121
const action = 'txlist' ;
120
122
@@ -125,13 +127,21 @@ module.exports = function(getRequest, apiKey) {
125
127
if ( ! endblock ) {
126
128
endblock = 'latest' ;
127
129
}
130
+
131
+ if ( ! page ) {
132
+ page = '1' ;
133
+ }
134
+
135
+ if ( ! offset ) {
136
+ offset = '100' ;
137
+ }
128
138
129
139
if ( ! sort ) {
130
140
sort = 'asc' ;
131
141
}
132
142
133
143
var query = querystring . stringify ( {
134
- module, action, startblock, endblock, sort, address, apiKey
144
+ module, action, startblock, endblock, page , offset , sort, address, apiKey
135
145
} ) ;
136
146
137
147
return getRequest ( query ) ;
0 commit comments