minter-js-sdk
Version:
JS SDK for Minter Blockchain
48 lines (44 loc) • 2.1 kB
JavaScript
'use strict';
var index = require('./api/index.js');
var getNonce = require('./api/get-nonce.js');
var getCoinInfo = require('./api/get-coin-info.js');
var getMinGasPrice = require('./api/get-min-gas-price.js');
var postTx = require('./api/post-tx.js');
var postSignedTx = require('./api/post-signed-tx.js');
var estimateCoinSell = require('./api/estimate-coin-sell.js');
var estimateCoinSellAll = require('./api/estimate-coin-sell-all.js');
var estimateCoinBuy = require('./api/estimate-coin-buy.js');
var estimateTxCommission = require('./api/estimate-tx-commission.js');
var replaceCoin = require('./api/replace-coin.js');
var getCommissionPrice = require('./api/get-commission-price.js');
var getPoolInfo = require('./api/get-pool-info.js');
/**
* @param {object} [options]
* @param {string} [options.apiType]
* @param {string} [options.chainId]
* @param {string} [options.baseURL]
* @constructor
*/
function Minter(options) {
var apiInstance = new index(options);
this.apiInstance = apiInstance;
this.postTx = postTx.default(apiInstance);
this.postSignedTx = postSignedTx(apiInstance);
this.getNonce = getNonce(apiInstance);
this.ensureNonce = postTx.EnsureNonce(apiInstance);
this.getCoinInfo = getCoinInfo(apiInstance);
this.getMinGasPrice = getMinGasPrice(apiInstance);
this.estimateCoinSell = estimateCoinSell(apiInstance);
this.estimateCoinSellAll = estimateCoinSellAll(apiInstance);
this.estimateCoinBuy = estimateCoinBuy(apiInstance);
this.estimateTxCommission = estimateTxCommission.default(apiInstance);
this.replaceCoinSymbol = replaceCoin.ReplaceCoinSymbol(apiInstance);
this.replaceCoinId = replaceCoin.ReplaceCoinId(apiInstance);
this.replaceCoinSymbolByPath = replaceCoin.ReplaceCoinSymbolByPath(apiInstance);
this.replaceCoinIdByPath = replaceCoin.ReplaceCoinIdByPath(apiInstance);
this.getCoinId = replaceCoin.GetCoinId(apiInstance);
this.getCoinSymbol = replaceCoin.GetCoinSymbol(apiInstance);
this.getPoolInfo = getPoolInfo(apiInstance);
this.getCommissionPrice = getCommissionPrice(apiInstance);
}
module.exports = Minter;