@openfort/react-native 0.1.12 → 0.1.14

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.
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const SDK_INFO = {
5
5
  name: '@openfort/react-native',
6
- version: '0.1.9',
6
+ version: '0.1.13',
7
7
  description: 'React Native client for Openfort',
8
8
  homepage: 'https://openfort.io/docs',
9
9
  };
@@ -39,7 +39,10 @@ export function createOpenfortClient({ baseConfiguration, overrides, shieldConfi
39
39
  // baseUrl,
40
40
  // logLevel,
41
41
  return new OpenfortClient({
42
- baseConfiguration,
42
+ baseConfiguration: {
43
+ nativeAppIdentifier: nativeAppId,
44
+ ...baseConfiguration
45
+ },
43
46
  overrides: {
44
47
  ...overrides,
45
48
  crypto: {
@@ -81,7 +84,7 @@ let defaultClient = null;
81
84
  */
82
85
  export function getDefaultClient(options) {
83
86
  if (!defaultClient && options) {
84
- defaultClient = new OpenfortClient(options);
87
+ defaultClient = createOpenfortClient(options);
85
88
  }
86
89
  if (!defaultClient) {
87
90
  throw new Error('Openfort client not initialized. Make sure to wrap your app with OpenfortProvider.');
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useEffect, useCallback, useMemo } from 'react';
2
- import { OpenfortConfiguration, ShieldConfiguration, EmbeddedState, } from '@openfort/openfort-js';
2
+ import { ShieldConfiguration, EmbeddedState, } from '@openfort/openfort-js';
3
3
  import { OpenfortContext } from './context';
4
4
  import { createOpenfortClient, setDefaultClient } from './client';
5
5
  import { EmbeddedWalletWebView, WebViewUtils } from '../native';
@@ -89,9 +89,9 @@ export const OpenfortProvider = ({ children, publishableKey, customAuth, support
89
89
  // Create or use provided client
90
90
  const client = useMemo(() => {
91
91
  const newClient = createOpenfortClient({
92
- baseConfiguration: new OpenfortConfiguration({
92
+ baseConfiguration: {
93
93
  publishableKey: publishableKey,
94
- }),
94
+ },
95
95
  shieldConfiguration: walletConfig ? new ShieldConfiguration({
96
96
  shieldPublishableKey: walletConfig.shieldPublishableKey,
97
97
  shieldDebug: walletConfig.debug,
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export declare const SDK_INFO: {
5
5
  readonly name: "@openfort/react-native";
6
- readonly version: "0.1.9";
6
+ readonly version: "0.1.13";
7
7
  readonly description: "React Native client for Openfort";
8
8
  readonly homepage: "https://openfort.io/docs";
9
9
  };
@@ -16,6 +16,8 @@ export type CommonEmbeddedWalletConfiguration = {
16
16
  ethereumProviderPolicyId?: PolicyConfig;
17
17
  accountType?: AccountTypeEnum;
18
18
  debug?: boolean;
19
+ /** Recovery method for the embedded wallet: 'automatic' or 'password' */
20
+ recoveryMethod?: 'automatic' | 'password';
19
21
  };
20
22
  export type EncryptionSession = {
21
23
  /** Function to retrieve an encryption session using a session ID */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openfort/react-native",
3
3
  "main": "dist/index.js",
4
- "version": "0.1.12",
4
+ "version": "0.1.14",
5
5
  "license": "MIT",
6
6
  "description": "React Native SDK for Openfort platform integration",
7
7
  "scripts": {
@@ -23,7 +23,7 @@
23
23
  }
24
24
  },
25
25
  "dependencies": {
26
- "@openfort/openfort-js": "^0.10.27"
26
+ "@openfort/openfort-js": "^0.10.28"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "expo-apple-authentication": "*",