@block-auth.io/core 0.4.0 → 0.4.2
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/LICENSE +15 -0
- package/dist/index.cjs +283 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +145 -0
- package/dist/index.d.ts +145 -0
- package/dist/index.js +283 -35
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
package/dist/index.d.cts
CHANGED
|
@@ -775,6 +775,8 @@ declare function createBlockAuthClient(config: BlockAuthClientConfig): {
|
|
|
775
775
|
$openModals: nanostores.WritableAtom<ModalName[]>;
|
|
776
776
|
$user: nanostores.MapStore<UserState>;
|
|
777
777
|
};
|
|
778
|
+
/** App apiKey from client config (also seeded into $ws). */
|
|
779
|
+
apiKey: string;
|
|
778
780
|
connect: (waitMs?: number | undefined, url?: string | undefined, retries?: number | undefined) => Promise<void>;
|
|
779
781
|
disconnect: () => Promise<void>;
|
|
780
782
|
signin: () => Promise<any>;
|
|
@@ -1519,6 +1521,13 @@ declare class BrowserBase {
|
|
|
1519
1521
|
reset(target?: 'all' | 'ui' | 'session' | 'external', { keepExtensionInstalled }?: {
|
|
1520
1522
|
keepExtensionInstalled?: boolean | undefined;
|
|
1521
1523
|
}): void;
|
|
1524
|
+
/**
|
|
1525
|
+
* Stable id for this browser, generated once and persisted in localStorage
|
|
1526
|
+
* (every tab of this browser shares it, and it survives logout). Lets the
|
|
1527
|
+
* server scope a signout to just this browser instead of every device
|
|
1528
|
+
* signed in with the same account.
|
|
1529
|
+
*/
|
|
1530
|
+
getDeviceSessionId(): string;
|
|
1522
1531
|
/**
|
|
1523
1532
|
* Obtains the current UI configuration using localStorage as the
|
|
1524
1533
|
* source of truth, seeding the default if none is stored.
|
|
@@ -1691,6 +1700,142 @@ declare const TEXTS: {
|
|
|
1691
1700
|
readonly es: "Di adiós a las contraseñas";
|
|
1692
1701
|
readonly en: "Say goodbye to passwords";
|
|
1693
1702
|
};
|
|
1703
|
+
readonly permissionsRequired: {
|
|
1704
|
+
readonly es: "Permisos requeridos";
|
|
1705
|
+
readonly en: "Permissions required";
|
|
1706
|
+
};
|
|
1707
|
+
readonly solicitedData: {
|
|
1708
|
+
readonly es: "Datos solicitados";
|
|
1709
|
+
readonly en: "Solicited data";
|
|
1710
|
+
};
|
|
1711
|
+
readonly reject: {
|
|
1712
|
+
readonly es: "RECHAZAR";
|
|
1713
|
+
readonly en: "REJECT";
|
|
1714
|
+
};
|
|
1715
|
+
readonly accept: {
|
|
1716
|
+
readonly es: "ACEPTAR";
|
|
1717
|
+
readonly en: "ACCEPT";
|
|
1718
|
+
};
|
|
1719
|
+
readonly iAuthorizeThe: {
|
|
1720
|
+
readonly es: "Autorizo la";
|
|
1721
|
+
readonly en: "I authorize the";
|
|
1722
|
+
};
|
|
1723
|
+
readonly privacyPolicy: {
|
|
1724
|
+
readonly es: "Política de Privacidad";
|
|
1725
|
+
readonly en: "Privacy Policy";
|
|
1726
|
+
};
|
|
1727
|
+
readonly andThe: {
|
|
1728
|
+
readonly es: "y los";
|
|
1729
|
+
readonly en: "and the";
|
|
1730
|
+
};
|
|
1731
|
+
readonly termsAndConditions: {
|
|
1732
|
+
readonly es: "Términos y Condiciones";
|
|
1733
|
+
readonly en: "Terms and Conditions";
|
|
1734
|
+
};
|
|
1735
|
+
readonly configureSessionTime: {
|
|
1736
|
+
readonly es: "Quiero configurar el tiempo de mi sesión";
|
|
1737
|
+
readonly en: "I want to configure my session time";
|
|
1738
|
+
};
|
|
1739
|
+
readonly solicitsTo: {
|
|
1740
|
+
readonly es: "solicita a";
|
|
1741
|
+
readonly en: "solicits to";
|
|
1742
|
+
};
|
|
1743
|
+
readonly required: {
|
|
1744
|
+
readonly es: "Requerido";
|
|
1745
|
+
readonly en: "Required";
|
|
1746
|
+
};
|
|
1747
|
+
readonly optional: {
|
|
1748
|
+
readonly es: "Opcional";
|
|
1749
|
+
readonly en: "Optional";
|
|
1750
|
+
};
|
|
1751
|
+
readonly fillRequiredFields: {
|
|
1752
|
+
readonly es: "Completa los campos requeridos para continuar";
|
|
1753
|
+
readonly en: "Fill required fields to continue";
|
|
1754
|
+
};
|
|
1755
|
+
readonly noTransactionsFound: {
|
|
1756
|
+
readonly es: "No se encontraron transacciones";
|
|
1757
|
+
readonly en: "No transactions found";
|
|
1758
|
+
};
|
|
1759
|
+
readonly noAppKeyFound: {
|
|
1760
|
+
readonly es: "No se encontró la clave de la aplicación";
|
|
1761
|
+
readonly en: "No application key found";
|
|
1762
|
+
};
|
|
1763
|
+
readonly noContractAddressFound: {
|
|
1764
|
+
readonly es: "No se encontró la dirección del contrato";
|
|
1765
|
+
readonly en: "No contract address found";
|
|
1766
|
+
};
|
|
1767
|
+
readonly noTransactionsParamsFound: {
|
|
1768
|
+
readonly es: "No se encontraron parámetros de la transacción";
|
|
1769
|
+
readonly en: "No transaction params found";
|
|
1770
|
+
};
|
|
1771
|
+
readonly somethingWentWrong: {
|
|
1772
|
+
readonly es: "Algo salió mal";
|
|
1773
|
+
readonly en: "Something went wrong";
|
|
1774
|
+
};
|
|
1775
|
+
readonly permTemporalIdentity: {
|
|
1776
|
+
readonly es: "Acceso temporal a tu identidad";
|
|
1777
|
+
readonly en: "Temporal access to identity";
|
|
1778
|
+
};
|
|
1779
|
+
readonly permAuthorisedApps: {
|
|
1780
|
+
readonly es: "Acceso a la lista de aplicaciones autorizadas";
|
|
1781
|
+
readonly en: "Access to the list of authorised apps";
|
|
1782
|
+
};
|
|
1783
|
+
readonly permOnlyThisTxn: {
|
|
1784
|
+
readonly es: "Solo se firmará esta transacción";
|
|
1785
|
+
readonly en: "Only this transaction will be signed";
|
|
1786
|
+
};
|
|
1787
|
+
readonly firstName: {
|
|
1788
|
+
readonly es: "Nombre";
|
|
1789
|
+
readonly en: "First Name";
|
|
1790
|
+
};
|
|
1791
|
+
readonly lastName: {
|
|
1792
|
+
readonly es: "Apellido";
|
|
1793
|
+
readonly en: "Last Name";
|
|
1794
|
+
};
|
|
1795
|
+
readonly secondLastName: {
|
|
1796
|
+
readonly es: "Segundo apellido";
|
|
1797
|
+
readonly en: "Second Last Name";
|
|
1798
|
+
};
|
|
1799
|
+
readonly email: {
|
|
1800
|
+
readonly es: "Correo electrónico";
|
|
1801
|
+
readonly en: "Email";
|
|
1802
|
+
};
|
|
1803
|
+
readonly phone: {
|
|
1804
|
+
readonly es: "Teléfono";
|
|
1805
|
+
readonly en: "Phone";
|
|
1806
|
+
};
|
|
1807
|
+
readonly onlyLettersAllowed: {
|
|
1808
|
+
readonly es: "Solo se permiten letras y espacios";
|
|
1809
|
+
readonly en: "Only letters and spaces allowed";
|
|
1810
|
+
};
|
|
1811
|
+
readonly enterValidEmail: {
|
|
1812
|
+
readonly es: "Introduce un correo electrónico válido (ej. nombre@dominio.com)";
|
|
1813
|
+
readonly en: "Enter a valid email (e.g. name@domain.com)";
|
|
1814
|
+
};
|
|
1815
|
+
readonly enterValidPhone: {
|
|
1816
|
+
readonly es: "Introduce un número de teléfono válido";
|
|
1817
|
+
readonly en: "Enter a valid phone number";
|
|
1818
|
+
};
|
|
1819
|
+
readonly helpUsReport: {
|
|
1820
|
+
readonly es: "Ayúdanos a mejorar y reporta el error aquí";
|
|
1821
|
+
readonly en: "Help us get better and report the error here";
|
|
1822
|
+
};
|
|
1823
|
+
readonly thanksForReport: {
|
|
1824
|
+
readonly es: "¡Gracias por reportar el error!";
|
|
1825
|
+
readonly en: "Thanks for reporting the error!";
|
|
1826
|
+
};
|
|
1827
|
+
readonly report: {
|
|
1828
|
+
readonly es: "REPORTAR";
|
|
1829
|
+
readonly en: "REPORT";
|
|
1830
|
+
};
|
|
1831
|
+
readonly close: {
|
|
1832
|
+
readonly es: "Cerrar";
|
|
1833
|
+
readonly en: "Close";
|
|
1834
|
+
};
|
|
1835
|
+
readonly modalWillCloseIn: {
|
|
1836
|
+
readonly es: "Este modal se cerrará en...";
|
|
1837
|
+
readonly en: "This modal will close in...";
|
|
1838
|
+
};
|
|
1694
1839
|
};
|
|
1695
1840
|
type TextKey = keyof typeof TEXTS;
|
|
1696
1841
|
declare function t(key: TextKey, locale?: Locale): string;
|
package/dist/index.d.ts
CHANGED
|
@@ -775,6 +775,8 @@ declare function createBlockAuthClient(config: BlockAuthClientConfig): {
|
|
|
775
775
|
$openModals: nanostores.WritableAtom<ModalName[]>;
|
|
776
776
|
$user: nanostores.MapStore<UserState>;
|
|
777
777
|
};
|
|
778
|
+
/** App apiKey from client config (also seeded into $ws). */
|
|
779
|
+
apiKey: string;
|
|
778
780
|
connect: (waitMs?: number | undefined, url?: string | undefined, retries?: number | undefined) => Promise<void>;
|
|
779
781
|
disconnect: () => Promise<void>;
|
|
780
782
|
signin: () => Promise<any>;
|
|
@@ -1519,6 +1521,13 @@ declare class BrowserBase {
|
|
|
1519
1521
|
reset(target?: 'all' | 'ui' | 'session' | 'external', { keepExtensionInstalled }?: {
|
|
1520
1522
|
keepExtensionInstalled?: boolean | undefined;
|
|
1521
1523
|
}): void;
|
|
1524
|
+
/**
|
|
1525
|
+
* Stable id for this browser, generated once and persisted in localStorage
|
|
1526
|
+
* (every tab of this browser shares it, and it survives logout). Lets the
|
|
1527
|
+
* server scope a signout to just this browser instead of every device
|
|
1528
|
+
* signed in with the same account.
|
|
1529
|
+
*/
|
|
1530
|
+
getDeviceSessionId(): string;
|
|
1522
1531
|
/**
|
|
1523
1532
|
* Obtains the current UI configuration using localStorage as the
|
|
1524
1533
|
* source of truth, seeding the default if none is stored.
|
|
@@ -1691,6 +1700,142 @@ declare const TEXTS: {
|
|
|
1691
1700
|
readonly es: "Di adiós a las contraseñas";
|
|
1692
1701
|
readonly en: "Say goodbye to passwords";
|
|
1693
1702
|
};
|
|
1703
|
+
readonly permissionsRequired: {
|
|
1704
|
+
readonly es: "Permisos requeridos";
|
|
1705
|
+
readonly en: "Permissions required";
|
|
1706
|
+
};
|
|
1707
|
+
readonly solicitedData: {
|
|
1708
|
+
readonly es: "Datos solicitados";
|
|
1709
|
+
readonly en: "Solicited data";
|
|
1710
|
+
};
|
|
1711
|
+
readonly reject: {
|
|
1712
|
+
readonly es: "RECHAZAR";
|
|
1713
|
+
readonly en: "REJECT";
|
|
1714
|
+
};
|
|
1715
|
+
readonly accept: {
|
|
1716
|
+
readonly es: "ACEPTAR";
|
|
1717
|
+
readonly en: "ACCEPT";
|
|
1718
|
+
};
|
|
1719
|
+
readonly iAuthorizeThe: {
|
|
1720
|
+
readonly es: "Autorizo la";
|
|
1721
|
+
readonly en: "I authorize the";
|
|
1722
|
+
};
|
|
1723
|
+
readonly privacyPolicy: {
|
|
1724
|
+
readonly es: "Política de Privacidad";
|
|
1725
|
+
readonly en: "Privacy Policy";
|
|
1726
|
+
};
|
|
1727
|
+
readonly andThe: {
|
|
1728
|
+
readonly es: "y los";
|
|
1729
|
+
readonly en: "and the";
|
|
1730
|
+
};
|
|
1731
|
+
readonly termsAndConditions: {
|
|
1732
|
+
readonly es: "Términos y Condiciones";
|
|
1733
|
+
readonly en: "Terms and Conditions";
|
|
1734
|
+
};
|
|
1735
|
+
readonly configureSessionTime: {
|
|
1736
|
+
readonly es: "Quiero configurar el tiempo de mi sesión";
|
|
1737
|
+
readonly en: "I want to configure my session time";
|
|
1738
|
+
};
|
|
1739
|
+
readonly solicitsTo: {
|
|
1740
|
+
readonly es: "solicita a";
|
|
1741
|
+
readonly en: "solicits to";
|
|
1742
|
+
};
|
|
1743
|
+
readonly required: {
|
|
1744
|
+
readonly es: "Requerido";
|
|
1745
|
+
readonly en: "Required";
|
|
1746
|
+
};
|
|
1747
|
+
readonly optional: {
|
|
1748
|
+
readonly es: "Opcional";
|
|
1749
|
+
readonly en: "Optional";
|
|
1750
|
+
};
|
|
1751
|
+
readonly fillRequiredFields: {
|
|
1752
|
+
readonly es: "Completa los campos requeridos para continuar";
|
|
1753
|
+
readonly en: "Fill required fields to continue";
|
|
1754
|
+
};
|
|
1755
|
+
readonly noTransactionsFound: {
|
|
1756
|
+
readonly es: "No se encontraron transacciones";
|
|
1757
|
+
readonly en: "No transactions found";
|
|
1758
|
+
};
|
|
1759
|
+
readonly noAppKeyFound: {
|
|
1760
|
+
readonly es: "No se encontró la clave de la aplicación";
|
|
1761
|
+
readonly en: "No application key found";
|
|
1762
|
+
};
|
|
1763
|
+
readonly noContractAddressFound: {
|
|
1764
|
+
readonly es: "No se encontró la dirección del contrato";
|
|
1765
|
+
readonly en: "No contract address found";
|
|
1766
|
+
};
|
|
1767
|
+
readonly noTransactionsParamsFound: {
|
|
1768
|
+
readonly es: "No se encontraron parámetros de la transacción";
|
|
1769
|
+
readonly en: "No transaction params found";
|
|
1770
|
+
};
|
|
1771
|
+
readonly somethingWentWrong: {
|
|
1772
|
+
readonly es: "Algo salió mal";
|
|
1773
|
+
readonly en: "Something went wrong";
|
|
1774
|
+
};
|
|
1775
|
+
readonly permTemporalIdentity: {
|
|
1776
|
+
readonly es: "Acceso temporal a tu identidad";
|
|
1777
|
+
readonly en: "Temporal access to identity";
|
|
1778
|
+
};
|
|
1779
|
+
readonly permAuthorisedApps: {
|
|
1780
|
+
readonly es: "Acceso a la lista de aplicaciones autorizadas";
|
|
1781
|
+
readonly en: "Access to the list of authorised apps";
|
|
1782
|
+
};
|
|
1783
|
+
readonly permOnlyThisTxn: {
|
|
1784
|
+
readonly es: "Solo se firmará esta transacción";
|
|
1785
|
+
readonly en: "Only this transaction will be signed";
|
|
1786
|
+
};
|
|
1787
|
+
readonly firstName: {
|
|
1788
|
+
readonly es: "Nombre";
|
|
1789
|
+
readonly en: "First Name";
|
|
1790
|
+
};
|
|
1791
|
+
readonly lastName: {
|
|
1792
|
+
readonly es: "Apellido";
|
|
1793
|
+
readonly en: "Last Name";
|
|
1794
|
+
};
|
|
1795
|
+
readonly secondLastName: {
|
|
1796
|
+
readonly es: "Segundo apellido";
|
|
1797
|
+
readonly en: "Second Last Name";
|
|
1798
|
+
};
|
|
1799
|
+
readonly email: {
|
|
1800
|
+
readonly es: "Correo electrónico";
|
|
1801
|
+
readonly en: "Email";
|
|
1802
|
+
};
|
|
1803
|
+
readonly phone: {
|
|
1804
|
+
readonly es: "Teléfono";
|
|
1805
|
+
readonly en: "Phone";
|
|
1806
|
+
};
|
|
1807
|
+
readonly onlyLettersAllowed: {
|
|
1808
|
+
readonly es: "Solo se permiten letras y espacios";
|
|
1809
|
+
readonly en: "Only letters and spaces allowed";
|
|
1810
|
+
};
|
|
1811
|
+
readonly enterValidEmail: {
|
|
1812
|
+
readonly es: "Introduce un correo electrónico válido (ej. nombre@dominio.com)";
|
|
1813
|
+
readonly en: "Enter a valid email (e.g. name@domain.com)";
|
|
1814
|
+
};
|
|
1815
|
+
readonly enterValidPhone: {
|
|
1816
|
+
readonly es: "Introduce un número de teléfono válido";
|
|
1817
|
+
readonly en: "Enter a valid phone number";
|
|
1818
|
+
};
|
|
1819
|
+
readonly helpUsReport: {
|
|
1820
|
+
readonly es: "Ayúdanos a mejorar y reporta el error aquí";
|
|
1821
|
+
readonly en: "Help us get better and report the error here";
|
|
1822
|
+
};
|
|
1823
|
+
readonly thanksForReport: {
|
|
1824
|
+
readonly es: "¡Gracias por reportar el error!";
|
|
1825
|
+
readonly en: "Thanks for reporting the error!";
|
|
1826
|
+
};
|
|
1827
|
+
readonly report: {
|
|
1828
|
+
readonly es: "REPORTAR";
|
|
1829
|
+
readonly en: "REPORT";
|
|
1830
|
+
};
|
|
1831
|
+
readonly close: {
|
|
1832
|
+
readonly es: "Cerrar";
|
|
1833
|
+
readonly en: "Close";
|
|
1834
|
+
};
|
|
1835
|
+
readonly modalWillCloseIn: {
|
|
1836
|
+
readonly es: "Este modal se cerrará en...";
|
|
1837
|
+
readonly en: "This modal will close in...";
|
|
1838
|
+
};
|
|
1694
1839
|
};
|
|
1695
1840
|
type TextKey = keyof typeof TEXTS;
|
|
1696
1841
|
declare function t(key: TextKey, locale?: Locale): string;
|