@w3payments/common 1.1.0 → 1.1.1
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.
- package/dist/index.d.ts +38 -0
- package/dist/index.js +57 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +58 -16
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -269,6 +269,34 @@ export declare type FiatPaymentMethod = BasePaymentMethod & {
|
|
|
269
269
|
method: 'ach';
|
|
270
270
|
};
|
|
271
271
|
|
|
272
|
+
/**
|
|
273
|
+
* Format a value for display with currency symbol
|
|
274
|
+
*/
|
|
275
|
+
export declare function formatCurrencyDisplay(value: string | number, currency: Currency): string;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Currency-aware formatting utilities
|
|
279
|
+
*/
|
|
280
|
+
/**
|
|
281
|
+
* Format a value according to currency specifications
|
|
282
|
+
*/
|
|
283
|
+
export declare function formatCurrencyValue(value: string | number, currency: Currency): string;
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Format a number with specific decimal places (no thousand separators)
|
|
287
|
+
*/
|
|
288
|
+
export declare function formatNumber(value: string | number, decimals: number): string;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Format a number for display with thousand separators
|
|
292
|
+
*/
|
|
293
|
+
export declare function formatNumberDisplay(value: string | number, decimals: number): string;
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Format USD amount
|
|
297
|
+
*/
|
|
298
|
+
export declare function formatUSD(value: number): string;
|
|
299
|
+
|
|
272
300
|
export declare function getCurrencyIcon(code: string): string | undefined;
|
|
273
301
|
|
|
274
302
|
export declare function getExchangeIcon(exchange: string): string | undefined;
|
|
@@ -550,6 +578,16 @@ export declare interface PaymentResult {
|
|
|
550
578
|
*/
|
|
551
579
|
export declare type PaymentStatus = 'pending' | 'processing' | 'completed' | 'failed' | 'cancelled';
|
|
552
580
|
|
|
581
|
+
/**
|
|
582
|
+
* Truncate value to currency's maximum decimal places
|
|
583
|
+
*/
|
|
584
|
+
export declare function truncateToCurrencyDecimals(value: string, currency: Currency): string;
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* Validate decimal places for currency input
|
|
588
|
+
*/
|
|
589
|
+
export declare function validateCurrencyDecimals(value: string, currency: Currency): boolean;
|
|
590
|
+
|
|
553
591
|
/**
|
|
554
592
|
* Standard vendor adapter interface
|
|
555
593
|
*/
|
package/dist/index.js
CHANGED
|
@@ -147,8 +147,6 @@ class PaymentMethodService {
|
|
|
147
147
|
const walletMethods = this.getCryptoPaymentMethods().filter(
|
|
148
148
|
(method) => method.method === "wallet"
|
|
149
149
|
);
|
|
150
|
-
console.log("getWalletMethods: All wallet methods:", walletMethods.length);
|
|
151
|
-
console.log("getWalletMethods: Filters:", filters);
|
|
152
150
|
if (!filters) return walletMethods;
|
|
153
151
|
const filtered = walletMethods.filter((method) => {
|
|
154
152
|
const currencyMatches = !filters.currencies?.length || filters.currencies.some(
|
|
@@ -156,12 +154,8 @@ class PaymentMethodService {
|
|
|
156
154
|
);
|
|
157
155
|
const targetMatches = (!filters.targetCurrency || method.currency.toLowerCase() === filters.targetCurrency.toLowerCase()) && (!filters.targetNetwork || method.network.toLowerCase() === filters.targetNetwork.toLowerCase());
|
|
158
156
|
const matches = currencyMatches && targetMatches;
|
|
159
|
-
console.log(
|
|
160
|
-
`getWalletMethods: Method ${method.currency}/${method.network} - currencyMatches: ${currencyMatches}, targetMatches: ${targetMatches}, overall: ${matches}`
|
|
161
|
-
);
|
|
162
157
|
return matches;
|
|
163
158
|
});
|
|
164
|
-
console.log("getWalletMethods: Filtered result:", filtered.length);
|
|
165
159
|
return filtered;
|
|
166
160
|
}
|
|
167
161
|
/**
|
|
@@ -197,27 +191,18 @@ class PaymentMethodService {
|
|
|
197
191
|
*/
|
|
198
192
|
getDisplayOptions(filters) {
|
|
199
193
|
const result = [];
|
|
200
|
-
console.log(
|
|
201
|
-
"getDisplayOptions: Processing walletFilter:",
|
|
202
|
-
filters?.walletFilter
|
|
203
|
-
);
|
|
204
194
|
filters?.walletFilter?.forEach((currency) => {
|
|
205
|
-
console.log(`getDisplayOptions: Processing wallet currency: ${currency}`);
|
|
206
195
|
const walletMethods = this.getWalletMethods({
|
|
207
196
|
currencies: [currency],
|
|
208
197
|
targetCurrency: filters.targetCurrency,
|
|
209
198
|
targetNetwork: filters.targetNetwork
|
|
210
199
|
});
|
|
211
|
-
console.log(
|
|
212
|
-
`getDisplayOptions: Found ${walletMethods.length} wallet methods for ${currency}`
|
|
213
|
-
);
|
|
214
200
|
if (walletMethods.length > 0) {
|
|
215
201
|
result.push({
|
|
216
202
|
id: `wallet-${currency.toLowerCase()}`,
|
|
217
203
|
displayName: currency,
|
|
218
204
|
method: "wallet"
|
|
219
205
|
});
|
|
220
|
-
console.log(`getDisplayOptions: Added wallet option for ${currency}`);
|
|
221
206
|
}
|
|
222
207
|
});
|
|
223
208
|
filters?.exchangeFilter?.forEach((exchange) => {
|
|
@@ -435,6 +420,56 @@ class NetworkService {
|
|
|
435
420
|
}
|
|
436
421
|
}
|
|
437
422
|
const networkService = NetworkService.getInstance();
|
|
423
|
+
const usdFormatter = new Intl.NumberFormat("en-US", {
|
|
424
|
+
style: "currency",
|
|
425
|
+
currency: "USD"
|
|
426
|
+
});
|
|
427
|
+
const numberFormatters = /* @__PURE__ */ new Map();
|
|
428
|
+
function getNumberFormatter(decimals, useGrouping = false) {
|
|
429
|
+
const key = `${decimals}-${useGrouping}`;
|
|
430
|
+
if (!numberFormatters.has(key)) {
|
|
431
|
+
numberFormatters.set(
|
|
432
|
+
key,
|
|
433
|
+
new Intl.NumberFormat("en-US", {
|
|
434
|
+
minimumFractionDigits: decimals,
|
|
435
|
+
maximumFractionDigits: decimals,
|
|
436
|
+
useGrouping
|
|
437
|
+
})
|
|
438
|
+
);
|
|
439
|
+
}
|
|
440
|
+
return numberFormatters.get(key);
|
|
441
|
+
}
|
|
442
|
+
function formatNumber(value, decimals) {
|
|
443
|
+
const num = typeof value === "string" ? parseFloat(value) : value;
|
|
444
|
+
if (isNaN(num)) return "";
|
|
445
|
+
return getNumberFormatter(decimals, false).format(num);
|
|
446
|
+
}
|
|
447
|
+
function formatNumberDisplay(value, decimals) {
|
|
448
|
+
const num = typeof value === "string" ? parseFloat(value) : value;
|
|
449
|
+
if (isNaN(num)) return "";
|
|
450
|
+
return getNumberFormatter(decimals, true).format(num);
|
|
451
|
+
}
|
|
452
|
+
function formatUSD(value) {
|
|
453
|
+
return usdFormatter.format(value);
|
|
454
|
+
}
|
|
455
|
+
function formatCurrencyValue(value, currency) {
|
|
456
|
+
return formatNumber(value, currency.decimals);
|
|
457
|
+
}
|
|
458
|
+
function formatCurrencyDisplay(value, currency) {
|
|
459
|
+
const formatted = formatNumberDisplay(value, currency.decimals);
|
|
460
|
+
return `${currency.symbol}${formatted}`;
|
|
461
|
+
}
|
|
462
|
+
function validateCurrencyDecimals(value, currency) {
|
|
463
|
+
const parts = value.split(".");
|
|
464
|
+
if (parts.length <= 1) return true;
|
|
465
|
+
return parts[1].length <= currency.decimals;
|
|
466
|
+
}
|
|
467
|
+
function truncateToCurrencyDecimals(value, currency) {
|
|
468
|
+
const parts = value.split(".");
|
|
469
|
+
if (parts.length <= 1) return value;
|
|
470
|
+
const truncatedDecimal = parts[1].substring(0, currency.decimals);
|
|
471
|
+
return truncatedDecimal.length > 0 ? `${parts[0]}.${truncatedDecimal}` : parts[0];
|
|
472
|
+
}
|
|
438
473
|
function camelToKebab(str) {
|
|
439
474
|
return str.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
|
|
440
475
|
}
|
|
@@ -622,9 +657,16 @@ exports.NETWORKS = NETWORKS;
|
|
|
622
657
|
exports.PaymentMethodService = PaymentMethodService;
|
|
623
658
|
exports.applyTheme = applyTheme;
|
|
624
659
|
exports.currencyService = currencyService;
|
|
660
|
+
exports.formatCurrencyDisplay = formatCurrencyDisplay;
|
|
661
|
+
exports.formatCurrencyValue = formatCurrencyValue;
|
|
662
|
+
exports.formatNumber = formatNumber;
|
|
663
|
+
exports.formatNumberDisplay = formatNumberDisplay;
|
|
664
|
+
exports.formatUSD = formatUSD;
|
|
625
665
|
exports.getCurrencyIcon = getCurrencyIcon;
|
|
626
666
|
exports.getExchangeIcon = getExchangeIcon;
|
|
627
667
|
exports.getFiatIcon = getFiatIcon;
|
|
628
668
|
exports.networkService = networkService;
|
|
629
669
|
exports.paymentMethodService = paymentMethodService;
|
|
670
|
+
exports.truncateToCurrencyDecimals = truncateToCurrencyDecimals;
|
|
671
|
+
exports.validateCurrencyDecimals = validateCurrencyDecimals;
|
|
630
672
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","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,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jQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIwIDRINEMyLjg5IDQgMiA0Ljg5IDIgNlYxOEMyIDE5LjExIDIuODkgMjAgNCAyMEgyMEMyMS4xMSAyMCAyMiAxOS4xMSAyMiAxOFY2QzIyIDQuODkgMjEuMTEgNCAyMCA0Wk0yMCA2VjhINFY2SDIwWk0yMCAxOEg0VjEwSDIwVjE4WiIgZmlsbD0iY3VycmVudENvbG9yIi8+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,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE4Ljc0IDguNDNDMTguNzQgMTEuNTQgMTUuNzQgMTMgMTIuNzQgMTNIMTBWMjBINlYzSDEyLjc0QzE1Ljc0IDMg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AAA;AAAA,EAGV,gBAAgB;AAAA,EAChB,cAAc;AAChB;AAEO,SAAS,gBAAgB,UAAsC;AACpE,SAAO,cAAc,SAAS,aAAa;AAC7C;ACxBO,MAAM,YAAoC;AAAA;AAAA,EAE/C,KAAK;AAAA,EACL,MAAM;AAAA,EACN,MAAM;AAAA;AAAA,EAGN,QACE;AAAA,EACF,OACE;AAAA;AAAA,EAGF,QACE;AAAA,EACF,UACE;AAAA,EACF,WACE;AAAA;AAAA,EAGF,MAAM;AAAA,EACN,OACE;AACJ;AAEO,SAAS,YAAY,QAAoC;AAC9D,SAAO,UAAU,OAAO,aAAa;AACvC;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/services/payment-method.ts","../src/services/currency.ts","../src/services/network.ts","../src/utils/numbers.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 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 return matches;\n });\n\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 filters?.walletFilter?.forEach(currency => {\n const walletMethods = this.getWalletMethods({\n currencies: [currency],\n targetCurrency: filters.targetCurrency,\n targetNetwork: filters.targetNetwork,\n });\n\n if (walletMethods.length > 0) {\n result.push({\n id: `wallet-${currency.toLowerCase()}`,\n displayName: currency,\n method: 'wallet',\n });\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 * Number formatting utilities\n */\n\nimport type { Currency } from '@/types/currency';\n\n// Singleton USD formatter\nconst usdFormatter = new Intl.NumberFormat('en-US', {\n style: 'currency',\n currency: 'USD',\n});\n\n// Cache formatters by decimal places and grouping preference\nconst numberFormatters = new Map<string, Intl.NumberFormat>();\n\nfunction getNumberFormatter(\n decimals: number,\n useGrouping = false\n): Intl.NumberFormat {\n const key = `${decimals}-${useGrouping}`;\n if (!numberFormatters.has(key)) {\n numberFormatters.set(\n key,\n new Intl.NumberFormat('en-US', {\n minimumFractionDigits: decimals,\n maximumFractionDigits: decimals,\n useGrouping,\n })\n );\n }\n return numberFormatters.get(key)!;\n}\n\n/**\n * Format a number with specific decimal places (no thousand separators)\n */\nexport function formatNumber(value: string | number, decimals: number): string {\n const num = typeof value === 'string' ? parseFloat(value) : value;\n if (isNaN(num)) return '';\n\n return getNumberFormatter(decimals, false).format(num);\n}\n\n/**\n * Format a number for display with thousand separators\n */\nexport function formatNumberDisplay(\n value: string | number,\n decimals: number\n): string {\n const num = typeof value === 'string' ? parseFloat(value) : value;\n if (isNaN(num)) return '';\n\n return getNumberFormatter(decimals, true).format(num);\n}\n\n/**\n * Format USD amount\n */\nexport function formatUSD(value: number): string {\n return usdFormatter.format(value);\n}\n\n/**\n * Currency-aware formatting utilities\n */\n\n/**\n * Format a value according to currency specifications\n */\nexport function formatCurrencyValue(\n value: string | number,\n currency: Currency\n): string {\n return formatNumber(value, currency.decimals);\n}\n\n/**\n * Format a value for display with currency symbol\n */\nexport function formatCurrencyDisplay(\n value: string | number,\n currency: Currency\n): string {\n const formatted = formatNumberDisplay(value, currency.decimals);\n return `${currency.symbol}${formatted}`;\n}\n\n/**\n * Validate decimal places for currency input\n */\nexport function validateCurrencyDecimals(\n value: string,\n currency: Currency\n): boolean {\n const parts = value.split('.');\n if (parts.length <= 1) return true; // No decimal part\n return parts[1].length <= currency.decimals;\n}\n\n/**\n * Truncate value to currency's maximum decimal places\n */\nexport function truncateToCurrencyDecimals(\n value: string,\n currency: Currency\n): string {\n const parts = value.split('.');\n if (parts.length <= 1) return value; // No decimal part\n\n const truncatedDecimal = parts[1].substring(0, currency.decimals);\n return truncatedDecimal.length > 0\n ? `${parts[0]}.${truncatedDecimal}`\n : parts[0];\n}\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,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMgN1YxN0gyMVY3SDNaTTQgOEgyMFYxNkg0VjhaTTYgMTBWMTRI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DQuODkgMjEuMTEgNCAyMCA0Wk0yMCA2VjhINFY2SDIwWk0yMCAxOEg0VjEwSDIwVjE4WiIgZmlsbD0iY3VycmVudENvbG9yIi8+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,PHN2ZyB3aWR0aD0iMjQi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
145
|
const walletMethods = this.getCryptoPaymentMethods().filter(
|
|
146
146
|
(method) => method.method === "wallet"
|
|
147
147
|
);
|
|
148
|
-
console.log("getWalletMethods: All wallet methods:", walletMethods.length);
|
|
149
|
-
console.log("getWalletMethods: Filters:", filters);
|
|
150
148
|
if (!filters) return walletMethods;
|
|
151
149
|
const filtered = walletMethods.filter((method) => {
|
|
152
150
|
const currencyMatches = !filters.currencies?.length || filters.currencies.some(
|
|
@@ -154,12 +152,8 @@ class PaymentMethodService {
|
|
|
154
152
|
);
|
|
155
153
|
const targetMatches = (!filters.targetCurrency || method.currency.toLowerCase() === filters.targetCurrency.toLowerCase()) && (!filters.targetNetwork || method.network.toLowerCase() === filters.targetNetwork.toLowerCase());
|
|
156
154
|
const matches = currencyMatches && targetMatches;
|
|
157
|
-
console.log(
|
|
158
|
-
`getWalletMethods: Method ${method.currency}/${method.network} - currencyMatches: ${currencyMatches}, targetMatches: ${targetMatches}, overall: ${matches}`
|
|
159
|
-
);
|
|
160
155
|
return matches;
|
|
161
156
|
});
|
|
162
|
-
console.log("getWalletMethods: Filtered result:", filtered.length);
|
|
163
157
|
return filtered;
|
|
164
158
|
}
|
|
165
159
|
/**
|
|
@@ -195,27 +189,18 @@ class PaymentMethodService {
|
|
|
195
189
|
*/
|
|
196
190
|
getDisplayOptions(filters) {
|
|
197
191
|
const result = [];
|
|
198
|
-
console.log(
|
|
199
|
-
"getDisplayOptions: Processing walletFilter:",
|
|
200
|
-
filters?.walletFilter
|
|
201
|
-
);
|
|
202
192
|
filters?.walletFilter?.forEach((currency) => {
|
|
203
|
-
console.log(`getDisplayOptions: Processing wallet currency: ${currency}`);
|
|
204
193
|
const walletMethods = this.getWalletMethods({
|
|
205
194
|
currencies: [currency],
|
|
206
195
|
targetCurrency: filters.targetCurrency,
|
|
207
196
|
targetNetwork: filters.targetNetwork
|
|
208
197
|
});
|
|
209
|
-
console.log(
|
|
210
|
-
`getDisplayOptions: Found ${walletMethods.length} wallet methods for ${currency}`
|
|
211
|
-
);
|
|
212
198
|
if (walletMethods.length > 0) {
|
|
213
199
|
result.push({
|
|
214
200
|
id: `wallet-${currency.toLowerCase()}`,
|
|
215
201
|
displayName: currency,
|
|
216
202
|
method: "wallet"
|
|
217
203
|
});
|
|
218
|
-
console.log(`getDisplayOptions: Added wallet option for ${currency}`);
|
|
219
204
|
}
|
|
220
205
|
});
|
|
221
206
|
filters?.exchangeFilter?.forEach((exchange) => {
|
|
@@ -433,6 +418,56 @@ class NetworkService {
|
|
|
433
418
|
}
|
|
434
419
|
}
|
|
435
420
|
const networkService = NetworkService.getInstance();
|
|
421
|
+
const usdFormatter = new Intl.NumberFormat("en-US", {
|
|
422
|
+
style: "currency",
|
|
423
|
+
currency: "USD"
|
|
424
|
+
});
|
|
425
|
+
const numberFormatters = /* @__PURE__ */ new Map();
|
|
426
|
+
function getNumberFormatter(decimals, useGrouping = false) {
|
|
427
|
+
const key = `${decimals}-${useGrouping}`;
|
|
428
|
+
if (!numberFormatters.has(key)) {
|
|
429
|
+
numberFormatters.set(
|
|
430
|
+
key,
|
|
431
|
+
new Intl.NumberFormat("en-US", {
|
|
432
|
+
minimumFractionDigits: decimals,
|
|
433
|
+
maximumFractionDigits: decimals,
|
|
434
|
+
useGrouping
|
|
435
|
+
})
|
|
436
|
+
);
|
|
437
|
+
}
|
|
438
|
+
return numberFormatters.get(key);
|
|
439
|
+
}
|
|
440
|
+
function formatNumber(value, decimals) {
|
|
441
|
+
const num = typeof value === "string" ? parseFloat(value) : value;
|
|
442
|
+
if (isNaN(num)) return "";
|
|
443
|
+
return getNumberFormatter(decimals, false).format(num);
|
|
444
|
+
}
|
|
445
|
+
function formatNumberDisplay(value, decimals) {
|
|
446
|
+
const num = typeof value === "string" ? parseFloat(value) : value;
|
|
447
|
+
if (isNaN(num)) return "";
|
|
448
|
+
return getNumberFormatter(decimals, true).format(num);
|
|
449
|
+
}
|
|
450
|
+
function formatUSD(value) {
|
|
451
|
+
return usdFormatter.format(value);
|
|
452
|
+
}
|
|
453
|
+
function formatCurrencyValue(value, currency) {
|
|
454
|
+
return formatNumber(value, currency.decimals);
|
|
455
|
+
}
|
|
456
|
+
function formatCurrencyDisplay(value, currency) {
|
|
457
|
+
const formatted = formatNumberDisplay(value, currency.decimals);
|
|
458
|
+
return `${currency.symbol}${formatted}`;
|
|
459
|
+
}
|
|
460
|
+
function validateCurrencyDecimals(value, currency) {
|
|
461
|
+
const parts = value.split(".");
|
|
462
|
+
if (parts.length <= 1) return true;
|
|
463
|
+
return parts[1].length <= currency.decimals;
|
|
464
|
+
}
|
|
465
|
+
function truncateToCurrencyDecimals(value, currency) {
|
|
466
|
+
const parts = value.split(".");
|
|
467
|
+
if (parts.length <= 1) return value;
|
|
468
|
+
const truncatedDecimal = parts[1].substring(0, currency.decimals);
|
|
469
|
+
return truncatedDecimal.length > 0 ? `${parts[0]}.${truncatedDecimal}` : parts[0];
|
|
470
|
+
}
|
|
436
471
|
function camelToKebab(str) {
|
|
437
472
|
return str.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
|
|
438
473
|
}
|
|
@@ -621,10 +656,17 @@ export {
|
|
|
621
656
|
PaymentMethodService,
|
|
622
657
|
applyTheme,
|
|
623
658
|
currencyService,
|
|
659
|
+
formatCurrencyDisplay,
|
|
660
|
+
formatCurrencyValue,
|
|
661
|
+
formatNumber,
|
|
662
|
+
formatNumberDisplay,
|
|
663
|
+
formatUSD,
|
|
624
664
|
getCurrencyIcon,
|
|
625
665
|
getExchangeIcon,
|
|
626
666
|
getFiatIcon,
|
|
627
667
|
networkService,
|
|
628
|
-
paymentMethodService
|
|
668
|
+
paymentMethodService,
|
|
669
|
+
truncateToCurrencyDecimals,
|
|
670
|
+
validateCurrencyDecimals
|
|
629
671
|
};
|
|
630
672
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +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,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMgN1YxN0gyMVY3SDNaTTQgOEgyMFYxNkg0VjhaTTYgMTBWMTRIOVYxMEg2Wk0xMCAxMFYxMUgxOFYxMEgxMFpNMTAgMTJWMTNIMTVWMTJIMTBaIiBmaWxsPSJjdXJyZW50Q29sb3IiLz4KPC9zdmc+',\n wire: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnL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3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIwIDRINEMyLjg5IDQgMiA0Ljg5IDIgNlYxOEMyIDE5LjExIDIuODkgMjAgNCAyMEgyMEMyMS4xMSAyMCAyMiAxOS4xMSAyMiAxOFY2QzIyIDQuODkgMjEuMTEgNCAyMCA0Wk0yMCA2VjhINFY2SDIwWk0yMCAxOEg0VjEwSDIwVjE4WiIgZmlsbD0iY3VycmVudENvbG9yIi8+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,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyIDJDNi40OCAyIDIgNi40OCAyIDEyUzYuNDggMjIgMTIgMjJTMjIgMTcuNTIgMjIgMTJTMTcuNTIgMiAxMiAyWk0xMyAxN0g5VjE1SDE1VjE3SDE3VjE5SDE1VjIxSDEzVjE5SDlWMTVIMTNWMTdaIiBmaWxsPSJjdXJyZW50Q29sb3IiLz4KPC9zdmc+',\n\n // Others/Fallback\n bank: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMgN1YxN0gyMVY3SDNaTTQgOEgyMFYxNkg0VjhaTTYgMTBWMTRIOVYxMEg2Wk0xMCAxMFYxMUgxOFYxMEgxMFpNMTAgMTJWMTNIMTVWMTJIMTBaIiBmaWxsPSJjdXJyZW50Q29sb3IiLz4KPC9zdmc+',\n other:\n 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyIDhDMTMuMSA4IDE0IDcuMSAxNCA2UzEzLjEgNCAxMiA0IDEwIDQuOSAxMCA2UzEwLjkgOCAxMiA4Wk0xMiAxMEMxMC45IDEwIDEwIDEwLjkgMTAgMTJTMTAuOSAxNCAxMiAxNFMxNCAxMy4xIDE0IDEyUzEzLjEgMTAgMTIgMTBaTTEyIDE2QzEwLjkgMTYgMTAgMTYuOSAxMCAxOFMxMC45IDIwIDEyIDIwUzE0IDE5LjEgMTQgMThTMTMuMSAxNiAxMiAxNloiIGZpbGw9ImN1cnJlbnRDb2xvciIvPgo8L3N2Zz4K',\n};\n\nexport function getFiatIcon(method: string): string | undefined {\n return fiatIcons[method.toLowerCase()];\n}\n"],"names":[],"mappings":"AAeO,MAAM,qBAAqB;AAAA,EAChC,OAAe;AAAA,EACP,qCAAqB,IAAA;AAAA,EAErB,cAAc;AAAA,EAAC;AAAA,EAEvB,OAA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,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,SAAS;AAAA,EAAA;AAEb;ACfO,MAAM,gBAAwC;AAAA;AAAA,EAEnD,KAAK;AAAA,EACL,KAAK;AAAA,EACL,MAAM;AAAA,EACN,MAAM;AAAA,EACN,KAAK;AAAA;AAAA,EAGL,KAAK;AAAA,EACL,MAAM;AAAA,EACN,OAAO;AAAA,EACP,KAAK;AAAA;AAAA,EAGL,KAAK;AAAA,EACL,MAAM;AAAA,EACN,MAAM;AAAA;AAAA,EAGN,KAAK;AAAA,EACL,IAAI;AAAA;AAAA,EAGJ,MAAM;AAAA,EACN,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AACP;AAEO,SAAS,gBAAgB,MAAkC;AAChE,SAAO,cAAc,KAAK,aAAa;AACzC;AChCO,MAAM,gBAAwC;AAAA;AAAA,EAEnD,UACE;AAAA,EACF,QACE;AAAA,EACF,SACE;AAAA;AAAA,EAGF,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,KAAK;AAAA,EACL,MAAM;AAAA,EACN,UAAU;AAAA;AAAA,EAGV,gBAAgB;AAAA,EAChB,cAAc;AAChB;AAEO,SAAS,gBAAgB,UAAsC;AACpE,SAAO,cAAc,SAAS,aAAa;AAC7C;ACxBO,MAAM,YAAoC;AAAA;AAAA,EAE/C,KAAK;AAAA,EACL,MAAM;AAAA,EACN,MAAM;AAAA;AAAA,EAGN,QACE;AAAA,EACF,OACE;AAAA;AAAA,EAGF,QACE;AAAA,EACF,UACE;AAAA,EACF,WACE;AAAA;AAAA,EAGF,MAAM;AAAA,EACN,OACE;AACJ;AAEO,SAAS,YAAY,QAAoC;AAC9D,SAAO,UAAU,OAAO,aAAa;AACvC;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../src/services/payment-method.ts","../src/services/currency.ts","../src/services/network.ts","../src/utils/numbers.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 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 return matches;\n });\n\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 filters?.walletFilter?.forEach(currency => {\n const walletMethods = this.getWalletMethods({\n currencies: [currency],\n targetCurrency: filters.targetCurrency,\n targetNetwork: filters.targetNetwork,\n });\n\n if (walletMethods.length > 0) {\n result.push({\n id: `wallet-${currency.toLowerCase()}`,\n displayName: currency,\n method: 'wallet',\n });\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 * Number formatting utilities\n */\n\nimport type { Currency } from '@/types/currency';\n\n// Singleton USD formatter\nconst usdFormatter = new Intl.NumberFormat('en-US', {\n style: 'currency',\n currency: 'USD',\n});\n\n// Cache formatters by decimal places and grouping preference\nconst numberFormatters = new Map<string, Intl.NumberFormat>();\n\nfunction getNumberFormatter(\n decimals: number,\n useGrouping = false\n): Intl.NumberFormat {\n const key = `${decimals}-${useGrouping}`;\n if (!numberFormatters.has(key)) {\n numberFormatters.set(\n key,\n new Intl.NumberFormat('en-US', {\n minimumFractionDigits: decimals,\n maximumFractionDigits: decimals,\n useGrouping,\n })\n );\n }\n return numberFormatters.get(key)!;\n}\n\n/**\n * Format a number with specific decimal places (no thousand separators)\n */\nexport function formatNumber(value: string | number, decimals: number): string {\n const num = typeof value === 'string' ? parseFloat(value) : value;\n if (isNaN(num)) return '';\n\n return getNumberFormatter(decimals, false).format(num);\n}\n\n/**\n * Format a number for display with thousand separators\n */\nexport function formatNumberDisplay(\n value: string | number,\n decimals: number\n): string {\n const num = typeof value === 'string' ? parseFloat(value) : value;\n if (isNaN(num)) return '';\n\n return getNumberFormatter(decimals, true).format(num);\n}\n\n/**\n * Format USD amount\n */\nexport function formatUSD(value: number): string {\n return usdFormatter.format(value);\n}\n\n/**\n * Currency-aware formatting utilities\n */\n\n/**\n * Format a value according to currency specifications\n */\nexport function formatCurrencyValue(\n value: string | number,\n currency: Currency\n): string {\n return formatNumber(value, currency.decimals);\n}\n\n/**\n * Format a value for display with currency symbol\n */\nexport function formatCurrencyDisplay(\n value: string | number,\n currency: Currency\n): string {\n const formatted = formatNumberDisplay(value, currency.decimals);\n return `${currency.symbol}${formatted}`;\n}\n\n/**\n * Validate decimal places for currency input\n */\nexport function validateCurrencyDecimals(\n value: string,\n currency: Currency\n): boolean {\n const parts = value.split('.');\n if (parts.length <= 1) return true; // No decimal part\n return parts[1].length <= currency.decimals;\n}\n\n/**\n * Truncate value to currency's maximum decimal places\n */\nexport function truncateToCurrencyDecimals(\n value: string,\n currency: Currency\n): string {\n const parts = value.split('.');\n if (parts.length <= 1) return value; // No decimal part\n\n const truncatedDecimal = parts[1].substring(0, currency.decimals);\n return truncatedDecimal.length > 0\n ? `${parts[0]}.${truncatedDecimal}`\n : parts[0];\n}\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,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMgN1YxN0gyMVY3SDNaTTQgOEgyMFYxNkg0VjhaTTYgMTBWMTRIOVYxMEg2Wk0xMCAxMFYxMUgxOFYxMEgxMFpNMTAgMTJWMTNIMTVWMTJIMTBaIiBmaWxsPSJjdXJyZW50Q29sb3IiLz4KPC9zdmc+',\n wire: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyIDJMMTMuMDkgOC4yNkwyMCA5TDEzLjA5IDE1Ljc0TDEyIDIyTDEwLjkxIDE1Ljc0TDQgOUwxMC45MSA4LjI2TDEyIDJaIiBmaWxsPSJjdXJyZW50Q29sb3IiLz4KPC9zdmc+',\n sepa: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjA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i8+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,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyIDJDNi40OCAyIDIgNi40OCAyIDEyUzYuNDggMjIgMTIgMjJTMjIgMTcuNTIgMjIgMTJTMTcuNTIgMiAxMiAyWk0xMyAxN0g5VjE1SDE1VjE3SDE3VjE5SDE1VjIxSDEzVjE5SDlWMTVIMTNWMTdaIiBmaWxsPSJjdXJyZW50Q29sb3IiLz4KPC9zdmc+',\n\n // Others/Fallback\n bank: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMgN1YxN0gyMVY3SDNaTTQgOEgyMFYxNkg0VjhaTTYgMTBWMTRIOVYxMEg2Wk0xMCAxMFYxMUgxOFYxMEgxMFpNMTAgMTJWMTNIMTVWMTJIMTBaIiBmaWxsPSJjdXJyZW50Q29sb3IiLz4KPC9zdmc+',\n other:\n 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyIDhDMTMuMSA4IDE0IDcuMSAxNCA2UzEzLjEgNCAxMiA0IDEwIDQuOSAxMCA2UzEwLjkgOCAxMiA4Wk0xMiAxMEMxMC45IDEwIDEwIDEwLjkgMTAgMTJTMTAuOSAxNCAxMiAxNFMxNCAxMy4xIDE0IDEyUzEzLjEgMTAgMTIgMTBaTTEyIDE2QzEwLjkgMTYgMTAgMTYuOSAxMCAxOFMxMC45IDIwIDEyIDIwUzE0IDE5LjEgMTQgMThTMTMuMSAxNiAxMiAxNloiIGZpbGw9ImN1cnJlbnRDb2xvciIvPgo8L3N2Zz4K',\n};\n\nexport function getFiatIcon(method: string): string | undefined {\n return fiatIcons[method.toLowerCase()];\n}\n"],"names":[],"mappings":"AAeO,MAAM,qBAAqB;AAAA,EAChC,OAAe;AAAA,EACP,qCAAqB,IAAA;AAAA,EAErB,cAAc;AAAA,EAAC;AAAA,EAEvB,OAAc,cAAoC;AAChD,QAAI,CAAC,qBAAqB,UAAU;AAClC,2BAAqB,WAAW,IAAI,qBAAA;AAAA,IACtC;AACA,WAAO,qBAAqB;AAAA,EAC9B;AAAA;AAAA;AAAA;AAAA,EAKO,SAAS,QAA6B;AAC3C,SAAK,eAAe,IAAI,OAAO,IAAI,MAAM;AAAA,EAC3C;AAAA;AAAA;AAAA;AAAA,EAKO,aAAa,SAAgC;AAClD,YAAQ,QAAQ,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