UNPKG

@moneygraph/sdk

Version:

AI-native SDK for global payouts powered by StratosPay

41 lines (40 loc) 2.17 kB
"use strict"; /** * MoneyGraph SDK - Currency Type Definitions * * Strict TypeScript union types for all supported currencies. * Based on StratosPay API documentation. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.CURRENCY_INFO = void 0; exports.isPayInCurrency = isPayInCurrency; exports.isCryptoCurrency = isCryptoCurrency; exports.isPayInFiatCurrency = isPayInFiatCurrency; // ============================================================================= // TYPE GUARDS & UTILITIES // ============================================================================= const PAY_IN_FIAT = ['USD', 'EUR', 'NGN', 'KES', 'UGX', 'RWF', 'TZS', 'GHS', 'MWK', 'XOF', 'XAF']; const CRYPTO = ['USDC', 'USDT', 'ETH', 'BTC', 'TRX', 'DOGE', 'BSC', 'BNB', 'XRP', 'POL', 'SHIBA']; function isPayInCurrency(value) { return PAY_IN_FIAT.includes(value) || CRYPTO.includes(value); } function isCryptoCurrency(value) { return CRYPTO.includes(value); } function isPayInFiatCurrency(value) { return PAY_IN_FIAT.includes(value); } exports.CURRENCY_INFO = { USD: { code: 'USD', name: 'US Dollar', symbol: '$', decimals: 2, isCrypto: false }, EUR: { code: 'EUR', name: 'Euro', symbol: '€', decimals: 2, isCrypto: false }, GBP: { code: 'GBP', name: 'British Pound', symbol: '£', decimals: 2, isCrypto: false }, NGN: { code: 'NGN', name: 'Nigerian Naira', symbol: '₦', decimals: 2, isCrypto: false }, KES: { code: 'KES', name: 'Kenyan Shilling', symbol: 'KSh', decimals: 2, isCrypto: false }, JPY: { code: 'JPY', name: 'Japanese Yen', symbol: '¥', decimals: 0, isCrypto: false }, CNY: { code: 'CNY', name: 'Chinese Yuan', symbol: '¥', decimals: 2, isCrypto: false }, INR: { code: 'INR', name: 'Indian Rupee', symbol: '₹', decimals: 2, isCrypto: false }, USDC: { code: 'USDC', name: 'USD Coin', symbol: 'USDC', decimals: 6, isCrypto: true }, USDT: { code: 'USDT', name: 'Tether', symbol: 'USDT', decimals: 6, isCrypto: true }, ETH: { code: 'ETH', name: 'Ethereum', symbol: 'ETH', decimals: 18, isCrypto: true }, BTC: { code: 'BTC', name: 'Bitcoin', symbol: 'BTC', decimals: 8, isCrypto: true }, };