nodejs-cryptomus
Version:
A comprehensive Node.js client for the Cryptomus API
30 lines (29 loc) • 1.06 kB
JavaScript
import { CryptomusClient } from './client';
import { PaymentService } from './services/payment';
import { PayoutService } from './services/payout';
import { WebhookService } from './services/webhook';
import { BalanceService } from './services/balance';
import { CurrencyService } from './services/currency';
/**
* Cryptomus API client
*/
export class Cryptomus {
/**
* Create a new Cryptomus API client
*
* @param options - Configuration options
*/
constructor(options) {
this.client = new CryptomusClient(options);
this.payment = new PaymentService(this.client);
this.payout = new PayoutService(this.client);
this.paymentWebhook = new WebhookService(options.paymentKey);
this.payoutWebhook = new WebhookService(options.payoutKey || '');
this.balance = new BalanceService(this.client);
this.currency = new CurrencyService(this.client);
}
}
// Export all types and functions
export * from './types';
export * from './utils/signature';
export * from './utils/helpers';