UNPKG

@cranberry-money/shared-services

Version:

Platform-agnostic API services with pure functions and dependency injection. Includes auth, portfolios, assets, countries, sectors, and more.

13 lines 597 B
import { getChainName } from '@cranberry-money/shared-constants'; export const getWalletHoldings = (apiClient, uuid, params) => apiClient.get(`/api/wallets/${uuid}/holdings/`, { params }); export const fetchBatchBalances = async (apiClient, addresses, chain = 'ETH') => { if (addresses.length > 20) { throw new Error('Maximum 20 addresses allowed per request'); } const response = await apiClient.post('/api/wallets/batch-check-balances/', { addresses, chain: getChainName(chain), }); return response.data; }; //# sourceMappingURL=wallet-balances.js.map