@cedros/pay-react 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1731 -0
  3. package/dist/CedrosContext-B3iCqN6e.js +11 -0
  4. package/dist/CedrosContext-vX9uqZKp.mjs +1796 -0
  5. package/dist/ar-LVoQZTFI.js +1 -0
  6. package/dist/ar-w27mU-4x.mjs +19 -0
  7. package/dist/bn-BR5Cv1T4.js +1 -0
  8. package/dist/bn-Ba_k3Kex.mjs +19 -0
  9. package/dist/components/CedrosPay.d.ts +54 -0
  10. package/dist/components/CedrosPay.d.ts.map +1 -0
  11. package/dist/components/CryptoButton.d.ts +26 -0
  12. package/dist/components/CryptoButton.d.ts.map +1 -0
  13. package/dist/components/PaymentModal.d.ts +28 -0
  14. package/dist/components/PaymentModal.d.ts.map +1 -0
  15. package/dist/components/ProductPrice.d.ts +56 -0
  16. package/dist/components/ProductPrice.d.ts.map +1 -0
  17. package/dist/components/PurchaseButton.d.ts +52 -0
  18. package/dist/components/PurchaseButton.d.ts.map +1 -0
  19. package/dist/components/StripeButton.d.ts +27 -0
  20. package/dist/components/StripeButton.d.ts.map +1 -0
  21. package/dist/context/CedrosContext.d.ts +46 -0
  22. package/dist/context/CedrosContext.d.ts.map +1 -0
  23. package/dist/context/ThemeContext.d.ts +30 -0
  24. package/dist/context/ThemeContext.d.ts.map +1 -0
  25. package/dist/context/index.d.ts +3 -0
  26. package/dist/context/index.d.ts.map +1 -0
  27. package/dist/crypto-only.d.ts +33 -0
  28. package/dist/crypto-only.d.ts.map +1 -0
  29. package/dist/crypto-only.js +1 -0
  30. package/dist/crypto-only.mjs +35 -0
  31. package/dist/de-CoZiPFN7.mjs +19 -0
  32. package/dist/de-pQxy-oD1.js +1 -0
  33. package/dist/en-CSsJl3nf.mjs +19 -0
  34. package/dist/en-D-uY3ltT.js +1 -0
  35. package/dist/es-BWGIBp2f.mjs +19 -0
  36. package/dist/es-D24cg8dD.js +1 -0
  37. package/dist/fil-BOBft9G-.js +1 -0
  38. package/dist/fil-Czo27xmj.mjs +19 -0
  39. package/dist/fr-Ct9ub8Fa.js +1 -0
  40. package/dist/fr-DQ-2ThBv.mjs +19 -0
  41. package/dist/he-DpV1WnBQ.mjs +19 -0
  42. package/dist/he-DtQqRKRq.js +1 -0
  43. package/dist/hooks/usePaymentMode.d.ts +39 -0
  44. package/dist/hooks/usePaymentMode.d.ts.map +1 -0
  45. package/dist/hooks/useRefundVerification.d.ts +30 -0
  46. package/dist/hooks/useRefundVerification.d.ts.map +1 -0
  47. package/dist/hooks/useStripeCheckout.d.ts +20 -0
  48. package/dist/hooks/useStripeCheckout.d.ts.map +1 -0
  49. package/dist/hooks/useX402Payment.d.ts +24 -0
  50. package/dist/hooks/useX402Payment.d.ts.map +1 -0
  51. package/dist/i18n/index.d.ts +107 -0
  52. package/dist/i18n/index.d.ts.map +1 -0
  53. package/dist/i18n/useTranslation.d.ts +55 -0
  54. package/dist/i18n/useTranslation.d.ts.map +1 -0
  55. package/dist/id-BJMqsu19.mjs +19 -0
  56. package/dist/id-CiM2mL7C.js +1 -0
  57. package/dist/in-BxgxKLQH.mjs +19 -0
  58. package/dist/in-Bzcjmxcc.js +1 -0
  59. package/dist/index.d.ts +33 -0
  60. package/dist/index.d.ts.map +1 -0
  61. package/dist/index.js +1 -0
  62. package/dist/index.mjs +626 -0
  63. package/dist/it-Blb_pIJl.js +1 -0
  64. package/dist/it-DZFFPALf.mjs +19 -0
  65. package/dist/jp-9NHyIuwY.js +1 -0
  66. package/dist/jp-ZExTrlHK.mjs +19 -0
  67. package/dist/kr-DHX3i4Ht.mjs +19 -0
  68. package/dist/kr-DvzJ-0yX.js +1 -0
  69. package/dist/managers/ManagerCache.d.ts +49 -0
  70. package/dist/managers/ManagerCache.d.ts.map +1 -0
  71. package/dist/managers/RouteDiscoveryManager.d.ts +72 -0
  72. package/dist/managers/RouteDiscoveryManager.d.ts.map +1 -0
  73. package/dist/managers/StripeManager.d.ts +110 -0
  74. package/dist/managers/StripeManager.d.ts.map +1 -0
  75. package/dist/managers/WalletManager.d.ts +150 -0
  76. package/dist/managers/WalletManager.d.ts.map +1 -0
  77. package/dist/managers/X402Manager.d.ts +176 -0
  78. package/dist/managers/X402Manager.d.ts.map +1 -0
  79. package/dist/ms-BOAu5pUB.js +1 -0
  80. package/dist/ms-Cv1fdIi2.mjs +19 -0
  81. package/dist/nl-BmGonsKb.mjs +19 -0
  82. package/dist/nl-WHh_DfO8.js +1 -0
  83. package/dist/pa-B7kIhZCF.js +1 -0
  84. package/dist/pa-BfwcJIar.mjs +19 -0
  85. package/dist/pay-react.css +1 -0
  86. package/dist/pl-DE5IB9xv.mjs +19 -0
  87. package/dist/pl-H0hBKdvF.js +1 -0
  88. package/dist/pt-CLzkqDzf.mjs +19 -0
  89. package/dist/pt-DwGrViQ3.js +1 -0
  90. package/dist/ru-CB2m0UDT.js +1 -0
  91. package/dist/ru-DM6-oUR0.mjs +19 -0
  92. package/dist/stripe-only.d.ts +31 -0
  93. package/dist/stripe-only.d.ts.map +1 -0
  94. package/dist/stripe-only.js +1 -0
  95. package/dist/stripe-only.mjs +33 -0
  96. package/dist/styles-D3XGpsqb.js +1 -0
  97. package/dist/styles-zgmHs6Hs.mjs +1601 -0
  98. package/dist/ta-A5HnrGb5.mjs +19 -0
  99. package/dist/ta-CAS197uN.js +1 -0
  100. package/dist/telemetry.d.ts +27 -0
  101. package/dist/telemetry.d.ts.map +1 -0
  102. package/dist/telemetry.js +1 -0
  103. package/dist/telemetry.mjs +127 -0
  104. package/dist/testing/__tests__/providers.test.d.ts +10 -0
  105. package/dist/testing/__tests__/providers.test.d.ts.map +1 -0
  106. package/dist/testing/helpers.d.ts +242 -0
  107. package/dist/testing/helpers.d.ts.map +1 -0
  108. package/dist/testing/index.d.ts +12 -0
  109. package/dist/testing/index.d.ts.map +1 -0
  110. package/dist/testing/index.js +1 -0
  111. package/dist/testing/index.mjs +374 -0
  112. package/dist/testing/mocks.d.ts +225 -0
  113. package/dist/testing/mocks.d.ts.map +1 -0
  114. package/dist/testing/providers.d.ts +89 -0
  115. package/dist/testing/providers.d.ts.map +1 -0
  116. package/dist/th-3fbB3Ytp.mjs +19 -0
  117. package/dist/th-Cpz2cFcg.js +1 -0
  118. package/dist/tr-BrgfFFdq.mjs +19 -0
  119. package/dist/tr-hQrEFk86.js +1 -0
  120. package/dist/types/componentOptions.d.ts +138 -0
  121. package/dist/types/componentOptions.d.ts.map +1 -0
  122. package/dist/types/errors.d.ts +213 -0
  123. package/dist/types/errors.d.ts.map +1 -0
  124. package/dist/types/index.d.ts +248 -0
  125. package/dist/types/index.d.ts.map +1 -0
  126. package/dist/uk-0hFun_g_.mjs +19 -0
  127. package/dist/uk-DrK2Sv8C.js +1 -0
  128. package/dist/ur-CaOjJXai.mjs +19 -0
  129. package/dist/ur-D5-7mN9a.js +1 -0
  130. package/dist/utils/__tests__/cspHelper.test.d.ts +9 -0
  131. package/dist/utils/__tests__/cspHelper.test.d.ts.map +1 -0
  132. package/dist/utils/__tests__/fetchWithTimeout.test.d.ts +11 -0
  133. package/dist/utils/__tests__/fetchWithTimeout.test.d.ts.map +1 -0
  134. package/dist/utils/cartHelpers.d.ts +105 -0
  135. package/dist/utils/cartHelpers.d.ts.map +1 -0
  136. package/dist/utils/circuitBreaker.d.ts +112 -0
  137. package/dist/utils/circuitBreaker.d.ts.map +1 -0
  138. package/dist/utils/couponHelpers.d.ts +50 -0
  139. package/dist/utils/couponHelpers.d.ts.map +1 -0
  140. package/dist/utils/cspHelper.d.ts +162 -0
  141. package/dist/utils/cspHelper.d.ts.map +1 -0
  142. package/dist/utils/deprecation.d.ts +128 -0
  143. package/dist/utils/deprecation.d.ts.map +1 -0
  144. package/dist/utils/errorHandling.d.ts +30 -0
  145. package/dist/utils/errorHandling.d.ts.map +1 -0
  146. package/dist/utils/errorMessages.d.ts +47 -0
  147. package/dist/utils/errorMessages.d.ts.map +1 -0
  148. package/dist/utils/errorParser.d.ts +37 -0
  149. package/dist/utils/errorParser.d.ts.map +1 -0
  150. package/dist/utils/eventEmitter.d.ts +119 -0
  151. package/dist/utils/eventEmitter.d.ts.map +1 -0
  152. package/dist/utils/exponentialBackoff.d.ts +104 -0
  153. package/dist/utils/exponentialBackoff.d.ts.map +1 -0
  154. package/dist/utils/fetchWithTimeout.d.ts +13 -0
  155. package/dist/utils/fetchWithTimeout.d.ts.map +1 -0
  156. package/dist/utils/index.d.ts +15 -0
  157. package/dist/utils/index.d.ts.map +1 -0
  158. package/dist/utils/logger.d.ts +76 -0
  159. package/dist/utils/logger.d.ts.map +1 -0
  160. package/dist/utils/modalStyles.d.ts +13 -0
  161. package/dist/utils/modalStyles.d.ts.map +1 -0
  162. package/dist/utils/rateLimiter.d.ts +88 -0
  163. package/dist/utils/rateLimiter.d.ts.map +1 -0
  164. package/dist/utils/requestDeduplication.d.ts +124 -0
  165. package/dist/utils/requestDeduplication.d.ts.map +1 -0
  166. package/dist/utils/securityValidation.d.ts +75 -0
  167. package/dist/utils/securityValidation.d.ts.map +1 -0
  168. package/dist/utils/solanaCheck.d.ts +10 -0
  169. package/dist/utils/solanaCheck.d.ts.map +1 -0
  170. package/dist/utils/telemetry.d.ts +277 -0
  171. package/dist/utils/telemetry.d.ts.map +1 -0
  172. package/dist/utils/tokenMintValidator.d.ts +77 -0
  173. package/dist/utils/tokenMintValidator.d.ts.map +1 -0
  174. package/dist/utils/uuid.d.ts +13 -0
  175. package/dist/utils/uuid.d.ts.map +1 -0
  176. package/dist/utils/validateConfig.d.ts +13 -0
  177. package/dist/utils/validateConfig.d.ts.map +1 -0
  178. package/dist/utils/walletDetection.d.ts +6 -0
  179. package/dist/utils/walletDetection.d.ts.map +1 -0
  180. package/dist/utils/walletPool.d.ts +57 -0
  181. package/dist/utils/walletPool.d.ts.map +1 -0
  182. package/dist/uuid-C0iMjdcc.js +1 -0
  183. package/dist/uuid-UlzrVY8Y.mjs +17 -0
  184. package/dist/vn-0nlIZFLP.mjs +19 -0
  185. package/dist/vn-B_iut9YL.js +1 -0
  186. package/dist/walletDetection-JZR3UCOa.mjs +27 -0
  187. package/dist/walletDetection-bNmV5ItZ.js +1 -0
  188. package/dist/zh-B4Endr1F.mjs +19 -0
  189. package/dist/zh-PR82dCHr.js +1 -0
  190. package/package.json +139 -0
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Runtime check for optional Solana dependencies
3
+ * Returns helpful error message if dependencies are missing
4
+ */
5
+ export declare function checkSolanaAvailability(): Promise<{
6
+ available: boolean;
7
+ error?: string;
8
+ }>;
9
+ export declare function requireSolana(): Promise<void>;
10
+ //# sourceMappingURL=solanaCheck.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"solanaCheck.d.ts","sourceRoot":"","sources":["../../src/utils/solanaCheck.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,wBAAsB,uBAAuB,IAAI,OAAO,CAAC;IAAE,SAAS,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAyB/F;AAED,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAKnD"}
@@ -0,0 +1,277 @@
1
+ import { PaymentErrorCode } from '../types/errors';
2
+ /**
3
+ * Correlation ID for tracking errors across distributed systems
4
+ *
5
+ * Format: cedros_<timestamp>_<uuid>
6
+ * Example: cedros_1699564800000_a1b2c3d4
7
+ */
8
+ export type CorrelationId = string;
9
+ /**
10
+ * Error severity levels for telemetry
11
+ */
12
+ export declare enum ErrorSeverity {
13
+ /** Debug information (not usually logged) */
14
+ DEBUG = "debug",
15
+ /** Informational message */
16
+ INFO = "info",
17
+ /** Warning that doesn't prevent operation */
18
+ WARNING = "warning",
19
+ /** Error that affects current operation */
20
+ ERROR = "error",
21
+ /** Critical error that affects entire system */
22
+ CRITICAL = "critical"
23
+ }
24
+ /**
25
+ * Payment context for error enrichment
26
+ *
27
+ * IMPORTANT: This context contains ONLY non-sensitive metadata.
28
+ * The following are NEVER included:
29
+ * - Private keys or seed phrases
30
+ * - Wallet credentials or passwords
31
+ * - Credit card numbers or CVV
32
+ * - Full transaction payloads
33
+ * - User email or personal information
34
+ * - Actual wallet addresses (sanitized to [REDACTED])
35
+ *
36
+ * Only business context (amount, currency, stage) is included for debugging.
37
+ */
38
+ export interface PaymentContext {
39
+ /** Payment method attempted (stripe, crypto, etc.) */
40
+ paymentMethod?: 'stripe' | 'crypto' | 'unknown';
41
+ /** Resource ID being purchased (product SKU, not user data) */
42
+ resourceId?: string;
43
+ /** Cart ID for multi-item purchases */
44
+ cartId?: string;
45
+ /** Transaction ID if available (public blockchain txn hash, not user data) */
46
+ transactionId?: string;
47
+ /** Amount in atomic units (e.g., "1000000" for 1 USDC) */
48
+ amount?: string;
49
+ /** Currency or token symbol (e.g., "USDC", "USD") */
50
+ currency?: string;
51
+ /** Payment flow stage (for identifying where failure occurred) */
52
+ stage?: 'init' | 'quote' | 'sign' | 'submit' | 'verify' | 'complete';
53
+ /** Additional metadata (sanitized) - never include sensitive data here */
54
+ metadata?: Record<string, string | number | boolean>;
55
+ }
56
+ /**
57
+ * Enriched error with telemetry context
58
+ */
59
+ export interface EnrichedError {
60
+ /** Unique correlation ID for tracking */
61
+ correlationId: CorrelationId;
62
+ /** Timestamp when error occurred */
63
+ timestamp: number;
64
+ /** ISO 8601 timestamp string */
65
+ timestampISO: string;
66
+ /** Error severity */
67
+ severity: ErrorSeverity;
68
+ /** Error code (if available) */
69
+ code?: PaymentErrorCode | string;
70
+ /** Error message (sanitized) */
71
+ message: string;
72
+ /** Original error object (sanitized) */
73
+ error?: Error;
74
+ /** Stack trace (sanitized) */
75
+ stack?: string;
76
+ /** Payment context */
77
+ paymentContext?: PaymentContext;
78
+ /** User agent string */
79
+ userAgent?: string;
80
+ /** SDK version */
81
+ sdkVersion?: string;
82
+ /** Environment (production, development, test) */
83
+ environment?: string;
84
+ /** Additional tags for filtering */
85
+ tags?: Record<string, string>;
86
+ }
87
+ /**
88
+ * Telemetry hook for sending errors to monitoring service
89
+ *
90
+ * Users provide this function to integrate with their monitoring solution
91
+ * (Sentry, Datadog, custom backend, etc.)
92
+ */
93
+ export type TelemetryHook = (error: EnrichedError) => void | Promise<void>;
94
+ /**
95
+ * Global telemetry configuration
96
+ */
97
+ interface TelemetryConfig {
98
+ /** User-provided telemetry hook (optional) */
99
+ onError?: TelemetryHook;
100
+ /** Enable telemetry (default: false) */
101
+ enabled: boolean;
102
+ /** Sanitize PII from errors (default: true) */
103
+ sanitizePII: boolean;
104
+ /** SDK version for telemetry */
105
+ sdkVersion?: string;
106
+ /** Environment name */
107
+ environment?: string;
108
+ /** Additional tags to include in all errors */
109
+ globalTags?: Record<string, string>;
110
+ }
111
+ /**
112
+ * Configure global telemetry settings
113
+ *
114
+ * @param config - Telemetry configuration
115
+ *
116
+ * @example
117
+ * ```typescript
118
+ * import { configureTelemetry } from '@cedros/pay-react';
119
+ * import * as Sentry from '@sentry/react';
120
+ *
121
+ * configureTelemetry({
122
+ * enabled: true,
123
+ * sdkVersion: '2.0.0',
124
+ * environment: process.env.NODE_ENV,
125
+ * onError: (error) => {
126
+ * Sentry.captureException(error.error, {
127
+ * extra: {
128
+ * correlationId: error.correlationId,
129
+ * paymentContext: error.paymentContext,
130
+ * },
131
+ * tags: error.tags,
132
+ * level: error.severity,
133
+ * });
134
+ * },
135
+ * });
136
+ * ```
137
+ */
138
+ export declare function configureTelemetry(config: Partial<TelemetryConfig>): void;
139
+ /**
140
+ * Get current telemetry configuration
141
+ *
142
+ * @internal
143
+ */
144
+ export declare function getTelemetryConfig(): TelemetryConfig;
145
+ /**
146
+ * Generate a new correlation ID
147
+ *
148
+ * @returns Correlation ID in format: cedros_<timestamp>_<uuid>
149
+ *
150
+ * @example
151
+ * ```typescript
152
+ * const correlationId = generateCorrelationId();
153
+ * // => "cedros_1699564800000_a1b2c3d4e5f6"
154
+ * ```
155
+ */
156
+ export declare function generateCorrelationId(): CorrelationId;
157
+ /**
158
+ * Sanitize PII from a string
159
+ *
160
+ * @param input - String potentially containing PII
161
+ * @returns Sanitized string with PII replaced by [REDACTED]
162
+ *
163
+ * @example
164
+ * ```typescript
165
+ * sanitizePII('Error: user@example.com failed')
166
+ * // => "Error: [REDACTED] failed"
167
+ * ```
168
+ */
169
+ export declare function sanitizePII(input: string): string;
170
+ /**
171
+ * Sanitize an Error object by removing PII from message and stack
172
+ *
173
+ * @param error - Error to sanitize
174
+ * @returns New Error with sanitized message and stack
175
+ */
176
+ export declare function sanitizeError(error: Error): Error;
177
+ /**
178
+ * Enrich an error with telemetry context
179
+ *
180
+ * @param error - Original error
181
+ * @param options - Enrichment options
182
+ * @returns Enriched error with correlation ID and context
183
+ *
184
+ * @example
185
+ * ```typescript
186
+ * const enriched = enrichError(new Error('Payment failed'), {
187
+ * severity: ErrorSeverity.ERROR,
188
+ * code: 'payment_verification_failed',
189
+ * paymentContext: {
190
+ * paymentMethod: 'crypto',
191
+ * resourceId: 'item-123',
192
+ * amount: '1000000',
193
+ * currency: 'USDC',
194
+ * stage: 'verify',
195
+ * },
196
+ * });
197
+ * ```
198
+ */
199
+ export declare function enrichError(error: Error | string, options?: {
200
+ severity?: ErrorSeverity;
201
+ code?: PaymentErrorCode | string;
202
+ paymentContext?: PaymentContext;
203
+ correlationId?: CorrelationId;
204
+ tags?: Record<string, string>;
205
+ }): EnrichedError;
206
+ /**
207
+ * Report an error to the configured telemetry hook
208
+ *
209
+ * Only sends if telemetry is enabled and a hook is configured.
210
+ *
211
+ * @param error - Error to report (can be Error, string, or EnrichedError)
212
+ * @param options - Enrichment options (if error is not already enriched)
213
+ *
214
+ * @example
215
+ * ```typescript
216
+ * // Simple error reporting
217
+ * reportError(new Error('Payment failed'));
218
+ *
219
+ * // With context
220
+ * reportError(new Error('Insufficient funds'), {
221
+ * severity: ErrorSeverity.WARNING,
222
+ * code: 'insufficient_funds',
223
+ * paymentContext: {
224
+ * paymentMethod: 'crypto',
225
+ * amount: '1000000',
226
+ * currency: 'USDC',
227
+ * },
228
+ * });
229
+ *
230
+ * // Already enriched
231
+ * const enriched = enrichError(error, { ... });
232
+ * reportError(enriched);
233
+ * ```
234
+ */
235
+ export declare function reportError(error: Error | string | EnrichedError, options?: {
236
+ severity?: ErrorSeverity;
237
+ code?: PaymentErrorCode | string;
238
+ paymentContext?: PaymentContext;
239
+ correlationId?: CorrelationId;
240
+ tags?: Record<string, string>;
241
+ }): void;
242
+ /**
243
+ * Create a tagged error reporter for a specific context
244
+ *
245
+ * Useful for creating module-specific error reporters with consistent tags.
246
+ *
247
+ * @param defaultTags - Tags to include in all errors from this reporter
248
+ * @returns Error reporter function with pre-configured tags
249
+ *
250
+ * @example
251
+ * ```typescript
252
+ * const reportStripeError = createErrorReporter({
253
+ * module: 'stripe',
254
+ * component: 'StripeButton',
255
+ * });
256
+ *
257
+ * reportStripeError(new Error('Session creation failed'), {
258
+ * severity: ErrorSeverity.ERROR,
259
+ * code: 'stripe_session_failed',
260
+ * });
261
+ * ```
262
+ */
263
+ export declare function createErrorReporter(defaultTags: Record<string, string>): (error: Error | string, options?: {
264
+ severity?: ErrorSeverity;
265
+ code?: PaymentErrorCode | string;
266
+ paymentContext?: PaymentContext;
267
+ correlationId?: CorrelationId;
268
+ tags?: Record<string, string>;
269
+ }) => void;
270
+ /**
271
+ * Reset telemetry configuration (useful for testing)
272
+ *
273
+ * @internal
274
+ */
275
+ export declare function resetTelemetry(): void;
276
+ export {};
277
+ //# sourceMappingURL=telemetry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../src/utils/telemetry.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Known stablecoin mint addresses on Solana mainnet-beta
3
+ *
4
+ * These are the canonical token mint addresses for major stablecoins.
5
+ * Typos in token mint addresses result in payments being sent to the wrong token,
6
+ * causing permanent loss of funds.
7
+ *
8
+ * This validator helps prevent catastrophic misconfigurations by warning
9
+ * developers when they use an unrecognized token mint address.
10
+ */
11
+ export declare const KNOWN_STABLECOINS: {
12
+ readonly CASHx9KJUStyftLFWGvEVf59SGeG9sh5FfcnZMVPCASH: "CASH";
13
+ readonly EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v: "USDC";
14
+ readonly Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB: "USDT";
15
+ readonly '2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo': "PYUSD";
16
+ };
17
+ /**
18
+ * Type guard to check if a token mint is a known stablecoin
19
+ */
20
+ export declare function isKnownStablecoin(tokenMint: string): tokenMint is keyof typeof KNOWN_STABLECOINS;
21
+ /**
22
+ * Get the symbol for a known stablecoin mint address
23
+ * Returns undefined if the mint is not recognized
24
+ */
25
+ export declare function getStablecoinSymbol(tokenMint: string): string | undefined;
26
+ /**
27
+ * Validation result for token mint checks
28
+ */
29
+ export interface TokenMintValidationResult {
30
+ isValid: boolean;
31
+ isKnownStablecoin: boolean;
32
+ symbol?: string;
33
+ warning?: string;
34
+ error?: string;
35
+ }
36
+ /**
37
+ * Validate a token mint address with strict mode by default
38
+ *
39
+ * STRICT MODE (default):
40
+ * - Throws error for unknown mints to prevent fund loss
41
+ * - Requires explicit dangerouslyAllowUnknownMint opt-in
42
+ *
43
+ * PERMISSIVE MODE (allowUnknown=true):
44
+ * - Warns but doesn't fail for unknown mints
45
+ * - Use only for custom tokens, testnet, or new stablecoins
46
+ *
47
+ * @param tokenMint - The token mint address to validate
48
+ * @param context - Where the mint is being used (for better error messages)
49
+ * @param allowUnknown - Whether to allow unknown mints (default: false)
50
+ * @returns Validation result with errors or warnings
51
+ *
52
+ * @example
53
+ * ```typescript
54
+ * // Strict mode (default) - throws for unknown mints
55
+ * const result = validateTokenMint(config.tokenMint, 'CedrosConfig', config.dangerouslyAllowUnknownMint);
56
+ * if (!result.isValid) {
57
+ * throw new Error(result.error);
58
+ * }
59
+ *
60
+ * // Permissive mode - warns for unknown mints
61
+ * const result = validateTokenMint(customMint, 'custom', true);
62
+ * if (result.warning) {
63
+ * console.warn(result.warning);
64
+ * }
65
+ * ```
66
+ */
67
+ export declare function validateTokenMint(tokenMint: string | undefined, context?: string, allowUnknown?: boolean): TokenMintValidationResult;
68
+ /**
69
+ * Similar to validateTokenMint but for the asset field in X402Requirement
70
+ * Used when validating payment quotes from the backend
71
+ *
72
+ * @param asset - The asset/token mint from X402Requirement
73
+ * @param resource - Resource ID for context in error messages
74
+ * @param allowUnknown - Whether to allow unknown mints (from config.dangerouslyAllowUnknownMint)
75
+ */
76
+ export declare function validateX402Asset(asset: string | undefined, resource?: string, allowUnknown?: boolean): TokenMintValidationResult;
77
+ //# sourceMappingURL=tokenMintValidator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokenMintValidator.d.ts","sourceRoot":"","sources":["../../src/utils/tokenMintValidator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB;;;;;CAKpB,CAAC;AAEX;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,IAAI,MAAM,OAAO,iBAAiB,CAEhG;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAKzE;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,OAAO,GAAE,MAAqB,EAC9B,YAAY,GAAE,OAAe,GAC5B,yBAAyB,CA+E3B;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,QAAQ,GAAE,MAAkB,EAC5B,YAAY,GAAE,OAAe,GAC5B,yBAAyB,CAE3B"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Lightweight UUID v4 generator using native crypto API
3
+ *
4
+ * Replaces the 13 KB uuid package with ~0.5 KB native implementation
5
+ * for ~97% bundle size reduction in this dependency
6
+ */
7
+ /**
8
+ * Generate a RFC4122 version 4 UUID
9
+ * Uses native crypto.randomUUID() when available (modern browsers)
10
+ * Falls back to Math.random() for older environments
11
+ */
12
+ export declare function generateUUID(): string;
13
+ //# sourceMappingURL=uuid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uuid.d.ts","sourceRoot":"","sources":["../../src/utils/uuid.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;GAIG;AACH,wBAAgB,YAAY,IAAI,MAAM,CA+BrC"}
@@ -0,0 +1,13 @@
1
+ import { CedrosConfig } from '../types';
2
+ /**
3
+ * Validate Cedros configuration before initializing providers/managers.
4
+ *
5
+ * Throws a detailed error listing every issue so developers can
6
+ * correct misconfiguration quickly during integration.
7
+ *
8
+ * Returns a normalized config with serverUrl defaulted to window.location.origin
9
+ */
10
+ export declare function validateConfig(config: CedrosConfig): Required<CedrosConfig> & {
11
+ serverUrl: string;
12
+ };
13
+ //# sourceMappingURL=validateConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateConfig.d.ts","sourceRoot":"","sources":["../../src/utils/validateConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AA6B7C;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,YAAY,GAAG,QAAQ,CAAC,YAAY,CAAC,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAqGnG"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Detects if any Solana wallet extensions are installed in the browser
3
+ * Checks for common wallet adapters like Phantom, Solflare, Backpack, etc.
4
+ */
5
+ export declare function detectSolanaWallets(): boolean;
6
+ //# sourceMappingURL=walletDetection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"walletDetection.d.ts","sourceRoot":"","sources":["../../src/utils/walletDetection.ts"],"names":[],"mappings":"AAiBA;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAqC7C"}
@@ -0,0 +1,57 @@
1
+ import { WalletAdapter } from '@solana/wallet-adapter-base';
2
+ /**
3
+ * Wallet pool instance scoped to a specific React context
4
+ *
5
+ * Each instance maintains its own set of wallet adapters and handles cleanup.
6
+ */
7
+ export declare class WalletPool {
8
+ private adapters;
9
+ private readonly poolId;
10
+ private isCleanedUp;
11
+ constructor(poolId?: string);
12
+ /**
13
+ * Get wallet adapters for this pool
14
+ *
15
+ * Lazy initialization: adapters are created on first access.
16
+ * Returns empty array in SSR environments.
17
+ */
18
+ getAdapters(): WalletAdapter[];
19
+ /**
20
+ * Cleanup wallet adapters
21
+ *
22
+ * Disconnects all wallets and clears the adapter cache.
23
+ * Called automatically when CedrosProvider unmounts.
24
+ *
25
+ * IMPORTANT: After cleanup, getAdapters() will return empty array.
26
+ */
27
+ cleanup(): Promise<void>;
28
+ /**
29
+ * Check if this pool has been initialized
30
+ *
31
+ * Useful for testing or debugging.
32
+ */
33
+ isInitialized(): boolean;
34
+ /**
35
+ * Get pool ID (for debugging/logging)
36
+ */
37
+ getId(): string;
38
+ }
39
+ /**
40
+ * Create a new wallet pool instance
41
+ *
42
+ * Each CedrosProvider should create its own pool for isolation.
43
+ *
44
+ * @param poolId - Optional pool ID for debugging (auto-generated if not provided)
45
+ * @returns New wallet pool instance
46
+ *
47
+ * @example
48
+ * ```typescript
49
+ * const walletPool = createWalletPool('user-123-session');
50
+ * const wallets = walletPool.getAdapters();
51
+ *
52
+ * // Later, on component unmount:
53
+ * await walletPool.cleanup();
54
+ * ```
55
+ */
56
+ export declare function createWalletPool(poolId?: string): WalletPool;
57
+ //# sourceMappingURL=walletPool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"walletPool.d.ts","sourceRoot":"","sources":["../../src/utils/walletPool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAGjE;;;;GAIG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAgC;IAChD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,WAAW,CAAS;gBAEhB,MAAM,CAAC,EAAE,MAAM;IAK3B;;;;;OAKG;IACH,WAAW,IAAI,aAAa,EAAE;IA2B9B;;;;;;;OAOG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAmC9B;;;;OAIG;IACH,aAAa,IAAI,OAAO;IAIxB;;OAEG;IACH,KAAK,IAAI,MAAM;CAGhB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU,CAE5D"}
@@ -0,0 +1 @@
1
+ "use strict";function r(){if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();if(typeof crypto<"u"&&crypto.getRandomValues){const x=new Uint8Array(16);crypto.getRandomValues(x),x[6]=x[6]&15|64,x[8]=x[8]&63|128;const t=Array.from(x).map(e=>e.toString(16).padStart(2,"0")).join("");return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,x=>{const t=Math.random()*16|0;return(x==="x"?t:t&3|8).toString(16)})}exports.generateUUID=r;
@@ -0,0 +1,17 @@
1
+ function e() {
2
+ if (typeof crypto < "u" && crypto.randomUUID)
3
+ return crypto.randomUUID();
4
+ if (typeof crypto < "u" && crypto.getRandomValues) {
5
+ const x = new Uint8Array(16);
6
+ crypto.getRandomValues(x), x[6] = x[6] & 15 | 64, x[8] = x[8] & 63 | 128;
7
+ const t = Array.from(x).map((r) => r.toString(16).padStart(2, "0")).join("");
8
+ return `${t.slice(0, 8)}-${t.slice(8, 12)}-${t.slice(12, 16)}-${t.slice(16, 20)}-${t.slice(20)}`;
9
+ }
10
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (x) => {
11
+ const t = Math.random() * 16 | 0;
12
+ return (x === "x" ? t : t & 3 | 8).toString(16);
13
+ });
14
+ }
15
+ export {
16
+ e as g
17
+ };
@@ -0,0 +1,19 @@
1
+ const n = "CEDROS PAY - Tệp nguồn dịch (Tiếng Việt)", t = "1.0.0", g = "vi", i = { pay_with_card: "Thanh toán bằng thẻ", pay_with_crypto: "Thanh toán bằng USDC", pay_with_usdc: "Thanh toán bằng USDC", purchase: "Mua hàng", card: "Thẻ", usdc_solana: "USDC (Solana)", crypto: "Tiền mã hoá", connect_wallet: "Kết nối ví", connecting: "Đang kết nối...", processing: "Đang xử lý...", loading: "Đang tải...", close: "Đóng", cancel: "Hủy", confirm: "Xác nhận", retry: "Thử lại", go_back: "Quay lại", contact_support: "Liên hệ hỗ trợ" }, h = { invalid_payment_proof: { message: "Xác minh thanh toán không thành công", action: "Vui lòng thử thanh toán lại. Nếu vẫn tiếp diễn, hãy liên hệ hỗ trợ." }, invalid_signature: { message: "Chữ ký giao dịch không hợp lệ", action: "Vui lòng phê duyệt giao dịch trong ví của bạn rồi thử lại." }, invalid_transaction: { message: "Định dạng giao dịch không hợp lệ", action: "Vui lòng thử thanh toán lại. Nếu vẫn tiếp diễn, hãy thử cập nhật ứng dụng ví." }, transaction_not_found: { message: "Không tìm thấy giao dịch trên blockchain", action: "Giao dịch của bạn có thể vẫn đang được xử lý. Vui lòng đợi một lúc và kiểm tra ví, hoặc thử lại." }, transaction_not_confirmed: { message: "Giao dịch vẫn đang được xử lý", action: "Vui lòng đợi blockchain xác nhận giao dịch, sau đó thử lại." }, transaction_failed: { message: "Giao dịch thất bại trên blockchain", action: "Kiểm tra chi tiết trong ví của bạn. Bạn có thể cần điều chỉnh cài đặt giao dịch hoặc nạp thêm SOL cho phí." }, transaction_expired: { message: "Giao dịch mất quá nhiều thời gian để xử lý", action: "Vui lòng thử thanh toán lại. Cân nhắc tăng mức ưu tiên giao dịch nếu ví của bạn hỗ trợ." }, invalid_recipient: { message: "Thanh toán đã được gửi đến địa chỉ sai", action: "Vui lòng thử lại và đảm bảo bạn phê duyệt đúng giao dịch trong ví." }, invalid_sender: { message: "Ví người gửi thanh toán không hợp lệ", action: "Vui lòng kết nối lại ví và thử lại." }, unauthorized_refund_issuer: { message: "Bạn không được phép thực hiện hoàn tiền", action: "Chỉ các tài khoản được ủy quyền mới có thể xử lý hoàn tiền. Vui lòng liên hệ hỗ trợ nếu bạn cho rằng đây là lỗi." }, amount_below_minimum: { message: "Số tiền thanh toán quá thấp", action: "Vui lòng kiểm tra số tiền yêu cầu và thử lại." }, amount_mismatch: { message: "Số tiền thanh toán không khớp với báo giá", action: "Giá có thể đã thay đổi. Vui lòng làm mới trang và thử thanh toán lại." }, insufficient_funds_sol: { message: "Không đủ SOL để trả phí giao dịch", action: "Nạp ít nhất 0.001 SOL vào ví để chi trả phí mạng, sau đó thử lại." }, insufficient_funds_token: { message: "Số dư trong ví của bạn không đủ", action: "Vui lòng nạp thêm tiền vào ví rồi thử lại." }, invalid_token_mint: { message: "Token thanh toán không đúng", action: "Vui lòng thanh toán bằng token đúng như hiển thị trong chi tiết thanh toán." }, not_spl_transfer: { message: "Giao dịch không phải là chuyển token hợp lệ", action: "Vui lòng đảm bảo bạn đang gửi đúng loại token từ ví của mình." }, missing_token_account: { message: "Không tìm thấy tài khoản token", action: "Ví của bạn có thể cần tạo tài khoản token trước. Hãy thử lại hoặc dùng ví khác." }, invalid_token_program: { message: "Chương trình token không hợp lệ", action: "Vui lòng thử thanh toán lại. Nếu vẫn tiếp diễn, hãy thử dùng ví khác." }, missing_memo: { message: "Cần có memo thanh toán nhưng chưa được đính kèm", action: "Vui lòng thử thanh toán lại và đảm bảo phê duyệt chi tiết giao dịch trong ví." }, invalid_memo: { message: "Định dạng memo thanh toán không hợp lệ", action: "Vui lòng thử thanh toán lại." }, payment_already_used: { message: "Khoản thanh toán này đã được xử lý", action: "Kiểm tra lịch sử giao dịch của bạn. Nếu cần thanh toán khác, vui lòng bắt đầu giao dịch mới." }, signature_reused: { message: "Chữ ký giao dịch đã được sử dụng", action: "Vui lòng tạo giao dịch thanh toán mới." }, quote_expired: { message: "Báo giá thanh toán đã hết hạn", action: "Giá được cập nhật thường xuyên. Vui lòng làm mới trang và thử thanh toán lại." }, missing_field: { message: "Thiếu thông tin bắt buộc", action: "Vui lòng kiểm tra tất cả các trường bắt buộc và thử lại." }, invalid_field: { message: "Một số thông tin không hợp lệ", action: "Vui lòng kiểm tra lại dữ liệu nhập và thử lại." }, invalid_amount: { message: "Số tiền thanh toán không hợp lệ", action: "Vui lòng kiểm tra số tiền và thử lại." }, invalid_wallet: { message: "Địa chỉ ví không hợp lệ", action: "Vui lòng kết nối lại ví và thử lại." }, invalid_resource: { message: "Lựa chọn mặt hàng không hợp lệ", action: "Vui lòng làm mới trang và thử lại." }, invalid_coupon: { message: "Mã giảm giá không hợp lệ", action: "Vui lòng kiểm tra mã giảm giá và thử lại." }, invalid_cart_item: { message: "Một hoặc nhiều mặt hàng trong giỏ hàng không hợp lệ", action: "Vui lòng xem lại giỏ hàng và thử lại." }, empty_cart: { message: "Giỏ hàng của bạn đang trống", action: "Vui lòng thêm mặt hàng vào giỏ trước khi thanh toán." }, resource_not_found: { message: "Không tìm thấy mặt hàng", action: "Mặt hàng này có thể không còn tồn tại. Vui lòng làm mới và thử lại." }, cart_not_found: { message: "Không tìm thấy giỏ hàng", action: "Giỏ hàng của bạn có thể đã hết hạn. Vui lòng bắt đầu đơn hàng mới." }, refund_not_found: { message: "Không tìm thấy giao dịch hoàn tiền", action: "Vui lòng kiểm tra số tham chiếu hoàn tiền hoặc liên hệ hỗ trợ." }, product_not_found: { message: "Sản phẩm không còn khả dụng", action: "Sản phẩm này có thể đã ngừng bán. Vui lòng xem danh mục hiện có." }, coupon_not_found: { message: "Không tìm thấy mã giảm giá", action: "Vui lòng kiểm tra mã hoặc xóa để tiếp tục." }, session_not_found: { message: "Phiên thanh toán đã hết hạn", action: "Vui lòng bắt đầu thanh toán mới." }, cart_already_paid: { message: "Đơn hàng này đã được thanh toán", action: "Kiểm tra lịch sử đơn hàng của bạn. Nếu cần mua thêm, vui lòng bắt đầu đơn hàng mới." }, refund_already_processed: { message: "Khoản hoàn tiền này đã được xử lý", action: "Kiểm tra lịch sử giao dịch hoặc liên hệ hỗ trợ để biết chi tiết." }, coupon_expired: { message: "Mã giảm giá đã hết hạn", action: "Vui lòng xóa mã giảm giá hoặc dùng mã khác." }, coupon_usage_limit_reached: { message: "Đã đạt giới hạn sử dụng mã giảm giá", action: "Mã này đã được sử dụng hết. Vui lòng thử mã khác." }, coupon_not_applicable: { message: "Không thể áp dụng mã giảm giá cho đơn mua này", action: "Vui lòng kiểm tra điều khoản của mã hoặc xóa để tiếp tục." }, coupon_wrong_payment_method: { message: "Mã giảm giá không áp dụng cho phương thức thanh toán này", action: "Thử phương thức thanh toán khác hoặc xóa mã giảm giá." }, stripe_error: { message: "Dịch vụ thanh toán thẻ tạm thời không khả dụng", action: "Vui lòng thử lại sau, hoặc dùng thanh toán bằng tiền mã hoá." }, rpc_error: { message: "Mạng blockchain tạm thời không khả dụng", action: "Vui lòng thử lại sau, hoặc dùng thanh toán bằng thẻ." }, network_error: { message: "Sự cố kết nối mạng", action: "Vui lòng kiểm tra kết nối internet và thử lại." }, internal_error: { message: "Đã xảy ra lỗi từ phía chúng tôi", action: "Vui lòng thử lại. Nếu vẫn tiếp diễn, hãy liên hệ hỗ trợ." }, database_error: { message: "Dịch vụ tạm thời không khả dụng", action: "Vui lòng thử lại sau." }, config_error: { message: "Lỗi cấu hình dịch vụ", action: "Vui lòng liên hệ hỗ trợ để được trợ giúp." }, unknown_error: { message: "Đã xảy ra lỗi không mong muốn", action: "Vui lòng thử lại hoặc liên hệ hỗ trợ nếu tình trạng tiếp diễn." } }, a = { unknown_token_mint: "Cảnh báo: Địa chỉ mint của token không được nhận diện. Hãy kiểm tra lại đây có phải token đúng để tránh mất tiền.", token_typo_warning: "Địa chỉ token không khớp với các stablecoin đã biết (USDC, USDT, PYUSD, CASH). Hãy kiểm tra cẩn thận để tránh mất tiền vĩnh viễn." }, o = { no_wallet_detected: "Không phát hiện ví Solana", install_wallet: "Vui lòng cài đặt ví Solana như Phantom, Solflare hoặc Backpack.", wallet_not_connected: "Ví chưa được kết nối", connect_your_wallet: "Vui lòng kết nối ví để tiếp tục.", wallet_connection_failed: "Kết nối ví thất bại", try_again: "Vui lòng thử kết nối lại.", transaction_rejected: "Giao dịch đã bị từ chối", approve_in_wallet: "Vui lòng phê duyệt giao dịch trong ví để tiếp tục." }, c = {
2
+ comment: n,
3
+ version: t,
4
+ locale: "vi",
5
+ ui: i,
6
+ errors: h,
7
+ validation: a,
8
+ wallet: o
9
+ };
10
+ export {
11
+ n as comment,
12
+ c as default,
13
+ h as errors,
14
+ g as locale,
15
+ i as ui,
16
+ a as validation,
17
+ t as version,
18
+ o as wallet
19
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n="CEDROS PAY - Tệp nguồn dịch (Tiếng Việt)",t="1.0.0",i="vi",h={pay_with_card:"Thanh toán bằng thẻ",pay_with_crypto:"Thanh toán bằng USDC",pay_with_usdc:"Thanh toán bằng USDC",purchase:"Mua hàng",card:"Thẻ",usdc_solana:"USDC (Solana)",crypto:"Tiền mã hoá",connect_wallet:"Kết nối ví",connecting:"Đang kết nối...",processing:"Đang xử lý...",loading:"Đang tải...",close:"Đóng",cancel:"Hủy",confirm:"Xác nhận",retry:"Thử lại",go_back:"Quay lại",contact_support:"Liên hệ hỗ trợ"},a={invalid_payment_proof:{message:"Xác minh thanh toán không thành công",action:"Vui lòng thử thanh toán lại. Nếu vẫn tiếp diễn, hãy liên hệ hỗ trợ."},invalid_signature:{message:"Chữ ký giao dịch không hợp lệ",action:"Vui lòng phê duyệt giao dịch trong ví của bạn rồi thử lại."},invalid_transaction:{message:"Định dạng giao dịch không hợp lệ",action:"Vui lòng thử thanh toán lại. Nếu vẫn tiếp diễn, hãy thử cập nhật ứng dụng ví."},transaction_not_found:{message:"Không tìm thấy giao dịch trên blockchain",action:"Giao dịch của bạn có thể vẫn đang được xử lý. Vui lòng đợi một lúc và kiểm tra ví, hoặc thử lại."},transaction_not_confirmed:{message:"Giao dịch vẫn đang được xử lý",action:"Vui lòng đợi blockchain xác nhận giao dịch, sau đó thử lại."},transaction_failed:{message:"Giao dịch thất bại trên blockchain",action:"Kiểm tra chi tiết trong ví của bạn. Bạn có thể cần điều chỉnh cài đặt giao dịch hoặc nạp thêm SOL cho phí."},transaction_expired:{message:"Giao dịch mất quá nhiều thời gian để xử lý",action:"Vui lòng thử thanh toán lại. Cân nhắc tăng mức ưu tiên giao dịch nếu ví của bạn hỗ trợ."},invalid_recipient:{message:"Thanh toán đã được gửi đến địa chỉ sai",action:"Vui lòng thử lại và đảm bảo bạn phê duyệt đúng giao dịch trong ví."},invalid_sender:{message:"Ví người gửi thanh toán không hợp lệ",action:"Vui lòng kết nối lại ví và thử lại."},unauthorized_refund_issuer:{message:"Bạn không được phép thực hiện hoàn tiền",action:"Chỉ các tài khoản được ủy quyền mới có thể xử lý hoàn tiền. Vui lòng liên hệ hỗ trợ nếu bạn cho rằng đây là lỗi."},amount_below_minimum:{message:"Số tiền thanh toán quá thấp",action:"Vui lòng kiểm tra số tiền yêu cầu và thử lại."},amount_mismatch:{message:"Số tiền thanh toán không khớp với báo giá",action:"Giá có thể đã thay đổi. Vui lòng làm mới trang và thử thanh toán lại."},insufficient_funds_sol:{message:"Không đủ SOL để trả phí giao dịch",action:"Nạp ít nhất 0.001 SOL vào ví để chi trả phí mạng, sau đó thử lại."},insufficient_funds_token:{message:"Số dư trong ví của bạn không đủ",action:"Vui lòng nạp thêm tiền vào ví rồi thử lại."},invalid_token_mint:{message:"Token thanh toán không đúng",action:"Vui lòng thanh toán bằng token đúng như hiển thị trong chi tiết thanh toán."},not_spl_transfer:{message:"Giao dịch không phải là chuyển token hợp lệ",action:"Vui lòng đảm bảo bạn đang gửi đúng loại token từ ví của mình."},missing_token_account:{message:"Không tìm thấy tài khoản token",action:"Ví của bạn có thể cần tạo tài khoản token trước. Hãy thử lại hoặc dùng ví khác."},invalid_token_program:{message:"Chương trình token không hợp lệ",action:"Vui lòng thử thanh toán lại. Nếu vẫn tiếp diễn, hãy thử dùng ví khác."},missing_memo:{message:"Cần có memo thanh toán nhưng chưa được đính kèm",action:"Vui lòng thử thanh toán lại và đảm bảo phê duyệt chi tiết giao dịch trong ví."},invalid_memo:{message:"Định dạng memo thanh toán không hợp lệ",action:"Vui lòng thử thanh toán lại."},payment_already_used:{message:"Khoản thanh toán này đã được xử lý",action:"Kiểm tra lịch sử giao dịch của bạn. Nếu cần thanh toán khác, vui lòng bắt đầu giao dịch mới."},signature_reused:{message:"Chữ ký giao dịch đã được sử dụng",action:"Vui lòng tạo giao dịch thanh toán mới."},quote_expired:{message:"Báo giá thanh toán đã hết hạn",action:"Giá được cập nhật thường xuyên. Vui lòng làm mới trang và thử thanh toán lại."},missing_field:{message:"Thiếu thông tin bắt buộc",action:"Vui lòng kiểm tra tất cả các trường bắt buộc và thử lại."},invalid_field:{message:"Một số thông tin không hợp lệ",action:"Vui lòng kiểm tra lại dữ liệu nhập và thử lại."},invalid_amount:{message:"Số tiền thanh toán không hợp lệ",action:"Vui lòng kiểm tra số tiền và thử lại."},invalid_wallet:{message:"Địa chỉ ví không hợp lệ",action:"Vui lòng kết nối lại ví và thử lại."},invalid_resource:{message:"Lựa chọn mặt hàng không hợp lệ",action:"Vui lòng làm mới trang và thử lại."},invalid_coupon:{message:"Mã giảm giá không hợp lệ",action:"Vui lòng kiểm tra mã giảm giá và thử lại."},invalid_cart_item:{message:"Một hoặc nhiều mặt hàng trong giỏ hàng không hợp lệ",action:"Vui lòng xem lại giỏ hàng và thử lại."},empty_cart:{message:"Giỏ hàng của bạn đang trống",action:"Vui lòng thêm mặt hàng vào giỏ trước khi thanh toán."},resource_not_found:{message:"Không tìm thấy mặt hàng",action:"Mặt hàng này có thể không còn tồn tại. Vui lòng làm mới và thử lại."},cart_not_found:{message:"Không tìm thấy giỏ hàng",action:"Giỏ hàng của bạn có thể đã hết hạn. Vui lòng bắt đầu đơn hàng mới."},refund_not_found:{message:"Không tìm thấy giao dịch hoàn tiền",action:"Vui lòng kiểm tra số tham chiếu hoàn tiền hoặc liên hệ hỗ trợ."},product_not_found:{message:"Sản phẩm không còn khả dụng",action:"Sản phẩm này có thể đã ngừng bán. Vui lòng xem danh mục hiện có."},coupon_not_found:{message:"Không tìm thấy mã giảm giá",action:"Vui lòng kiểm tra mã hoặc xóa để tiếp tục."},session_not_found:{message:"Phiên thanh toán đã hết hạn",action:"Vui lòng bắt đầu thanh toán mới."},cart_already_paid:{message:"Đơn hàng này đã được thanh toán",action:"Kiểm tra lịch sử đơn hàng của bạn. Nếu cần mua thêm, vui lòng bắt đầu đơn hàng mới."},refund_already_processed:{message:"Khoản hoàn tiền này đã được xử lý",action:"Kiểm tra lịch sử giao dịch hoặc liên hệ hỗ trợ để biết chi tiết."},coupon_expired:{message:"Mã giảm giá đã hết hạn",action:"Vui lòng xóa mã giảm giá hoặc dùng mã khác."},coupon_usage_limit_reached:{message:"Đã đạt giới hạn sử dụng mã giảm giá",action:"Mã này đã được sử dụng hết. Vui lòng thử mã khác."},coupon_not_applicable:{message:"Không thể áp dụng mã giảm giá cho đơn mua này",action:"Vui lòng kiểm tra điều khoản của mã hoặc xóa để tiếp tục."},coupon_wrong_payment_method:{message:"Mã giảm giá không áp dụng cho phương thức thanh toán này",action:"Thử phương thức thanh toán khác hoặc xóa mã giảm giá."},stripe_error:{message:"Dịch vụ thanh toán thẻ tạm thời không khả dụng",action:"Vui lòng thử lại sau, hoặc dùng thanh toán bằng tiền mã hoá."},rpc_error:{message:"Mạng blockchain tạm thời không khả dụng",action:"Vui lòng thử lại sau, hoặc dùng thanh toán bằng thẻ."},network_error:{message:"Sự cố kết nối mạng",action:"Vui lòng kiểm tra kết nối internet và thử lại."},internal_error:{message:"Đã xảy ra lỗi từ phía chúng tôi",action:"Vui lòng thử lại. Nếu vẫn tiếp diễn, hãy liên hệ hỗ trợ."},database_error:{message:"Dịch vụ tạm thời không khả dụng",action:"Vui lòng thử lại sau."},config_error:{message:"Lỗi cấu hình dịch vụ",action:"Vui lòng liên hệ hỗ trợ để được trợ giúp."},unknown_error:{message:"Đã xảy ra lỗi không mong muốn",action:"Vui lòng thử lại hoặc liên hệ hỗ trợ nếu tình trạng tiếp diễn."}},o={unknown_token_mint:"Cảnh báo: Địa chỉ mint của token không được nhận diện. Hãy kiểm tra lại đây có phải token đúng để tránh mất tiền.",token_typo_warning:"Địa chỉ token không khớp với các stablecoin đã biết (USDC, USDT, PYUSD, CASH). Hãy kiểm tra cẩn thận để tránh mất tiền vĩnh viễn."},g={no_wallet_detected:"Không phát hiện ví Solana",install_wallet:"Vui lòng cài đặt ví Solana như Phantom, Solflare hoặc Backpack.",wallet_not_connected:"Ví chưa được kết nối",connect_your_wallet:"Vui lòng kết nối ví để tiếp tục.",wallet_connection_failed:"Kết nối ví thất bại",try_again:"Vui lòng thử kết nối lại.",transaction_rejected:"Giao dịch đã bị từ chối",approve_in_wallet:"Vui lòng phê duyệt giao dịch trong ví để tiếp tục."},c={comment:n,version:t,locale:i,ui:h,errors:a,validation:o,wallet:g};exports.comment=n;exports.default=c;exports.errors=a;exports.locale=i;exports.ui=h;exports.validation=o;exports.version=t;exports.wallet=g;
@@ -0,0 +1,27 @@
1
+ function n() {
2
+ if (typeof window > "u")
3
+ return !1;
4
+ const o = window, t = [
5
+ "phantom",
6
+ "solflare",
7
+ "backpack",
8
+ "glow",
9
+ "slope",
10
+ "sollet",
11
+ "coin98",
12
+ "clover",
13
+ "mathWallet",
14
+ "ledger",
15
+ "torus",
16
+ "walletconnect"
17
+ ];
18
+ for (const l of t) {
19
+ const e = o[l];
20
+ if (e && typeof e == "object" && "solana" in e && e.solana)
21
+ return !0;
22
+ }
23
+ return !!o.solana;
24
+ }
25
+ export {
26
+ n as detectSolanaWallets
27
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function n(){if(typeof window>"u")return!1;const t=window,o=["phantom","solflare","backpack","glow","slope","sollet","coin98","clover","mathWallet","ledger","torus","walletconnect"];for(const l of o){const e=t[l];if(e&&typeof e=="object"&&"solana"in e&&e.solana)return!0}return!!t.solana}exports.detectSolanaWallets=n;
@@ -0,0 +1,19 @@
1
+ const e = "CEDROS PAY - 翻译源文件(中文)", a = "1.0.0", i = "zh", n = { pay_with_card: "使用银行卡支付", pay_with_crypto: "使用 USDC 支付", pay_with_usdc: "使用 USDC 支付", purchase: "购买", card: "银行卡", usdc_solana: "USDC(Solana)", crypto: "加密货币", connect_wallet: "连接钱包", connecting: "正在连接...", processing: "正在处理...", loading: "正在加载...", close: "关闭", cancel: "取消", confirm: "确认", retry: "重试", go_back: "返回", contact_support: "联系支持" }, o = { invalid_payment_proof: { message: "支付验证失败", action: "请重试支付。如果问题仍然存在,请联系支持。" }, invalid_signature: { message: "交易签名无效", action: "请在您的钱包中批准该交易,然后重试。" }, invalid_transaction: { message: "交易格式无效", action: "请重试支付。如果仍然出现问题,请尝试更新您的钱包应用。" }, transaction_not_found: { message: "区块链上未找到该交易", action: "您的交易可能仍在处理中。请稍候并检查您的钱包,或重试。" }, transaction_not_confirmed: { message: "交易仍在处理中", action: "请稍候等待区块链确认您的交易,然后再试。" }, transaction_failed: { message: "区块链上的交易失败", action: "请在钱包中查看详情。您可能需要调整交易设置或增加用于手续费的 SOL。" }, transaction_expired: { message: "交易处理耗时过长", action: "请重试支付。如您的钱包支持,可考虑提高交易优先级。" }, invalid_recipient: { message: "付款被发送到错误地址", action: "请重试,并确保您在钱包中批准的是正确的交易。" }, invalid_sender: { message: "付款发送方钱包无效", action: "请重新连接您的钱包后再试。" }, unauthorized_refund_issuer: { message: "您无权发起退款", action: "只有授权账户才能处理退款。如您认为这是错误,请联系支持。" }, amount_below_minimum: { message: "支付金额过低", action: "请核对所需金额并重试。" }, amount_mismatch: { message: "支付金额与报价不一致", action: "价格可能已发生变化。请刷新页面并重新支付。" }, insufficient_funds_sol: { message: "用于交易手续费的 SOL 余额不足", action: "请向钱包充值至少 0.001 SOL 以覆盖网络手续费,然后重试。" }, insufficient_funds_token: { message: "钱包余额不足", action: "请向钱包添加更多资金后再试。" }, invalid_token_mint: { message: "付款代币不正确", action: "请按照支付详情所示使用正确的代币付款。" }, not_spl_transfer: { message: "该交易不是有效的代币转账", action: "请确保您从钱包发送的是正确的代币类型。" }, missing_token_account: { message: "未找到代币账户", action: "您的钱包可能需要先创建代币账户。请重试或使用其他钱包。" }, invalid_token_program: { message: "代币程序无效", action: "请重试支付。如果仍有问题,请尝试使用其他钱包。" }, missing_memo: { message: "需要付款备注(memo),但未包含", action: "请重试支付,并确保您在钱包中批准交易明细。" }, invalid_memo: { message: "付款备注(memo)格式无效", action: "请重试支付。" }, payment_already_used: { message: "此付款已被处理", action: "请查看交易历史。如需再次支付,请发起新的交易。" }, signature_reused: { message: "交易签名已被使用", action: "请创建一笔新的支付交易。" }, quote_expired: { message: "支付报价已过期", action: "价格更新频繁。请刷新页面并重新支付。" }, missing_field: { message: "缺少必填信息", action: "请检查所有必填字段并重试。" }, invalid_field: { message: "部分信息无效", action: "请检查输入后再试。" }, invalid_amount: { message: "支付金额无效", action: "请核对金额后再试。" }, invalid_wallet: { message: "钱包地址无效", action: "请重新连接您的钱包后再试。" }, invalid_resource: { message: "无效的商品选择", action: "请刷新页面后再试。" }, invalid_coupon: { message: "无效的优惠码", action: "请检查优惠码后再试。" }, invalid_cart_item: { message: "购物车中一个或多个商品无效", action: "请查看您的购物车后再试。" }, empty_cart: { message: "您的购物车为空", action: "请先将商品加入购物车后再结账。" }, resource_not_found: { message: "未找到该商品", action: "该商品可能已不可用。请刷新页面后再试。" }, cart_not_found: { message: "未找到购物车", action: "您的购物车可能已过期。请发起新的订单。" }, refund_not_found: { message: "未找到退款记录", action: "请检查退款参考编号或联系支持。" }, product_not_found: { message: "商品不可用", action: "该商品可能已不可用。请浏览我们当前的商品。" }, coupon_not_found: { message: "未找到优惠码", action: "请检查优惠码或将其移除以继续。" }, session_not_found: { message: "支付会话已过期", action: "请发起新的支付。" }, cart_already_paid: { message: "此订单已完成支付", action: "请查看订单历史。如需再次购买,请发起新的订单。" }, refund_already_processed: { message: "此退款已处理", action: "请查看交易历史或联系支持以获取详情。" }, coupon_expired: { message: "优惠券已过期", action: "请移除优惠码或使用其他优惠码。" }, coupon_usage_limit_reached: { message: "优惠券使用次数已达上限", action: "该优惠券已被全部兑付。请尝试使用其他代码。" }, coupon_not_applicable: { message: "该优惠券不适用于本次购买", action: "请查看优惠券条款或将其移除以继续。" }, coupon_wrong_payment_method: { message: "该优惠券不适用于此支付方式", action: "请尝试其他支付方式或移除优惠码。" }, stripe_error: { message: "银行卡支付服务暂时不可用", action: "请稍后重试,或改用加密货币支付。" }, rpc_error: { message: "区块链网络暂时不可用", action: "请稍后重试,或改用银行卡支付。" }, network_error: { message: "网络连接问题", action: "请检查您的网络连接并重试。" }, internal_error: { message: "我们这边出现问题", action: "请重试。如果仍然持续,请联系支持。" }, database_error: { message: "服务暂时不可用", action: "请稍后重试。" }, config_error: { message: "服务配置错误", action: "请联系支持获取协助。" }, unknown_error: { message: "发生未知错误", action: "请重试,若问题持续请联系支持。" } }, s = { unknown_token_mint: "警告:未识别的代币 mint 地址。请仔细确认这是正确的代币,以避免资金损失。", token_typo_warning: "代币地址与已知稳定币(USDC、USDT、PYUSD、CASH)不匹配。请仔细核对,以防资金永久丢失。" }, t = { no_wallet_detected: "未检测到 Solana 钱包", install_wallet: "请安装 Phantom、Solflare 或 Backpack 等 Solana 钱包。", wallet_not_connected: "钱包未连接", connect_your_wallet: "请连接您的钱包以继续。", wallet_connection_failed: "连接钱包失败", try_again: "请重试连接。", transaction_rejected: "交易已被拒绝", approve_in_wallet: "请在钱包中批准该交易以继续。" }, c = {
2
+ comment: e,
3
+ version: a,
4
+ locale: "zh",
5
+ ui: n,
6
+ errors: o,
7
+ validation: s,
8
+ wallet: t
9
+ };
10
+ export {
11
+ e as comment,
12
+ c as default,
13
+ o as errors,
14
+ i as locale,
15
+ n as ui,
16
+ s as validation,
17
+ a as version,
18
+ t as wallet
19
+ };