nodejs-cryptomus
Version:
A comprehensive Node.js client for the Cryptomus API
48 lines (47 loc) • 1.96 kB
JavaScript
;
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Cryptomus = void 0;
const client_1 = require("./client");
const payment_1 = require("./services/payment");
const payout_1 = require("./services/payout");
const webhook_1 = require("./services/webhook");
const balance_1 = require("./services/balance");
const currency_1 = require("./services/currency");
/**
* Cryptomus API client
*/
class Cryptomus {
/**
* Create a new Cryptomus API client
*
* @param options - Configuration options
*/
constructor(options) {
this.client = new client_1.CryptomusClient(options);
this.payment = new payment_1.PaymentService(this.client);
this.payout = new payout_1.PayoutService(this.client);
this.paymentWebhook = new webhook_1.WebhookService(options.paymentKey);
this.payoutWebhook = new webhook_1.WebhookService(options.payoutKey || '');
this.balance = new balance_1.BalanceService(this.client);
this.currency = new currency_1.CurrencyService(this.client);
}
}
exports.Cryptomus = Cryptomus;
// Export all types and functions
__exportStar(require("./types"), exports);
__exportStar(require("./utils/signature"), exports);
__exportStar(require("./utils/helpers"), exports);