@p2pdotme/sdk 1.0.2 → 1.0.3

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 (50) hide show
  1. package/README.md +2 -1
  2. package/dist/country.cjs +611 -0
  3. package/dist/country.cjs.map +1 -0
  4. package/dist/country.d.cts +106 -0
  5. package/dist/country.d.ts +106 -0
  6. package/dist/country.mjs +571 -0
  7. package/dist/country.mjs.map +1 -0
  8. package/dist/fraud-engine.cjs +19 -13
  9. package/dist/fraud-engine.cjs.map +1 -1
  10. package/dist/fraud-engine.mjs +19 -13
  11. package/dist/fraud-engine.mjs.map +1 -1
  12. package/dist/index.cjs +24 -16
  13. package/dist/index.cjs.map +1 -1
  14. package/dist/index.d.cts +32 -25
  15. package/dist/index.d.ts +32 -25
  16. package/dist/index.mjs +23 -16
  17. package/dist/index.mjs.map +1 -1
  18. package/dist/order-routing.cjs +19 -13
  19. package/dist/order-routing.cjs.map +1 -1
  20. package/dist/order-routing.mjs +19 -13
  21. package/dist/order-routing.mjs.map +1 -1
  22. package/dist/payload.cjs +18 -14
  23. package/dist/payload.cjs.map +1 -1
  24. package/dist/payload.d.cts +5 -20
  25. package/dist/payload.d.ts +5 -20
  26. package/dist/payload.mjs +18 -14
  27. package/dist/payload.mjs.map +1 -1
  28. package/dist/profile.cjs +19 -13
  29. package/dist/profile.cjs.map +1 -1
  30. package/dist/profile.d.cts +3 -27
  31. package/dist/profile.d.ts +3 -27
  32. package/dist/profile.mjs +19 -13
  33. package/dist/profile.mjs.map +1 -1
  34. package/dist/qr-parsers.cjs +260 -5
  35. package/dist/qr-parsers.cjs.map +1 -1
  36. package/dist/qr-parsers.d.cts +10 -1
  37. package/dist/qr-parsers.d.ts +10 -1
  38. package/dist/qr-parsers.mjs +260 -5
  39. package/dist/qr-parsers.mjs.map +1 -1
  40. package/dist/react.cjs +26 -20
  41. package/dist/react.cjs.map +1 -1
  42. package/dist/react.d.cts +8 -47
  43. package/dist/react.d.ts +8 -47
  44. package/dist/react.mjs +26 -20
  45. package/dist/react.mjs.map +1 -1
  46. package/dist/zkkyc.cjs +19 -13
  47. package/dist/zkkyc.cjs.map +1 -1
  48. package/dist/zkkyc.mjs +19 -13
  49. package/dist/zkkyc.mjs.map +1 -1
  50. package/package.json +7 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/country/index.ts","../src/constants/currencies.constant.ts","../src/country/currencies/ars.ts","../src/country/currencies/brl.ts","../src/country/currencies/cop.ts","../src/country/currencies/eur.ts","../src/country/currencies/idr.ts","../src/country/currencies/inr.ts","../src/country/currencies/mex.ts","../src/country/currencies/ngn.ts","../src/country/currencies/usd.ts","../src/country/currencies/ven.ts","../src/country/countries.ts","../src/country/payment-fields.ts","../src/country/validators.ts"],"sourcesContent":["// ── Constants ────────────────────────────────────────────────────────────\n\nexport { COUNTRY_OPTIONS } from \"./countries\";\nexport { PAYMENT_ID_FIELDS } from \"./payment-fields\";\n\n// ── Types ───────────────────────────────────────────────────────────────\n\nexport type { CountryOption, PaymentIdFieldConfig } from \"./types\";\n\n// ── Validators ──────────────────────────────────────────────────────────\n\nexport {\n\tdeserializeCompoundPaymentId,\n\tformatCompoundPaymentIdForDisplay,\n\tserializeCompoundPaymentId,\n\tvalidateArgentinePaymentId,\n\tvalidateIndonesianPhoneNumber,\n\tvalidateMexicanPaymentId,\n\tvalidateNigerianAccountNumber,\n\tvalidatePIXId,\n\tvalidateRevolutId,\n\tvalidateUPIId,\n\tvalidateVenezuelanPhoneNumber,\n\tvalidateVenezuelanRif,\n} from \"./validators\";\n","/** All supported currency symbols. Single source of truth for the SDK. */\nexport const CURRENCY = {\n\tIDR: \"IDR\",\n\tINR: \"INR\",\n\tBRL: \"BRL\",\n\tARS: \"ARS\",\n\tMEX: \"MEX\",\n\tVEN: \"VEN\",\n\tEUR: \"EUR\",\n\tNGN: \"NGN\",\n\tUSD: \"USD\",\n\tCOP: \"COP\",\n} as const;\n","import { CURRENCY } from \"../../constants\";\nimport type { CountryOption, PaymentIdFieldConfig } from \"../types\";\n\nexport const ARS_PLACEHOLDER = \"juan.perez\";\nexport const ARS_VALIDATION_ERROR =\n\t\"Please enter a valid CBU/CVU (22 digits) or Alias (6-20 characters)\";\n\n/** Validates CBU (Clave Bancaria Uniforme) — Argentine banking key, 22 digits with checksums. */\nfunction validateCBU(cbu: string): boolean {\n\tif (cbu.length !== 22) return false;\n\tif (/^(\\d)\\1{21}$/.test(cbu)) return false;\n\n\tconst bankCode = cbu.substring(0, 7);\n\tconst bankCheckDigit = parseInt(cbu[7], 10);\n\tlet sum = 0;\n\tconst weights = [7, 1, 3, 9, 7, 1, 3];\n\tfor (let i = 0; i < 7; i++) {\n\t\tsum += parseInt(bankCode[i], 10) * weights[i];\n\t}\n\tconst calculatedBankCheck = (10 - (sum % 10)) % 10;\n\tif (bankCheckDigit !== calculatedBankCheck) return false;\n\n\tconst accountNumber = cbu.substring(8, 21);\n\tconst accountCheckDigit = parseInt(cbu[21], 10);\n\tsum = 0;\n\tconst accountWeights = [3, 9, 7, 1, 3, 9, 7, 1, 3, 9, 7, 1, 3];\n\tfor (let i = 0; i < 13; i++) {\n\t\tsum += parseInt(accountNumber[i], 10) * accountWeights[i];\n\t}\n\tconst calculatedAccountCheck = (10 - (sum % 10)) % 10;\n\tif (accountCheckDigit !== calculatedAccountCheck) return false;\n\n\treturn true;\n}\n\n/**\n * Validates Argentine payment IDs (CBU, CVU, or Alias).\n * CBU/CVU: 22 digits with checksum. Alias: 6-20 alphanumeric characters.\n */\nexport function validateArgentinePaymentId(paymentId: string): boolean {\n\tif (!paymentId || paymentId.trim().length === 0) return false;\n\n\tconst trimmedPaymentId = paymentId.trim();\n\n\tif (/^\\d{22}$/.test(trimmedPaymentId)) return validateCBU(trimmedPaymentId);\n\tif (/^[a-zA-Z0-9.\\-_]{6,20}$/.test(trimmedPaymentId)) return true;\n\n\treturn false;\n}\n\n/** Payment ID field configuration for ARS (Argentina, ALIAS). */\nexport const ARS_PAYMENT_FIELDS: PaymentIdFieldConfig[] = [\n\t{\n\t\tkey: \"alias\",\n\t\tlabel: \"ALIAS_ID\",\n\t\tplaceholder: ARS_PLACEHOLDER,\n\t\tdisplayLabel: \"Alias\",\n\t\tvalidate: validateArgentinePaymentId,\n\t\tvalidationErrorMessage: ARS_VALIDATION_ERROR,\n\t},\n];\n\n/** Country option for Argentina (ARS). */\nexport const ARS_COUNTRY_OPTION: CountryOption = {\n\tcountry: \"Argentina\",\n\tcurrency: CURRENCY.ARS,\n\tsymbolNative: \"$\",\n\tlocale: \"es-AR\",\n\tpaymentMethod: \"ALIAS\",\n\tpaymentAddressName: \"ALIAS_ID\",\n\ttimezone: \"America/Argentina/Buenos_Aires\",\n\ttimezone_name: \"ART\",\n\tflag: \"🇦🇷\",\n\tflagUrl: \"https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/1f1e6-1f1f7.png\",\n\tphoneCode: \"+54\",\n\ttelegramSupportChannel: \"https://t.me/p2pmeargentina\",\n\ttwitterUsername: \"p2pmeargentina\",\n\tsmsCountryCodes: [\"AR\"],\n\tprecision: 2,\n\tisAlpha: false,\n\tdisabled: false,\n\tdisabledPaymentTypes: [],\n};\n","import { CURRENCY } from \"../../constants\";\nimport type { CountryOption, PaymentIdFieldConfig } from \"../types\";\n\nexport const BRL_PLACEHOLDER = \"Chave pix ou pix copia e cola\";\nexport const BRL_VALIDATION_ERROR = \"Please enter a valid PIX ID\";\n\n/** Validates CPF (Brazilian tax ID for individuals). */\nfunction validateCPF(cpf: string): boolean {\n\tif (cpf.length !== 11) return false;\n\tif (/^(\\d)\\1{10}$/.test(cpf)) return false;\n\n\tlet sum = 0;\n\tfor (let i = 0; i < 9; i++) {\n\t\tsum += parseInt(cpf[i], 10) * (10 - i);\n\t}\n\tlet remainder = sum % 11;\n\tconst firstDigit = remainder < 2 ? 0 : 11 - remainder;\n\tif (parseInt(cpf[9], 10) !== firstDigit) return false;\n\n\tsum = 0;\n\tfor (let i = 0; i < 10; i++) {\n\t\tsum += parseInt(cpf[i], 10) * (11 - i);\n\t}\n\tremainder = sum % 11;\n\tconst secondDigit = remainder < 2 ? 0 : 11 - remainder;\n\treturn parseInt(cpf[10], 10) === secondDigit;\n}\n\n/** Validates CNPJ (Brazilian tax ID for companies). */\nfunction validateCNPJ(cnpj: string): boolean {\n\tif (cnpj.length !== 14) return false;\n\tif (/^(\\d)\\1{13}$/.test(cnpj)) return false;\n\n\tlet sum = 0;\n\tconst weights1 = [5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2];\n\tfor (let i = 0; i < 12; i++) {\n\t\tsum += parseInt(cnpj[i], 10) * weights1[i];\n\t}\n\tlet remainder = sum % 11;\n\tconst firstDigit = remainder < 2 ? 0 : 11 - remainder;\n\tif (parseInt(cnpj[12], 10) !== firstDigit) return false;\n\n\tsum = 0;\n\tconst weights2 = [6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2];\n\tfor (let i = 0; i < 13; i++) {\n\t\tsum += parseInt(cnpj[i], 10) * weights2[i];\n\t}\n\tremainder = sum % 11;\n\tconst secondDigit = remainder < 2 ? 0 : 11 - remainder;\n\treturn parseInt(cnpj[13], 10) === secondDigit;\n}\n\n/**\n * Validates PIX ID format.\n * PIX can be: CPF (11 digits), CNPJ (14 digits), email, phone, or random key (UUID).\n */\nexport function validatePIXId(pixId: string): boolean {\n\tif (!pixId || pixId.trim().length === 0) return false;\n\n\tconst trimmedPixId = pixId.trim();\n\n\tif (/^\\d{11}$/.test(trimmedPixId)) return validateCPF(trimmedPixId);\n\tif (/^\\d{14}$/.test(trimmedPixId)) return validateCNPJ(trimmedPixId);\n\tif (/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(trimmedPixId)) return true;\n\tif (/^\\d{10,11}$/.test(trimmedPixId)) return true;\n\tif (/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(trimmedPixId))\n\t\treturn true;\n\n\treturn false;\n}\n\n/** Payment ID field configuration for BRL (Brazil, PIX). */\nexport const BRL_PAYMENT_FIELDS: PaymentIdFieldConfig[] = [\n\t{\n\t\tkey: \"pix\",\n\t\tlabel: \"PIX_ID\",\n\t\tplaceholder: BRL_PLACEHOLDER,\n\t\tdisplayLabel: \"PIX ID\",\n\t\tvalidate: validatePIXId,\n\t\tvalidationErrorMessage: BRL_VALIDATION_ERROR,\n\t},\n];\n\n/** Country option for Brazil (BRL). */\nexport const BRL_COUNTRY_OPTION: CountryOption = {\n\tcountry: \"Brazil\",\n\tcurrency: CURRENCY.BRL,\n\tsymbolNative: \"R$\",\n\tlocale: \"pt-BR\",\n\tpaymentMethod: \"PIX\",\n\tpaymentAddressName: \"PIX_ID\",\n\ttimezone: \"America/Sao_Paulo\",\n\ttimezone_name: \"BRT\",\n\tflag: \"🇧🇷\",\n\tflagUrl: \"https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/1f1e7-1f1f7.png\",\n\tphoneCode: \"+55\",\n\ttelegramSupportChannel: \"https://t.me/p2pmebrasil\",\n\ttwitterUsername: \"p2pmebrasil\",\n\tsmsCountryCodes: [\"BR\"],\n\tprecision: 2,\n\tisAlpha: false,\n\tdisabled: false,\n\tdisabledPaymentTypes: [],\n};\n","import { CURRENCY } from \"../../constants\";\nimport type { CountryOption, PaymentIdFieldConfig } from \"../types\";\n\nexport const COP_PLACEHOLDER = \"juan.perez@nequi.com.co\";\nexport const COP_VALIDATION_ERROR =\n\t\"Please enter a valid Nequi or Daviplata ID (e.g., 3001234567 or email)\";\n\n/**\n * Validates Colombian payment ID for Nequi or Daviplata.\n * Accepts a 10-digit phone number starting with 3, or a valid email address.\n */\nexport function validateColombianPaymentId(paymentId: string): boolean {\n\tif (!paymentId || paymentId.trim().length === 0) return false;\n\tconst trimmed = paymentId.trim();\n\tif (/^3\\d{9}$/.test(trimmed)) return true;\n\tif (/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(trimmed)) return true;\n\treturn false;\n}\n\n/** Payment ID field configuration for COP (Colombia, Transferencia). */\nexport const COP_PAYMENT_FIELDS: PaymentIdFieldConfig[] = [\n\t{\n\t\tkey: \"alias\",\n\t\tlabel: \"ALIAS_TRANSFERENCIA\",\n\t\tplaceholder: COP_PLACEHOLDER,\n\t\tdisplayLabel: \"Nequi / Daviplata\",\n\t\tvalidate: validateColombianPaymentId,\n\t\tvalidationErrorMessage: COP_VALIDATION_ERROR,\n\t},\n];\n\n/** Country option for Colombia (COP). */\nexport const COP_COUNTRY_OPTION: CountryOption = {\n\tcountry: \"Colombia\",\n\tcurrency: CURRENCY.COP,\n\tsymbolNative: \"$\",\n\tlocale: \"es-CO\",\n\tpaymentMethod: \"TRANSFERENCIA\",\n\tpaymentAddressName: \"ALIAS_TRANSFERENCIA\",\n\ttimezone: \"America/Bogota\",\n\ttimezone_name: \"COT\",\n\tflag: \"🇨🇴\",\n\tflagUrl: \"https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/1f1e8-1f1f4.png\",\n\tphoneCode: \"+57\",\n\ttelegramSupportChannel: \"https://t.me/p2pmeColombia\",\n\ttwitterUsername: \"p2pmeColombia\",\n\tsmsCountryCodes: [\"CO\"],\n\tprecision: 2,\n\tisAlpha: true,\n\tdisabled: true,\n\tdisabledPaymentTypes: [\"PAY\"],\n};\n","import { CURRENCY } from \"../../constants\";\nimport type { CountryOption, PaymentIdFieldConfig } from \"../types\";\n\nexport const EUR_PLACEHOLDER = \"@username or email\";\nexport const EUR_VALIDATION_ERROR = \"Please enter a valid Revolut ID (username, email, or phone)\";\n\n/**\n * Validates Revolut ID (username, email, or phone number).\n */\nexport function validateRevolutId(revolutId: string): boolean {\n\tif (!revolutId || revolutId.trim().length === 0) return false;\n\n\tconst trimmed = revolutId.trim();\n\n\tif (/^@?[a-zA-Z0-9._-]{3,30}$/.test(trimmed)) return true;\n\tif (/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(trimmed)) return true;\n\tif (/^\\+?\\d{7,15}$/.test(trimmed)) return true;\n\n\treturn false;\n}\n\n/** Payment ID field configuration for EUR (Revolut EUR). */\nexport const EUR_PAYMENT_FIELDS: PaymentIdFieldConfig[] = [\n\t{\n\t\tkey: \"revolut\",\n\t\tlabel: \"REVOLUT_ID\",\n\t\tplaceholder: EUR_PLACEHOLDER,\n\t\tdisplayLabel: \"Revolut ID\",\n\t\tvalidate: validateRevolutId,\n\t\tvalidationErrorMessage: EUR_VALIDATION_ERROR,\n\t},\n];\n\n/** Country option for Revolut EUR. */\nexport const EUR_COUNTRY_OPTION: CountryOption = {\n\tcountry: \"Revolut EUR\",\n\tcurrency: CURRENCY.EUR,\n\tsymbolNative: \"€\",\n\tlocale: \"de-DE\",\n\tpaymentMethod: \"REVOLUT\",\n\tpaymentAddressName: \"REVOLUT_ID\",\n\ttimezone: \"Europe/Berlin\",\n\ttimezone_name: \"CET\",\n\tflag: \"\",\n\tflagUrl: \"https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/1f310.png\",\n\tphoneCode: \"\",\n\ttelegramSupportChannel: \"https://t.me/P2Pdotme\",\n\ttwitterUsername: \"P2Pdotme\",\n\tsmsCountryCodes: [],\n\tprecision: 2,\n\tisAlpha: true,\n\tdisabled: false,\n\tdisabledPaymentTypes: [\"PAY\"],\n};\n","import { CURRENCY } from \"../../constants\";\nimport type { CountryOption, PaymentIdFieldConfig } from \"../types\";\n\nexport const IDR_PLACEHOLDER = \"8123456789\";\nexport const IDR_VALIDATION_ERROR =\n\t\"Please enter a valid Indonesian phone number (e.g., 8123456789)\";\n\n/**\n * Validates Indonesian phone number.\n * Validates just the number part (9-12 digits).\n */\nexport function validateIndonesianPhoneNumber(phoneNumber: string): boolean {\n\tif (!phoneNumber || phoneNumber.trim().length === 0) return false;\n\tif (/[a-zA-Z]/.test(phoneNumber)) return false;\n\tconst cleaned = phoneNumber.replace(/\\D/g, \"\");\n\treturn /^\\d{9,12}$/.test(cleaned);\n}\n\n/** Payment ID field configuration for IDR (Indonesia, QRIS). */\nexport const IDR_PAYMENT_FIELDS: PaymentIdFieldConfig[] = [\n\t{\n\t\tkey: \"phone\",\n\t\tlabel: \"PHONE_NUMBER\",\n\t\tplaceholder: IDR_PLACEHOLDER,\n\t\tdisplayLabel: \"Phone Number\",\n\t\tvalidate: validateIndonesianPhoneNumber,\n\t\tvalidationErrorMessage: IDR_VALIDATION_ERROR,\n\t},\n];\n\n/** Country option for Indonesia (IDR). */\nexport const IDR_COUNTRY_OPTION: CountryOption = {\n\tcountry: \"Indonesia\",\n\tcurrency: CURRENCY.IDR,\n\tsymbolNative: \"Rp\",\n\tlocale: \"id-ID\",\n\tpaymentMethod: \"QRIS\",\n\tpaymentAddressName: \"PHONE_NUMBER\",\n\ttimezone: \"Asia/Jakarta\",\n\ttimezone_name: \"WIB\",\n\tflag: \"🇮🇩\",\n\tflagUrl: \"https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/1f1ee-1f1e9.png\",\n\tphoneCode: \"+62\",\n\ttelegramSupportChannel: \"https://t.me/p2pmeindonesia\",\n\ttwitterUsername: \"p2pdotmeID\",\n\tsmsCountryCodes: [],\n\tprecision: 0,\n\tisAlpha: false,\n\tdisabled: false,\n\tdisabledPaymentTypes: [],\n};\n","import { CURRENCY } from \"../../constants\";\nimport type { CountryOption, PaymentIdFieldConfig } from \"../types\";\n\nexport const INR_PLACEHOLDER = \"merchant@upi\";\nexport const INR_VALIDATION_ERROR = \"Please enter a valid UPI ID (e.g., username@bankname)\";\n\n/**\n * Validates UPI ID format.\n * UPI ID format: username@bankname (e.g., john@paytm, user@ybl, 8658404239@kotak811)\n */\nexport function validateUPIId(upiId: string): boolean {\n\tif (!upiId || upiId.trim().length === 0) return false;\n\tconst upiRegex = /^[a-zA-Z0-9.\\-_]{2,256}@[a-zA-Z0-9]{2,64}$/;\n\treturn upiRegex.test(upiId.trim());\n}\n\n/** Payment ID field configuration for INR (India, UPI). */\nexport const INR_PAYMENT_FIELDS: PaymentIdFieldConfig[] = [\n\t{\n\t\tkey: \"upi\",\n\t\tlabel: \"UPI_ID\",\n\t\tplaceholder: INR_PLACEHOLDER,\n\t\tdisplayLabel: \"UPI ID\",\n\t\tvalidate: validateUPIId,\n\t\tvalidationErrorMessage: INR_VALIDATION_ERROR,\n\t},\n];\n\n/** Country option for India (INR). */\nexport const INR_COUNTRY_OPTION: CountryOption = {\n\tcountry: \"India\",\n\tcurrency: CURRENCY.INR,\n\tsymbolNative: \"₹\",\n\tlocale: \"en-IN\",\n\tpaymentMethod: \"UPI\",\n\tpaymentAddressName: \"UPI_ID\",\n\ttimezone: \"Asia/Kolkata\",\n\ttimezone_name: \"IST\",\n\tflag: \"🇮🇳\",\n\tflagUrl: \"https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/1f1ee-1f1f3.png\",\n\tphoneCode: \"+91\",\n\ttelegramSupportChannel: \"https://t.me/P2Pdotme\",\n\ttwitterUsername: \"P2Pdotme\",\n\tsmsCountryCodes: [\"IN\"],\n\tprecision: 2,\n\tisAlpha: false,\n\tdisabled: false,\n\tdisabledPaymentTypes: [],\n};\n","import { CURRENCY } from \"../../constants\";\nimport type { CountryOption, PaymentIdFieldConfig } from \"../types\";\n\nexport const MEX_PLACEHOLDER = \"012345678901234567\";\nexport const MEX_VALIDATION_ERROR =\n\t\"Please enter a valid CLABE (18 digits), card number, or phone number\";\n\n/**\n * Validates Mexican payment IDs (CLABE, card number, or phone number).\n * CLABE: 18 digits. Card: 16 digits. Phone: 10 digits.\n */\nexport function validateMexicanPaymentId(paymentId: string): boolean {\n\tif (!paymentId || paymentId.trim().length === 0) return false;\n\n\tconst trimmed = paymentId.trim().replace(/\\D/g, \"\");\n\n\tif (/^\\d{18}$/.test(trimmed)) return true;\n\tif (/^\\d{16}$/.test(trimmed)) return true;\n\tif (/^\\d{10}$/.test(trimmed)) return true;\n\n\treturn false;\n}\n\n/** Payment ID field configuration for MEX (Mexico, SPEI). */\nexport const MEX_PAYMENT_FIELDS: PaymentIdFieldConfig[] = [\n\t{\n\t\tkey: \"clabe\",\n\t\tlabel: \"CLABE_ID\",\n\t\tplaceholder: MEX_PLACEHOLDER,\n\t\tdisplayLabel: \"CLABE\",\n\t\tvalidate: validateMexicanPaymentId,\n\t\tvalidationErrorMessage: MEX_VALIDATION_ERROR,\n\t},\n];\n\n/** Country option for Mexico (MEX). */\nexport const MEX_COUNTRY_OPTION: CountryOption = {\n\tcountry: \"Mexico\",\n\tcurrency: CURRENCY.MEX,\n\tinternationalFormat: \"MXN\",\n\tsymbolNative: \"Mx\",\n\tlocale: \"es-MX\",\n\tpaymentMethod: \"SPEI\",\n\tpaymentAddressName: \"CLABE_ID\",\n\ttimezone: \"America/Mexico_City\",\n\ttimezone_name: \"CST\",\n\tflag: \"🇲🇽\",\n\tflagUrl: \"https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/1f1f2-1f1fd.png\",\n\tphoneCode: \"+52\",\n\ttelegramSupportChannel: \"https://t.me/p2pmemexico\",\n\ttwitterUsername: \"p2pmemexico\",\n\tsmsCountryCodes: [\"MX\"],\n\tprecision: 2,\n\tisAlpha: true,\n\tdisabled: false,\n\tdisabledPaymentTypes: [\"PAY\"],\n};\n","import { CURRENCY } from \"../../constants\";\nimport type { CountryOption, PaymentIdFieldConfig } from \"../types\";\n\nexport const NGN_PLACEHOLDER = \"0123456789\";\nexport const NGN_PLACEHOLDER_BANK = \"Bank Name\";\nexport const NGN_VALIDATION_ERROR = \"Please enter a valid 10-digit account number\";\n\n/**\n * Validates Nigerian bank account number (NUBAN format, 10 digits).\n */\nexport function validateNigerianAccountNumber(accountNumber: string): boolean {\n\tif (!accountNumber || accountNumber.trim().length === 0) return false;\n\tconst cleaned = accountNumber.trim().replace(/\\D/g, \"\");\n\treturn /^\\d{10}$/.test(cleaned);\n}\n\n/** Payment ID field configuration for NGN (Nigeria, NIP). */\nexport const NGN_PAYMENT_FIELDS: PaymentIdFieldConfig[] = [\n\t{\n\t\tkey: \"account\",\n\t\tlabel: \"ACCOUNT_NUMBER\",\n\t\tplaceholder: NGN_PLACEHOLDER,\n\t\tdisplayLabel: \"Account Number\",\n\t\tvalidate: validateNigerianAccountNumber,\n\t\tvalidationErrorMessage: NGN_VALIDATION_ERROR,\n\t},\n\t{\n\t\tkey: \"bank-name\",\n\t\tlabel: \"BANK_NAME\",\n\t\tplaceholder: NGN_PLACEHOLDER_BANK,\n\t\tdisplayLabel: \"Bank Name\",\n\t\tvalidate: (v: string) => v.trim().length > 0,\n\t\tvalidationErrorMessage: NGN_VALIDATION_ERROR,\n\t},\n];\n\n/** Country option for Nigeria (NGN). */\nexport const NGN_COUNTRY_OPTION: CountryOption = {\n\tcountry: \"Nigeria\",\n\tcurrency: CURRENCY.NGN,\n\tsymbolNative: \"₦\",\n\tlocale: \"en-NG\",\n\tpaymentMethod: \"NIP\",\n\tpaymentAddressName: \"ACCOUNT_NUMBER\",\n\ttimezone: \"Africa/Lagos\",\n\ttimezone_name: \"WAT\",\n\tflag: \"🇳🇬\",\n\tflagUrl: \"https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/1f1f3-1f1ec.png\",\n\tphoneCode: \"+234\",\n\ttelegramSupportChannel: \"https://t.me/p2pmeNigeria\",\n\ttwitterUsername: \"p2pmeNigeria\",\n\tsmsCountryCodes: [\"NG\"],\n\tprecision: 2,\n\tisAlpha: true,\n\tdisabled: false,\n\tdisabledPaymentTypes: [\"PAY\"],\n};\n","import { CURRENCY } from \"../../constants\";\nimport type { CountryOption, PaymentIdFieldConfig } from \"../types\";\nimport { EUR_PLACEHOLDER, EUR_VALIDATION_ERROR, validateRevolutId } from \"./eur\";\n\nexport const USD_PLACEHOLDER = EUR_PLACEHOLDER;\nexport const USD_VALIDATION_ERROR = EUR_VALIDATION_ERROR;\n\n/** Payment ID field configuration for USD (Revolut USD). */\nexport const USD_PAYMENT_FIELDS: PaymentIdFieldConfig[] = [\n\t{\n\t\tkey: \"revolut\",\n\t\tlabel: \"REVOLUT_ID\",\n\t\tplaceholder: USD_PLACEHOLDER,\n\t\tdisplayLabel: \"Revolut ID\",\n\t\tvalidate: validateRevolutId,\n\t\tvalidationErrorMessage: USD_VALIDATION_ERROR,\n\t},\n];\n\n/** Country option for Revolut USD. */\nexport const USD_COUNTRY_OPTION: CountryOption = {\n\tcountry: \"Revolut USD\",\n\tcurrency: CURRENCY.USD,\n\tsymbolNative: \"$\",\n\tlocale: \"en-US\",\n\tpaymentMethod: \"REVOLUT\",\n\tpaymentAddressName: \"REVOLUT_ID\",\n\ttimezone: \"America/New_York\",\n\ttimezone_name: \"EST\",\n\tflag: \"\",\n\tflagUrl: \"https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/1f310.png\",\n\tphoneCode: \"+1\",\n\ttelegramSupportChannel: \"https://t.me/P2Pdotme\",\n\ttwitterUsername: \"P2Pdotme\",\n\tsmsCountryCodes: [\"US\"],\n\tprecision: 2,\n\tisAlpha: true,\n\tdisabled: false,\n\tdisabledPaymentTypes: [\"PAY\"],\n};\n","import { CURRENCY } from \"../../constants\";\nimport type { CountryOption, PaymentIdFieldConfig } from \"../types\";\n\nexport const VEN_PLACEHOLDER = \"04121234567\";\nexport const VEN_PLACEHOLDER_RIF = \"V12345678\";\nexport const VEN_PLACEHOLDER_BANK = \"Banesco\";\n\nexport const VEN_VALIDATION_ERROR = \"Please enter a valid phone number (e.g., 04121234567)\";\nexport const VEN_VALIDATION_ERROR_RIF = \"Please enter a valid RIF (e.g., V12345678)\";\nexport const VEN_VALIDATION_ERROR_BANK = \"Please enter a bank name\";\n\n/**\n * Validates Venezuelan phone number for Pago Movil.\n * Format: 04XX-XXXXXXX (11 digits starting with 04).\n */\nexport function validateVenezuelanPhoneNumber(phoneNumber: string): boolean {\n\tif (!phoneNumber || phoneNumber.trim().length === 0) return false;\n\n\tconst cleaned = phoneNumber.trim().replace(/\\D/g, \"\");\n\n\tif (/^04\\d{9}$/.test(cleaned)) return true;\n\tif (/^4\\d{9}$/.test(cleaned)) return true;\n\n\treturn false;\n}\n\n/**\n * Validates Venezuelan RIF (Registro de Informacion Fiscal).\n * Format: One letter (J/V/E/G/C) followed by 7-9 digits.\n */\nexport function validateVenezuelanRif(rif: string): boolean {\n\tif (!rif || rif.trim().length === 0) return false;\n\tconst trimmed = rif.trim().toUpperCase();\n\treturn /^[JVEGC]\\d{7,9}$/.test(trimmed);\n}\n\n/** Payment ID field configuration for VEN (Venezuela, Pago Móvil). */\nexport const VEN_PAYMENT_FIELDS: PaymentIdFieldConfig[] = [\n\t{\n\t\tkey: \"phone\",\n\t\tlabel: \"PHONE_NUMBER\",\n\t\tplaceholder: VEN_PLACEHOLDER,\n\t\tdisplayLabel: \"Phone\",\n\t\tvalidate: validateVenezuelanPhoneNumber,\n\t\tvalidationErrorMessage: VEN_VALIDATION_ERROR,\n\t},\n\t{\n\t\tkey: \"rif\",\n\t\tlabel: \"RIF_LABEL\",\n\t\tplaceholder: VEN_PLACEHOLDER_RIF,\n\t\tdisplayLabel: \"RIF\",\n\t\tvalidate: validateVenezuelanRif,\n\t\tvalidationErrorMessage: VEN_VALIDATION_ERROR_RIF,\n\t},\n\t{\n\t\tkey: \"bank\",\n\t\tlabel: \"BANK_LABEL\",\n\t\tplaceholder: VEN_PLACEHOLDER_BANK,\n\t\tdisplayLabel: \"Banco\",\n\t\tvalidate: (v: string) => v.trim().length > 0,\n\t\tvalidationErrorMessage: VEN_VALIDATION_ERROR_BANK,\n\t},\n];\n\n/** Country option for Venezuela (VEN). */\nexport const VEN_COUNTRY_OPTION: CountryOption = {\n\tcountry: \"Venezuela\",\n\tcurrency: CURRENCY.VEN,\n\tinternationalFormat: \"VES\",\n\tsymbolNative: \"Bs\",\n\tlocale: \"es-VE\",\n\tpaymentMethod: \"PAGO_MOVIL\",\n\tpaymentAddressName: \"PAGO_MOVIL_DETAILS\",\n\ttimezone: \"America/Caracas\",\n\ttimezone_name: \"VET\",\n\tflag: \"🇻🇪\",\n\tflagUrl: \"https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/1f1fb-1f1ea.png\",\n\tphoneCode: \"+58\",\n\ttelegramSupportChannel: \"https://t.me/p2pmevenezuela\",\n\ttwitterUsername: \"p2pmevenezuela\",\n\tsmsCountryCodes: [\"VE\"],\n\tprecision: 2,\n\tisAlpha: true,\n\tdisabled: false,\n\tdisabledPaymentTypes: [],\n};\n","import {\n\tARS_COUNTRY_OPTION,\n\tBRL_COUNTRY_OPTION,\n\tCOP_COUNTRY_OPTION,\n\tEUR_COUNTRY_OPTION,\n\tIDR_COUNTRY_OPTION,\n\tINR_COUNTRY_OPTION,\n\tMEX_COUNTRY_OPTION,\n\tNGN_COUNTRY_OPTION,\n\tUSD_COUNTRY_OPTION,\n\tVEN_COUNTRY_OPTION,\n} from \"./currencies\";\nimport type { CountryOption } from \"./types\";\n\n/** All supported countries with their currency metadata, payment methods, and display config. */\nexport const COUNTRY_OPTIONS: readonly CountryOption[] = [\n\tINR_COUNTRY_OPTION,\n\tIDR_COUNTRY_OPTION,\n\tBRL_COUNTRY_OPTION,\n\tARS_COUNTRY_OPTION,\n\tMEX_COUNTRY_OPTION,\n\tVEN_COUNTRY_OPTION,\n\tNGN_COUNTRY_OPTION,\n\tCOP_COUNTRY_OPTION,\n\tEUR_COUNTRY_OPTION,\n\tUSD_COUNTRY_OPTION,\n];\n","import type { CurrencyType } from \"../types\";\nimport {\n\tARS_PAYMENT_FIELDS,\n\tBRL_PAYMENT_FIELDS,\n\tCOP_PAYMENT_FIELDS,\n\tEUR_PAYMENT_FIELDS,\n\tIDR_PAYMENT_FIELDS,\n\tINR_PAYMENT_FIELDS,\n\tMEX_PAYMENT_FIELDS,\n\tNGN_PAYMENT_FIELDS,\n\tUSD_PAYMENT_FIELDS,\n\tVEN_PAYMENT_FIELDS,\n} from \"./currencies\";\nimport type { PaymentIdFieldConfig } from \"./types\";\n\n/** Payment ID field configuration for each supported currency. */\nexport const PAYMENT_ID_FIELDS: Record<CurrencyType, PaymentIdFieldConfig[]> = {\n\tINR: INR_PAYMENT_FIELDS,\n\tIDR: IDR_PAYMENT_FIELDS,\n\tBRL: BRL_PAYMENT_FIELDS,\n\tARS: ARS_PAYMENT_FIELDS,\n\tMEX: MEX_PAYMENT_FIELDS,\n\tVEN: VEN_PAYMENT_FIELDS,\n\tNGN: NGN_PAYMENT_FIELDS,\n\tEUR: EUR_PAYMENT_FIELDS,\n\tUSD: USD_PAYMENT_FIELDS,\n\tCOP: COP_PAYMENT_FIELDS,\n};\n","export {\n\tvalidateArgentinePaymentId,\n\tvalidateColombianPaymentId,\n\tvalidateIndonesianPhoneNumber,\n\tvalidateMexicanPaymentId,\n\tvalidateNigerianAccountNumber,\n\tvalidatePIXId,\n\tvalidateRevolutId,\n\tvalidateUPIId,\n\tvalidateVenezuelanPhoneNumber,\n\tvalidateVenezuelanRif,\n} from \"./currencies\";\n\n/** Serializes multiple fields into a pipe-separated string. */\nexport function serializeCompoundPaymentId(...fields: string[]): string {\n\treturn fields.join(\"|\");\n}\n\n/** Deserializes a pipe-separated payment ID into its component fields. */\nexport function deserializeCompoundPaymentId(paymentId: string): string[] {\n\treturn paymentId.split(\"|\");\n}\n\n/**\n * Formats a compound payment ID for display using optional labels.\n * Fields without a label are shown as-is, fields with a label are shown as \"Label: value\".\n */\nexport function formatCompoundPaymentIdForDisplay(\n\tpaymentId: string,\n\tlabels: (string | null)[],\n): string {\n\tconst parts = deserializeCompoundPaymentId(paymentId);\n\treturn parts.map((part, i) => (labels[i] ? `${labels[i]}: ${part}` : part)).join(\" | \");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCO,IAAM,WAAW;AAAA,EACvB,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,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U;AAAA,EACV,sBAAsB,CAAC;AACxB;;;ACtEO,IAAM,kBAA4C;AAAA,EACxD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;;;ACVO,IAAM,oBAAkE;AAAA,EAC9E,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AACN;;;ACbO,SAAS,8BAA8B,QAA0B;AACvE,SAAO,OAAO,KAAK,GAAG;AACvB;AAGO,SAAS,6BAA6B,WAA6B;AACzE,SAAO,UAAU,MAAM,GAAG;AAC3B;AAMO,SAAS,kCACf,WACA,QACS;AACT,QAAM,QAAQ,6BAA6B,SAAS;AACpD,SAAO,MAAM,IAAI,CAAC,MAAM,MAAO,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,CAAC,KAAK,IAAI,KAAK,IAAK,EAAE,KAAK,KAAK;AACvF;","names":[]}
