@dynamic-labs/global-wallet-client 4.4.2-preview.1 → 4.4.3

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,24 +1,26 @@
1
1
 
2
- ### [4.4.2-preview.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.4.2...v4.4.2-preview.1) (2025-01-30)
2
+ ### [4.4.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.4.2...v4.4.3) (2025-01-30)
3
3
 
4
4
 
5
- ### Features
5
+ ### Bug Fixes
6
6
 
7
- * add support for 7702 on ZeroDevConnector ([144e99a](https://github.com/dynamic-labs/dynamic-auth/commit/144e99a673abbe4c775ec2124375925e96f76071))
8
- * implement experimental_signAuthorization method in TurnkeyEVMWalletConnector ([#7866](https://github.com/dynamic-labs/dynamic-auth/issues/7866)) ([9622d1e](https://github.com/dynamic-labs/dynamic-auth/commit/9622d1e0e42bb3401fffbdda7b735db1736717ce))
9
- * implement experimental_signAuthorization method in TurnkeyEVMWalletConnector ([#7866](https://github.com/dynamic-labs/dynamic-auth/issues/7866)) ([7f367b8](https://github.com/dynamic-labs/dynamic-auth/commit/7f367b8bc9d6a0ece0268867bf9c7754d75d7949))
10
- * implement experimental_signAuthorization method in TurnkeyEVMWalletConnector ([#7866](https://github.com/dynamic-labs/dynamic-auth/issues/7866)) ([2019c4c](https://github.com/dynamic-labs/dynamic-auth/commit/2019c4cb89e4a042dc1c896a71b803db572e1842))
11
- * override kernel address and add auth to localstorage ([1074ebc](https://github.com/dynamic-labs/dynamic-auth/commit/1074ebc0f3eca26fb868fd7acc9e3ac7c1048007))
7
+ * remove extra useOnClickOutside hook ([#7910](https://github.com/dynamic-labs/dynamic-auth/issues/7910)) ([42fce2e](https://github.com/dynamic-labs/dynamic-auth/commit/42fce2e91e814514a72c97b3ea06930db805a200))
12
8
 
13
- ### [4.4.2-preview.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.4.1...v4.4.2-preview.0) (2025-01-28)
9
+ ### [4.4.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.4.1...v4.4.2) (2025-01-30)
14
10
 
15
11
 
16
12
  ### Features
17
13
 
18
- * add support for 7702 on ZeroDevConnector ([a8c850a](https://github.com/dynamic-labs/dynamic-auth/commit/a8c850ab192d6113ad55a01a594d5d90ab0fbfa6))
19
- * implement experimental_signAuthorization method in TurnkeyEVMWalletConnector ([#7866](https://github.com/dynamic-labs/dynamic-auth/issues/7866)) ([96853fa](https://github.com/dynamic-labs/dynamic-auth/commit/96853fae170ca2f81cc01ccd6d9886446876412b))
20
- * implement experimental_signAuthorization method in TurnkeyEVMWalletConnector ([#7866](https://github.com/dynamic-labs/dynamic-auth/issues/7866)) ([d988e88](https://github.com/dynamic-labs/dynamic-auth/commit/d988e88eccd0b04ba5710c8aa437f5dfffeb1d74))
21
- * implement experimental_signAuthorization method in TurnkeyEVMWalletConnector ([#7866](https://github.com/dynamic-labs/dynamic-auth/issues/7866)) ([597f837](https://github.com/dynamic-labs/dynamic-auth/commit/597f8375bacef1e6a9a064604074c6920955a3e2))
14
+ * add support for Bitget BTC ([#7915](https://github.com/dynamic-labs/dynamic-auth/issues/7915)) ([3fe23f7](https://github.com/dynamic-labs/dynamic-auth/commit/3fe23f739818ef0f5d504c34f237d1d115e4f50c))
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * add backpackeclipse to walletbook fallbacks ([#7932](https://github.com/dynamic-labs/dynamic-auth/issues/7932)) ([eeaa7da](https://github.com/dynamic-labs/dynamic-auth/commit/eeaa7da629cb06ffc856f2e7f99beefcb8553bbd))
20
+ * otp verified should always be true ([#7921](https://github.com/dynamic-labs/dynamic-auth/issues/7921)) ([ac884d6](https://github.com/dynamic-labs/dynamic-auth/commit/ac884d6475152778aabd72d2c923b3c0b7745b00))
21
+ * **qntm-2814:** return checksum address from coinbase and metamask ([#7927](https://github.com/dynamic-labs/dynamic-auth/issues/7927)) ([3169d4d](https://github.com/dynamic-labs/dynamic-auth/commit/3169d4dd717b840c3654d15bacb20780d515269b))
22
+ * fix: creation of embedded wallet sessions with external auth
23
+
22
24
 
23
25
  ### [4.4.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.4.0...v4.4.1) (2025-01-27)
24
26
 
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-preview.1";
6
+ var version = "4.4.3";
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-preview.1";
2
+ var version = "4.4.3";
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-preview.1",
3
+ "version": "4.4.3",
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-preview.1",
43
- "@dynamic-labs/logger": "4.4.2-preview.1",
44
- "@dynamic-labs/store": "4.4.2-preview.1",
45
- "@dynamic-labs/types": "4.4.2-preview.1",
46
- "@dynamic-labs/utils": "4.4.2-preview.1",
42
+ "@dynamic-labs/assert-package-version": "4.4.3",
43
+ "@dynamic-labs/logger": "4.4.3",
44
+ "@dynamic-labs/store": "4.4.3",
45
+ "@dynamic-labs/types": "4.4.3",
46
+ "@dynamic-labs/utils": "4.4.3",
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';