UNPKG

nodejs-cryptomus

Version:

A comprehensive Node.js client for the Cryptomus API

32 lines (31 loc) 747 B
/** * Balance service for managing account balances */ export class BalanceService { /** * Create a new balance service * * @param client - Cryptomus API client */ constructor(client) { this.client = client; } /** * Get merchant balance * * @returns Balance information */ async getMerchantBalance() { const response = await this.client.requestPayment('GET', '/balance'); return response.result; } /** * Get business balance (requires payout key) * * @returns Balance information */ async getBusinessBalance() { const response = await this.client.requestPayout('GET', '/balance'); return response.result; } }