@openfort/react 0.1.0 → 0.1.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.
@@ -2,10 +2,10 @@ import { type SDKOverrides, type ThirdPartyAuthConfiguration } from '@openfort/o
2
2
  import React from 'react';
3
3
  import type { useConnectCallbackProps } from '../../hooks/useConnectCallback';
4
4
  import { type ContextValue } from './context';
5
- import { type ConnectUIOptions, type OpenfortWalletConfig } from './types';
5
+ import { type ConnectUIOptions, type DebugModeOptions, type OpenfortWalletConfig } from './types';
6
6
  type OpenfortProviderProps = {
7
7
  children?: React.ReactNode;
8
- debugMode?: boolean;
8
+ debugMode?: boolean | DebugModeOptions;
9
9
  publishableKey: string;
10
10
  uiConfig?: ConnectUIOptions;
11
11
  walletConfig?: OpenfortWalletConfig;
@@ -2,7 +2,7 @@ import type { SDKOverrides, ThirdPartyAuthConfiguration } from '@openfort/openfo
2
2
  import type React from 'react';
3
3
  import type { useConnectCallbackProps } from '../../hooks/useConnectCallback';
4
4
  import type { CustomTheme, Languages, Mode, Theme } from '../../types';
5
- import type { Connector, ErrorMessage, OpenfortUIOptionsExtended, OpenfortWalletConfig, RouteOptions, SetRouteOptions } from './types';
5
+ import type { Connector, DebugModeOptions, ErrorMessage, OpenfortUIOptionsExtended, OpenfortWalletConfig, RouteOptions, SetRouteOptions } from './types';
6
6
  export type ContextValue = {
7
7
  setTheme: React.Dispatch<React.SetStateAction<Theme>>;
8
8
  mode: Mode;
@@ -23,7 +23,7 @@ export type ContextValue = {
23
23
  connector: Connector;
24
24
  setConnector: React.Dispatch<React.SetStateAction<Connector>>;
25
25
  errorMessage: ErrorMessage;
26
- debugMode?: boolean;
26
+ debugMode: Required<DebugModeOptions>;
27
27
  resize: number;
28
28
  triggerResize: () => void;
29
29
  uiConfig: OpenfortUIOptionsExtended;
@@ -79,6 +79,7 @@ type CommonWalletConfig = {
79
79
  /** Policy ID (pol_...) for the embedded signer. */
80
80
  ethereumProviderPolicyId?: PolicyConfig;
81
81
  accountType?: AccountTypeEnum;
82
+ /** @deprecated Use `debugMode` prop instead. */
82
83
  debug?: boolean;
83
84
  recoverWalletAutomaticallyAfterAuth?: boolean;
84
85
  };
@@ -91,6 +92,11 @@ type EncryptionSession = {
91
92
  getEncryptionSession?: never;
92
93
  createEncryptedSessionEndpoint?: string;
93
94
  };
95
+ export type DebugModeOptions = {
96
+ openfortReactDebugMode?: boolean;
97
+ openfortCoreDebugMode?: boolean;
98
+ shieldDebugMode?: boolean;
99
+ };
94
100
  /**
95
101
  * Configuration for wallet recovery behaviour.
96
102
  *
@@ -15,6 +15,6 @@ export declare const useWalletAuth: (hookOptions?: OpenfortHookOptions) => {
15
15
  linkWallet: (options: ConnectWalletOptions) => Promise<{
16
16
  error: OpenfortError;
17
17
  } | undefined>;
18
- availableWallets: import("../../../wallets/useWallets").WalletProps[];
18
+ availableWallets: import("../../../wallets/useWagmiWallets").WalletProps[];
19
19
  };
20
20
  export {};
@@ -114,7 +114,7 @@ export declare function useWallets(hookOptions?: WalletOptions): {
114
114
  isConnecting: boolean;
115
115
  isLoadingWallets: boolean;
116
116
  wallets: UserWallet[];
117
- availableWallets: import("../../wallets/useWallets").WalletProps[];
117
+ availableWallets: import("../../wallets/useWagmiWallets").WalletProps[];
118
118
  activeWallet: UserWallet | undefined;
119
119
  setRecovery: (params: SetRecoveryOptions) => Promise<RecoverEmbeddedWalletResult>;
120
120
  reset: () => void;
package/build/index.es.js CHANGED
@@ -4424,29 +4424,31 @@ const ConnectCallback = ({ onConnect, onDisconnect }) => {
4424
4424
  });
4425
4425
  return null;
4426
4426
  };
4427
- const CoreOpenfortProvider = ({ children, onConnect, onDisconnect, ...openfortProps }) => {
4427
+ const CoreOpenfortProvider = ({ children, onConnect, onDisconnect, openfortConfig, }) => {
4428
4428
  const { connectors, connect, reset } = useConnect();
4429
4429
  const { address } = useAccount();
4430
4430
  const [user, setUser] = useState(null);
4431
4431
  const [walletStatus, setWalletStatus] = useState({ status: 'idle' });
4432
4432
  const { disconnectAsync } = useDisconnect();
4433
4433
  const { walletConfig } = useOpenfort();
4434
+ const wagmiConfig = useConfig();
4435
+ const chainId = useChainId();
4434
4436
  // ---- Openfort instance ----
4435
4437
  const openfort = useMemo(() => {
4436
4438
  var _a;
4437
- logger.log('Creating Openfort instance.', openfortProps);
4438
- if (!openfortProps.baseConfiguration.publishableKey)
4439
+ logger.log('Creating Openfort instance.', openfortConfig);
4440
+ if (!openfortConfig.baseConfiguration.publishableKey)
4439
4441
  throw Error('CoreOpenfortProvider requires a publishableKey to be set in the baseConfiguration.');
4440
- if (openfortProps.shieldConfiguration &&
4441
- !((_a = openfortProps.shieldConfiguration) === null || _a === void 0 ? void 0 : _a.passkeyRpId) &&
4442
+ if (openfortConfig.shieldConfiguration &&
4443
+ !((_a = openfortConfig.shieldConfiguration) === null || _a === void 0 ? void 0 : _a.passkeyRpId) &&
4442
4444
  typeof window !== 'undefined') {
4443
- openfortProps.shieldConfiguration = {
4445
+ openfortConfig.shieldConfiguration = {
4444
4446
  passkeyRpId: window.location.hostname,
4445
4447
  passkeyRpName: document.title || 'Openfort DApp',
4446
- ...openfortProps.shieldConfiguration,
4448
+ ...openfortConfig.shieldConfiguration,
4447
4449
  };
4448
4450
  }
4449
- const newClient = createOpenfortClient(openfortProps);
4451
+ const newClient = createOpenfortClient(openfortConfig);
4450
4452
  return newClient;
4451
4453
  }, []);
4452
4454
  // ---- Embedded state ----
@@ -4520,8 +4522,27 @@ const CoreOpenfortProvider = ({ children, onConnect, onDisconnect, ...openfortPr
4520
4522
  return null;
4521
4523
  }
4522
4524
  }, [openfort]);
4523
- const chainId = useChainId();
4524
- const wagmiConfig = useConfig();
4525
+ // Embedded accounts list. Will reset on logout.
4526
+ const { data: embeddedAccounts, refetch: fetchEmbeddedAccounts, isPending: isLoadingAccounts, } = useQuery({
4527
+ queryKey: ['openfortEmbeddedAccountsList'],
4528
+ queryFn: async () => {
4529
+ try {
4530
+ return await openfort.embeddedWallet.list({
4531
+ limit: 100,
4532
+ // If its EOA we want all accounts, otherwise we want only smart accounts
4533
+ accountType: (walletConfig === null || walletConfig === void 0 ? void 0 : walletConfig.accountType) === AccountTypeEnum.EOA ? undefined : AccountTypeEnum.SMART_ACCOUNT,
4534
+ });
4535
+ }
4536
+ catch (error) {
4537
+ handleOAuthConfigError(error);
4538
+ throw error;
4539
+ }
4540
+ },
4541
+ refetchOnMount: false,
4542
+ refetchOnWindowFocus: false,
4543
+ retry: false,
4544
+ });
4545
+ // Update ethereum provider when chainId changes
4525
4546
  useEffect(() => {
4526
4547
  if (!openfort || !walletConfig)
4527
4548
  return;
@@ -4551,28 +4572,10 @@ const CoreOpenfortProvider = ({ children, onConnect, onDisconnect, ...openfortPr
4551
4572
  ...resolvePolicy(),
4552
4573
  chains: rpcUrls,
4553
4574
  });
4575
+ // Refresh embedded accounts to reflect any changes in the selected chain
4576
+ fetchEmbeddedAccounts();
4554
4577
  }, [openfort, walletConfig, chainId]);
4555
4578
  const [isConnectedWithEmbeddedSigner, setIsConnectedWithEmbeddedSigner] = useState(false);
4556
- // will reset on logout
4557
- const { data: embeddedAccounts, refetch: fetchEmbeddedAccounts, isPending: isLoadingAccounts, } = useQuery({
4558
- queryKey: ['openfortEmbeddedAccountsList'],
4559
- queryFn: async () => {
4560
- try {
4561
- return await openfort.embeddedWallet.list({
4562
- limit: 100,
4563
- // If its EOA we want all accounts, otherwise we want only smart accounts
4564
- accountType: (walletConfig === null || walletConfig === void 0 ? void 0 : walletConfig.accountType) === AccountTypeEnum.EOA ? undefined : AccountTypeEnum.SMART_ACCOUNT,
4565
- });
4566
- }
4567
- catch (error) {
4568
- handleOAuthConfigError(error);
4569
- throw error;
4570
- }
4571
- },
4572
- refetchOnMount: false,
4573
- refetchOnWindowFocus: false,
4574
- retry: false,
4575
- });
4576
4579
  useEffect(() => {
4577
4580
  if (!openfort)
4578
4581
  return;
@@ -4685,6 +4688,7 @@ const CoreOpenfortProvider = ({ children, onConnect, onDisconnect, ...openfortPr
4685
4688
  needsRecovery,
4686
4689
  user,
4687
4690
  updateUser,
4691
+ updateEmbeddedAccounts: fetchEmbeddedAccounts,
4688
4692
  embeddedAccounts,
4689
4693
  isLoadingAccounts,
4690
4694
  walletStatus,
@@ -5246,13 +5250,13 @@ const walletConfigs = {
5246
5250
  };
5247
5251
 
5248
5252
  const useWallet = (id) => {
5249
- const wallets = useWallets$1();
5253
+ const wallets = useWagmiWallets();
5250
5254
  const wallet = wallets.find((c) => c.id === id);
5251
5255
  if (!wallet)
5252
5256
  return null;
5253
5257
  return wallet;
5254
5258
  };
5255
- const useWallets$1 = () => {
5259
+ const useWagmiWallets = () => {
5256
5260
  const connectors = useConnectors();
5257
5261
  const context = useOpenfort();
5258
5262
  const wallets = connectors.map((connector) => {
@@ -5481,7 +5485,7 @@ const FitText = ({ children, maxFontSize = 100, minFontSize = 70, }) => {
5481
5485
  };
5482
5486
  FitText.displayName = 'FitText';
5483
5487
 
5484
- const OPENFORT_VERSION = '0.1.0';
5488
+ const OPENFORT_VERSION = '0.1.2';
5485
5489
 
5486
5490
  const Portal = (props) => {
5487
5491
  props = {
@@ -8685,7 +8689,7 @@ const ConnectorsContainer = styled.div `
8685
8689
  const ConnectorList = () => {
8686
8690
  const context = useOpenfort();
8687
8691
  const isMobile = useIsMobile();
8688
- const wallets = useWallets$1();
8692
+ const wallets = useWagmiWallets();
8689
8693
  const { lastConnectorId } = useLastConnector();
8690
8694
  const familyConnector = useFamilyConnector();
8691
8695
  const familyAccountsConnector = useFamilyAccountsConnector();
@@ -8951,15 +8955,16 @@ const mapWalletStatus = (status) => {
8951
8955
  * ```
8952
8956
  */
8953
8957
  function useWallets(hookOptions = {}) {
8954
- const { client, embeddedAccounts, isLoadingAccounts: isLoadingWallets } = useOpenfortCore();
8958
+ const { client, embeddedAccounts, isLoadingAccounts: isLoadingWallets, updateEmbeddedAccounts } = useOpenfortCore();
8955
8959
  const { user } = useUser();
8956
8960
  const { walletConfig, setOpen, setRoute, setConnector, uiConfig } = useOpenfort();
8957
8961
  const { connector, isConnected, address } = useAccount();
8958
8962
  const chainId = useChainId();
8959
- const availableWallets = useWallets$1(); // TODO: Map wallets object to be the same as wallets
8963
+ const availableWallets = useWagmiWallets(); // TODO: Map wallets object to be the same as wallets
8960
8964
  const { disconnect, disconnectAsync } = useDisconnect();
8961
8965
  const [status, setStatus] = useWalletStatus();
8962
8966
  const [connectToConnector, setConnectToConnector] = useState(undefined);
8967
+ const { switchChainAsync } = useSwitchChain();
8963
8968
  const { connect } = useConnect({
8964
8969
  mutation: {
8965
8970
  onError: (e) => {
@@ -9060,29 +9065,33 @@ function useWallets(hookOptions = {}) {
9060
9065
  throw new OpenfortError('Invalid recovery method', OpenfortErrorType.VALIDATION_ERROR);
9061
9066
  }
9062
9067
  }, [walletConfig, getEncryptionSession]);
9063
- const rawWallets = useMemo(() => {
9068
+ const userLinkedWalletConnectors = useMemo(() => {
9064
9069
  const userWallets = user
9065
9070
  ? user.linkedAccounts
9066
- .filter((a) => a.provider === UIAuthProvider.WALLET)
9067
- .map((a) => {
9071
+ .filter((linkedAccount) => linkedAccount.provider === UIAuthProvider.WALLET)
9072
+ .map((linkedAccount) => {
9068
9073
  // For connector wallets (e.g. Metamask, Rabby, etc.)
9069
- const wallet = availableWallets.find((c) => c.connector.id === a.walletClientType);
9074
+ const wallet = availableWallets.find((c) => c.connector.id === linkedAccount.walletClientType);
9070
9075
  return {
9071
9076
  accounts: [],
9072
- address: a.address,
9073
- connectorType: a.connectorType,
9074
- walletClientType: a.walletClientType,
9075
- id: (wallet === null || wallet === void 0 ? void 0 : wallet.id) || a.walletClientType || 'unknown',
9077
+ address: linkedAccount.address,
9078
+ connectorType: linkedAccount.connectorType,
9079
+ walletClientType: linkedAccount.walletClientType,
9080
+ id: (wallet === null || wallet === void 0 ? void 0 : wallet.id) || linkedAccount.walletClientType || 'unknown',
9076
9081
  isAvailable: !!wallet,
9077
9082
  connector: wallet === null || wallet === void 0 ? void 0 : wallet.connector,
9078
9083
  };
9079
9084
  })
9080
9085
  : [];
9086
+ return userWallets;
9087
+ }, [user === null || user === void 0 ? void 0 : user.linkedAccounts, embeddedAccounts]);
9088
+ const userEmbeddedWallets = useMemo(() => {
9089
+ const newRawWallets = [];
9081
9090
  embeddedAccounts === null || embeddedAccounts === void 0 ? void 0 : embeddedAccounts.forEach((embeddedAccount) => {
9082
9091
  // Remove duplicates (different chain ids)
9083
- if (userWallets.find((w) => w.address.toLowerCase() === embeddedAccount.address.toLowerCase()))
9092
+ if (newRawWallets.find((w) => w.address.toLowerCase() === embeddedAccount.address.toLowerCase()))
9084
9093
  return;
9085
- userWallets.push(parseEmbeddedAccount({
9094
+ newRawWallets.push(parseEmbeddedAccount({
9086
9095
  embeddedAccount,
9087
9096
  connector: openfortConnector,
9088
9097
  simpleAccounts: getSimpleAccounts({
@@ -9092,8 +9101,11 @@ function useWallets(hookOptions = {}) {
9092
9101
  chainId,
9093
9102
  }));
9094
9103
  });
9095
- return userWallets;
9096
- }, [user === null || user === void 0 ? void 0 : user.linkedAccounts, embeddedAccounts]);
9104
+ return newRawWallets;
9105
+ }, [chainId, embeddedAccounts, openfortConnector]);
9106
+ const rawWallets = useMemo(() => {
9107
+ return [...userLinkedWalletConnectors, ...userEmbeddedWallets];
9108
+ }, [userLinkedWalletConnectors, userEmbeddedWallets]);
9097
9109
  const wallets = useMemo(() => {
9098
9110
  // logger.log("Mapping wallets", { rawWallets, status, address, isConnected, connector: connector?.id });
9099
9111
  return rawWallets.map((w) => {
@@ -9104,8 +9116,9 @@ function useWallets(hookOptions = {}) {
9104
9116
  isActive: w.address.toLowerCase() === (address === null || address === void 0 ? void 0 : address.toLowerCase()) && isConnected && (connector === null || connector === void 0 ? void 0 : connector.id) === w.id,
9105
9117
  });
9106
9118
  });
9107
- }, [rawWallets.length, status.status, address, isConnected, connector === null || connector === void 0 ? void 0 : connector.id]);
9119
+ }, [rawWallets, status.status, address, isConnected, connector === null || connector === void 0 ? void 0 : connector.id]);
9108
9120
  const activeWallet = isConnected && connector ? wallets.find((w) => w.isActive) : undefined;
9121
+ const [shouldSwitchToChain, setShouldSwitchToChain] = useState(null);
9109
9122
  useEffect(() => {
9110
9123
  if (connectToConnector)
9111
9124
  connect({ connector: connectToConnector.connector });
@@ -9176,6 +9189,7 @@ function useWallets(hookOptions = {}) {
9176
9189
  hookOptions,
9177
9190
  });
9178
9191
  }
9192
+ let hasToSwitchChain = false;
9179
9193
  try {
9180
9194
  const embeddedAccounts = await queryClient.ensureQueryData({
9181
9195
  queryKey: ['openfortEmbeddedAccountsList'],
@@ -9191,7 +9205,7 @@ function useWallets(hookOptions = {}) {
9191
9205
  let embeddedAccount;
9192
9206
  if (walletAddress) {
9193
9207
  const addressToMatch = walletAddress.toLowerCase();
9194
- const accountToRecover = embeddedAccounts.find((w) => {
9208
+ let accountToRecover = embeddedAccounts.find((w) => {
9195
9209
  if ((walletConfig === null || walletConfig === void 0 ? void 0 : walletConfig.accountType) === AccountTypeEnum.EOA) {
9196
9210
  return w.address.toLowerCase() === addressToMatch;
9197
9211
  }
@@ -9200,23 +9214,23 @@ function useWallets(hookOptions = {}) {
9200
9214
  }
9201
9215
  });
9202
9216
  if (!accountToRecover) {
9203
- // TODO: Connect to wallet in the other chain and then switch chain
9204
- return onError({
9205
- error: new OpenfortError(`Embedded wallet not found for address ${walletAddress} and chainId ${chainId}`, OpenfortErrorType.WALLET_ERROR),
9206
- options: optionsObject,
9207
- hookOptions,
9217
+ logger.log(`No embedded wallet found for address ${walletAddress} in chain ${chainId}. Checking other chains.`);
9218
+ const accountToRecoverInDifferentChain = embeddedAccounts.find((w) => {
9219
+ return w.address.toLowerCase() === addressToMatch && !!w.chainId;
9208
9220
  });
9221
+ if (!accountToRecoverInDifferentChain || !accountToRecoverInDifferentChain.chainId) {
9222
+ throw new OpenfortError(`Embedded wallet not found for address ${walletAddress}`, OpenfortErrorType.WALLET_ERROR);
9223
+ }
9224
+ logger.log(`Found embedded wallet for address ${walletAddress} in different chain ${accountToRecoverInDifferentChain.chainId}.`);
9225
+ hasToSwitchChain = true;
9226
+ accountToRecover = accountToRecoverInDifferentChain;
9209
9227
  }
9210
9228
  logger.log('Found embedded wallet to recover', accountToRecover);
9211
9229
  if (((_b = optionsObject.recovery) === null || _b === void 0 ? void 0 : _b.recoveryMethod) &&
9212
9230
  accountToRecover.recoveryMethod &&
9213
9231
  optionsObject.recovery.recoveryMethod !== accountToRecover.recoveryMethod) {
9214
9232
  logger.log('Recovery method does not match', optionsObject.recovery.recoveryMethod, accountToRecover.recoveryMethod);
9215
- return onError({
9216
- error: new OpenfortError("The recovery method you entered is incorrect and does not match the wallet's recovery method", OpenfortErrorType.WALLET_ERROR),
9217
- options: optionsObject,
9218
- hookOptions,
9219
- });
9233
+ throw new OpenfortError("The recovery method you entered is incorrect and does not match the wallet's recovery method", OpenfortErrorType.WALLET_ERROR);
9220
9234
  }
9221
9235
  const recovery = {
9222
9236
  recoveryMethod: (_c = accountToRecover.recoveryMethod) !== null && _c !== void 0 ? _c : RecoveryMethod.AUTOMATIC,
@@ -9234,11 +9248,7 @@ function useWallets(hookOptions = {}) {
9234
9248
  if ((walletConfig === null || walletConfig === void 0 ? void 0 : walletConfig.accountType) === AccountTypeEnum.EOA) {
9235
9249
  accountToRecover = embeddedAccounts.find((w) => w.accountType === AccountTypeEnum.EOA);
9236
9250
  if (!accountToRecover) {
9237
- return onError({
9238
- error: new OpenfortError('No embedded wallet found with type EOA', OpenfortErrorType.WALLET_ERROR),
9239
- options: optionsObject,
9240
- hookOptions,
9241
- });
9251
+ throw new OpenfortError('No embedded wallet found with type EOA', OpenfortErrorType.WALLET_ERROR);
9242
9252
  }
9243
9253
  }
9244
9254
  else {
@@ -9246,11 +9256,7 @@ function useWallets(hookOptions = {}) {
9246
9256
  if (!accountToRecover) {
9247
9257
  // Here it should check if there is a wallet that can recover in another chain and recover it in the current chain (its a different account so its not supported yet)
9248
9258
  // TODO: Connect to wallet in the other chain and then switch chain
9249
- return onError({
9250
- error: new OpenfortError('No embedded wallet found for the current chain', OpenfortErrorType.WALLET_ERROR),
9251
- options: optionsObject,
9252
- hookOptions,
9253
- });
9259
+ throw new OpenfortError('No embedded wallet found for the current chain', OpenfortErrorType.WALLET_ERROR);
9254
9260
  }
9255
9261
  }
9256
9262
  logger.log('Found embedded wallet to recover (without walletAddress)', accountToRecover);
@@ -9266,11 +9272,7 @@ function useWallets(hookOptions = {}) {
9266
9272
  walletAddress = accountToRecover.address;
9267
9273
  }
9268
9274
  if (!embeddedAccount) {
9269
- return onError({
9270
- error: new OpenfortError('Failed to recover embedded wallet', OpenfortErrorType.WALLET_ERROR),
9271
- options: optionsObject,
9272
- hookOptions,
9273
- });
9275
+ throw new OpenfortError('Failed to recover embedded wallet', OpenfortErrorType.WALLET_ERROR);
9274
9276
  }
9275
9277
  setStatus({
9276
9278
  status: 'success',
@@ -9321,6 +9323,11 @@ function useWallets(hookOptions = {}) {
9321
9323
  hookOptions,
9322
9324
  });
9323
9325
  }
9326
+ finally {
9327
+ if (hasToSwitchChain) {
9328
+ setShouldSwitchToChain(chainId);
9329
+ }
9330
+ }
9324
9331
  }
9325
9332
  else {
9326
9333
  setStatus({
@@ -9334,6 +9341,19 @@ function useWallets(hookOptions = {}) {
9334
9341
  }
9335
9342
  return {};
9336
9343
  }, [wallets, setOpen, setRoute, setConnector, disconnectAsync, address, client, walletConfig, chainId, hookOptions]);
9344
+ useEffect(() => {
9345
+ (async () => {
9346
+ if (shouldSwitchToChain) {
9347
+ logger.log(`Switching to chain ${shouldSwitchToChain}.`);
9348
+ // const a = await client.embeddedWallet.getEthereumProvider()
9349
+ // const res = await switchChain(a, { id: shouldSwitchToChain })
9350
+ const res = await switchChainAsync({ chainId: shouldSwitchToChain });
9351
+ logger.log('Switched to chain', res);
9352
+ updateEmbeddedAccounts();
9353
+ setShouldSwitchToChain(null);
9354
+ }
9355
+ })();
9356
+ }, [shouldSwitchToChain]);
9337
9357
  const queryClient = useQueryClient();
9338
9358
  const createWallet = useCallback(async ({ recovery, ...options } = {}) => {
9339
9359
  setStatus({
@@ -9343,18 +9363,10 @@ function useWallets(hookOptions = {}) {
9343
9363
  try {
9344
9364
  const accessToken = await client.getAccessToken();
9345
9365
  if (!accessToken) {
9346
- return onError({
9347
- error: new OpenfortError('Openfort access token not found', OpenfortErrorType.WALLET_ERROR),
9348
- hookOptions,
9349
- options,
9350
- });
9366
+ throw new OpenfortError('Openfort access token not found', OpenfortErrorType.WALLET_ERROR);
9351
9367
  }
9352
9368
  if (!walletConfig) {
9353
- return onError({
9354
- error: new OpenfortError('Embedded signer not enabled', OpenfortErrorType.WALLET_ERROR),
9355
- hookOptions,
9356
- options,
9357
- });
9369
+ throw new OpenfortError('Embedded signer not enabled', OpenfortErrorType.WALLET_ERROR);
9358
9370
  }
9359
9371
  const recoveryParams = await parseWalletRecovery(recovery);
9360
9372
  const embeddedAccount = await client.embeddedWallet.create({
@@ -9385,7 +9397,9 @@ function useWallets(hookOptions = {}) {
9385
9397
  }
9386
9398
  catch (e) {
9387
9399
  const errorObj = e instanceof Error ? e : new Error('Failed to create wallet');
9388
- const error = new OpenfortError('Failed to create wallet', OpenfortErrorType.WALLET_ERROR, { error: errorObj });
9400
+ const error = e instanceof OpenfortError
9401
+ ? e
9402
+ : new OpenfortError('Failed to create wallet', OpenfortErrorType.WALLET_ERROR, { error: errorObj });
9389
9403
  setStatus({
9390
9404
  status: 'error',
9391
9405
  error,
@@ -11822,7 +11836,7 @@ const MobileConnectors = () => {
11822
11836
  const { connect: { getUri }, } = useWeb3();
11823
11837
  const wcUri = getUri();
11824
11838
  const { open: openW3M, isOpen: isOpenW3M } = useWalletConnectModal();
11825
- const wallets = useWallets$1();
11839
+ const wallets = useWagmiWallets();
11826
11840
  // filter out installed wallets
11827
11841
  const walletsIdsToDisplay = (_a = Object.keys(walletConfigs).filter((walletId) => {
11828
11842
  const wallet = walletConfigs[walletId];
@@ -12729,7 +12743,7 @@ const ProvidersHeader = styled(motion.h3) `
12729
12743
 
12730
12744
  const WalletIcon = ({ provider }) => {
12731
12745
  var _a;
12732
- const wallets = useWallets$1();
12746
+ const wallets = useWagmiWallets();
12733
12747
  const wallet = useMemo(() => {
12734
12748
  return wallets.find((w) => { var _a; return ((_a = w.id) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === provider.walletClientType; });
12735
12749
  }, [provider]);
@@ -14168,7 +14182,7 @@ const ConnectModal = ({ mode = 'auto', theme = 'auto', customTheme = customTheme
14168
14182
  * }
14169
14183
  * ```
14170
14184
  */
14171
- const OpenfortProvider = ({ children, uiConfig, onConnect, onDisconnect, debugMode = false, publishableKey, walletConfig, overrides, thirdPartyAuth, }) => {
14185
+ const OpenfortProvider = ({ children, uiConfig, onConnect, onDisconnect, debugMode, publishableKey, walletConfig, overrides, thirdPartyAuth, }) => {
14172
14186
  var _a, _b, _c, _d, _e;
14173
14187
  // OpenfortProvider must be within a WagmiProvider
14174
14188
  if (!React.useContext(WagmiContext)) {
@@ -14179,9 +14193,35 @@ const OpenfortProvider = ({ children, uiConfig, onConnect, onDisconnect, debugMo
14179
14193
  if (React.useContext(Openfortcontext)) {
14180
14194
  throw new Error('Multiple, nested usages of OpenfortProvider detected. Please use only one.');
14181
14195
  }
14182
- useMemo(() => {
14183
- logger.enabled = !!debugMode;
14184
- }, []);
14196
+ const debugModeOptions = useMemo(() => {
14197
+ const getDebugMode = () => {
14198
+ var _a, _b, _c;
14199
+ if (typeof debugMode === 'undefined') {
14200
+ return {
14201
+ shieldDebugMode: false,
14202
+ openfortCoreDebugMode: false,
14203
+ openfortReactDebugMode: false,
14204
+ };
14205
+ }
14206
+ else if (typeof debugMode === 'boolean') {
14207
+ return {
14208
+ shieldDebugMode: debugMode,
14209
+ openfortCoreDebugMode: debugMode,
14210
+ openfortReactDebugMode: debugMode,
14211
+ };
14212
+ }
14213
+ else {
14214
+ return {
14215
+ shieldDebugMode: (_a = debugMode.shieldDebugMode) !== null && _a !== void 0 ? _a : false,
14216
+ openfortCoreDebugMode: (_b = debugMode.openfortCoreDebugMode) !== null && _b !== void 0 ? _b : false,
14217
+ openfortReactDebugMode: (_c = debugMode.openfortReactDebugMode) !== null && _c !== void 0 ? _c : false,
14218
+ };
14219
+ }
14220
+ };
14221
+ const debugModeOptions = getDebugMode();
14222
+ logger.enabled = debugModeOptions.openfortReactDebugMode;
14223
+ return debugModeOptions;
14224
+ }, [debugMode]);
14185
14225
  const injectedConnector = useConnector('injected');
14186
14226
  const allowAutomaticRecovery = !!((walletConfig === null || walletConfig === void 0 ? void 0 : walletConfig.createEncryptedSessionEndpoint) || (walletConfig === null || walletConfig === void 0 ? void 0 : walletConfig.getEncryptionSession));
14187
14227
  // Default config options
@@ -14323,7 +14363,7 @@ const OpenfortProvider = ({ children, uiConfig, onConnect, onDisconnect, debugMo
14323
14363
  // Other configuration
14324
14364
  uiConfig: safeUiConfig,
14325
14365
  errorMessage,
14326
- debugMode,
14366
+ debugMode: debugModeOptions,
14327
14367
  emailInput,
14328
14368
  setEmailInput,
14329
14369
  resize,
@@ -14332,14 +14372,20 @@ const OpenfortProvider = ({ children, uiConfig, onConnect, onDisconnect, debugMo
14332
14372
  overrides,
14333
14373
  thirdPartyAuth,
14334
14374
  };
14335
- return createElement(Openfortcontext.Provider, { value }, jsx(Web3ContextProvider, { enabled: open, children: jsxs(CoreOpenfortProvider, { baseConfiguration: {
14336
- publishableKey,
14337
- }, shieldConfiguration: walletConfig
14338
- ? {
14339
- shieldPublishableKey: walletConfig.shieldPublishableKey,
14340
- debug: debugMode,
14341
- }
14342
- : undefined, overrides: overrides, thirdPartyAuth: thirdPartyAuth, onConnect: onConnect, onDisconnect: onDisconnect, children: [children, jsx(ConnectModal, { lang: ckLang, theme: ckTheme, mode: (_e = safeUiConfig.mode) !== null && _e !== void 0 ? _e : ckMode, customTheme: ckCustomTheme })] }) }));
14375
+ return createElement(Openfortcontext.Provider, { value }, jsx(Web3ContextProvider, { enabled: open, children: jsxs(CoreOpenfortProvider, { openfortConfig: {
14376
+ baseConfiguration: {
14377
+ publishableKey,
14378
+ },
14379
+ shieldConfiguration: walletConfig
14380
+ ? {
14381
+ shieldPublishableKey: walletConfig.shieldPublishableKey,
14382
+ debug: debugModeOptions.shieldDebugMode,
14383
+ }
14384
+ : undefined,
14385
+ debug: debugModeOptions.openfortCoreDebugMode,
14386
+ overrides,
14387
+ thirdPartyAuth,
14388
+ }, onConnect: onConnect, onDisconnect: onDisconnect, children: [children, jsx(ConnectModal, { lang: ckLang, theme: ckTheme, mode: (_e = safeUiConfig.mode) !== null && _e !== void 0 ? _e : ckMode, customTheme: ckCustomTheme })] }) }));
14343
14389
  };
14344
14390
 
14345
14391
  /**
@@ -14737,7 +14783,7 @@ const useAuthCallback = ({ enabled = true, // Automatically handle OAuth and ema
14737
14783
  const useWalletAuth = (hookOptions = {}) => {
14738
14784
  const { updateUser } = useOpenfortCore();
14739
14785
  const siwe = useConnectWithSiwe();
14740
- const availableWallets = useWallets$1(); // TODO: Use this to get the wallet client type
14786
+ const availableWallets = useWagmiWallets(); // TODO: Use this to get the wallet client type
14741
14787
  const { disconnect } = useDisconnect();
14742
14788
  const [walletConnectingTo, setWalletConnectingTo] = useState(null);
14743
14789
  const [shouldConnectWithSiwe, setShouldConnectWithSiwe] = useState(false);
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,5 @@
1
1
  import { type AuthPlayerResponse, type EmbeddedAccount, EmbeddedState, type Openfort } from '@openfort/openfort-js';
2
+ import { type QueryObserverResult, type RefetchOptions } from '@tanstack/react-query';
2
3
  import type React from 'react';
3
4
  import { type PropsWithChildren } from 'react';
4
5
  import type { WalletFlowStatus } from '../hooks/openfort/useWallets';
@@ -13,10 +14,13 @@ export type ContextValue = {
13
14
  embeddedAccounts?: EmbeddedAccount[];
14
15
  isLoadingAccounts: boolean;
15
16
  logout: () => void;
17
+ updateEmbeddedAccounts: (options?: RefetchOptions) => Promise<QueryObserverResult<EmbeddedAccount[], Error>>;
16
18
  walletStatus: WalletFlowStatus;
17
19
  setWalletStatus: (status: WalletFlowStatus) => void;
18
20
  client: Openfort;
19
21
  };
20
- type CoreOpenfortProviderProps = ConstructorParameters<typeof Openfort>[0] & useConnectCallbackProps;
21
- export declare const CoreOpenfortProvider: React.FC<PropsWithChildren<CoreOpenfortProviderProps>>;
22
+ type CoreOpenfortProviderProps = PropsWithChildren<{
23
+ openfortConfig: ConstructorParameters<typeof Openfort>[0];
24
+ } & useConnectCallbackProps>;
25
+ export declare const CoreOpenfortProvider: React.FC<CoreOpenfortProviderProps>;
22
26
  export {};
@@ -1 +1 @@
1
- export declare const OPENFORT_VERSION = "0.1.0";
1
+ export declare const OPENFORT_VERSION = "0.1.2";
@@ -6,4 +6,4 @@ export type WalletProps = {
6
6
  isInstalled?: boolean;
7
7
  } & WalletConfigProps;
8
8
  export declare const useWallet: (id: string) => WalletProps | null;
9
- export declare const useWallets: () => WalletProps[];
9
+ export declare const useWagmiWallets: () => WalletProps[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfort/react",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "author": "Openfort (https://www.openfort.io)",
5
5
  "license": "BSD-2-Clause license",
6
6
  "description": "The easiest way to integrate Openfort to your project.",
@@ -32,7 +32,7 @@
32
32
  "react"
33
33
  ],
34
34
  "dependencies": {
35
- "@openfort/openfort-js": "0.10.30",
35
+ "@openfort/openfort-js": "^0.10.31",
36
36
  "axios": "^1.7.7",
37
37
  "buffer": "^6.0.3",
38
38
  "detect-browser": "^5.3.0",