Skip to content
This repository was archived by the owner on Dec 26, 2024. It is now read-only.

Commit 658dcce

Browse files
committed
Fixing token bundling
1 parent 54115c0 commit 658dcce

1 file changed

Lines changed: 16 additions & 13 deletions

File tree

lib/init.js

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
"use strict";
2-
const log = require('./log');
3-
const proxy = require('./proxy');
4-
const stats = require('./stats');
5-
const block = require('./block');
6-
const transaction = require('./transaction');
7-
const contract = require('./contract');
8-
const account = require('./account');
2+
const log = require("./log");
3+
const proxy = require("./proxy");
4+
const stats = require("./stats");
5+
const block = require("./block");
6+
const transaction = require("./transaction");
7+
const contract = require("./contract");
8+
const account = require("./account");
9+
const token = require("./token");
910
/**
1011
* @module etherscan/api
1112
*/
@@ -15,18 +16,16 @@ const account = require('./account');
1516
* @param {string} chain - (optional) Testnet chain keys [ropsten, rinkeby, kovan]
1617
* @param {number} timeout - (optional) Timeout in milliseconds for requests, default 10000
1718
*/
18-
module.exports = function(apiKey, chain, timeout) {
19-
19+
module.exports = function (apiKey, chain, timeout) {
2020
if (!apiKey) {
21-
apiKey = 'YourApiKeyToken';
21+
apiKey = "YourApiKeyToken";
2222
}
2323

24-
2524
if (!timeout) {
2625
timeout = 10000;
2726
}
2827

29-
var getRequest = require('./get-request')(chain, timeout);
28+
var getRequest = require("./get-request")(chain, timeout);
3029

3130
/** @lends module:etherscan/api */
3231
return {
@@ -57,6 +56,10 @@ module.exports = function(apiKey, chain, timeout) {
5756
/**
5857
* @namespace
5958
*/
60-
account: account(getRequest, apiKey)
59+
account: account(getRequest, apiKey),
60+
/**
61+
* @namespace
62+
*/
63+
token: token(getRequest, apiKey),
6164
};
6265
};

0 commit comments

Comments
 (0)