@dynamic-labs/global-wallet-client 4.4.2 → 4.4.4

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,24 @@
1
1
 
2
+ ### [4.4.4](https://github.com/dynamic-labs/dynamic-auth/compare/v4.4.3...v4.4.4) (2025-01-31)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * coinbase connect only signature request message flicker ([#7950](https://github.com/dynamic-labs/dynamic-auth/issues/7950)) ([e7bc2b8](https://github.com/dynamic-labs/dynamic-auth/commit/e7bc2b82f611612936521838b0fe01a5115446c3))
8
+ * decouple show menu from click event ([#7951](https://github.com/dynamic-labs/dynamic-auth/issues/7951)) ([b1132f9](https://github.com/dynamic-labs/dynamic-auth/commit/b1132f96bda15a9cbea30c3040f6bf9cd7be5e05))
9
+ * ensure correct dependencies are listed in packages ([#7949](https://github.com/dynamic-labs/dynamic-auth/issues/7949)) ([a84f39f](https://github.com/dynamic-labs/dynamic-auth/commit/a84f39fcb289b17c6b17b51977b685ea66b4b16d))
10
+ * in-app browser coinbase evm wallet ([#7957](https://github.com/dynamic-labs/dynamic-auth/issues/7957)) ([a85f556](https://github.com/dynamic-labs/dynamic-auth/commit/a85f556d4c44bf331718f9d04ec64a68f492240b))
11
+ * mfa and external wallet funding back button ([#7930](https://github.com/dynamic-labs/dynamic-auth/issues/7930)) ([7f65dc6](https://github.com/dynamic-labs/dynamic-auth/commit/7f65dc66f4d121ac5ee1b34638f52543e53476db))
12
+ * **sdk-react-core:** logout user when SDK is upgraded ([#7940](https://github.com/dynamic-labs/dynamic-auth/issues/7940)) ([e20b113](https://github.com/dynamic-labs/dynamic-auth/commit/e20b113d5dc182df499b34080893da9fc98568f6))
13
+ * set sms verified to always true ([#7929](https://github.com/dynamic-labs/dynamic-auth/issues/7929)) ([9bfbc99](https://github.com/dynamic-labs/dynamic-auth/commit/9bfbc999da04ee9ebf1f4f4dff8c70c1cac18131))
14
+
15
+ ### [4.4.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.4.2...v4.4.3) (2025-01-30)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * remove extra useOnClickOutside hook ([#7910](https://github.com/dynamic-labs/dynamic-auth/issues/7910)) ([42fce2e](https://github.com/dynamic-labs/dynamic-auth/commit/42fce2e91e814514a72c97b3ea06930db805a200))
21
+
2
22
  ### [4.4.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.4.1...v4.4.2) (2025-01-30)
3
23
 
4
24
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.4.2";
6
+ var version = "4.4.4";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.4.2";
2
+ var version = "4.4.4";
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.4.2",
3
+ "version": "4.4.4",
4
4
  "description": "Core package for building Dynamic's Global Wallet",
5
5
  "author": "Dynamic Labs, Inc.",
6
6
  "license": "MIT",
@@ -39,11 +39,11 @@
39
39
  },
40
40
  "homepage": "https://www.dynamic.xyz/",
41
41
  "dependencies": {
42
- "@dynamic-labs/assert-package-version": "4.4.2",
43
- "@dynamic-labs/logger": "4.4.2",
44
- "@dynamic-labs/store": "4.4.2",
45
- "@dynamic-labs/types": "4.4.2",
46
- "@dynamic-labs/utils": "4.4.2",
42
+ "@dynamic-labs/assert-package-version": "4.4.4",
43
+ "@dynamic-labs/logger": "4.4.4",
44
+ "@dynamic-labs/store": "4.4.4",
45
+ "@dynamic-labs/types": "4.4.4",
46
+ "@dynamic-labs/utils": "4.4.4",
47
47
  "eventemitter3": "5.0.1"
48
48
  },
49
49
  "peerDependencies": {
@@ -51,7 +51,8 @@
51
51
  "@solana/web3.js": "1.92.1",
52
52
  "@solana/wallet-standard-features": "^1.2.0",
53
53
  "@wallet-standard/features": "^1.0.3",
54
- "@wallet-standard/base": "^1.0.1"
54
+ "@wallet-standard/base": "^1.0.1",
55
+ "@wallet-standard/wallet": "^1.1.0"
55
56
  },
56
57
  "peerDependenciesMeta": {
57
58
  "viem": {
@@ -68,6 +69,9 @@
68
69
  },
69
70
  "@wallet-standard/base": {
70
71
  "optional": true
72
+ },
73
+ "@wallet-standard/wallet": {
74
+ "optional": true
71
75
  }
72
76
  }
73
77
  }
@@ -0,0 +1,15 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ const fakeStorage = {
7
+ clear: () => { },
8
+ getItem: () => null,
9
+ key: () => null,
10
+ length: 0,
11
+ removeItem: () => { },
12
+ setItem: () => { },
13
+ };
14
+
15
+ exports.fakeStorage = fakeStorage;
@@ -0,0 +1,8 @@
1
+ export declare const fakeStorage: {
2
+ clear: () => void;
3
+ getItem: () => null;
4
+ key: () => null;
5
+ length: number;
6
+ removeItem: () => void;
7
+ setItem: () => void;
8
+ };
@@ -0,0 +1,11 @@
1
+ 'use client'
2
+ const fakeStorage = {
3
+ clear: () => { },
4
+ getItem: () => null,
5
+ key: () => null,
6
+ length: 0,
7
+ removeItem: () => { },
8
+ setItem: () => { },
9
+ };
10
+
11
+ export { fakeStorage };
@@ -0,0 +1 @@
1
+ export { fakeStorage } from './fakeStorage';
@@ -12,10 +12,14 @@ var createDisconnectAction = require('./actions/disconnectAction/createDisconnec
12
12
  var createEthereumModule = require('./functions/createEthereumModule/createEthereumModule.cjs');
13
13
  var createSolanaModule = require('./functions/createSolanaModule/createSolanaModule.cjs');
14
14
  var addVersionPostfixToUrl = require('./functions/addVersionPostfixToUrl/addVersionPostfixToUrl.cjs');
15
+ var isSSR = require('./functions/isSSR/isSSR.cjs');
16
+ var fakeStorage = require('./constants/fakeStorage/fakeStorage.cjs');
15
17
 
16
18
  const createGlobalWalletClient = ({ environmentId, popup: popupInfo, developmentOptions: { postfixPopupUrlWithVersion = true } = {}, }) => {
17
19
  const eventEmitter = createClientEventEmitter.createClientEventEmitter();
18
- const store = createClientStore.createClientStore();
20
+ const store = createClientStore.createClientStore({
21
+ storage: isSSR.isSSR() ? fakeStorage.fakeStorage : localStorage,
22
+ });
19
23
  const popupUrl = postfixPopupUrlWithVersion
20
24
  ? addVersionPostfixToUrl.addVersionPostfixToUrl(_package.version, popupInfo.url)
21
25
  : popupInfo.url;
@@ -8,10 +8,14 @@ import { createDisconnectAction } from './actions/disconnectAction/createDisconn
8
8
  import { createEthereumModule } from './functions/createEthereumModule/createEthereumModule.js';
9
9
  import { createSolanaModule } from './functions/createSolanaModule/createSolanaModule.js';
10
10
  import { addVersionPostfixToUrl } from './functions/addVersionPostfixToUrl/addVersionPostfixToUrl.js';
11
+ import { isSSR } from './functions/isSSR/isSSR.js';
12
+ import { fakeStorage } from './constants/fakeStorage/fakeStorage.js';
11
13
 
12
14
  const createGlobalWalletClient = ({ environmentId, popup: popupInfo, developmentOptions: { postfixPopupUrlWithVersion = true } = {}, }) => {
13
15
  const eventEmitter = createClientEventEmitter();
14
- const store = createClientStore();
16
+ const store = createClientStore({
17
+ storage: isSSR() ? fakeStorage : localStorage,
18
+ });
15
19
  const popupUrl = postfixPopupUrlWithVersion
16
20
  ? addVersionPostfixToUrl(version, popupInfo.url)
17
21
  : popupInfo.url;
@@ -3,9 +3,14 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
+ var isSSR = require('../../../functions/isSSR/isSSR.cjs');
7
+
6
8
  let lastEventHandler;
7
9
  const announceEip6963Provider = ({ info, provider, }) => {
8
10
  var _a;
11
+ if (isSSR.isSSR()) {
12
+ return;
13
+ }
9
14
  if (lastEventHandler) {
10
15
  window.removeEventListener('eip6963:requestProvider', lastEventHandler);
11
16
  }
@@ -1,7 +1,12 @@
1
1
  'use client'
2
+ import { isSSR } from '../../../functions/isSSR/isSSR.js';
3
+
2
4
  let lastEventHandler;
3
5
  const announceEip6963Provider = ({ info, provider, }) => {
4
6
  var _a;
7
+ if (isSSR()) {
8
+ return;
9
+ }
5
10
  if (lastEventHandler) {
6
11
  window.removeEventListener('eip6963:requestProvider', lastEventHandler);
7
12
  }
@@ -0,0 +1 @@
1
+ export { isSSR } from './isSSR';
@@ -0,0 +1,8 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ const isSSR = () => typeof window === 'undefined';
7
+
8
+ exports.isSSR = isSSR;
@@ -0,0 +1 @@
1
+ export declare const isSSR: () => boolean;
@@ -0,0 +1,4 @@
1
+ 'use client'
2
+ const isSSR = () => typeof window === 'undefined';
3
+
4
+ export { isSSR };
@@ -0,0 +1 @@
1
+ export { registerWallet } from './registerWallet';
@@ -0,0 +1,31 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var wallet = require('@wallet-standard/wallet');
7
+ var isSSR = require('../../../functions/isSSR/isSSR.cjs');
8
+
9
+ /**
10
+ * Register a "@wallet-standard/base".Wallet as a Standard Wallet with the app.
11
+ *
12
+ * This dispatches a "@wallet-standard/base".WindowRegisterWalletEvent to notify the app that the Wallet is
13
+ * ready to be registered.
14
+ *
15
+ * This also adds a listener for "@wallet-standard/base".WindowAppReadyEvent to listen for a notification
16
+ * from the app that the app is ready to register the Wallet.
17
+ *
18
+ * This combination of event dispatch and listener guarantees that the Wallet will be registered synchronously
19
+ * as soon as the app is ready whether the Wallet loads before or after the app.
20
+ *
21
+ * @param wallet - Wallet to register.
22
+ * @group Wallet
23
+ */
24
+ const registerWallet = (wallet$1) => {
25
+ if (isSSR.isSSR()) {
26
+ return;
27
+ }
28
+ wallet.registerWallet(wallet$1);
29
+ };
30
+
31
+ exports.registerWallet = registerWallet;
@@ -0,0 +1,17 @@
1
+ import { registerWallet as registerWalletStandard } from '@wallet-standard/wallet';
2
+ /**
3
+ * Register a "@wallet-standard/base".Wallet as a Standard Wallet with the app.
4
+ *
5
+ * This dispatches a "@wallet-standard/base".WindowRegisterWalletEvent to notify the app that the Wallet is
6
+ * ready to be registered.
7
+ *
8
+ * This also adds a listener for "@wallet-standard/base".WindowAppReadyEvent to listen for a notification
9
+ * from the app that the app is ready to register the Wallet.
10
+ *
11
+ * This combination of event dispatch and listener guarantees that the Wallet will be registered synchronously
12
+ * as soon as the app is ready whether the Wallet loads before or after the app.
13
+ *
14
+ * @param wallet - Wallet to register.
15
+ * @group Wallet
16
+ */
17
+ export declare const registerWallet: typeof registerWalletStandard;
@@ -0,0 +1,27 @@
1
+ 'use client'
2
+ import { registerWallet as registerWallet$1 } from '@wallet-standard/wallet';
3
+ import { isSSR } from '../../../functions/isSSR/isSSR.js';
4
+
5
+ /**
6
+ * Register a "@wallet-standard/base".Wallet as a Standard Wallet with the app.
7
+ *
8
+ * This dispatches a "@wallet-standard/base".WindowRegisterWalletEvent to notify the app that the Wallet is
9
+ * ready to be registered.
10
+ *
11
+ * This also adds a listener for "@wallet-standard/base".WindowAppReadyEvent to listen for a notification
12
+ * from the app that the app is ready to register the Wallet.
13
+ *
14
+ * This combination of event dispatch and listener guarantees that the Wallet will be registered synchronously
15
+ * as soon as the app is ready whether the Wallet loads before or after the app.
16
+ *
17
+ * @param wallet - Wallet to register.
18
+ * @group Wallet
19
+ */
20
+ const registerWallet = (wallet) => {
21
+ if (isSSR()) {
22
+ return;
23
+ }
24
+ registerWallet$1(wallet);
25
+ };
26
+
27
+ export { registerWallet };
@@ -1 +1,2 @@
1
1
  export { createSolanaWallet } from './functions/createSolanaWallet';
2
+ export { registerWallet } from './functions/registerWallet';
package/src/solana.cjs CHANGED
@@ -4,7 +4,9 @@
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var createSolanaWallet = require('./lib/solana/functions/createSolanaWallet/createSolanaWallet.cjs');
7
+ var registerWallet = require('./lib/solana/functions/registerWallet/registerWallet.cjs');
7
8
 
8
9
 
9
10
 
10
11
  exports.createSolanaWallet = createSolanaWallet.createSolanaWallet;
12
+ exports.registerWallet = registerWallet.registerWallet;
package/src/solana.d.ts CHANGED
@@ -1 +1 @@
1
- export { createSolanaWallet } from './lib/solana';
1
+ export { createSolanaWallet, registerWallet } from './lib/solana';
package/src/solana.js CHANGED
@@ -1,2 +1,3 @@
1
1
  'use client'
2
2
  export { createSolanaWallet } from './lib/solana/functions/createSolanaWallet/createSolanaWallet.js';
3
+ export { registerWallet } from './lib/solana/functions/registerWallet/registerWallet.js';