@openfort/react-native 1.0.8 → 1.0.10

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.
@@ -119,7 +119,10 @@ export function useEmbeddedEthereumWallet(options = {}) {
119
119
  const accounts = await client.embeddedWallet.list({
120
120
  limit: 100,
121
121
  chainType: ChainTypeEnum.EVM,
122
- accountType: walletConfig?.accountType === AccountTypeEnum.EOA ? undefined : AccountTypeEnum.SMART_ACCOUNT,
122
+ accountType: walletConfig?.accountType === AccountTypeEnum.EOA ||
123
+ walletConfig?.accountType === AccountTypeEnum.DELEGATED_ACCOUNT
124
+ ? undefined
125
+ : walletConfig?.accountType || AccountTypeEnum.SMART_ACCOUNT,
123
126
  });
124
127
  // Filter for Ethereum accounts only
125
128
  setEmbeddedAccounts(accounts);
@@ -287,7 +290,7 @@ export function useEmbeddedEthereumWallet(options = {}) {
287
290
  }
288
291
  // Build recovery params
289
292
  const recoveryParams = await buildRecoveryParams({ ...createOptions, userId: user?.id }, walletConfig);
290
- const accountType = createOptions?.accountType || walletConfig?.accountType || AccountTypeEnum.SMART_ACCOUNT;
293
+ const accountType = createOptions?.accountType || walletConfig?.accountType || AccountTypeEnum.EOA;
291
294
  // Create embedded wallet
292
295
  const embeddedAccount = await client.embeddedWallet.create({
293
296
  chainId: accountType === AccountTypeEnum.EOA ? undefined : chainId,
@@ -552,7 +555,7 @@ export function useEmbeddedEthereumWallet(options = {}) {
552
555
  wallets,
553
556
  setActive,
554
557
  setRecovery,
555
- exportPrivateKey: client.embeddedWallet.exportPrivateKey,
558
+ exportPrivateKey: () => client.embeddedWallet.exportPrivateKey(),
556
559
  };
557
560
  // Priority 1: Explicit action states (user-initiated operations)
558
561
  if (status.status === 'fetching-wallets') {
@@ -477,6 +477,7 @@ export function useEmbeddedSolanaWallet(options = {}) {
477
477
  create,
478
478
  wallets,
479
479
  setActive,
480
+ exportPrivateKey: () => client.embeddedWallet.exportPrivateKey(),
480
481
  };
481
482
  // Priority 1: Explicit action states (user-initiated operations)
482
483
  if (status.status === 'fetching-wallets') {
@@ -512,6 +513,6 @@ export function useEmbeddedSolanaWallet(options = {}) {
512
513
  }
513
514
  // Default: disconnected (authenticated but no wallet selected)
514
515
  return { ...baseActions, status: 'disconnected', activeWallet: null };
515
- }, [status, activeWallet, activeAccount, provider, wallets, embeddedState, create, setActive]);
516
+ }, [status, activeWallet, activeAccount, provider, wallets, embeddedState, create, setActive, client.embeddedWallet]);
516
517
  return state;
517
518
  }
@@ -315,6 +315,10 @@ export interface SolanaWalletActions {
315
315
  * Set a wallet as active (recover/connect to it)
316
316
  */
317
317
  setActive(options: SetActiveSolanaWalletOptions): Promise<void>;
318
+ /**
319
+ * Export the private key of the active wallet
320
+ */
321
+ exportPrivateKey(): Promise<string>;
318
322
  }
319
323
  /**
320
324
  * Ethereum wallet hook return type - discriminated union based on status
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openfort/react-native",
3
3
  "main": "dist/index.js",
4
- "version": "1.0.8",
4
+ "version": "1.0.10",
5
5
  "license": "MIT",
6
6
  "description": "React Native SDK for Openfort platform integration",
7
7
  "repository": {