UNPKG

nodejs-cryptomus

Version:

A comprehensive Node.js client for the Cryptomus API

42 lines (41 loc) 1.19 kB
/** * Currency service for managing currencies and limits */ export class CurrencyService { /** * Create a new currency service * * @param client - Cryptomus API client */ constructor(client) { this.client = client; } /** * Get available currencies with networks for payment * * @returns List of available currencies with networks */ async getPaymentCurrencies() { const response = await this.client.requestPayment('GET', '/payment/currencies'); return response.result; } /** * Get available currencies with networks for payout * * @returns List of available currencies with networks */ async getPayoutCurrencies() { const response = await this.client.requestPayout('GET', '/payout/currencies'); return response.result; } /** * Get payment limits for a specific currency * * @param currency - Currency code * @returns Payment limit information */ async getPaymentLimits(currency) { const response = await this.client.requestPayment('GET', '/payment/limits', { currency }); return response.result; } }