@@ -0,0 +1,106 @@
1
+ import z$1, { z } from 'zod';
2
+
3
+ declare const ZodCurrencySchema: z.ZodEnum<{
4
+ [x: string]: string;
5
+ }>;
6
+
7
+ type CurrencyType = z$1.infer<typeof ZodCurrencySchema>;
8
+
9
+ interface PaymentIdFieldConfig {
10
+ readonly key: string;
11
+ readonly label: string;
12
+ readonly placeholder: string;
13
+ readonly displayLabel: string | null;
14
+ readonly validate: (value: string) => boolean;
15
+ readonly validationErrorMessage: string;
16
+ }
17
+ interface CountryOption {
18
+ readonly country: string;
19
+ readonly currency: CurrencyType;
20
+ readonly internationalFormat?: string;
21
+ readonly symbolNative: string;
22
+ readonly locale: string;
23
+ readonly paymentMethod: string;
24
+ readonly paymentAddressName: string;
25
+ readonly timezone: string;
26
+ readonly timezone_name: string;
27
+ readonly flag: string;
28
+ readonly phoneCode?: string;
29
+ readonly flagUrl: string;
30
+ readonly telegramSupportChannel: string;
31
+ readonly twitterUsername: string;
32
+ readonly smsCountryCodes: readonly string[];
33
+ readonly precision: number;
34
+ readonly isAlpha: boolean;
35
+ readonly disabled: boolean;
36
+ readonly disabledPaymentTypes: readonly string[];
37
+ }
38
+
39
+ /** All supported countries with their currency metadata, payment methods, and display config. */
40
+ declare const COUNTRY_OPTIONS: readonly CountryOption[];
41
+
42
+ /** Payment ID field configuration for each supported currency. */
43
+ declare const PAYMENT_ID_FIELDS: Record<CurrencyType, PaymentIdFieldConfig[]>;
44
+
45
+ /**
46
+ * Validates Argentine payment IDs (CBU, CVU, or Alias).
47
+ * CBU/CVU: 22 digits with checksum. Alias: 6-20 alphanumeric characters.
48
+ */
49
+ declare function validateArgentinePaymentId(paymentId: string): boolean;
50
+
51
+ /**
52
+ * Validates PIX ID format.
53
+ * PIX can be: CPF (11 digits), CNPJ (14 digits), email, phone, or random key (UUID).
54
+ */
55
+ declare function validatePIXId(pixId: string): boolean;
56
+
57
+ /**
58
+ * Validates Revolut ID (username, email, or phone number).
59
+ */
60
+ declare function validateRevolutId(revolutId: string): boolean;
61
+
62
+ /**
63
+ * Validates Indonesian phone number.
64
+ * Validates just the number part (9-12 digits).
65
+ */
66
+ declare function validateIndonesianPhoneNumber(phoneNumber: string): boolean;
67
+
68
+ /**
69
+ * Validates UPI ID format.
70
+ * UPI ID format: username@bankname (e.g., john@paytm, user@ybl, 8658404239@kotak811)
71
+ */
72
+ declare function validateUPIId(upiId: string): boolean;
73
+
74
+ /**
75
+ * Validates Mexican payment IDs (CLABE, card number, or phone number).
76
+ * CLABE: 18 digits. Card: 16 digits. Phone: 10 digits.
77
+ */
78
+ declare function validateMexicanPaymentId(paymentId: string): boolean;
79
+
80
+ /**
81
+ * Validates Nigerian bank account number (NUBAN format, 10 digits).
82
+ */
83
+ declare function validateNigerianAccountNumber(accountNumber: string): boolean;
84
+
85
+ /**
86
+ * Validates Venezuelan phone number for Pago Movil.
87
+ * Format: 04XX-XXXXXXX (11 digits starting with 04).
88
+ */
89
+ declare function validateVenezuelanPhoneNumber(phoneNumber: string): boolean;
90
+ /**
91
+ * Validates Venezuelan RIF (Registro de Informacion Fiscal).
92
+ * Format: One letter (J/V/E/G/C) followed by 7-9 digits.
93
+ */
94
+ declare function validateVenezuelanRif(rif: string): boolean;
95
+
96
+ /** Serializes multiple fields into a pipe-separated string. */
97
+ declare function serializeCompoundPaymentId(...fields: string[]): string;
98
+ /** Deserializes a pipe-separated payment ID into its component fields. */
99
+ declare function deserializeCompoundPaymentId(paymentId: string): string[];
100
+ /**
101
+ * Formats a compound payment ID for display using optional labels.
102
+ * Fields without a label are shown as-is, fields with a label are shown as "Label: value".
103
+ */
104
+ declare function formatCompoundPaymentIdForDisplay(paymentId: string, labels: (string | null)[]): string;
105
+
106
+ export { COUNTRY_OPTIONS, type CountryOption, PAYMENT_ID_FIELDS, type PaymentIdFieldConfig, deserializeCompoundPaymentId, formatCompoundPaymentIdForDisplay, serializeCompoundPaymentId, validateArgentinePaymentId, validateIndonesianPhoneNumber, validateMexicanPaymentId, validateNigerianAccountNumber, validatePIXId, validateRevolutId, validateUPIId, validateVenezuelanPhoneNumber, validateVenezuelanRif };
@@ -0,0 +1,106 @@
1
+ import z$1, { z } from 'zod';
2
+
3
+ declare const ZodCurrencySchema: z.ZodEnum<{
4
+ [x: string]: string;
5
+ }>;
6
+
7
+ type CurrencyType = z$1.infer<typeof ZodCurrencySchema>;
8
+
9
+ interface PaymentIdFieldConfig {
10
+ readonly key: string;
11
+ readonly label: string;
12
+ readonly placeholder: string;
13
+ readonly displayLabel: string | null;
14
+ readonly validate: (value: string) => boolean;
15
+ readonly validationErrorMessage: string;
16
+ }
17
+ interface CountryOption {
18
+ readonly country: string;
19
+ readonly currency: CurrencyType;
20
+ readonly internationalFormat?: string;
21
+ readonly symbolNative: string;
22
+ readonly locale: string;
23
+ readonly paymentMethod: string;
24
+ readonly paymentAddressName: string;
25
+ readonly timezone: string;
26
+ readonly timezone_name: string;
27
+ readonly flag: string;
28
+ readonly phoneCode?: string;
29
+ readonly flagUrl: string;
30
+ readonly telegramSupportChannel: string;
31
+ readonly twitterUsername: string;
32
+ readonly smsCountryCodes: readonly string[];
33
+ readonly precision: number;
34
+ readonly isAlpha: boolean;
35
+ readonly disabled: boolean;
36
+ readonly disabledPaymentTypes: readonly string[];
37
+ }
38
+
39
+ /** All supported countries with their currency metadata, payment methods, and display config. */
40
+ declare const COUNTRY_OPTIONS: readonly CountryOption[];
41
+
42
+ /** Payment ID field configuration for each supported currency. */
43
+ declare const PAYMENT_ID_FIELDS: Record<CurrencyType, PaymentIdFieldConfig[]>;
44
+
45
+ /**
46
+ * Validates Argentine payment IDs (CBU, CVU, or Alias).
47
+ * CBU/CVU: 22 digits with checksum. Alias: 6-20 alphanumeric characters.
48
+ */
49
+ declare function validateArgentinePaymentId(paymentId: string): boolean;
50
+
51
+ /**
52
+ * Validates PIX ID format.
53
+ * PIX can be: CPF (11 digits), CNPJ (14 digits), email, phone, or random key (UUID).
54
+ */
55
+ declare function validatePIXId(pixId: string): boolean;
56
+
57
+ /**
58
+ * Validates Revolut ID (username, email, or phone number).
59
+ */
60
+ declare function validateRevolutId(revolutId: string): boolean;
61
+
62
+ /**
63
+ * Validates Indonesian phone number.
64
+ * Validates just the number part (9-12 digits).
65
+ */
66
+ declare function validateIndonesianPhoneNumber(phoneNumber: string): boolean;
67
+
68
+ /**
69
+ * Validates UPI ID format.
70
+ * UPI ID format: username@bankname (e.g., john@paytm, user@ybl, 8658404239@kotak811)
71
+ */
72
+ declare function validateUPIId(upiId: string): boolean;
73
+
74
+ /**
75
+ * Validates Mexican payment IDs (CLABE, card number, or phone number).
76
+ * CLABE: 18 digits. Card: 16 digits. Phone: 10 digits.
77
+ */
78
+ declare function validateMexicanPaymentId(paymentId: string): boolean;
79
+
80
+ /**
81
+ * Validates Nigerian bank account number (NUBAN format, 10 digits).
82
+ */
83
+ declare function validateNigerianAccountNumber(accountNumber: string): boolean;
84
+
85
+ /**
86
+ * Validates Venezuelan phone number for Pago Movil.
87
+ * Format: 04XX-XXXXXXX (11 digits starting with 04).
88
+ */
89
+ declare function validateVenezuelanPhoneNumber(phoneNumber: string): boolean;
90
+ /**
91
+ * Validates Venezuelan RIF (Registro de Informacion Fiscal).
92
+ * Format: One letter (J/V/E/G/C) followed by 7-9 digits.
93
+ */
94
+ declare function validateVenezuelanRif(rif: string): boolean;
95
+
96
+ /** Serializes multiple fields into a pipe-separated string. */
97
+ declare function serializeCompoundPaymentId(...fields: string[]): string;
98
+ /** Deserializes a pipe-separated payment ID into its component fields. */
99
+ declare function deserializeCompoundPaymentId(paymentId: string): string[];
100
+ /**
101
+ * Formats a compound payment ID for display using optional labels.
102
+ * Fields without a label are shown as-is, fields with a label are shown as "Label: value".
103
+ */
104
+ declare function formatCompoundPaymentIdForDisplay(paymentId: string, labels: (string | null)[]): string;
105
+
106
+ export { COUNTRY_OPTIONS, type CountryOption, PAYMENT_ID_FIELDS, type PaymentIdFieldConfig, deserializeCompoundPaymentId, formatCompoundPaymentIdForDisplay, serializeCompoundPaymentId, validateArgentinePaymentId, validateIndonesianPhoneNumber, validateMexicanPaymentId, validateNigerianAccountNumber, validatePIXId, validateRevolutId, validateUPIId, validateVenezuelanPhoneNumber, validateVenezuelanRif };