@block-auth.io/core 0.9.1 → 0.10.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.
package/dist/index.js CHANGED
@@ -6,6 +6,7 @@ import { injected, walletConnect } from '@wagmi/connectors';
6
6
  import { mainnet } from 'viem/chains';
7
7
  import { PublicClientApplication } from '@azure/msal-browser';
8
8
  import bs58 from 'bs58';
9
+ import { getCountries, getCountryCallingCode, AsYouType, parsePhoneNumberFromString } from 'libphonenumber-js/min';
9
10
  import QRCode from 'qrcode';
10
11
 
11
12
  var __defProp = Object.defineProperty;
@@ -985,6 +986,7 @@ var initial2 = {
985
986
  isSigned: false,
986
987
  isSigningLoader: false,
987
988
  isAcceptingTxn: false,
989
+ acceptTxnError: null,
988
990
  waitingForSuccessLogInSince: 0,
989
991
  isOtpRequired: false,
990
992
  isOnDeletion: false,
@@ -1003,6 +1005,7 @@ var setIsSigning = (v) => $ui.setKey("isSigning", v);
1003
1005
  var setIsSigned = (v) => $ui.setKey("isSigned", v);
1004
1006
  var setIsSigningLoader = (v) => $ui.setKey("isSigningLoader", v);
1005
1007
  var setIsAcceptingTxn = (v) => $ui.setKey("isAcceptingTxn", v);
1008
+ var setAcceptTxnError = (v) => $ui.setKey("acceptTxnError", v);
1006
1009
  var setWaitingForSuccessLogInSince = (v) => $ui.setKey("waitingForSuccessLogInSince", v);
1007
1010
  var setIsOtpRequired = (v) => $ui.setKey("isOtpRequired", v);
1008
1011
  var setIsOnDeletion = (v) => $ui.setKey("isOnDeletion", v);
@@ -1532,6 +1535,26 @@ async function emitOauthSignup(deps) {
1532
1535
  }
1533
1536
 
1534
1537
  // src/auth/txns.ts
1538
+ var TXN_DATA_TIMEOUT_MS = 3e3;
1539
+ var TXN_DATA_ERROR_KEY = "txn_data_required";
1540
+ var TXN_DATA_MODES = ["required", "optional"];
1541
+ var TXN_DATA_STATUSES = [
1542
+ "shared",
1543
+ "granted",
1544
+ "consent",
1545
+ "missing"
1546
+ ];
1547
+ var toTxnDataParam = (raw) => {
1548
+ if (!raw || typeof raw.slug !== "string") return null;
1549
+ if (!TXN_DATA_MODES.includes(raw.mode)) return null;
1550
+ if (!TXN_DATA_STATUSES.includes(raw.status)) return null;
1551
+ return {
1552
+ slug: raw.slug,
1553
+ mode: raw.mode,
1554
+ status: raw.status,
1555
+ value: typeof raw.value === "string" ? raw.value : null
1556
+ };
1557
+ };
1535
1558
  function requestSignin(args) {
1536
1559
  const { wsc, token, url, service, apiKey, sessionId } = args;
1537
1560
  wsc.emit("user:txns:create", { token, url, service, apiKey, sessionId });
@@ -1543,16 +1566,53 @@ function rejectTxn(args) {
1543
1566
  args.wsc.emit("user:txns:update", { token: args.token, state: "cancelled" });
1544
1567
  }
1545
1568
  function acceptTxn(args) {
1546
- const { wsc, token, lifetime, providerSlug, userParams, sessionId } = args;
1569
+ const {
1570
+ wsc,
1571
+ token,
1572
+ lifetime,
1573
+ providerSlug,
1574
+ userParams,
1575
+ grantedParams,
1576
+ revokedParams,
1577
+ sessionId
1578
+ } = args;
1547
1579
  wsc.emit("provider:signin", {
1548
1580
  token,
1549
1581
  lifetime,
1550
1582
  state: "approved",
1551
1583
  providerSlug,
1552
1584
  userParams: userParams ?? {},
1585
+ grantedParams: grantedParams ?? [],
1586
+ revokedParams: revokedParams ?? [],
1553
1587
  sessionId
1554
1588
  });
1555
1589
  }
1590
+ function requestTxnData(args) {
1591
+ const { wsc, token, txnId, timeoutMs = TXN_DATA_TIMEOUT_MS } = args;
1592
+ const ws = wsc?.ws;
1593
+ if (!ws?.connected) return Promise.resolve(null);
1594
+ return new Promise((resolve) => {
1595
+ const finish = (result) => {
1596
+ clearTimeout(timer);
1597
+ ws.off("user:txns:data", onData);
1598
+ resolve(result);
1599
+ };
1600
+ const onData = (data) => {
1601
+ if (!data?.success) {
1602
+ if (data?.txnId === void 0 || String(data.txnId) === String(txnId))
1603
+ finish(null);
1604
+ return;
1605
+ }
1606
+ const item = data.message?.items?.[0];
1607
+ if (!item || String(item.txnId) !== String(txnId)) return;
1608
+ const params = (Array.isArray(item.params) ? item.params : []).map(toTxnDataParam).filter((param) => !!param);
1609
+ finish({ txnId: item.txnId, params });
1610
+ };
1611
+ const timer = setTimeout(() => finish(null), timeoutMs);
1612
+ ws.on("user:txns:data", onData);
1613
+ ws.emit("user:txns:data", { token, txnId });
1614
+ });
1615
+ }
1556
1616
  function reportTxn(args) {
1557
1617
  args.wsc.emit("ext:report", { token: args.token, report: args.report });
1558
1618
  }
@@ -2386,8 +2446,15 @@ function createBlockAuthClient(config3) {
2386
2446
  lifetime: opts.lifetime,
2387
2447
  providerSlug: $ui.get().serviceName ?? "blockauth",
2388
2448
  userParams: opts.userParams,
2449
+ grantedParams: opts.grantedParams,
2450
+ revokedParams: opts.revokedParams,
2389
2451
  sessionId: browserBase.getDeviceSessionId()
2390
2452
  }),
2453
+ dataRequest: (txnId) => requestTxnData({
2454
+ wsc: provider.wsc,
2455
+ token: userToken(),
2456
+ txnId
2457
+ }),
2391
2458
  report: (slug) => reportTxn({
2392
2459
  wsc: provider.wsc,
2393
2460
  token: userToken(),
@@ -2422,6 +2489,369 @@ function createBlockAuthClient(config3) {
2422
2489
  provider
2423
2490
  };
2424
2491
  }
2492
+ var DEFAULT_PHONE_COUNTRY = "ES";
2493
+ var LEGACY_PHONE_PATTERN = /^(\d{1,4})_(\d{4,14})_([a-z]{2})$/i;
2494
+ var NATIONAL_SEPARATORS = /[\s\-().]/g;
2495
+ var SUPPORTED_COUNTRIES = new Set(getCountries());
2496
+ var MAIN_COUNTRY_BY_CALLING_CODE = {
2497
+ "1": "US",
2498
+ "7": "RU",
2499
+ "39": "IT",
2500
+ "44": "GB",
2501
+ "47": "NO",
2502
+ "61": "AU",
2503
+ "212": "MA",
2504
+ "262": "RE",
2505
+ "290": "SH",
2506
+ "358": "FI",
2507
+ "590": "GP",
2508
+ "599": "CW"
2509
+ };
2510
+ var getCallingCodeCountry = (callingCode, fallbackCountry) => getCountryCallingCode(fallbackCountry) === callingCode ? fallbackCountry : MAIN_COUNTRY_BY_CALLING_CODE[callingCode] ?? getCountries().find(
2511
+ (country) => getCountryCallingCode(country) === callingCode
2512
+ ) ?? fallbackCountry;
2513
+ var isPhoneCountry = (value) => !!value && SUPPORTED_COUNTRIES.has(value);
2514
+ var toPhoneCountry = (value) => {
2515
+ const upper = (value ?? "").toUpperCase();
2516
+ return isPhoneCountry(upper) ? upper : null;
2517
+ };
2518
+ function getPhoneCountryFlag(iso2) {
2519
+ const code = iso2.toUpperCase();
2520
+ if (!/^[A-Z]{2}$/.test(code)) return "";
2521
+ return String.fromCodePoint(
2522
+ ...[...code].map((char) => 127462 + char.charCodeAt(0) - 65)
2523
+ );
2524
+ }
2525
+ function getPhoneDialCode(iso2) {
2526
+ return `+${getCountryCallingCode(iso2)}`;
2527
+ }
2528
+ var getRegionNames = (locale) => {
2529
+ try {
2530
+ return typeof Intl !== "undefined" && "DisplayNames" in Intl ? new Intl.DisplayNames([locale], { type: "region" }) : null;
2531
+ } catch {
2532
+ return null;
2533
+ }
2534
+ };
2535
+ function getPhoneCountries(locale = "en") {
2536
+ const names = getRegionNames(locale);
2537
+ return getCountries().map((iso2) => {
2538
+ let name = iso2;
2539
+ try {
2540
+ name = names?.of(iso2) ?? iso2;
2541
+ } catch {
2542
+ name = iso2;
2543
+ }
2544
+ return {
2545
+ iso2,
2546
+ dialCode: getPhoneDialCode(iso2),
2547
+ flag: getPhoneCountryFlag(iso2),
2548
+ name
2549
+ };
2550
+ }).sort((a, b) => a.name.localeCompare(b.name, locale));
2551
+ }
2552
+ var normalizeSearch = (value) => value.normalize("NFD").replace(/[̀-ͯ]/g, "").toLowerCase().trim();
2553
+ function searchPhoneCountries(countries, query) {
2554
+ const term = normalizeSearch(query);
2555
+ if (!term) return countries;
2556
+ const digits = term.replace(/^\+/, "");
2557
+ return countries.filter(
2558
+ (country) => normalizeSearch(country.name).includes(term) || country.iso2.toLowerCase() === term || /^\d+$/.test(digits) && country.dialCode.slice(1).startsWith(digits)
2559
+ );
2560
+ }
2561
+ var fromLegacy = (raw) => {
2562
+ const legacy = raw.match(LEGACY_PHONE_PATTERN);
2563
+ return legacy ? `+${legacy[1]}${legacy[2]}` : raw;
2564
+ };
2565
+ var parsePhone = (value, country) => {
2566
+ const raw = (value ?? "").trim();
2567
+ if (!raw) return void 0;
2568
+ try {
2569
+ return parsePhoneNumberFromString(fromLegacy(raw), country);
2570
+ } catch {
2571
+ return void 0;
2572
+ }
2573
+ };
2574
+ function isValidPhoneValue(value) {
2575
+ return !!parsePhone(value)?.isValid();
2576
+ }
2577
+ function toPhoneE164(value) {
2578
+ const phone = parsePhone(value);
2579
+ return phone?.isValid() ? phone.number : null;
2580
+ }
2581
+ function formatPhoneForDisplay(value) {
2582
+ const raw = (value ?? "").trim();
2583
+ const phone = parsePhone(raw);
2584
+ return phone?.isValid() ? phone.formatInternational() : raw;
2585
+ }
2586
+ function getDefaultPhoneCountry(languages) {
2587
+ const candidates = languages ?? (typeof navigator !== "undefined" ? [...navigator.languages ?? [], navigator.language] : []);
2588
+ for (const language of candidates) {
2589
+ if (!language) continue;
2590
+ let region;
2591
+ try {
2592
+ region = new Intl.Locale(language).region;
2593
+ } catch {
2594
+ region = language.split(/[-_]/)[1];
2595
+ }
2596
+ const country = toPhoneCountry(region);
2597
+ if (country) return country;
2598
+ }
2599
+ return DEFAULT_PHONE_COUNTRY;
2600
+ }
2601
+ function parsePhoneValue(value, fallbackCountry = getDefaultPhoneCountry()) {
2602
+ const raw = (value ?? "").trim();
2603
+ if (!raw) return { country: fallbackCountry, nationalNumber: "" };
2604
+ const legacy = raw.match(LEGACY_PHONE_PATTERN);
2605
+ const legacyCountry = legacy ? toPhoneCountry(legacy[3]) : null;
2606
+ const phone = parsePhone(raw);
2607
+ if (!phone) {
2608
+ if (!legacy && /^\+\d+$/.test(raw.replace(NATIONAL_SEPARATORS, ""))) {
2609
+ const typer = new AsYouType();
2610
+ typer.input(raw);
2611
+ const callingCode = typer.getCallingCode();
2612
+ if (callingCode) {
2613
+ return {
2614
+ country: typer.getCountry() ?? getCallingCodeCountry(callingCode, fallbackCountry),
2615
+ nationalNumber: raw.replace(/\D/g, "").slice(callingCode.length)
2616
+ };
2617
+ }
2618
+ }
2619
+ return {
2620
+ country: legacyCountry ?? fallbackCountry,
2621
+ nationalNumber: raw
2622
+ };
2623
+ }
2624
+ const country = legacyCountry ?? phone.country ?? getCallingCodeCountry(String(phone.countryCallingCode), fallbackCountry);
2625
+ return {
2626
+ country,
2627
+ nationalNumber: phone.isValid() ? phone.formatNational() : String(phone.nationalNumber)
2628
+ };
2629
+ }
2630
+ function buildPhoneE164(country, nationalNumber) {
2631
+ const raw = nationalNumber.trim();
2632
+ if (!raw) return null;
2633
+ const phone = parsePhone(raw, country);
2634
+ return phone?.isValid() ? phone.number : null;
2635
+ }
2636
+ function buildPhoneValue(country, nationalNumber) {
2637
+ const raw = nationalNumber.trim();
2638
+ if (!raw) return "";
2639
+ const e164 = buildPhoneE164(country, raw);
2640
+ if (e164) return e164;
2641
+ const compact = raw.replace(NATIONAL_SEPARATORS, "");
2642
+ return compact.startsWith("+") ? compact : `${getPhoneDialCode(country)}${compact}`;
2643
+ }
2644
+ function updatePhoneDraft(country, nationalNumber) {
2645
+ const raw = nationalNumber.trim();
2646
+ if (raw.startsWith("+")) {
2647
+ const phone = parsePhone(raw);
2648
+ if (phone?.isValid() && phone.country) {
2649
+ return {
2650
+ country: phone.country,
2651
+ nationalNumber: phone.formatNational(),
2652
+ value: phone.number
2653
+ };
2654
+ }
2655
+ }
2656
+ return {
2657
+ country,
2658
+ nationalNumber,
2659
+ value: buildPhoneValue(country, nationalNumber)
2660
+ };
2661
+ }
2662
+ function resolvePhoneDraft(value, draft, fallbackCountry) {
2663
+ const current = value ?? "";
2664
+ if (draft && draft.value === current) return draft;
2665
+ const country = draft?.country ?? fallbackCountry ?? getDefaultPhoneCountry();
2666
+ const parsed = parsePhoneValue(current, country);
2667
+ const keepCountry = !!draft && getCountryCallingCode(draft.country) === getCountryCallingCode(parsed.country);
2668
+ return {
2669
+ value: current,
2670
+ country: keepCountry ? country : parsed.country,
2671
+ nationalNumber: parsed.nationalNumber
2672
+ };
2673
+ }
2674
+
2675
+ // src/auth/solicitedData.ts
2676
+ var PARAM_LABEL_KEYS = {
2677
+ "users-firstname": "firstName",
2678
+ "users-lastname": "lastName",
2679
+ "users-secondlastname": "secondLastName",
2680
+ "users-email": "email",
2681
+ "users-phone": "phone"
2682
+ };
2683
+ var PARAM_DISPLAY_ORDER = [
2684
+ "users-firstname",
2685
+ "users-lastname",
2686
+ "users-secondlastname",
2687
+ "users-email",
2688
+ "users-phone"
2689
+ ];
2690
+ var PARAM_INPUT_TYPE = {
2691
+ "users-firstname": "text",
2692
+ "users-lastname": "text",
2693
+ "users-secondlastname": "text",
2694
+ "users-email": "email",
2695
+ "users-phone": "tel"
2696
+ };
2697
+ var NAME_PATTERN = /^[A-Za-zÀ-ÖØ-öø-ÿ\s'-]{1,50}$/;
2698
+ var PARAM_VALIDATORS = {
2699
+ "users-firstname": (v) => NAME_PATTERN.test(v.trim()),
2700
+ "users-lastname": (v) => NAME_PATTERN.test(v.trim()),
2701
+ "users-secondlastname": (v) => NAME_PATTERN.test(v.trim()),
2702
+ "users-email": (v) => v.trim().length <= 100 && /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(v.trim()),
2703
+ "users-phone": (v) => isValidPhoneValue(v)
2704
+ };
2705
+ var PARAM_NORMALIZERS = {
2706
+ "users-phone": (v) => toPhoneE164(v) ?? v.trim()
2707
+ };
2708
+ var PARAM_DISPLAY_FORMATTERS = {
2709
+ "users-phone": (v) => formatPhoneForDisplay(v)
2710
+ };
2711
+ var formatParamValue = (slug, value) => {
2712
+ const format = PARAM_DISPLAY_FORMATTERS[slug];
2713
+ return !format ? value : format(value);
2714
+ };
2715
+ var normalizeParamValue = (slug, value) => {
2716
+ const trimmed = value.trim();
2717
+ const normalize = PARAM_NORMALIZERS[slug];
2718
+ return !normalize || !trimmed ? trimmed : normalize(trimmed);
2719
+ };
2720
+ var PARAM_ERROR_KEYS = {
2721
+ "users-firstname": "onlyLettersAllowed",
2722
+ "users-lastname": "onlyLettersAllowed",
2723
+ "users-secondlastname": "onlyLettersAllowed",
2724
+ "users-email": "enterValidEmail",
2725
+ "users-phone": "enterValidPhone"
2726
+ };
2727
+ var EMPTY_SOLICITED_DATA_FORM = {
2728
+ values: {},
2729
+ shared: {},
2730
+ saved: {}
2731
+ };
2732
+ var omitKey = (record, key) => Object.fromEntries(
2733
+ Object.entries(record).filter(([entryKey]) => entryKey !== key)
2734
+ );
2735
+ var isValidParamValue = (slug, value) => {
2736
+ const trimmed = value.trim();
2737
+ if (!trimmed) return false;
2738
+ const validate = PARAM_VALIDATORS[slug];
2739
+ return !validate || validate(trimmed);
2740
+ };
2741
+ function getSolicitedParams({
2742
+ params,
2743
+ requiredParams = [],
2744
+ optionalParams = []
2745
+ }) {
2746
+ const items = params ?? [
2747
+ ...requiredParams.map((slug) => ({
2748
+ slug,
2749
+ mode: "required",
2750
+ status: "missing",
2751
+ value: null
2752
+ })),
2753
+ ...optionalParams.map((slug) => ({
2754
+ slug,
2755
+ mode: "optional",
2756
+ status: "missing",
2757
+ value: null
2758
+ }))
2759
+ ];
2760
+ return PARAM_DISPLAY_ORDER.flatMap((slug) => {
2761
+ const item = items.find((param) => param.slug === slug);
2762
+ return item ? [item] : [];
2763
+ });
2764
+ }
2765
+ function getSolicitedFields(items, form = EMPTY_SOLICITED_DATA_FORM, withConsent = true) {
2766
+ return items.map((item) => {
2767
+ const profileValue = item.value ?? "";
2768
+ const inputValue = form.values[item.slug] ?? profileValue;
2769
+ const trimmed = inputValue.trim();
2770
+ const isEmpty = !trimmed;
2771
+ const isValid = isValidParamValue(item.slug, inputValue);
2772
+ if (!withConsent) {
2773
+ return {
2774
+ ...item,
2775
+ profileValue,
2776
+ inputValue,
2777
+ isEmpty,
2778
+ isShared: !!trimmed,
2779
+ isChanged: !!trimmed,
2780
+ isSaved: !!trimmed,
2781
+ isValid,
2782
+ isComplete: trimmed ? isValid : item.mode !== "required"
2783
+ };
2784
+ }
2785
+ const isChanged = normalizeParamValue(item.slug, trimmed) !== normalizeParamValue(item.slug, profileValue);
2786
+ const savedValue = form.saved[item.slug];
2787
+ const isSaved = isChanged && (isValid || isEmpty) && savedValue === trimmed;
2788
+ const isShared = !isEmpty && (form.shared[item.slug] ?? (item.status === "granted" || item.status === "shared" || isValid && (!profileValue.trim() || savedValue === "")));
2789
+ const isComplete = isShared ? isValid && (!isChanged || isSaved) : item.mode !== "required";
2790
+ return {
2791
+ ...item,
2792
+ profileValue,
2793
+ inputValue,
2794
+ isEmpty,
2795
+ isShared,
2796
+ isChanged,
2797
+ isSaved,
2798
+ isValid,
2799
+ isComplete
2800
+ };
2801
+ });
2802
+ }
2803
+ function getSolicitedHintKey(field, withConsent = true) {
2804
+ if (!withConsent || !field.isChanged) return null;
2805
+ if (!field.isSaved) return "pendingChangeHint";
2806
+ return field.isShared ? "savedToProfileHint" : "notSharedHint";
2807
+ }
2808
+ var isSolicitedHintSuccess = (field) => field.isSaved && field.isShared;
2809
+ var isSolicitedDataComplete = (fields) => fields.every((field) => field.isComplete);
2810
+ function getSolicitedAcceptParams(fields) {
2811
+ const userParams = {};
2812
+ const grantedParams = [];
2813
+ const revokedParams = [];
2814
+ fields.forEach((field) => {
2815
+ if (!field.isShared) {
2816
+ if ((field.status === "granted" || field.status === "shared") && field.mode === "optional")
2817
+ revokedParams.push(field.slug);
2818
+ return;
2819
+ }
2820
+ if (!field.isValid) return;
2821
+ if (field.isChanged) {
2822
+ if (field.isSaved)
2823
+ userParams[field.slug] = normalizeParamValue(
2824
+ field.slug,
2825
+ field.inputValue
2826
+ );
2827
+ return;
2828
+ }
2829
+ if (field.status === "consent" || field.status === "granted")
2830
+ grantedParams.push(field.slug);
2831
+ });
2832
+ return { userParams, grantedParams, revokedParams };
2833
+ }
2834
+ var setSolicitedValue = (form, item, value) => ({
2835
+ ...form,
2836
+ values: { ...form.values, [item.slug]: value }
2837
+ });
2838
+ var setSolicitedShared = (form, slug, shared) => ({
2839
+ ...form,
2840
+ shared: { ...form.shared, [slug]: shared }
2841
+ });
2842
+ var saveSolicitedValue = (form, slug) => {
2843
+ const value = (form.values[slug] ?? "").trim();
2844
+ return {
2845
+ ...form,
2846
+ saved: { ...form.saved, [slug]: value },
2847
+ shared: value ? { ...form.shared, [slug]: true } : form.shared
2848
+ };
2849
+ };
2850
+ var undoSolicitedValue = (form, item) => ({
2851
+ values: omitKey(form.values, item.slug),
2852
+ saved: omitKey(form.saved, item.slug),
2853
+ shared: (item.value ?? "").trim() ? form.shared : omitKey(form.shared, item.slug)
2854
+ });
2425
2855
 
2426
2856
  // src/runtime/authRuntime.ts
2427
2857
  var SIGNIN_TIMEOUT_MS = 12e4;
@@ -2735,7 +3165,12 @@ function createAuthRuntime(client, callbacks = {}) {
2735
3165
  }
2736
3166
  };
2737
3167
  const onProviderSignin = (data) => {
2738
- const { success, message } = data;
3168
+ const { success, message, translationKey } = data;
3169
+ if (!success && translationKey === TXN_DATA_ERROR_KEY) {
3170
+ setIsAcceptingTxn(false);
3171
+ setAcceptTxnError(message);
3172
+ return;
3173
+ }
2739
3174
  if (!success) {
2740
3175
  void _onError();
2741
3176
  return;
@@ -3228,6 +3663,31 @@ var TEXTS = {
3228
3663
  es: "Completa los campos requeridos para continuar",
3229
3664
  en: "Fill required fields to continue"
3230
3665
  },
3666
+ completeRequiredData: {
3667
+ es: "Autoriza o completa los datos obligatorios para continuar",
3668
+ en: "Authorize or fill in the required data to continue"
3669
+ },
3670
+ requiredDataError: {
3671
+ es: "No se pudo aceptar: faltan datos obligatorios o no son v\xE1lidos. Rev\xEDsalos e int\xE9ntalo de nuevo.",
3672
+ en: "Could not accept: required data is missing or invalid. Please review it and try again."
3673
+ },
3674
+ shareData: { es: "Ceder", en: "Share" },
3675
+ saveData: { es: "Guardar", en: "Save" },
3676
+ undoChange: { es: "Deshacer", en: "Undo" },
3677
+ savedToProfileHint: {
3678
+ es: "Se guardar\xE1 en tu perfil al aceptar",
3679
+ en: "It will be saved to your profile on accept"
3680
+ },
3681
+ pendingChangeHint: {
3682
+ es: "Guarda o deshaz el cambio",
3683
+ en: "Save or undo the change"
3684
+ },
3685
+ notSharedHint: {
3686
+ es: "Este dato no se ceder\xE1",
3687
+ en: "This data will not be shared"
3688
+ },
3689
+ clearField: { es: "Limpiar campo", en: "Clear field" },
3690
+ acceptData: { es: "Aceptar", en: "Accept" },
3231
3691
  noTransactionsFound: {
3232
3692
  es: "No se encontraron transacciones",
3233
3693
  en: "No transactions found"
@@ -3283,6 +3743,12 @@ var TEXTS = {
3283
3743
  es: "Introduce un n\xFAmero de tel\xE9fono v\xE1lido",
3284
3744
  en: "Enter a valid phone number"
3285
3745
  },
3746
+ phoneCountry: { es: "Pa\xEDs", en: "Country" },
3747
+ searchPhoneCountry: { es: "Buscar pa\xEDs o prefijo", en: "Search country or code" },
3748
+ noPhoneCountryResults: {
3749
+ es: "No hay pa\xEDses que coincidan",
3750
+ en: "No matching countries"
3751
+ },
3286
3752
  helpUsReport: {
3287
3753
  es: "Ay\xFAdanos a mejorar y reporta el error aqu\xED",
3288
3754
  en: "Help us get better and report the error here"
@@ -3303,6 +3769,6 @@ function t(key, locale = "en") {
3303
3769
  return entry?.[locale] ?? entry?.en ?? key;
3304
3770
  }
3305
3771
 
3306
- export { $extension, $locale, $openModals, $ui, $user, $wallet, $web3, $ws, BlockAuthProvider, DISCOVERY_TIMEOUT_MS, RpcClient, SDK_PAGE_MARKER, SYNC_TIMEOUT_MS, TEXTS, WsClient, appearsExtensionInstalled, clearExtensionDomMarkers, clearRemainingAuthData, clearSdkPresence, closeAllModals, closeModal, confirmExtensionPresence, createAuthRuntime, createBlockAuthClient, createDeletionService, createEvmWallet, createSolanaWallet, deepLinkFor, discoverExtensionOnce, fetchUserProfile, finalizeAfterRestorationExpired, getExtensionStoreUrl, getUserRoleNames, getUserRoleSlugs, getUserRoles, handleRestorationExpired, handleRestoreFailure, hasAnyRole, hasAnyRoleBySlug, hasRole, hasRoleBySlug, isExtensionPresent, isExtensionStateComplete, isFirefox, isModalOpen, isRestorationExpiredMessage, isSdkPage, isShowSignin, loadUserProfile, makeQrDataUrl, markSdkPresence, oauth_exports as oauth, onExtensionRemoved, onExtensionStatePublished, openExtensionOnTxn, openModal, probeExtensionPresence, reconcileExtensionState, requestExtensionRefresh, requestExtensionStateSync, requestSdkRestore, resetExtension, resetExtensionAbsentState, resetExtensionSyncModuleState, resetUi, resetUser, resetWallet, resetWeb3, resetWs, setApiKey, setBackendMessage, setDeletionAddress, setDid, setExtensionInstalled, setExtensionIsLocked, setExtensionIsUser, setExtensionIsUserActive, setIsAcceptingTxn, setIsAppActive, setIsCheckingAppActive, setIsLoadingUser, setIsOnDeletion, setIsOtpRequired, setIsSdkSignedIn, setIsServiceConnected, setIsSigned, setIsSignedFirstCheck, setIsSigning, setIsSigningLoader, setLocale, setReady, setRequests, setServiceIcon, setServiceName, setSignature, setSignedBy, setToken, setUiConfig, setUser, setWaitingForSuccessLogInSince, startExtensionSync, syncExtensionStateFromStorage, t, utils_exports as utils };
3772
+ export { $extension, $locale, $openModals, $ui, $user, $wallet, $web3, $ws, BlockAuthProvider, DEFAULT_PHONE_COUNTRY, DISCOVERY_TIMEOUT_MS, EMPTY_SOLICITED_DATA_FORM, PARAM_DISPLAY_FORMATTERS, PARAM_DISPLAY_ORDER, PARAM_ERROR_KEYS, PARAM_INPUT_TYPE, PARAM_LABEL_KEYS, PARAM_NORMALIZERS, PARAM_VALIDATORS, RpcClient, SDK_PAGE_MARKER, SYNC_TIMEOUT_MS, TEXTS, WsClient, appearsExtensionInstalled, buildPhoneE164, buildPhoneValue, clearExtensionDomMarkers, clearRemainingAuthData, clearSdkPresence, closeAllModals, closeModal, confirmExtensionPresence, createAuthRuntime, createBlockAuthClient, createDeletionService, createEvmWallet, createSolanaWallet, deepLinkFor, discoverExtensionOnce, fetchUserProfile, finalizeAfterRestorationExpired, formatParamValue, formatPhoneForDisplay, getDefaultPhoneCountry, getExtensionStoreUrl, getPhoneCountries, getPhoneCountryFlag, getPhoneDialCode, getSolicitedAcceptParams, getSolicitedFields, getSolicitedHintKey, getSolicitedParams, getUserRoleNames, getUserRoleSlugs, getUserRoles, handleRestorationExpired, handleRestoreFailure, hasAnyRole, hasAnyRoleBySlug, hasRole, hasRoleBySlug, isExtensionPresent, isExtensionStateComplete, isFirefox, isModalOpen, isPhoneCountry, isRestorationExpiredMessage, isSdkPage, isShowSignin, isSolicitedDataComplete, isSolicitedHintSuccess, isValidParamValue, isValidPhoneValue, loadUserProfile, makeQrDataUrl, markSdkPresence, normalizeParamValue, oauth_exports as oauth, onExtensionRemoved, onExtensionStatePublished, openExtensionOnTxn, openModal, parsePhoneValue, probeExtensionPresence, reconcileExtensionState, requestExtensionRefresh, requestExtensionStateSync, requestSdkRestore, resetExtension, resetExtensionAbsentState, resetExtensionSyncModuleState, resetUi, resetUser, resetWallet, resetWeb3, resetWs, resolvePhoneDraft, saveSolicitedValue, searchPhoneCountries, setAcceptTxnError, setApiKey, setBackendMessage, setDeletionAddress, setDid, setExtensionInstalled, setExtensionIsLocked, setExtensionIsUser, setExtensionIsUserActive, setIsAcceptingTxn, setIsAppActive, setIsCheckingAppActive, setIsLoadingUser, setIsOnDeletion, setIsOtpRequired, setIsSdkSignedIn, setIsServiceConnected, setIsSigned, setIsSignedFirstCheck, setIsSigning, setIsSigningLoader, setLocale, setReady, setRequests, setServiceIcon, setServiceName, setSignature, setSignedBy, setSolicitedShared, setSolicitedValue, setToken, setUiConfig, setUser, setWaitingForSuccessLogInSince, startExtensionSync, syncExtensionStateFromStorage, t, toPhoneE164, undoSolicitedValue, updatePhoneDraft, utils_exports as utils };
3307
3773
  //# sourceMappingURL=index.js.map
3308
3774
  //# sourceMappingURL=index.js.map