@embarkai/ui-kit 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -136,7 +136,6 @@ declare function useTokenBalance(tokenAddress: `0x${string}`, userAddress?: `0x$
136
136
  declare global {
137
137
  interface Window {
138
138
  __EMBARK_SERVICES__?: Partial<{
139
- bundlerUrl: string;
140
139
  tssUrl: string;
141
140
  shareVaultUrl: string;
142
141
  tssRequireWasm: boolean;
@@ -254,7 +253,6 @@ interface ProviderConfig {
254
253
  forceChain?: boolean;
255
254
  };
256
255
  services: {
257
- bundlerUrl: string;
258
256
  tssUrl: string;
259
257
  shareVaultUrl: string;
260
258
  iframeUrl?: string;
@@ -897,6 +895,8 @@ interface SessionState {
897
895
  viemChain: Chain | null;
898
896
  /** Tracks if user explicitly selected a chain (vs using dApp config default) */
899
897
  walletReadyStatus: WalletReadyStatus | null;
898
+ /** Whether zustand persist has finished hydrating from localStorage */
899
+ hasHydrated: boolean;
900
900
  setUsePaymaster: (usePaymaster: boolean) => void;
901
901
  setIsIframeReady: (ready: boolean) => void;
902
902
  setSession: (s: AccountSession | null) => void;
@@ -932,6 +932,11 @@ declare const useSession: zustand.UseBoundStore<Omit<zustand.StoreApi<SessionSta
932
932
  }, unknown>>;
933
933
  };
934
934
  }>;
935
+ /**
936
+ * Wait for zustand persist hydration to complete.
937
+ * Use in async functions to ensure activeChainId and other persisted state is available.
938
+ */
939
+ declare function waitForStoreHydration(): Promise<void>;
935
940
  /**
936
941
  * Require active chain ID from session store (for non-React usage)
937
942
  * Throws an error if the chain ID is not yet set (e.g., before store hydration)
@@ -974,6 +979,7 @@ declare const useLoadingStatus: () => {
974
979
  declare const useRecoveryUserId: () => string;
975
980
  declare const useHasServerVault: () => boolean;
976
981
  declare const useActiveChainId: () => number;
982
+ declare const useHydrated: () => boolean;
977
983
 
978
984
  declare enum PageKey {
979
985
  AUTH = "auth",
@@ -1718,126 +1724,126 @@ declare function useTransactions(): {
1718
1724
  input: viem.Hex;
1719
1725
  s: viem.Hex;
1720
1726
  value: bigint;
1727
+ hash: Hash$1;
1728
+ v: bigint;
1729
+ r: viem.Hex;
1721
1730
  type: "legacy";
1722
- yParity?: undefined;
1731
+ to: viem.Address | null;
1723
1732
  from: viem.Address;
1724
1733
  gas: bigint;
1725
- hash: Hash$1;
1726
1734
  nonce: number;
1727
- r: viem.Hex;
1728
- to: viem.Address | null;
1729
- typeHex: viem.Hex | null;
1730
- v: bigint;
1731
- accessList?: undefined;
1732
- authorizationList?: undefined;
1733
1735
  blobVersionedHashes?: undefined;
1734
- chainId?: number;
1735
1736
  gasPrice: bigint;
1736
1737
  maxFeePerBlobGas?: undefined;
1737
1738
  maxFeePerGas?: undefined;
1738
1739
  maxPriorityFeePerGas?: undefined;
1739
- blockHash: `0x${string}`;
1740
+ accessList?: undefined;
1741
+ authorizationList?: undefined;
1742
+ yParity?: undefined;
1743
+ typeHex: viem.Hex | null;
1744
+ chainId?: number;
1740
1745
  blockNumber: bigint;
1746
+ blockHash: `0x${string}`;
1741
1747
  transactionIndex: number;
1742
1748
  } | {
1743
1749
  input: viem.Hex;
1744
1750
  s: viem.Hex;
1745
1751
  value: bigint;
1752
+ hash: Hash$1;
1753
+ v: bigint;
1754
+ r: viem.Hex;
1746
1755
  type: "eip2930";
1747
- yParity: number;
1756
+ to: viem.Address | null;
1748
1757
  from: viem.Address;
1749
1758
  gas: bigint;
1750
- hash: Hash$1;
1751
1759
  nonce: number;
1752
- r: viem.Hex;
1753
- to: viem.Address | null;
1754
- typeHex: viem.Hex | null;
1755
- v: bigint;
1756
- accessList: viem.AccessList;
1757
- authorizationList?: undefined;
1758
1760
  blobVersionedHashes?: undefined;
1759
- chainId: number;
1760
1761
  gasPrice: bigint;
1761
1762
  maxFeePerBlobGas?: undefined;
1762
1763
  maxFeePerGas?: undefined;
1763
1764
  maxPriorityFeePerGas?: undefined;
1764
- blockHash: `0x${string}`;
1765
+ accessList: viem.AccessList;
1766
+ authorizationList?: undefined;
1767
+ yParity: number;
1768
+ typeHex: viem.Hex | null;
1769
+ chainId: number;
1765
1770
  blockNumber: bigint;
1771
+ blockHash: `0x${string}`;
1766
1772
  transactionIndex: number;
1767
1773
  } | {
1768
1774
  input: viem.Hex;
1769
1775
  s: viem.Hex;
1770
1776
  value: bigint;
1777
+ hash: Hash$1;
1778
+ v: bigint;
1779
+ r: viem.Hex;
1771
1780
  type: "eip1559";
1772
- yParity: number;
1781
+ to: viem.Address | null;
1773
1782
  from: viem.Address;
1774
1783
  gas: bigint;
1775
- hash: Hash$1;
1776
1784
  nonce: number;
1777
- r: viem.Hex;
1778
- to: viem.Address | null;
1779
- typeHex: viem.Hex | null;
1780
- v: bigint;
1781
- accessList: viem.AccessList;
1782
- authorizationList?: undefined;
1783
1785
  blobVersionedHashes?: undefined;
1784
- chainId: number;
1785
1786
  gasPrice?: undefined;
1786
1787
  maxFeePerBlobGas?: undefined;
1787
1788
  maxFeePerGas: bigint;
1788
1789
  maxPriorityFeePerGas: bigint;
1789
- blockHash: `0x${string}`;
1790
+ accessList: viem.AccessList;
1791
+ authorizationList?: undefined;
1792
+ yParity: number;
1793
+ typeHex: viem.Hex | null;
1794
+ chainId: number;
1790
1795
  blockNumber: bigint;
1796
+ blockHash: `0x${string}`;
1791
1797
  transactionIndex: number;
1792
1798
  } | {
1793
1799
  input: viem.Hex;
1794
1800
  s: viem.Hex;
1795
1801
  value: bigint;
1802
+ hash: Hash$1;
1803
+ v: bigint;
1804
+ r: viem.Hex;
1796
1805
  type: "eip4844";
1797
- yParity: number;
1806
+ to: viem.Address | null;
1798
1807
  from: viem.Address;
1799
1808
  gas: bigint;
1800
- hash: Hash$1;
1801
1809
  nonce: number;
1802
- r: viem.Hex;
1803
- to: viem.Address | null;
1804
- typeHex: viem.Hex | null;
1805
- v: bigint;
1806
- accessList: viem.AccessList;
1807
- authorizationList?: undefined;
1808
1810
  blobVersionedHashes: readonly viem.Hex[];
1809
- chainId: number;
1810
1811
  gasPrice?: undefined;
1811
1812
  maxFeePerBlobGas: bigint;
1812
1813
  maxFeePerGas: bigint;
1813
1814
  maxPriorityFeePerGas: bigint;
1814
- blockHash: `0x${string}`;
1815
+ accessList: viem.AccessList;
1816
+ authorizationList?: undefined;
1817
+ yParity: number;
1818
+ typeHex: viem.Hex | null;
1819
+ chainId: number;
1815
1820
  blockNumber: bigint;
1821
+ blockHash: `0x${string}`;
1816
1822
  transactionIndex: number;
1817
1823
  } | {
1818
1824
  input: viem.Hex;
1819
1825
  s: viem.Hex;
1820
1826
  value: bigint;
1827
+ hash: Hash$1;
1828
+ v: bigint;
1829
+ r: viem.Hex;
1821
1830
  type: "eip7702";
1822
- yParity: number;
1831
+ to: viem.Address | null;
1823
1832
  from: viem.Address;
1824
1833
  gas: bigint;
1825
- hash: Hash$1;
1826
1834
  nonce: number;
1827
- r: viem.Hex;
1828
- to: viem.Address | null;
1829
- typeHex: viem.Hex | null;
1830
- v: bigint;
1831
- accessList: viem.AccessList;
1832
- authorizationList: viem.SignedAuthorizationList;
1833
1835
  blobVersionedHashes?: undefined;
1834
- chainId: number;
1835
1836
  gasPrice?: undefined;
1836
1837
  maxFeePerBlobGas?: undefined;
1837
1838
  maxFeePerGas: bigint;
1838
1839
  maxPriorityFeePerGas: bigint;
1839
- blockHash: `0x${string}`;
1840
+ accessList: viem.AccessList;
1841
+ authorizationList: viem.SignedAuthorizationList;
1842
+ yParity: number;
1843
+ typeHex: viem.Hex | null;
1844
+ chainId: number;
1840
1845
  blockNumber: bigint;
1846
+ blockHash: `0x${string}`;
1841
1847
  transactionIndex: number;
1842
1848
  }>;
1843
1849
  getTransactionReceipt: (hash: Hash$1) => Promise<TransactionReceipt>;
@@ -1864,126 +1870,126 @@ declare function useSmartAccountTransactions(): {
1864
1870
  input: viem.Hex;
1865
1871
  s: viem.Hex;
1866
1872
  value: bigint;
1873
+ hash: Hash$1;
1874
+ v: bigint;
1875
+ r: viem.Hex;
1867
1876
  type: "legacy";
1868
- yParity?: undefined;
1877
+ to: viem.Address | null;
1869
1878
  from: viem.Address;
1870
1879
  gas: bigint;
1871
- hash: Hash$1;
1872
1880
  nonce: number;
1873
- r: viem.Hex;
1874
- to: viem.Address | null;
1875
- typeHex: viem.Hex | null;
1876
- v: bigint;
1877
- accessList?: undefined;
1878
- authorizationList?: undefined;
1879
1881
  blobVersionedHashes?: undefined;
1880
- chainId?: number;
1881
1882
  gasPrice: bigint;
1882
1883
  maxFeePerBlobGas?: undefined;
1883
1884
  maxFeePerGas?: undefined;
1884
1885
  maxPriorityFeePerGas?: undefined;
1885
- blockHash: `0x${string}`;
1886
+ accessList?: undefined;
1887
+ authorizationList?: undefined;
1888
+ yParity?: undefined;
1889
+ typeHex: viem.Hex | null;
1890
+ chainId?: number;
1886
1891
  blockNumber: bigint;
1892
+ blockHash: `0x${string}`;
1887
1893
  transactionIndex: number;
1888
1894
  } | {
1889
1895
  input: viem.Hex;
1890
1896
  s: viem.Hex;
1891
1897
  value: bigint;
1898
+ hash: Hash$1;
1899
+ v: bigint;
1900
+ r: viem.Hex;
1892
1901
  type: "eip2930";
1893
- yParity: number;
1902
+ to: viem.Address | null;
1894
1903
  from: viem.Address;
1895
1904
  gas: bigint;
1896
- hash: Hash$1;
1897
1905
  nonce: number;
1898
- r: viem.Hex;
1899
- to: viem.Address | null;
1900
- typeHex: viem.Hex | null;
1901
- v: bigint;
1902
- accessList: viem.AccessList;
1903
- authorizationList?: undefined;
1904
1906
  blobVersionedHashes?: undefined;
1905
- chainId: number;
1906
1907
  gasPrice: bigint;
1907
1908
  maxFeePerBlobGas?: undefined;
1908
1909
  maxFeePerGas?: undefined;
1909
1910
  maxPriorityFeePerGas?: undefined;
1910
- blockHash: `0x${string}`;
1911
+ accessList: viem.AccessList;
1912
+ authorizationList?: undefined;
1913
+ yParity: number;
1914
+ typeHex: viem.Hex | null;
1915
+ chainId: number;
1911
1916
  blockNumber: bigint;
1917
+ blockHash: `0x${string}`;
1912
1918
  transactionIndex: number;
1913
1919
  } | {
1914
1920
  input: viem.Hex;
1915
1921
  s: viem.Hex;
1916
1922
  value: bigint;
1923
+ hash: Hash$1;
1924
+ v: bigint;
1925
+ r: viem.Hex;
1917
1926
  type: "eip1559";
1918
- yParity: number;
1927
+ to: viem.Address | null;
1919
1928
  from: viem.Address;
1920
1929
  gas: bigint;
1921
- hash: Hash$1;
1922
1930
  nonce: number;
1923
- r: viem.Hex;
1924
- to: viem.Address | null;
1925
- typeHex: viem.Hex | null;
1926
- v: bigint;
1927
- accessList: viem.AccessList;
1928
- authorizationList?: undefined;
1929
1931
  blobVersionedHashes?: undefined;
1930
- chainId: number;
1931
1932
  gasPrice?: undefined;
1932
1933
  maxFeePerBlobGas?: undefined;
1933
1934
  maxFeePerGas: bigint;
1934
1935
  maxPriorityFeePerGas: bigint;
1935
- blockHash: `0x${string}`;
1936
+ accessList: viem.AccessList;
1937
+ authorizationList?: undefined;
1938
+ yParity: number;
1939
+ typeHex: viem.Hex | null;
1940
+ chainId: number;
1936
1941
  blockNumber: bigint;
1942
+ blockHash: `0x${string}`;
1937
1943
  transactionIndex: number;
1938
1944
  } | {
1939
1945
  input: viem.Hex;
1940
1946
  s: viem.Hex;
1941
1947
  value: bigint;
1948
+ hash: Hash$1;
1949
+ v: bigint;
1950
+ r: viem.Hex;
1942
1951
  type: "eip4844";
1943
- yParity: number;
1952
+ to: viem.Address | null;
1944
1953
  from: viem.Address;
1945
1954
  gas: bigint;
1946
- hash: Hash$1;
1947
1955
  nonce: number;
1948
- r: viem.Hex;
1949
- to: viem.Address | null;
1950
- typeHex: viem.Hex | null;
1951
- v: bigint;
1952
- accessList: viem.AccessList;
1953
- authorizationList?: undefined;
1954
1956
  blobVersionedHashes: readonly viem.Hex[];
1955
- chainId: number;
1956
1957
  gasPrice?: undefined;
1957
1958
  maxFeePerBlobGas: bigint;
1958
1959
  maxFeePerGas: bigint;
1959
1960
  maxPriorityFeePerGas: bigint;
1960
- blockHash: `0x${string}`;
1961
+ accessList: viem.AccessList;
1962
+ authorizationList?: undefined;
1963
+ yParity: number;
1964
+ typeHex: viem.Hex | null;
1965
+ chainId: number;
1961
1966
  blockNumber: bigint;
1967
+ blockHash: `0x${string}`;
1962
1968
  transactionIndex: number;
1963
1969
  } | {
1964
1970
  input: viem.Hex;
1965
1971
  s: viem.Hex;
1966
1972
  value: bigint;
1973
+ hash: Hash$1;
1974
+ v: bigint;
1975
+ r: viem.Hex;
1967
1976
  type: "eip7702";
1968
- yParity: number;
1977
+ to: viem.Address | null;
1969
1978
  from: viem.Address;
1970
1979
  gas: bigint;
1971
- hash: Hash$1;
1972
1980
  nonce: number;
1973
- r: viem.Hex;
1974
- to: viem.Address | null;
1975
- typeHex: viem.Hex | null;
1976
- v: bigint;
1977
- accessList: viem.AccessList;
1978
- authorizationList: viem.SignedAuthorizationList;
1979
1981
  blobVersionedHashes?: undefined;
1980
- chainId: number;
1981
1982
  gasPrice?: undefined;
1982
1983
  maxFeePerBlobGas?: undefined;
1983
1984
  maxFeePerGas: bigint;
1984
1985
  maxPriorityFeePerGas: bigint;
1985
- blockHash: `0x${string}`;
1986
+ accessList: viem.AccessList;
1987
+ authorizationList: viem.SignedAuthorizationList;
1988
+ yParity: number;
1989
+ typeHex: viem.Hex | null;
1990
+ chainId: number;
1986
1991
  blockNumber: bigint;
1992
+ blockHash: `0x${string}`;
1987
1993
  transactionIndex: number;
1988
1994
  };
1989
1995
  receipt: viem.TransactionReceipt;
@@ -2689,4 +2695,4 @@ declare function combineI18NResources(...resourses: TranslationResources[]): Tra
2689
2695
  declare function getAvailableLanguages(resourses: TranslationResources): string[];
2690
2696
  declare function getLanguageIcon(languageKey: string): string | null;
2691
2697
 
2692
- export { AccountAbstractionError, type AccountSession, Address, type AddressProps, type Asset, type CallbacksConfig, ConnectWalletButton, type ConnectWalletButtonProps, ErrorCodes, type FingerprintVerificationResult, Hash, type HashProps, KeyshareBackupMenu as KeyshareBackup, LOCAL_STORAGE_I18N_KEY, LangToggle, type NicknameAvailability, type NicknameAvatar, type NicknameChangeResult, type NicknameInfo, type NicknameResolution, type NicknameResolveRequest, type NicknameResolvedTarget, type NicknameValidationResult, PASSPORT_TRANSLATIONS, PageKey, type PageOpenParams, Provider, type ProviderConfig, type ProviderDetail, type ProviderProps, type RegisterSmartAccountResult, type SendTransactionParams, type SendTransactionResult, type SignTypedDataParams, type SmartAccountEntry, ThemeToggle, type TokenBalance, type Transaction, TransactionsList, type TypedDataDomain, type TypedDataField, type UpdateProfileRequest, type UseErc3643ComplianceOptions, type UseErc3643ComplianceResult, type UseLogoutReturn, type UseNicknameResolveOptions, type UseNicknameResolveResult, type UseSendTransactionReturn, type UseUserOpStatusOptions, type UseUserOpStatusReturn, type UserOpMempool, type SendTransactionParams$1 as UserOpSendTransactionParams, type UserOpState, UserOpStatus, type UserOpStatusProps, type UserOperation, type UserOperationByHash, type UserOperationReceipt, UserOperationTimeoutError, type UserProfile, UserRejectedError, type WaitForReceiptOptions, type WalletReadyStatus, type WatchToken, combineI18NResources, createAccountAbstractionError, deployAccount, destroyIframeManager, generateFingerprint, getAllSmartAccounts, getAvailableLanguages, getIframeManager, getLanguageIcon, getSmartAccountForChain, getUserOperationByHash, getUserOperationReceipt, getUserProfile, looksLikeNickname, prepareUserOperation, requireActiveChainId, sendUserOperation, signTypedData, updateUserProfile, useAccountSession, useActiveChainId, useAddress, useAssets, useBalance, useColorMode, useErc3643Compliance, useError, useHasServerVault, useIFrameReady, useIsMobileView, useLinkedProfiles, useLoadingStatus, useLogout, useNicknameResolve, useOpenPage, useProviderConfig, useRecoveryUserId, useSendTransaction, useSession, useSmartAccountTransactions, useTokenBalance, useTokenInfo, useTransactions, useUserOpStatus, verifyFingerprint, verifyFingerprintDetailed, wagmiConfig, waitForUserOperationReceipt };
2698
+ export { AccountAbstractionError, type AccountSession, Address, type AddressProps, type Asset, type CallbacksConfig, ConnectWalletButton, type ConnectWalletButtonProps, ErrorCodes, type FingerprintVerificationResult, Hash, type HashProps, KeyshareBackupMenu as KeyshareBackup, LOCAL_STORAGE_I18N_KEY, LangToggle, type NicknameAvailability, type NicknameAvatar, type NicknameChangeResult, type NicknameInfo, type NicknameResolution, type NicknameResolveRequest, type NicknameResolvedTarget, type NicknameValidationResult, PASSPORT_TRANSLATIONS, PageKey, type PageOpenParams, Provider, type ProviderConfig, type ProviderDetail, type ProviderProps, type RegisterSmartAccountResult, type SendTransactionParams, type SendTransactionResult, type SignTypedDataParams, type SmartAccountEntry, ThemeToggle, type TokenBalance, type Transaction, TransactionsList, type TypedDataDomain, type TypedDataField, type UpdateProfileRequest, type UseErc3643ComplianceOptions, type UseErc3643ComplianceResult, type UseLogoutReturn, type UseNicknameResolveOptions, type UseNicknameResolveResult, type UseSendTransactionReturn, type UseUserOpStatusOptions, type UseUserOpStatusReturn, type UserOpMempool, type SendTransactionParams$1 as UserOpSendTransactionParams, type UserOpState, UserOpStatus, type UserOpStatusProps, type UserOperation, type UserOperationByHash, type UserOperationReceipt, UserOperationTimeoutError, type UserProfile, UserRejectedError, type WaitForReceiptOptions, type WalletReadyStatus, type WatchToken, combineI18NResources, createAccountAbstractionError, deployAccount, destroyIframeManager, generateFingerprint, getAllSmartAccounts, getAvailableLanguages, getIframeManager, getLanguageIcon, getSmartAccountForChain, getUserOperationByHash, getUserOperationReceipt, getUserProfile, looksLikeNickname, prepareUserOperation, requireActiveChainId, sendUserOperation, signTypedData, updateUserProfile, useAccountSession, useActiveChainId, useAddress, useAssets, useBalance, useColorMode, useErc3643Compliance, useError, useHasServerVault, useHydrated, useIFrameReady, useIsMobileView, useLinkedProfiles, useLoadingStatus, useLogout, useNicknameResolve, useOpenPage, useProviderConfig, useRecoveryUserId, useSendTransaction, useSession, useSmartAccountTransactions, useTokenBalance, useTokenInfo, useTransactions, useUserOpStatus, verifyFingerprint, verifyFingerprintDetailed, wagmiConfig, waitForStoreHydration, waitForUserOperationReceipt };