@w3payments/common 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../src/services/payment-method.ts","../src/services/currency.ts","../src/services/network.ts","../src/utils/theme.ts","../src/data/currencies.ts","../src/data/networks.ts","../src/icons/currency.ts","../src/icons/exchange.ts","../src/icons/fiat.ts"],"sourcesContent":["/**\n * Payment Method Service\n *\n * Registration and lookup service for vendor payment methods.\n */\n\nimport type {\n PaymentMethod,\n CryptoPaymentMethod,\n FiatPaymentMethod,\n} from '@/types/payment-method';\n\n/**\n * Payment method service for managing payment method registration and lookup\n */\nexport class PaymentMethodService {\n private static instance: PaymentMethodService;\n private paymentMethods = new Map<string, PaymentMethod>();\n\n private constructor() {}\n\n public static getInstance(): PaymentMethodService {\n if (!PaymentMethodService.instance) {\n PaymentMethodService.instance = new PaymentMethodService();\n }\n return PaymentMethodService.instance;\n }\n\n /**\n * Register a new payment method\n */\n public register(method: PaymentMethod): void {\n this.paymentMethods.set(method.id, method);\n }\n\n /**\n * Register multiple payment methods\n */\n public registerMany(methods: PaymentMethod[]): void {\n methods.forEach(method => this.register(method));\n }\n\n /**\n * Get payment method by ID\n */\n public getPaymentMethod(id: string): PaymentMethod | undefined {\n return this.paymentMethods.get(id);\n }\n\n /**\n * Get all registered payment methods\n */\n public getAllPaymentMethods(): PaymentMethod[] {\n return Array.from(this.paymentMethods.values());\n }\n\n /**\n * Check if payment method exists\n */\n public hasPaymentMethod(id: string): boolean {\n return this.paymentMethods.has(id);\n }\n\n /**\n * Get payment methods by vendor\n */\n public getByVendor(vendorId: string): PaymentMethod[] {\n return this.getAllPaymentMethods().filter(\n method => method.vendorId === vendorId\n );\n }\n\n /**\n * Get payment methods by method type (ach, wallet, exchange)\n */\n public getByMethod(methodType: string): PaymentMethod[] {\n return this.getAllPaymentMethods().filter(\n method => method.method === methodType\n );\n }\n\n /**\n * Get payment methods by type (fiat or crypto)\n */\n public getByType(type: 'fiat' | 'crypto'): PaymentMethod[] {\n return this.getAllPaymentMethods().filter(method => method.type === type);\n }\n\n /**\n * Get fiat payment methods only\n */\n public getFiatPaymentMethods(): FiatPaymentMethod[] {\n return this.getAllPaymentMethods().filter(\n (method): method is FiatPaymentMethod => method.type === 'fiat'\n );\n }\n\n /**\n * Get crypto payment methods only\n */\n public getCryptoPaymentMethods(): CryptoPaymentMethod[] {\n return this.getAllPaymentMethods().filter(\n (method): method is CryptoPaymentMethod => method.type === 'crypto'\n );\n }\n\n /**\n * Get payment methods by currency\n */\n public getByCurrency(currencyCode: string): PaymentMethod[] {\n return this.getAllPaymentMethods().filter(method =>\n method.supportedCurrencies.includes(currencyCode)\n );\n }\n\n /**\n * Get crypto payment methods by network\n */\n public getByNetwork(networkId: string): CryptoPaymentMethod[] {\n return this.getCryptoPaymentMethods().filter(\n method => method.network === networkId\n );\n }\n\n /**\n * Get crypto payment methods by network and currency combination\n */\n public getByNetworkAndCurrency(\n networkId: string,\n currencyCode: string\n ): CryptoPaymentMethod[] {\n return this.getCryptoPaymentMethods().filter(\n method => method.network === networkId && method.currency === currencyCode\n );\n }\n\n /**\n * Get payment methods by region\n */\n public getByRegion(region: string): PaymentMethod[] {\n return this.getAllPaymentMethods().filter(\n method =>\n !method.regions ||\n method.regions.length === 0 ||\n method.regions.includes(region)\n );\n }\n\n /**\n * Get active payment methods only\n */\n public getActive(): PaymentMethod[] {\n return this.getAllPaymentMethods().filter(method => method.isActive);\n }\n\n /**\n * Get available payment methods for currency and region\n */\n public getAvailableFor(\n currencyCode: string,\n region?: string\n ): PaymentMethod[] {\n const methods = this.getByCurrency(currencyCode).filter(\n method => method.isActive\n );\n\n if (region) {\n return methods.filter(\n method =>\n !method.regions ||\n method.regions.length === 0 ||\n method.regions.includes(region)\n );\n }\n\n return methods;\n }\n\n /**\n * Search payment methods by name or description\n */\n public searchPaymentMethods(query: string): PaymentMethod[] {\n const lowerQuery = query.toLowerCase();\n return this.getAllPaymentMethods().filter(\n method =>\n method.name.toLowerCase().includes(lowerQuery) ||\n method.description?.toLowerCase().includes(lowerQuery)\n );\n }\n\n /**\n * Get wallet payment methods with optional currency and target filters\n */\n public getWalletMethods(filters?: {\n currencies?: string[];\n targetCurrency?: string;\n targetNetwork?: string;\n }): CryptoPaymentMethod[] {\n const walletMethods = this.getCryptoPaymentMethods().filter(\n method => method.method === 'wallet'\n );\n\n console.log('getWalletMethods: All wallet methods:', walletMethods.length);\n console.log('getWalletMethods: Filters:', filters);\n\n if (!filters) return walletMethods;\n\n const filtered = walletMethods.filter(method => {\n const currencyMatches =\n !filters.currencies?.length ||\n filters.currencies.some(\n curr => method.currency.toLowerCase() === curr.toLowerCase()\n );\n\n const targetMatches =\n (!filters.targetCurrency ||\n method.currency.toLowerCase() ===\n filters.targetCurrency.toLowerCase()) &&\n (!filters.targetNetwork ||\n method.network.toLowerCase() === filters.targetNetwork.toLowerCase());\n\n const matches = currencyMatches && targetMatches;\n\n console.log(\n `getWalletMethods: Method ${method.currency}/${method.network} - currencyMatches: ${currencyMatches}, targetMatches: ${targetMatches}, overall: ${matches}`\n );\n\n return matches;\n });\n\n console.log('getWalletMethods: Filtered result:', filtered.length);\n return filtered;\n }\n\n /**\n * Get exchange payment methods with optional exchange and target filters\n */\n public getExchangeMethods(filters?: {\n exchanges?: string[];\n targetCurrency?: string;\n }): CryptoPaymentMethod[] {\n const exchangeMethods = this.getCryptoPaymentMethods().filter(\n method => method.method === 'exchange'\n );\n\n if (!filters) return exchangeMethods;\n\n return exchangeMethods.filter(method => {\n const exchangeMatches =\n !filters.exchanges?.length ||\n filters.exchanges.some(exchange =>\n method.name.toLowerCase().includes(exchange.toLowerCase())\n );\n\n const targetMatches =\n !filters.targetCurrency ||\n method.currency.toLowerCase() === filters.targetCurrency.toLowerCase();\n\n return exchangeMatches && targetMatches;\n });\n }\n\n /**\n * Get fiat payment methods with optional method type filter\n */\n public getFiatMethods(filters?: { methods?: string[] }): FiatPaymentMethod[] {\n const fiatMethods = this.getFiatPaymentMethods();\n\n if (!filters?.methods?.length) return fiatMethods;\n\n return fiatMethods.filter(method =>\n filters.methods!.some(\n fiat => method.method.toLowerCase() === fiat.toLowerCase()\n )\n );\n }\n\n /**\n * Get simple display options from filter values\n */\n public getDisplayOptions(filters?: {\n walletFilter?: string[];\n exchangeFilter?: string[];\n fiatFilter?: string[];\n targetCurrency?: string;\n targetNetwork?: string;\n }): Array<{\n id: string;\n displayName: string;\n method: string;\n }> {\n const result: Array<{\n id: string;\n displayName: string;\n method: string;\n }> = [];\n\n // Add wallet options from filter (check if they support target currency/network)\n console.log(\n 'getDisplayOptions: Processing walletFilter:',\n filters?.walletFilter\n );\n filters?.walletFilter?.forEach(currency => {\n console.log(`getDisplayOptions: Processing wallet currency: ${currency}`);\n const walletMethods = this.getWalletMethods({\n currencies: [currency],\n targetCurrency: filters.targetCurrency,\n targetNetwork: filters.targetNetwork,\n });\n\n console.log(\n `getDisplayOptions: Found ${walletMethods.length} wallet methods for ${currency}`\n );\n if (walletMethods.length > 0) {\n result.push({\n id: `wallet-${currency.toLowerCase()}`,\n displayName: currency,\n method: 'wallet',\n });\n console.log(`getDisplayOptions: Added wallet option for ${currency}`);\n }\n });\n\n // Add exchange options from filter (check if they support target currency)\n filters?.exchangeFilter?.forEach(exchange => {\n const exchangeMethods = this.getExchangeMethods({\n exchanges: [exchange],\n targetCurrency: filters.targetCurrency,\n });\n\n if (exchangeMethods.length > 0) {\n result.push({\n id: `exchange-${exchange.toLowerCase()}`,\n displayName: exchange,\n method: 'exchange',\n });\n }\n });\n\n // Add fiat options from filter (check if methods exist)\n filters?.fiatFilter?.forEach(fiatMethod => {\n const fiatMethods = this.getFiatMethods({\n methods: [fiatMethod],\n });\n\n if (fiatMethods.length > 0) {\n result.push({\n id: `fiat-${fiatMethod.toLowerCase()}`,\n displayName: fiatMethod,\n method: 'fiat',\n });\n }\n });\n\n return result;\n }\n\n /**\n * Clear all payment methods (useful for testing)\n */\n public clear(): void {\n this.paymentMethods.clear();\n }\n}\n\n/**\n * Default payment method service instance\n */\nexport const paymentMethodService = PaymentMethodService.getInstance();\n\n/**\n * Convenience functions for common operations\n */\nexport const getPaymentMethod = (id: string) =>\n paymentMethodService.getPaymentMethod(id);\nexport const getByVendor = (vendorId: string) =>\n paymentMethodService.getByVendor(vendorId);\nexport const getByMethod = (method: string) =>\n paymentMethodService.getByMethod(method);\nexport const getByType = (type: 'fiat' | 'crypto') =>\n paymentMethodService.getByType(type);\nexport const getByCurrency = (currency: string) =>\n paymentMethodService.getByCurrency(currency);\nexport const getByNetwork = (network: string) =>\n paymentMethodService.getByNetwork(network);\nexport const getByNetworkAndCurrency = (network: string, currency: string) =>\n paymentMethodService.getByNetworkAndCurrency(network, currency);\nexport const getAvailableFor = (currency: string, region?: string) =>\n paymentMethodService.getAvailableFor(currency, region);\nexport const searchPaymentMethods = (query: string) =>\n paymentMethodService.searchPaymentMethods(query);\nexport const getWalletMethods = (\n filters?: Parameters<typeof paymentMethodService.getWalletMethods>[0]\n) => paymentMethodService.getWalletMethods(filters);\nexport const getExchangeMethods = (\n filters?: Parameters<typeof paymentMethodService.getExchangeMethods>[0]\n) => paymentMethodService.getExchangeMethods(filters);\nexport const getFiatMethods = (\n filters?: Parameters<typeof paymentMethodService.getFiatMethods>[0]\n) => paymentMethodService.getFiatMethods(filters);\n","/**\n * Currency Service\n *\n * Registration and lookup service for currencies with type-safe operations.\n */\n\nimport type { Currency, CryptoCurrency, FiatCurrency } from '@/types/currency';\nimport type { Environment } from '@/types/environment';\n\n/**\n * Currency service for managing currency registration and lookup\n */\nexport class CurrencyService {\n private static instance: CurrencyService;\n private currencies = new Map<string, Currency>();\n private supportedCurrencies = {\n sandbox: new Set<string>(),\n production: new Set<string>(),\n };\n\n private constructor() {}\n\n public static getInstance(): CurrencyService {\n if (!CurrencyService.instance) {\n CurrencyService.instance = new CurrencyService();\n }\n return CurrencyService.instance;\n }\n\n /**\n * Register a new currency\n */\n public register(currency: Currency): void {\n this.currencies.set(currency.code, currency);\n }\n\n /**\n * Register multiple currencies\n */\n public registerMany(currencies: Currency[]): void {\n currencies.forEach(currency => this.register(currency));\n }\n\n /**\n * Get currency by code\n */\n public getCurrency(code: string): Currency | undefined {\n return this.currencies.get(code);\n }\n\n /**\n * Get all registered currencies\n */\n public getAllCurrencies(): Currency[] {\n return Array.from(this.currencies.values());\n }\n\n /**\n * Check if currency exists\n */\n public hasCurrency(code: string): boolean {\n return this.currencies.has(code);\n }\n\n /**\n * Get currency icon URL\n */\n public getCurrencyIcon(code: string): string {\n const currency = this.getCurrency(code);\n return currency?.iconUrl || '';\n }\n\n /**\n * Get cryptocurrencies only\n */\n public getCryptoCurrencies(): CryptoCurrency[] {\n return this.getAllCurrencies().filter(\n (currency): currency is CryptoCurrency => currency.type === 'crypto'\n );\n }\n\n /**\n * Get fiat currencies only\n */\n public getFiatCurrencies(): FiatCurrency[] {\n return this.getAllCurrencies().filter(\n (currency): currency is FiatCurrency => currency.type === 'fiat'\n );\n }\n\n /**\n * Get stablecoins only\n */\n public getStablecoins(): CryptoCurrency[] {\n return this.getCryptoCurrencies().filter(currency => currency.isStablecoin);\n }\n\n /**\n * Get currencies by network\n */\n public getCurrenciesByNetwork(networkId: string): CryptoCurrency[] {\n return this.getCryptoCurrencies().filter(\n currency => currency.network === networkId\n );\n }\n\n /**\n * Search currencies by code or name\n */\n public searchCurrencies(query: string): Currency[] {\n const lowerQuery = query.toLowerCase();\n return this.getAllCurrencies().filter(\n currency =>\n currency.code.toLowerCase().includes(lowerQuery) ||\n currency.name.toLowerCase().includes(lowerQuery)\n );\n }\n\n /**\n * Add currency to supported list for environment\n */\n public addSupportedCurrency(code: string, environment: Environment): void {\n this.supportedCurrencies[environment].add(code);\n }\n\n /**\n * Get supported currencies for environment\n */\n public getSupportedCurrencies(environment: Environment): string[] {\n return Array.from(this.supportedCurrencies[environment]);\n }\n\n /**\n * Check if currency is supported in environment\n */\n public isCurrencySupported(code: string, environment: Environment): boolean {\n return this.supportedCurrencies[environment].has(code);\n }\n\n /**\n * Clear all currencies (useful for testing)\n */\n public clear(): void {\n this.currencies.clear();\n this.supportedCurrencies.sandbox.clear();\n this.supportedCurrencies.production.clear();\n }\n}\n\n/**\n * Default currency service instance\n */\nexport const currencyService = CurrencyService.getInstance();\n\n/**\n * Convenience functions\n */\nexport const getCurrency = (code: string) => currencyService.getCurrency(code);\nexport const getCurrencyIcon = (code: string) =>\n currencyService.getCurrencyIcon(code);\nexport const getCryptoCurrencies = () => currencyService.getCryptoCurrencies();\nexport const getFiatCurrencies = () => currencyService.getFiatCurrencies();\nexport const getStablecoins = () => currencyService.getStablecoins();\nexport const searchCurrencies = (query: string) =>\n currencyService.searchCurrencies(query);\nexport const getSupportedCurrencies = (env: Environment) =>\n currencyService.getSupportedCurrencies(env);\nexport const isCurrencySupported = (code: string, env: Environment) =>\n currencyService.isCurrencySupported(code, env);\n","/**\n * Network Service\n *\n * Registration and lookup service for blockchain networks.\n */\n\nimport type { Network } from '@/types/network';\n\n/**\n * Network service for managing blockchain network registration and lookup\n */\nexport class NetworkService {\n private static instance: NetworkService;\n private networks = new Map<string, Network>();\n\n private constructor() {}\n\n public static getInstance(): NetworkService {\n if (!NetworkService.instance) {\n NetworkService.instance = new NetworkService();\n }\n return NetworkService.instance;\n }\n\n /**\n * Register a new network\n */\n public register(network: Network): void {\n this.networks.set(network.id, network);\n }\n\n /**\n * Register multiple networks\n */\n public registerMany(networks: Network[]): void {\n networks.forEach(network => this.register(network));\n }\n\n /**\n * Get network by ID\n */\n public getNetwork(id: string): Network | undefined {\n return this.networks.get(id);\n }\n\n /**\n * Get all registered networks\n */\n public getAllNetworks(): Network[] {\n return Array.from(this.networks.values());\n }\n\n /**\n * Check if network exists\n */\n public hasNetwork(id: string): boolean {\n return this.networks.has(id);\n }\n\n /**\n * Get mainnet networks only\n */\n public getMainnetNetworks(): Network[] {\n return this.getAllNetworks().filter(network => !network.isTestnet);\n }\n\n /**\n * Get testnet networks only\n */\n public getTestnetNetworks(): Network[] {\n return this.getAllNetworks().filter(network => network.isTestnet);\n }\n\n /**\n * Clear all networks (useful for testing)\n */\n public clear(): void {\n this.networks.clear();\n }\n}\n\n/**\n * Default network service instance\n */\nexport const networkService = NetworkService.getInstance();\n\n/**\n * Convenience functions\n */\nexport const getNetwork = (id: string) => networkService.getNetwork(id);\nexport const getAllNetworks = () => networkService.getAllNetworks();\nexport const getMainnetNetworks = () => networkService.getMainnetNetworks();\nexport const getTestnetNetworks = () => networkService.getTestnetNetworks();\n","/**\n * W3 Payments Theme Utilities\n *\n * Functions for applying themes and converting theme objects to CSS variables\n */\n\nimport type {\n W3Theme,\n W3ThemeInput,\n W3ThemeVariables,\n CSSStyleProperties,\n} from '@/types/theme';\n\n/**\n * Convert camelCase to kebab-case\n */\nfunction camelToKebab(str: string): string {\n return str.replace(/[A-Z]/g, letter => `-${letter.toLowerCase()}`);\n}\n\n/**\n * Get default theme variables\n */\nfunction getDefaultVariables(): W3ThemeVariables {\n return {\n colorPrimary: '#6366f1',\n colorPrimaryHover: '#4f46e5',\n colorPrimaryLight: '#e0e7ff',\n colorBackground: '#ffffff',\n colorText: '#1f2937',\n colorTextMuted: '#6b7280',\n colorBorder: '#e5e7eb',\n colorBorderLight: '#f3f4f6',\n colorDanger: '#ef4444',\n colorSuccess: '#10b981',\n fontFamily: 'system-ui, -apple-system, sans-serif',\n fontSize: '1rem',\n borderRadius: '0.5rem',\n spacing: '1rem',\n };\n}\n\n/**\n * Get theme preset variables\n */\nfunction getThemePreset(themeName: string): W3ThemeVariables {\n const defaults = getDefaultVariables();\n\n switch (themeName) {\n case 'dark':\n return {\n ...defaults,\n colorPrimary: '#6366f1',\n colorPrimaryHover: '#7c3aed',\n colorPrimaryLight: '#1e1b4b',\n colorBackground: '#111827',\n colorText: '#f9fafb',\n colorTextMuted: '#9ca3af',\n colorBorder: '#374151',\n colorBorderLight: '#4b5563',\n };\n\n case 'light':\n default:\n return defaults;\n }\n}\n\n/**\n * Apply theme to container element\n */\nexport function applyTheme(\n themeInput: W3ThemeInput,\n container: HTMLElement\n): void {\n // Normalize theme input\n const theme: W3Theme =\n typeof themeInput === 'string' ? { theme: themeInput } : themeInput;\n\n // Get base variables from preset\n const baseVariables = getThemePreset(theme.theme ?? 'light');\n\n // Merge with custom variables\n const finalVariables = { ...baseVariables, ...theme.variables };\n\n // Apply CSS variables\n Object.entries(finalVariables).forEach(([key, value]) => {\n if (value !== undefined) {\n // Transform camelCase to CSS custom property: colorPrimary -> --color-primary\n const cssVar = `--${camelToKebab(key)}`;\n container.style.setProperty(cssVar, value);\n }\n });\n\n // Set data attribute for preset-based styling\n if (theme.theme) {\n container.setAttribute('data-theme', theme.theme);\n }\n\n // Apply component rules (inject custom styles)\n if (theme.rules) {\n applyComponentRules(theme.rules);\n }\n}\n\n/**\n * Apply component-level style rules\n */\nfunction applyComponentRules(rules: Record<string, CSSStyleProperties>): void {\n // Create or update style element for component rules\n const styleId = 'w3-theme-rules';\n let styleElement = document.getElementById(styleId) as HTMLStyleElement;\n\n if (!styleElement) {\n styleElement = document.createElement('style');\n styleElement.id = styleId;\n document.head.appendChild(styleElement);\n }\n\n // Generate CSS from rules\n const css = Object.entries(rules)\n .map(([selector, styles]) => {\n const cssProperties = Object.entries(styles)\n .map(([prop, value]) => `${camelToKebab(prop)}: ${value};`)\n .join(' ');\n\n return `.w3-widget ${selector} { ${cssProperties} }`;\n })\n .join('\\n');\n\n styleElement.textContent = css;\n}\n","/**\n * Currency Registry\n */\n\nimport type { Currency, FiatCurrency, CryptoCurrency } from '@/types/currency';\n\nexport const CURRENCIES: Record<string, Currency> = {\n USD: {\n code: 'USD',\n name: 'US Dollar',\n symbol: '$',\n decimals: 2,\n type: 'fiat',\n countryCode: 'US',\n iconUrl:\n 'https://cdn.jsdelivr.net/gh/atomiclabs/cryptocurrency-icons@1a63530be6e374711a8554f31b17e4cb92c25fa5/svg/icon/usd.svg',\n } satisfies FiatCurrency,\n\n BTC: {\n code: 'BTC',\n name: 'Bitcoin',\n symbol: '₿',\n decimals: 8,\n type: 'crypto',\n network: 'bitcoin',\n isStablecoin: false,\n iconUrl:\n 'https://cdn.jsdelivr.net/gh/atomiclabs/cryptocurrency-icons@1a63530be6e374711a8554f31b17e4cb92c25fa5/svg/icon/btc.svg',\n } satisfies CryptoCurrency,\n\n ETH: {\n code: 'ETH',\n name: 'Ethereum',\n symbol: 'Ξ',\n decimals: 18,\n type: 'crypto',\n network: 'ethereum',\n isStablecoin: false,\n iconUrl:\n 'https://cdn.jsdelivr.net/gh/atomiclabs/cryptocurrency-icons@1a63530be6e374711a8554f31b17e4cb92c25fa5/svg/icon/eth.svg',\n } satisfies CryptoCurrency,\n};\n","/**\n * Network Registry\n */\n\nimport type { Network } from '@/types/network';\n\nexport const NETWORKS: Record<string, Network> = {\n bitcoin: {\n id: 'bitcoin',\n name: 'Bitcoin',\n symbol: 'BTC',\n },\n\n ethereum: {\n id: 'ethereum',\n name: 'Ethereum',\n symbol: 'ETH',\n chainId: 1,\n },\n};\n\nexport const getNetwork = (id: string): Network | undefined => NETWORKS[id];\nexport const getAllNetworks = (): Network[] => Object.values(NETWORKS);\n","/**\n * Currency Icons\n */\n\nexport const currencyIcons: Record<string, string> = {\n // Major Cryptocurrencies\n BTC: 'https://cryptologos.cc/logos/bitcoin-btc-logo.svg',\n ETH: 'https://cryptologos.cc/logos/ethereum-eth-logo.svg',\n USDC: 'https://cryptologos.cc/logos/usd-coin-usdc-logo.svg',\n USDT: 'https://cryptologos.cc/logos/tether-usdt-logo.svg',\n DAI: 'https://cryptologos.cc/logos/multi-collateral-dai-dai-logo.svg',\n\n // Layer 1 Networks\n SOL: 'https://cryptologos.cc/logos/solana-sol-logo.svg',\n AVAX: 'https://cryptologos.cc/logos/avalanche-avax-logo.svg',\n MATIC: 'https://cryptologos.cc/logos/polygon-matic-logo.svg',\n BNB: 'https://cryptologos.cc/logos/bnb-bnb-logo.svg',\n\n // DeFi Tokens\n UNI: 'https://cryptologos.cc/logos/uniswap-uni-logo.svg',\n LINK: 'https://cryptologos.cc/logos/chainlink-link-logo.svg',\n AAVE: 'https://cryptologos.cc/logos/aave-aave-logo.svg',\n\n // Layer 2\n ARB: 'https://cryptologos.cc/logos/arbitrum-arb-logo.svg',\n OP: 'https://cryptologos.cc/logos/optimism-ethereum-op-logo.svg',\n\n // Other Popular\n DOGE: 'https://cryptologos.cc/logos/dogecoin-doge-logo.svg',\n XRP: 'https://cryptologos.cc/logos/xrp-xrp-logo.svg',\n ADA: 'https://cryptologos.cc/logos/cardano-ada-logo.svg',\n DOT: 'https://cryptologos.cc/logos/polkadot-new-dot-logo.svg',\n};\n\nexport function getCurrencyIcon(code: string): string | undefined {\n return currencyIcons[code.toUpperCase()];\n}\n","/**\n * Exchange Icons\n */\n\nexport const exchangeIcons: Record<string, string> = {\n // Major Exchanges\n coinbase:\n 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iMTIiIGN5PSIxMiIgcj0iMTAiIGZpbGw9IiMwMDUyRkYiLz4KPHJlY3QgeD0iOSIgeT0iOSIgd2lkdGg9IjYiIGhlaWdodD0iNiIgcng9IjEiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPg==',\n kraken:\n 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iMTIiIGN5PSIxMiIgcj0iMTAiIGZpbGw9IiM1NzQxOUEiLz4KPHBhdGggZD0iTTggN0wxNiA5VjE3TDggMTVWN1oiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPg==',\n binance:\n 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iMTIiIGN5PSIxMiIgcj0iMTAiIGZpbGw9IiNGM0JBMkYiLz4KPHBhdGggZD0iTTEyIDZMMTUgOVYxNUwxMiAxOEw5IDE1VjlMMTIgNloiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPg==',\n\n // Other Exchanges\n gemini: 'https://assets.coincap.io/assets/icons/256/gemini.png',\n kucoin: 'https://assets.coincap.io/assets/icons/256/kucoin.png',\n huobi: 'https://assets.coincap.io/assets/icons/256/huobi.png',\n okx: 'https://assets.coincap.io/assets/icons/256/okx.png',\n gate: 'https://assets.coincap.io/assets/icons/256/gate.png',\n bitfinex: 'https://assets.coincap.io/assets/icons/256/bitfinex.png',\n\n // Alternative sources if needed\n 'coinbase-pro': 'https://assets.coincap.io/assets/icons/256/coinbase.png',\n 'binance-us': 'https://assets.coincap.io/assets/icons/256/binance.png',\n};\n\nexport function getExchangeIcon(exchange: string): string | undefined {\n return exchangeIcons[exchange.toLowerCase()];\n}\n","/**\n * Fiat Payment Method Icons\n */\n\nexport const fiatIcons: Record<string, string> = {\n // Bank Transfer Methods\n ach: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMgN1YxN0gyMVY3SDNaTTQgOEgyMFYxNkg0VjhaTTYgMTBWMTRIOVYxMEg2Wk0xMCAxMFYxMUgxOFYxMEgxMFpNMTAgMTJWMTNIMTVWMTJIMTBaIiBmaWxsPSJjdXJyZW50Q29sb3I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bG9yIi8+Cjwvc3ZnPg==',\n debit:\n 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIwIDRINEMyLjg5IDQgMiA0Ljg5IDIgNlYxOEMyIDE5LjExIDIuODkgMjAgNCAyMEgyMEMyMS4xMSAyMCAyMiAxOS4xMSAyMiAxOFY2QzIyIDQuODkgMjEuMTEgNCAyMCA0Wk0yMCA2VjhINFY2SDIwWk0yMCAxOEg0VjEwSDIwVjE4WiIgZmlsbD0iY3VycmVudENvbG9yIi8+Cjwvc3ZnPg==',\n\n // Digital Wallets\n paypal:\n 'https://cdn.jsdelivr.net/gh/devicons/devicon/icons/paypal/paypal-original.svg',\n applepay:\n 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE4Ljc0IDguNDNDMTguNzQgMTEuNTQgMTUuNzQgMTMgMTIuNzQgMTNIMTBWMjBINlYzSDEyLjc0QzE1Ljc0IDMgMTguNzQgNC40NiAxOC43NCA4LjQzWk0xNC41IDguNDNDMTQuNSA2LjY3IDEzLjU5IDUuNzUgMTEuOTggNS43NUgxMFYxMS4yNUgxMS45OEMxMy41OSAxMS4yNSAxNC41IDEwLjMzIDE0LjUgOC40M1oiIGZpbGw9ImN1cnJlbnRDb2xvciIvPgo8L3N2Zz4K',\n googlepay:\n 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3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AO,aAAa;AACvC;"}
package/package.json ADDED
@@ -0,0 +1,78 @@
1
+ {
2
+ "name": "@w3payments/common",
3
+ "version": "1.1.0",
4
+ "description": "Shared types, utilities, and constants for W3 Payments ecosystem",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "module": "dist/index.mjs",
8
+ "types": "dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.mjs",
13
+ "require": "./dist/index.js"
14
+ },
15
+ "./types": {
16
+ "types": "./dist/types/index.d.ts",
17
+ "import": "./dist/types/index.mjs",
18
+ "require": "./dist/types/index.js"
19
+ },
20
+ "./utils": {
21
+ "types": "./dist/utils/index.d.ts",
22
+ "import": "./dist/utils/index.mjs",
23
+ "require": "./dist/utils/index.js"
24
+ },
25
+ "./constants": {
26
+ "types": "./dist/constants/index.d.ts",
27
+ "import": "./dist/constants/index.mjs",
28
+ "require": "./dist/constants/index.js"
29
+ },
30
+ "./services": {
31
+ "types": "./dist/services/index.d.ts",
32
+ "import": "./dist/services/index.mjs",
33
+ "require": "./dist/services/index.js"
34
+ }
35
+ },
36
+ "files": [
37
+ "dist"
38
+ ],
39
+ "author": "W3 Payments Team",
40
+ "license": "MIT",
41
+ "repository": {
42
+ "type": "git",
43
+ "url": "git+https://github.com/w3-io/payments-platform.git",
44
+ "directory": "packages/common"
45
+ },
46
+ "homepage": "https://github.com/w3-io/payments-platform#readme",
47
+ "bugs": {
48
+ "url": "https://github.com/w3-io/payments-platform/issues"
49
+ },
50
+ "keywords": [
51
+ "types",
52
+ "utilities",
53
+ "web3",
54
+ "payments",
55
+ "cryptocurrency",
56
+ "typescript",
57
+ "constants",
58
+ "shared"
59
+ ],
60
+ "publishConfig": {
61
+ "access": "public",
62
+ "registry": "https://registry.npmjs.org/"
63
+ },
64
+ "sideEffects": false,
65
+ "dependencies": {},
66
+ "devDependencies": {
67
+ "@types/node": "^24.10.3",
68
+ "typescript": "~5.9.3",
69
+ "vite": "^7.2.7",
70
+ "vite-plugin-dts": "^4.5.4"
71
+ },
72
+ "scripts": {
73
+ "build": "tsc -p tsconfig.build.json && vite build",
74
+ "typecheck": "tsc --noEmit",
75
+ "lint": "eslint .",
76
+ "dev": "vite build --watch"
77
+ }
78
+ }