@turnkey/sdk-react 4.0.0 → 4.1.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,48 @@
1
1
  # @turnkey/sdk-react
2
2
 
3
+ ## 4.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 72890f5: ### @turnkey/sdk-browser
8
+
9
+ - Move all type definitions to [`./__types__/base.ts`](https://github.com/tkhq/sdk/blob/494911d948d0a53c0d00aa01e9821aefd5e3f80d/packages/sdk-browser/src/__types__/base.ts)
10
+ - `TurnkeyBrowserClient`
11
+ - `refereshSession()` now consumes a [RefreshSessionParams](https://github.com/tkhq/sdk/blob/494911d948d0a53c0d00aa01e9821aefd5e3f80d/packages/sdk-browser/src/__types__/base.ts#L213) parameter
12
+ - `loginWithBundle()` now consumes a [LoginWithBundleParams](https://github.com/tkhq/sdk/blob/494911d948d0a53c0d00aa01e9821aefd5e3f80d/packages/sdk-browser/src/__types__/base.ts#L219) parameter
13
+ - `loginWithPasskey()` now consumes a [LoginWithPasskeyParams](https://github.com/tkhq/sdk/blob/494911d948d0a53c0d00aa01e9821aefd5e3f80d/packages/sdk-browser/src/__types__/base.ts#L224) parameter
14
+ - `loginWithWallet()` now consumes a [LoginWithWalletParams](https://github.com/tkhq/sdk/blob/494911d948d0a53c0d00aa01e9821aefd5e3f80d/packages/sdk-browser/src/__types__/base.ts#L231) parameter
15
+
16
+ ### @turnkey/sdk-react
17
+
18
+ - `Auth.tsx`
19
+ - updated `passkeyClient?.loginWithPasskey()` to implement new method signature
20
+ - updated `walletClient?.loginWithWallet()` to implement new method signature
21
+
22
+ ### @turnkey/sdk-server
23
+
24
+ - Move all type definitions to [`./__types__/base.ts`](https://github.com/tkhq/sdk/blob/494911d948d0a53c0d00aa01e9821aefd5e3f80d/packages/sdk-server/src/__types__/base.ts)
25
+
26
+ ### Patch Changes
27
+
28
+ - c9ae537: Update nextJs to >= 15.2.3 as per github advisory: https://github.com/advisories/GHSA-f82v-jwr5-mffw
29
+
30
+ For Next.js 15.x, this issue is fixed in 15.2.3
31
+ For Next.js 14.x, this issue is fixed in 14.2.25
32
+ For Next.js 13.x, this issue is fixed in 13.5.9
33
+ For Next.js 12.x, this issue is fixed in 12.3.5
34
+
35
+ - Updated dependencies [0e4e959]
36
+ - Updated dependencies [856f449]
37
+ - Updated dependencies [c9ae537]
38
+ - Updated dependencies [d4ce5fa]
39
+ - Updated dependencies [ecdb29a]
40
+ - Updated dependencies [72890f5]
41
+ - @turnkey/sdk-browser@3.0.0
42
+ - @turnkey/sdk-server@2.6.0
43
+ - @turnkey/crypto@2.3.1
44
+ - @turnkey/wallet-stamper@1.0.3
45
+
3
46
  ## 4.0.0
4
47
 
5
48
  ### Major Changes
@@ -161,7 +161,12 @@ const Auth = ({
161
161
  constants.authErrors.passkey.createFailed;
162
162
  }
163
163
  }
164
- await passkeyClient?.loginWithPasskey(exports.SessionType.READ_WRITE, authIframeClient, authIframeClient?.iframePublicKey, authConfig.sessionLengthSeconds?.toString());
164
+ await passkeyClient?.loginWithPasskey({
165
+ sessionType: exports.SessionType.READ_WRITE,
166
+ iframeClient: authIframeClient,
167
+ targetPublicKey: authIframeClient?.iframePublicKey,
168
+ expirationSeconds: authConfig.sessionLengthSeconds?.toString()
169
+ });
165
170
  await onAuthSuccess();
166
171
  } catch (error) {
167
172
  setPasskeySignupError(constants.authErrors.passkey.timeoutOrNotAllowed);
@@ -171,7 +176,12 @@ const Auth = ({
171
176
  const handleLoginWithPasskey = async () => {
172
177
  try {
173
178
  setLoading("passkey");
174
- await passkeyClient?.loginWithPasskey(exports.SessionType.READ_WRITE, authIframeClient, authIframeClient?.iframePublicKey, authConfig.sessionLengthSeconds?.toString());
179
+ await passkeyClient?.loginWithPasskey({
180
+ sessionType: exports.SessionType.READ_WRITE,
181
+ iframeClient: authIframeClient,
182
+ targetPublicKey: authIframeClient?.iframePublicKey,
183
+ expirationSeconds: authConfig.sessionLengthSeconds?.toString()
184
+ });
175
185
  await onAuthSuccess();
176
186
  } catch (error) {
177
187
  onError(constants.authErrors.passkey.loginFailed);
@@ -285,7 +295,12 @@ const Auth = ({
285
295
  onError(constants.authErrors.wallet.loginFailed);
286
296
  return;
287
297
  }
288
- await walletClient.loginWithWallet(exports.SessionType.READ_WRITE, authIframeClient, authIframeClient?.iframePublicKey, authConfig.sessionLengthSeconds?.toString());
298
+ await walletClient.loginWithWallet({
299
+ sessionType: exports.SessionType.READ_WRITE,
300
+ iframeClient: authIframeClient,
301
+ targetPublicKey: authIframeClient?.iframePublicKey,
302
+ expirationSeconds: authConfig.sessionLengthSeconds?.toString()
303
+ });
289
304
  await onAuthSuccess();
290
305
  } catch (error) {
291
306
  onError(error.message || constants.authErrors.wallet.loginFailed);