UNPKG

@machinemode/cryptopia

Version:

Node wrapper for Cryptopia's CLient API

32 lines 1.16 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var HttpsClient_1 = require("./http/HttpsClient"); var AccountService_1 = require("./account/AccountService"); var MarketService_1 = require("./market/MarketService"); var BASE_URI = 'www.cryptopia.co.nz'; var CryptopiaClient = (function () { function CryptopiaClient(key, secret) { this.httpsClient = new HttpsClient_1.default(BASE_URI, key, secret); this.marketService = new MarketService_1.default(this.httpsClient); if (key && secret) { this.accountService = new AccountService_1.default(this.httpsClient); } } Object.defineProperty(CryptopiaClient.prototype, "market", { get: function () { return this.marketService; }, enumerable: true, configurable: true }); Object.defineProperty(CryptopiaClient.prototype, "account", { get: function () { return this.accountService; }, enumerable: true, configurable: true }); return CryptopiaClient; }()); exports.default = CryptopiaClient; //# sourceMappingURL=CryptopiaClient.js.map