@dynamic-labs/sui-extension 4.95.0 → 4.95.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,18 @@
1
1
 
2
+ ### [4.95.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.95.1...v4.95.2) (2026-07-30)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * **ethereum-aa:** resolve chainId from network for ZeroDev v2 multichain projects ([#12106](https://github.com/dynamic-labs/dynamic-auth/issues/12106)) ([76f18b0](https://github.com/dynamic-labs/dynamic-auth/commit/76f18b0a861aa916f949a919e65a185c6c32673f)), closes [#12105](https://github.com/dynamic-labs/dynamic-auth/issues/12105) [#12105](https://github.com/dynamic-labs/dynamic-auth/issues/12105)
8
+
9
+ ### [4.95.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.95.0...v4.95.1) (2026-07-28)
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * **sui:** stop using Sui Foundation fullnode URLs in WaaS and extension connectors ([#12110](https://github.com/dynamic-labs/dynamic-auth/issues/12110)) ([5c5539d](https://github.com/dynamic-labs/dynamic-auth/commit/5c5539dfe9db321b078e2a0bfda71aebce99837b))
15
+
2
16
  ## [4.95.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.94.0...v4.95.0) (2026-07-28)
3
17
 
4
18
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.95.0";
6
+ var version = "4.95.2";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.95.0";
2
+ var version = "4.95.2";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sui-extension",
3
- "version": "4.95.0",
3
+ "version": "4.95.2",
4
4
  "main": "./src/index.cjs",
5
5
  "module": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -17,10 +17,10 @@
17
17
  "@mysten/sui": "1.45.2"
18
18
  },
19
19
  "dependencies": {
20
- "@dynamic-labs/assert-package-version": "4.95.0",
21
- "@dynamic-labs/client": "4.95.0",
22
- "@dynamic-labs/message-transport": "4.95.0",
23
- "@dynamic-labs/types": "4.95.0",
24
- "@dynamic-labs/webview-messages": "4.95.0"
20
+ "@dynamic-labs/assert-package-version": "4.95.2",
21
+ "@dynamic-labs/client": "4.95.2",
22
+ "@dynamic-labs/message-transport": "4.95.2",
23
+ "@dynamic-labs/types": "4.95.2",
24
+ "@dynamic-labs/webview-messages": "4.95.2"
25
25
  }
26
26
  }
@@ -3,19 +3,19 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var client = require('@mysten/sui/client');
7
6
  var messageTransport = require('@dynamic-labs/message-transport');
8
7
  var createSigner = require('./createSigner/createSigner.cjs');
9
8
  var getNetworkName = require('./getNetworkName/getNetworkName.cjs');
9
+ var getSuiNetworkUrl = require('./getSuiNetworkUrl/getSuiNetworkUrl.cjs');
10
10
 
11
11
  const suiExtensionName = 'sui';
