UNPKG

@turnkey/sdk-react-native

Version:
457 lines (303 loc) 15.5 kB
# @turnkey/sdk-react-native ## 1.5.13 ### Patch Changes - Updated dependencies [[`78ec1d9`](https://github.com/tkhq/sdk/commit/78ec1d9afcafde3ca7107fc720323d486d6afaea)]: - @turnkey/http@3.16.0 - @turnkey/crypto@2.8.8 - @turnkey/react-native-passkey-stamper@1.2.6 ## 1.5.12 ### Patch Changes - Updated dependencies []: - @turnkey/crypto@2.8.7 ## 1.5.11 ### Patch Changes - Updated dependencies []: - @turnkey/crypto@2.8.6 ## 1.5.10 ### Patch Changes - Updated dependencies [[`5f829c6`](https://github.com/tkhq/sdk/commit/5f829c67af03bb85c3806acd202b2debf8274e78), [`67b03a5`](https://github.com/tkhq/sdk/commit/67b03a5d9ab1b6eabfb0b41938ac91365b5dcd9b)]: - @turnkey/crypto@2.8.5 - @turnkey/http@3.15.0 - @turnkey/react-native-passkey-stamper@1.2.5 ## 1.5.9 ### Patch Changes - Updated dependencies [[`9fbd5c4`](https://github.com/tkhq/sdk/commit/9fbd5c459782dc3721dd0935d0a4458babce258b)]: - @turnkey/http@3.14.0 - @turnkey/crypto@2.8.4 - @turnkey/react-native-passkey-stamper@1.2.4 ## 1.5.8 ### Patch Changes - Updated dependencies [[`c745646`](https://github.com/tkhq/sdk/commit/c745646ae4b2a275e116abca07c6e108f89beb04)]: - @turnkey/crypto@2.8.4 ## 1.5.7 ### Patch Changes - [#1027](https://github.com/tkhq/sdk/pull/1027) [`6e25b17`](https://github.com/tkhq/sdk/commit/6e25b171365707a2653dcf171dd4b14d4291838e) Author [@moeodeh3](https://github.com/moeodeh3) - Expand peer dependency range to include newer versions of `react-native-keychain` ## 1.5.6 ### Patch Changes - Updated dependencies [[`5c4495b`](https://github.com/tkhq/sdk/commit/5c4495bff1b0abfe3c427ead1b8e1a8d510c8186)]: - @turnkey/crypto@2.8.3 ## 1.5.5 ### Patch Changes - [#1015](https://github.com/tkhq/sdk/pull/1015) [`429e4c4`](https://github.com/tkhq/sdk/commit/429e4c4b5d897a7233584d4ec429b21bba7a1f2b) Author [@moeodeh3](https://github.com/moeodeh3) - Update react-native-passkey to the latest version for Expo 54 compatibility - Updated dependencies [[`9df42ad`](https://github.com/tkhq/sdk/commit/9df42adc02c7ff77afba3b938536e79b57882ef1), [`429e4c4`](https://github.com/tkhq/sdk/commit/429e4c4b5d897a7233584d4ec429b21bba7a1f2b)]: - @turnkey/http@3.13.1 - @turnkey/react-native-passkey-stamper@1.2.3 - @turnkey/crypto@2.8.2 ## 1.5.4 ### Patch Changes - Updated dependencies []: - @turnkey/crypto@2.8.1 ## 1.5.3 ### Patch Changes - Updated dependencies [[`3997c0f`](https://github.com/tkhq/sdk/commit/3997c0fd08a8a85108acf904c0bf39d69f8dc79c)]: - @turnkey/crypto@2.8.0 ## 1.5.2 ### Patch Changes - Updated dependencies [[`4567059`](https://github.com/tkhq/sdk/commit/45670598f102223925b87a5295edca15a6ce8241)]: - @turnkey/http@3.13.0 - @turnkey/crypto@2.7.0 - @turnkey/react-native-passkey-stamper@1.2.2 ## 1.5.1 ### Patch Changes - Updated dependencies [[`2191a1b`](https://github.com/tkhq/sdk/commit/2191a1b201fb17dea4c79cf9e02b3a493b18f97a), [`5a96fe8`](https://github.com/tkhq/sdk/commit/5a96fe80db4c4c45e09ad8c613695ee4c2b8e51f)]: - @turnkey/crypto@2.7.0 - @turnkey/http@3.12.1 - @turnkey/react-native-passkey-stamper@1.2.1 ## 1.5.0 ### Minor Changes - Updated dependencies [[`fc1d6e2`](https://github.com/tkhq/sdk/commit/fc1d6e2d26f4a53116633e9e8cccccd792267f4e), [`fc1d6e2`](https://github.com/tkhq/sdk/commit/fc1d6e2d26f4a53116633e9e8cccccd792267f4e), [`4880f26`](https://github.com/tkhq/sdk/commit/4880f26a4dd324c049bff7f35284098ccfc55823), [`c6ee323`](https://github.com/tkhq/sdk/commit/c6ee3239c389a7bbbbb23610c84b883ed298f95c), [`c6ee323`](https://github.com/tkhq/sdk/commit/c6ee3239c389a7bbbbb23610c84b883ed298f95c), [`c6ee323`](https://github.com/tkhq/sdk/commit/c6ee3239c389a7bbbbb23610c84b883ed298f95c), [`06347ad`](https://github.com/tkhq/sdk/commit/06347adfa08fb0867c350e43821d0fed06c49624), [`6bfcbc5`](https://github.com/tkhq/sdk/commit/6bfcbc5c098e64ab1d115518733b87cfc1653e17)]: - @turnkey/encoding@0.6.0 - @turnkey/http@3.12.0 - @turnkey/crypto@2.6.0 - @turnkey/react-native-passkey-stamper@1.2.0 - @turnkey/api-key-stamper@0.5.0 ## 1.5.0-beta.1 ### Patch Changes - Updated dependencies []: - @turnkey/encoding@0.6.0-beta.6 - @turnkey/crypto@2.6.0-beta.6 - @turnkey/api-key-stamper@0.5.0-beta.6 - @turnkey/http@3.11.1-beta.0 - @turnkey/react-native-passkey-stamper@1.2.0-beta.1 ## 1.5.0-beta.0 ### Minor Changes - SDK beta release @turnkey/react-wallet-kit @turnkey/core ### Patch Changes - Updated dependencies []: - @turnkey/react-native-passkey-stamper@1.2.0-beta.0 - @turnkey/api-key-stamper@0.5.0-beta.5 - @turnkey/encoding@0.6.0-beta.5 - @turnkey/crypto@2.6.0-beta.5 - @turnkey/http@3.10.0-beta.2 ## 1.4.4 ### Patch Changes - Updated dependencies [[`026264c`](https://github.com/tkhq/sdk/commit/026264c55aa16342c8925af0bdcdf72dc00e5158), [`d7420e6`](https://github.com/tkhq/sdk/commit/d7420e6c3559efc1024b58749b31d253150cb189)]: - @turnkey/http@3.11.0 - @turnkey/crypto@2.6.0 - @turnkey/react-native-passkey-stamper@1.1.4 ## 1.4.3 ### Patch Changes - Updated dependencies [[`5d8be2d`](https://github.com/tkhq/sdk/commit/5d8be2d0329070c7aa025dddb1b28f04257ae4e6)]: - @turnkey/http@3.10.0 - @turnkey/crypto@2.5.0 - @turnkey/react-native-passkey-stamper@1.1.3 ## 1.4.2-beta.4 ### Patch Changes - Updated dependencies []: - @turnkey/encoding@0.6.0-beta.4 - @turnkey/http@3.10.0-beta.1 - @turnkey/api-key-stamper@0.4.8-beta.4 - @turnkey/crypto@2.5.1-beta.4 - @turnkey/react-native-passkey-stamper@1.1.2-beta.4 ## 1.4.2-beta.3 ### Patch Changes - Updated dependencies []: - @turnkey/encoding@0.6.0-beta.3 - @turnkey/http@3.10.0-beta.0 - @turnkey/api-key-stamper@0.4.8-beta.3 - @turnkey/crypto@2.5.1-beta.3 - @turnkey/react-native-passkey-stamper@1.1.2-beta.3 ## 1.4.2-beta.2 ### Patch Changes - Updated dependencies []: - @turnkey/encoding@0.6.0-beta.2 - @turnkey/api-key-stamper@0.4.8-beta.2 - @turnkey/crypto@2.5.1-beta.2 - @turnkey/http@3.8.1-beta.2 - @turnkey/react-native-passkey-stamper@1.1.2-beta.2 ## 1.4.2-beta.1 ### Patch Changes - Updated dependencies []: - @turnkey/encoding@0.6.0-beta.1 - @turnkey/api-key-stamper@0.4.8-beta.1 - @turnkey/crypto@2.5.1-beta.1 - @turnkey/http@3.8.1-beta.1 - @turnkey/react-native-passkey-stamper@1.1.2-beta.1 ## 1.4.2-beta.0 ### Patch Changes - Updated dependencies []: - @turnkey/encoding@1.0.0-beta.0 - @turnkey/api-key-stamper@0.4.8-beta.0 - @turnkey/crypto@2.5.1-beta.0 - @turnkey/http@3.8.1-beta.0 - @turnkey/react-native-passkey-stamper@1.1.2-beta.0 ## 1.4.2 ### Patch Changes - Updated dependencies [[`8b39dba`](https://github.com/tkhq/sdk/commit/8b39dbabf68d3e376b5b07f26960d5b61ae87fa9)]: - @turnkey/http@3.9.0 - @turnkey/crypto@2.5.0 - @turnkey/react-native-passkey-stamper@1.1.2 ## 1.4.1 ### Patch Changes - Updated dependencies [[`f83f25b`](https://github.com/tkhq/sdk/commit/f83f25ba33ef15dbd66723531eebe2fd00f43ac0)]: - @turnkey/http@3.8.0 - @turnkey/crypto@2.5.0 - @turnkey/react-native-passkey-stamper@1.1.1 ## 1.4.0 ### Minor Changes - [#651](https://github.com/tkhq/sdk/pull/651) [`81e355c`](https://github.com/tkhq/sdk/commit/81e355c9a8321feffcac056916b65139cf35eeed) Author [@turnekybc](https://github.com/turnekybc) - Add Coinbase & MoonPay Fiat Onramp. View the [Fiat Onramp feature docs](https://docs.turnkey.com/wallets/fiat-on-ramp). ### Patch Changes - Updated dependencies [[`81e355c`](https://github.com/tkhq/sdk/commit/81e355c9a8321feffcac056916b65139cf35eeed), [`6cde41c`](https://github.com/tkhq/sdk/commit/6cde41cfecdfb7d54abf52cc65e28ef0e2ad6ba3)]: - @turnkey/react-native-passkey-stamper@1.1.0 - @turnkey/http@3.7.0 - @turnkey/crypto@2.5.0 ## 1.3.7 ### Patch Changes - Updated dependencies [[`e90a478`](https://github.com/tkhq/sdk/commit/e90a478c9208d858b1144df9b2c2c7ba956c406e)]: - @turnkey/http@3.6.0 - @turnkey/crypto@2.4.3 - @turnkey/react-native-passkey-stamper@1.0.19 ## 1.3.6 ### Patch Changes - Updated dependencies [[`cb13c26`](https://github.com/tkhq/sdk/commit/cb13c26edb79a01ab651e3b2897334fd154b436a)]: - @turnkey/http@3.5.1 - @turnkey/crypto@2.4.3 - @turnkey/react-native-passkey-stamper@1.0.18 ## 1.3.5 ### Patch Changes - Updated dependencies [[`6cbff7a`](https://github.com/tkhq/sdk/commit/6cbff7a0c0b3a9a05586399e5cef476154d3bdca)]: - @turnkey/crypto@2.4.3 ## 1.3.4 ### Patch Changes - [#711](https://github.com/tkhq/sdk/pull/711) [`22dc1aa`](https://github.com/tkhq/sdk/commit/22dc1aa3f289ddc5818fb7328235eaa873f8f367) Author [@moeodeh3](https://github.com/moeodeh3) - Added `onInitialized`. A callback function that runs when context initialization is complete, useful for notifying connected apps. - Updated dependencies [[`c5cdf82`](https://github.com/tkhq/sdk/commit/c5cdf8229da5da1bd6d52db06b2fe42826e96d57), [`fa46701`](https://github.com/tkhq/sdk/commit/fa467019eef34b5199372248edff1e7a64934e79)]: - @turnkey/crypto@2.4.2 ## 1.3.3 ### Patch Changes - Updated dependencies [[`5f3dd98`](https://github.com/tkhq/sdk/commit/5f3dd9814650308b3bf3198168c453e7b1a98efd), [`7625df0`](https://github.com/tkhq/sdk/commit/7625df0538002c3455bd5862211210e38472e164), [`878e039`](https://github.com/tkhq/sdk/commit/878e03973856cfec83e6e3fda5b76d1b64943628)]: - @turnkey/http@3.5.0 - @turnkey/api-key-stamper@0.4.7 - @turnkey/crypto@2.4.1 - @turnkey/react-native-passkey-stamper@1.0.17 ## 1.3.2 ### Patch Changes - Updated dependencies [[`be0a621`](https://github.com/tkhq/sdk/commit/be0a621fb962bd51d2df1a1e79f5260d7c696772)]: - @turnkey/http@3.4.2 - @turnkey/crypto@2.4.0 - @turnkey/react-native-passkey-stamper@1.0.16 ## 1.3.1 ### Patch Changes - Updated dependencies [[`40c4035`](https://github.com/tkhq/sdk/commit/40c40359ec7096d0bca39ffc93e89361b3b11a1a), [`10ee5c5`](https://github.com/tkhq/sdk/commit/10ee5c524b477ce998e4fc635152cd101ae5a9cc), [`593de2d`](https://github.com/tkhq/sdk/commit/593de2d9404ec8cf53426f9cf832c13eefa3fbf2)]: - @turnkey/encoding@0.5.0 - @turnkey/crypto@2.4.0 - @turnkey/http@3.4.1 - @turnkey/api-key-stamper@0.4.6 - @turnkey/react-native-passkey-stamper@1.0.15 ## 1.3.0 ### Minor Changes - [#622](https://github.com/tkhq/sdk/pull/622) [`59f8941`](https://github.com/tkhq/sdk/commit/59f8941f77e548e248b2fdafcad36f5f0c2a5d29) Author [@moeodeh3](https://github.com/moeodeh3) - Added support for React 19 Renamed `sessionKey` parameter to `storageKey` in `createEmbeddedKey` `saveEmbeddedKey` and `getEmbeddedKey`. Added optional `embeddedStorageKey` parameter to `createSession`. This allows for retrieval of the embedded key from a custom location in secure storage. ### Patch Changes - [#641](https://github.com/tkhq/sdk/pull/641) [`77611c8`](https://github.com/tkhq/sdk/commit/77611c8f15aa16b316d81ee6addab62d86f2f3bc) Author [@amircheikh](https://github.com/amircheikh) - Added `onSessionEmpty`. A callback function that runs when there is no active session on app launch. - Updated dependencies [[`07dfd33`](https://github.com/tkhq/sdk/commit/07dfd3397472687092e1c73b1d68714f421b9ca0)]: - @turnkey/http@3.4.0 - @turnkey/crypto@2.3.1 - @turnkey/react-native-passkey-stamper@1.0.14 ## 1.2.3 ### Patch Changes - Updated dependencies [25ca339] - @turnkey/http@3.3.0 - @turnkey/crypto@2.3.1 - @turnkey/react-native-passkey-stamper@1.0.13 ## 1.2.2 ### Patch Changes - ef399e1: - Eliminated a race condition in `refreshSession` that could throw: `TurnkeyReactNativeError: Embedded key not found when refreshing the session` - The embedded key is now generated entirely in memory using `generateP256KeyPair` - Removed the need to store and immediately retrieve the private key from secure storage - `refreshSession` now accepts a single optional parameter object - `StorageKeys.RefreshEmbeddedKey` is now deprecated and no longer used during session refresh - Updated dependencies [3f6e415] - Updated dependencies [4d1d775] - @turnkey/http@3.2.0 - @turnkey/api-key-stamper@0.4.5 - @turnkey/crypto@2.3.1 - @turnkey/react-native-passkey-stamper@1.0.12 ## 1.2.1 ### Patch Changes - Updated dependencies [3e4a482] - @turnkey/http@3.1.0 - @turnkey/crypto@2.3.1 - @turnkey/react-native-passkey-stamper@1.0.11 ## 1.2.0 ### Minor Changes - ab45d29: Added `createSessionFromEmbeddedKey` function. This allows creation of a session using a compressed embedded key stored by calling `createEmbeddedKey`. You may also optionally pass in an embedded key created seperately. Utilizing these two functions with a `createSuborg` api call allows for a '1 tap' passkey sign up flow [(example)](https://github.com/tkhq/react-native-demo-wallet/blob/ccf2d6c182b9e5c5ce98014a56b0b9f4282277c2/providers/auth-provider.tsx#L186). Added optional `isCompressed` boolean field to the `createEmbeddedKey` function. This field is necessary for calling `createSessionFromEmbeddedKey`. ## 1.1.0 ### Minor Changes - e8bc05b: Introduces handleGoogleOAuth(): Adds a utility function to handle the Google OAuth authentication flow in React Native. **Usage Summary**: `handleGoogleOAuth` launches an InAppBrowser to initiate the OAuth flow using your client ID, nonce, and app scheme. After a successful login, it extracts the `oidcToken` from the redirect URL and calls your `onSuccess` callback with the token. ```ts handleGoogleOAuth({ clientId: string, // Google OAuth client ID nonce: string, // Random nonce scheme: string, // App’s custom URL scheme (e.g., "myapp") originUri?: string, // Optional custom origin URI - defaults to Turnkey proxies redirectUri?: string, // Optional custom redirect URI - defaults to Turnkey proxies onSuccess: (oidcToken: string) => void, // Called with token on success }); ``` ## 1.0.5 ### Patch Changes - 3b5b360: - Adds optional parameter for createEmbeddedKey(): - You can now pass a sessionKey to createEmbeddedKey() to generate separate embedded keys for different sessions, which is helpful when running multiple authentication flows concurrently. - Introduces onSessionExpiryWarning(): - You can now add a callback via the provider config that triggers 15 seconds before a session expires. - Introduces refreshSession(): - You now can refresh an active session that is about to expire. ## 1.0.4 ### Patch Changes - Updated dependencies [d1083bd] - Updated dependencies [f94d36e] - @turnkey/http@3.0.0 - @turnkey/crypto@2.3.1 ## 1.0.3 ### Minor Changes - a7e7de0: Fixed compatibility issue with `@turnkey/viem` ## 1.0.2 ### Patch Changes - Updated dependencies [ecdb29a] - @turnkey/http@2.22.0 - @turnkey/crypto@2.3.1 ## 1.0.1 ### Patch Changes - Updated dependencies [56a307e] - @turnkey/http@2.21.0 - @turnkey/crypto@2.3.1 ## 1.0.0 ### Major Changes - fcf9503: This breaking change adds support for multiple sessions: - The concept of a **selected session** has been introduced: - Users can switch between sessions using `setSelectedSession({ sessionKey: <key> })`. - The selected session determines the active `client`, `user`, and `session` state. - API calls such as `updateUser`, `createWallet`, and `signRawPayload` now apply to the selected session. - A session limit of **15 active sessions** has been enforced: - If the limit is reached, users must remove an existing session before creating a new one. - Expired or invalid sessions are automatically cleaned up. ## 0.1.1 ### Patch Changes - Updated dependencies [3c44c4a] - @turnkey/http@2.20.0 - @turnkey/crypto@2.3.1