UNPKG

nodejs-cryptomus

Version:

A comprehensive Node.js client for the Cryptomus API

46 lines (45 loc) 1.34 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CurrencyService = void 0; /** * Currency service for managing currencies and limits */ 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; } } exports.CurrencyService = CurrencyService;