12
- const SuiExtension = () => (client$1, core) => {
12
+ const SuiExtension = () => (client, core) => {
13
13
  core.declaredExtensionNames.push(suiExtensionName);
14
14
  const suiRequestChannel = messageTransport.createRequestChannel(core.messageTransport);
15
15
  return {
16
16
  sui: {
17
17
  getNetworkName: ({ walletId }) => getNetworkName.getNetworkName({ suiRequestChannel, walletId }),
18
- getNetworkUrl: ({ walletId }) => getNetworkName.getNetworkName({ suiRequestChannel, walletId }).then(client.getFullnodeUrl),
18
+ getNetworkUrl: ({ walletId }) => getNetworkName.getNetworkName({ suiRequestChannel, walletId }).then((networkName) => getSuiNetworkUrl.getSuiNetworkUrl({ client, core, networkName })),
19
19
  getSigner: ({ wallet }) => createSigner.createSigner({ suiRequestChannel, wallet }),
20
20
  },
21
21
  };
@@ -1,8 +1,8 @@
1
1
  'use client'
2
- import { getFullnodeUrl } from '@mysten/sui/client';
3
2
  import { createRequestChannel } from '@dynamic-labs/message-transport';
4
3
  import { createSigner } from './createSigner/createSigner.js';
5
4
  import { getNetworkName } from './getNetworkName/getNetworkName.js';
5
+ import { getSuiNetworkUrl } from './getSuiNetworkUrl/getSuiNetworkUrl.js';
6
6
 
7
7
  const suiExtensionName = 'sui';
8
8
  const SuiExtension = () => (client, core) => {
@@ -11,7 +11,7 @@ const SuiExtension = () => (client, core) => {
11
11
  return {
12
12
  sui: {
13
13
  getNetworkName: ({ walletId }) => getNetworkName({ suiRequestChannel, walletId }),
14
- getNetworkUrl: ({ walletId }) => getNetworkName({ suiRequestChannel, walletId }).then(getFullnodeUrl),
14
+ getNetworkUrl: ({ walletId }) => getNetworkName({ suiRequestChannel, walletId }).then((networkName) => getSuiNetworkUrl({ client, core, networkName })),
15
15
  getSigner: ({ wallet }) => createSigner({ suiRequestChannel, wallet }),
16
16
  },
17
17
  };
@@ -0,0 +1,23 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var _tslib = require('../../../_virtual/_tslib.cjs');
7
+ var client = require('@dynamic-labs/client');
8
+
9
+ const getSuiNetworkUrl = (_a) => _tslib.__awaiter(void 0, [_a], void 0, function* ({ client: client$1, core, networkName, }) {
10
+ var _b, _c, _d, _e, _f;
11
+ if (!client.hasExtension(client$1, core, client.baseClientExtensionName)) {
12
+ throw new Error('Dynamic client is malformed and missing base configuration');
13
+ }
14
+ const suiNetworks = (_b = client$1.networks.sui) !== null && _b !== void 0 ? _b : [];
15
+ const network = (_c = suiNetworks.find((networkConfig) => { var _a; return (_a = networkConfig.name) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(networkName.toLowerCase()); })) !== null && _c !== void 0 ? _c : suiNetworks[0];
16
+ const rpcUrl = (_e = (_d = network === null || network === void 0 ? void 0 : network.privateCustomerRpcUrls) === null || _d === void 0 ? void 0 : _d[0]) !== null && _e !== void 0 ? _e : (_f = network === null || network === void 0 ? void 0 : network.rpcUrls) === null || _f === void 0 ? void 0 : _f[0];
17
+ if (!rpcUrl) {
18
+ throw new Error(`No Sui RPC URL found for network ${networkName}`);
19
+ }
20
+ return rpcUrl;
21
+ });
22
+
23
+ exports.getSuiNetworkUrl = getSuiNetworkUrl;
@@ -0,0 +1,8 @@
1
+ import { Core, Extendable } from '@dynamic-labs/client';
2
+ type GetSuiNetworkUrlProps = {
3
+ client: Extendable;
4
+ core: Core;
5
+ networkName: string;
6
+ };
7
+ export declare const getSuiNetworkUrl: ({ client, core, networkName, }: GetSuiNetworkUrlProps) => Promise<string>;
8
+ export {};
@@ -0,0 +1,19 @@
1
+ 'use client'
2
+ import { __awaiter } from '../../../_virtual/_tslib.js';
3
+ import { hasExtension, baseClientExtensionName } from '@dynamic-labs/client';
4
+
5
+ const getSuiNetworkUrl = (_a) => __awaiter(void 0, [_a], void 0, function* ({ client, core, networkName, }) {
6
+ var _b, _c, _d, _e, _f;
7
+ if (!hasExtension(client, core, baseClientExtensionName)) {
8
+ throw new Error('Dynamic client is malformed and missing base configuration');
9
+ }
10
+ const suiNetworks = (_b = client.networks.sui) !== null && _b !== void 0 ? _b : [];
11
+ const network = (_c = suiNetworks.find((networkConfig) => { var _a; return (_a = networkConfig.name) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(networkName.toLowerCase()); })) !== null && _c !== void 0 ? _c : suiNetworks[0];
12
+ const rpcUrl = (_e = (_d = network === null || network === void 0 ? void 0 : network.privateCustomerRpcUrls) === null || _d === void 0 ? void 0 : _d[0]) !== null && _e !== void 0 ? _e : (_f = network === null || network === void 0 ? void 0 : network.rpcUrls) === null || _f === void 0 ? void 0 : _f[0];
13
+ if (!rpcUrl) {
14
+ throw new Error(`No Sui RPC URL found for network ${networkName}`);
15
+ }
16
+ return rpcUrl;
17
+ });
18
+
19
+ export { getSuiNetworkUrl };
@@ -0,0 +1 @@
1
+ export { getSuiNetworkUrl } from './getSuiNetworkUrl';