@dynamic-labs/global-wallet-client 4.37.1 → 4.37.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.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,19 @@
1
1
 
2
+ ### [4.37.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.37.1...v4.37.2) (2025-10-13)
3
+
4
+
5
+ ### Features
6
+
7
+ * add get all linked social accounts function ([#9676](https://github.com/dynamic-labs/dynamic-auth/issues/9676)) ([c637c3f](https://github.com/dynamic-labs/dynamic-auth/commit/c637c3f101ea9387584473e18ff728c17d000f73))
8
+ * add revoke delegation to connectors and hook ([#9628](https://github.com/dynamic-labs/dynamic-auth/issues/9628)) ([00a40e0](https://github.com/dynamic-labs/dynamic-auth/commit/00a40e0b2aa6137a97ccb3be7890326300582fcf))
9
+ * **react-native:** add methods to social module ([#9677](https://github.com/dynamic-labs/dynamic-auth/issues/9677)) ([e4ffc11](https://github.com/dynamic-labs/dynamic-auth/commit/e4ffc1139ddc49826da688857d20dfb3b0c77ad7))
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * duplicate wallet display for wallet upgrade ([#9684](https://github.com/dynamic-labs/dynamic-auth/issues/9684)) ([cf94223](https://github.com/dynamic-labs/dynamic-auth/commit/cf94223d91f74add454901b72f4bf7d81043bffc))
15
+ * fixes postbuild oom ([#9664](https://github.com/dynamic-labs/dynamic-auth/issues/9664)) ([7e56047](https://github.com/dynamic-labs/dynamic-auth/commit/7e5604721d708e375c642223cd2f615ab9191f70))
16
+
2
17
  ### [4.37.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.37.0...v4.37.1) (2025-10-08)
3
18
 
4
19
  ## [4.37.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.36.1...v4.37.0) (2025-10-08)
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.37.1";
6
+ var version = "4.37.2";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.37.1";
2
+ var version = "4.37.2";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/global-wallet-client",
3
- "version": "4.37.1",
3
+ "version": "4.37.2",
4
4
  "description": "Core package for building Dynamic's Global Wallet",
5
5
  "author": "Dynamic Labs, Inc.",
6
6
  "license": "MIT",
@@ -63,13 +63,13 @@
63
63
  },
64
64
  "homepage": "https://www.dynamic.xyz/",
65
65
  "dependencies": {
66
- "@dynamic-labs/assert-package-version": "4.37.1",
67
- "@dynamic-labs/ethereum-aa-zksync": "4.37.1",
68
- "@dynamic-labs/logger": "4.37.1",
69
- "@dynamic-labs/message-transport": "4.37.1",
70
- "@dynamic-labs/store": "4.37.1",
71
- "@dynamic-labs/types": "4.37.1",
72
- "@dynamic-labs/utils": "4.37.1",
66
+ "@dynamic-labs/assert-package-version": "4.37.2",
67
+ "@dynamic-labs/ethereum-aa-zksync": "4.37.2",
68
+ "@dynamic-labs/logger": "4.37.2",
69
+ "@dynamic-labs/message-transport": "4.37.2",
70
+ "@dynamic-labs/store": "4.37.2",
71
+ "@dynamic-labs/types": "4.37.2",
72
+ "@dynamic-labs/utils": "4.37.2",
73
73
  "eventemitter3": "5.0.1"
74
74
  },
75
75
  "peerDependencies": {
@@ -81,7 +81,7 @@
81
81
  "zksync-sso": "0.2.0",
82
82
  "@wallet-standard/wallet": "^1.1.0",
83
83
  "@zerodev/sdk": "5.4.36",
84
- "@dynamic-labs/ethereum-aa": "4.37.1"
84
+ "@dynamic-labs/ethereum-aa": "4.37.2"
85
85
  },
86
86
  "peerDependenciesMeta": {
87
87
  "viem": {
package/src/core.d.ts CHANGED
@@ -2,3 +2,4 @@ export { createPopupMessageClient, type PopupMessageClient, } from './lib/functi
2
2
  export { createEncryptedMessageEncoder } from './lib/functions/createEncryptedMessageEncoder';
3
3
  export type { GlobalWalletPopupMessages } from './lib/types/GlobalWalletPopupMessages';
4
4
  export { DisconnectError } from './lib/errors/DisconnectError';
5
+ export { addCustomWalletOpenerService } from './lib/functions/addCustomWalletOpenerService';
@@ -0,0 +1,12 @@
1
+ import { GlobalWalletClient } from '../../client';
2
+ type OpenWalletCallbackParams = {
3
+ url: URL;
4
+ };
5
+ type AddCustomWalletOpenerServiceParams = {
6
+ requesterOrigin: string;
7
+ openWalletCallback: (params: OpenWalletCallbackParams) => Promise<{
8
+ response: string;
9
+ }>;
10
+ };
11
+ export declare const addCustomWalletOpenerService: (client: GlobalWalletClient, { openWalletCallback, requesterOrigin }: AddCustomWalletOpenerServiceParams) => void;
12
+ export {};
@@ -0,0 +1 @@
1
+ export { addCustomWalletOpenerService } from './addCustomWalletOpenerService';
@@ -6,14 +6,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
6
6
  var addVersionPostfixToUrl = require('../addVersionPostfixToUrl/addVersionPostfixToUrl.cjs');
7
7
  var _package = require('../../../../package.cjs');
8
8
 
9
- const buildUrlWithParams = ({ urlInfo, environmentId, name, globalWindow, postfixUrlWithVersion = true, }) => {
9
+ const buildUrlWithParams = ({ urlInfo, environmentId, name, postfixUrlWithVersion = true, requesterOrigin, }) => {
10
10
  const baseUrl = postfixUrlWithVersion
11
11
  ? addVersionPostfixToUrl.addVersionPostfixToUrl(_package.version, urlInfo.url)
12
12
  : urlInfo.url;
13
13
  const finalUrl = new URL(baseUrl);
14
14
  finalUrl.hash = `/${name}`;
15
15
  finalUrl.searchParams.set('provider_env_id', environmentId);
16
- finalUrl.searchParams.set('requester_origin', globalWindow.location.origin);
16
+ finalUrl.searchParams.set('requester_origin', requesterOrigin);
17
17
  return finalUrl;
18
18
  };
19
19
 
@@ -4,7 +4,7 @@ export interface BuildUrlWithParamsOptions {
4
4
  };
5
5
  environmentId: string;
6
6
  name: string;
7
- globalWindow: Window;
8
7
  postfixUrlWithVersion?: boolean;
8
+ requesterOrigin: string;
9
9
  }
10
- export declare const buildUrlWithParams: ({ urlInfo, environmentId, name, globalWindow, postfixUrlWithVersion, }: BuildUrlWithParamsOptions) => URL;
10
+ export declare const buildUrlWithParams: ({ urlInfo, environmentId, name, postfixUrlWithVersion, requesterOrigin, }: BuildUrlWithParamsOptions) => URL;
@@ -2,14 +2,14 @@
2
2
  import { addVersionPostfixToUrl } from '../addVersionPostfixToUrl/addVersionPostfixToUrl.js';
3
3
  import { version } from '../../../../package.js';
4
4
 
5
- const buildUrlWithParams = ({ urlInfo, environmentId, name, globalWindow, postfixUrlWithVersion = true, }) => {
5
+ const buildUrlWithParams = ({ urlInfo, environmentId, name, postfixUrlWithVersion = true, requesterOrigin, }) => {
6
6
  const baseUrl = postfixUrlWithVersion
7
7
  ? addVersionPostfixToUrl(version, urlInfo.url)
8
8
  : urlInfo.url;
9
9
  const finalUrl = new URL(baseUrl);
10
10
  finalUrl.hash = `/${name}`;
11
11
  finalUrl.searchParams.set('provider_env_id', environmentId);
12
- finalUrl.searchParams.set('requester_origin', globalWindow.location.origin);
12
+ finalUrl.searchParams.set('requester_origin', requesterOrigin);
13
13
  return finalUrl;
14
14
  };
15
15
 
@@ -43,9 +43,9 @@ const createPopupWalletOpener = ({ client, popupInfo, popupHeight, popupWidth, e
43
43
  // Use the new generic URL builder
44
44
  const finalUrl = constructUrl.buildUrlWithParams({
45
45
  environmentId,
46
- globalWindow,
47
46
  name,
48
47
  postfixUrlWithVersion,
48
+ requesterOrigin: globalWindow.location.origin,
49
49
  urlInfo: popupInfo,
50
50
  });
51
51
  const resultDeferredPromise = new utils.DeferredPromise();
@@ -39,9 +39,9 @@ const createPopupWalletOpener = ({ client, popupInfo, popupHeight, popupWidth, e
39
39
  // Use the new generic URL builder
40
40
  const finalUrl = buildUrlWithParams({
41
41
  environmentId,
42
- globalWindow,
43
42
  name,
44
43
  postfixUrlWithVersion,
44
+ requesterOrigin: globalWindow.location.origin,
45
45
  urlInfo: popupInfo,
46
46
  });
47
47
  const resultDeferredPromise = new DeferredPromise();
@@ -1 +1 @@
1
- export { createWalletOpener, type WalletOpener, type OpenWalletProps, } from './createWalletOpener';
1
+ export { createWalletOpener, type WalletOpener, type OpenWalletProps, type WalletOpenerService, } from './createWalletOpener';
@@ -20,7 +20,7 @@ const waitForResponse = ({ url, decode, onResponse, onError, }) => {
20
20
  return;
21
21
  }
22
22
  const decodedMessage = decode ? yield decode(parsedData) : parsedData;
23
- const { error, success } = parseData(decodedMessage);
23
+ const { error, success } = parseGlobalWalletResponse(decodedMessage);
24
24
  if (!error && !success) {
25
25
  logger.logger.debug('Error validating event data schema from popup response event', parsedData);
26
26
  return;
@@ -43,7 +43,7 @@ const waitForResponse = ({ url, decode, onResponse, onError, }) => {
43
43
  window.removeEventListener('message', handleOnWindowEvent);
44
44
  };
45
45
  };
46
- const parseData = (data) => {
46
+ const parseGlobalWalletResponse = (data) => {
47
47
  if (!data || typeof data !== 'object') {
48
48
  return {};
49
49
  }
@@ -58,4 +58,5 @@ const parseData = (data) => {
58
58
  return {};
59
59
  };
60
60
 
61
+ exports.parseGlobalWalletResponse = parseGlobalWalletResponse;
61
62
  exports.waitForResponse = waitForResponse;
@@ -1,4 +1,4 @@
1
- import { IPopupActionSuccessResponse } from '@dynamic-labs/types';
1
+ import { IPopupActionErrorResponse, IPopupActionSuccessResponse } from '@dynamic-labs/types';
2
2
  type WaitForResponseProps = {
3
3
  url: string;
4
4
  decode?: (data: any) => Promise<any>;
@@ -6,4 +6,8 @@ type WaitForResponseProps = {
6
6
  onError: (error: Error) => void;
7
7
  };
8
8
  export declare const waitForResponse: ({ url, decode, onResponse, onError, }: WaitForResponseProps) => () => void;
9
+ export declare const parseGlobalWalletResponse: (data: any) => {
10
+ success?: IPopupActionSuccessResponse;
11
+ error?: IPopupActionErrorResponse;
12
+ };
9
13
  export {};
@@ -16,7 +16,7 @@ const waitForResponse = ({ url, decode, onResponse, onError, }) => {
16
16
  return;
17
17
  }
18
18
  const decodedMessage = decode ? yield decode(parsedData) : parsedData;
19
- const { error, success } = parseData(decodedMessage);
19
+ const { error, success } = parseGlobalWalletResponse(decodedMessage);
20
20
  if (!error && !success) {
21
21
  logger.debug('Error validating event data schema from popup response event', parsedData);
22
22
  return;
@@ -39,7 +39,7 @@ const waitForResponse = ({ url, decode, onResponse, onError, }) => {
39
39
  window.removeEventListener('message', handleOnWindowEvent);
40
40
  };
41
41
  };
42
- const parseData = (data) => {
42
+ const parseGlobalWalletResponse = (data) => {
43
43
  if (!data || typeof data !== 'object') {
44
44
  return {};
45
45
  }
@@ -54,4 +54,4 @@ const parseData = (data) => {
54
54
  return {};
55
55
  };
56
56
 
57
- export { waitForResponse };
57
+ export { parseGlobalWalletResponse, waitForResponse };