@dynamic-labs-sdk/zerodev 0.1.0-alpha.29 → 0.1.0-alpha.30

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,3 +1,11 @@
1
+ ## 0.1.0-alpha.30 (2025-11-19)
2
+
3
+ ### 🚀 Features
4
+
5
+ - allow social account unlinking ([#618](https://github.com/dynamic-labs/dynamic-sdk/pull/618))
6
+ - add support for Sui external wallets ([#643](https://github.com/dynamic-labs/dynamic-sdk/pull/643))
7
+ - add support for Sui embedded wallets ([#652](https://github.com/dynamic-labs/dynamic-sdk/pull/652))
8
+
1
9
  ## 0.1.0-alpha.29 (2025-11-12)
2
10
 
3
11
  ### 🚀 Features
@@ -11,7 +11,7 @@ var sdkApiCore = require('@dynamic-labs/sdk-api-core');
11
11
  var viem$1 = require('viem');
12
12
 
13
13
  var name = "@dynamic-labs-sdk/zerodev";
14
- var version = "0.1.0-alpha.29";
14
+ var version = "0.1.0-alpha.30";
15
15
 
16
16
  const ZERODEV_METADATA = {
17
17
  displayName: 'ZeroDev',
@@ -9,7 +9,7 @@ import { ProviderKernelVersionEnum, ProviderEnum, ProviderEntryPointVersionEnum,
9
9
  import { http } from 'viem';
10
10
 
11
11
  var name = "@dynamic-labs-sdk/zerodev";
12
- var version = "0.1.0-alpha.29";
12
+ var version = "0.1.0-alpha.30";
13
13
 
14
14
  const ZERODEV_METADATA = {
15
15
  displayName: 'ZeroDev',
package/index.cjs.js CHANGED
@@ -41,20 +41,32 @@ function _extends() {
41
41
  * @param params.smartWalletAccount - The smart wallet account to create the KernelClient for.
42
42
  * @param [params.bundlerProvider] - A custom bundler provider to use
43
43
  * @param [params.bundlerRpc] - A custom bundler RPC to use
44
+ * @param [params.networkId] - The network ID to use for the KernelClient.
45
+ * If not provided, the network ID will be fetched from the active network data.
44
46
  * @param [params.paymasterRpc] - A custom paymaster RPC to use
45
47
  * @param [params.gasTokenAddress] - The address of a custom ERC20 token to use as a gas token
46
48
  * @param [params.withSponsorship] - Whether to use sponsorship for the KernelClient or not (default is true).
47
49
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
48
50
  * @returns A promise that resolves to a KernelClient instance.
49
- */ const createKernelClientForWalletAccount = async ({ smartWalletAccount, withSponsorship = true, bundlerProvider, bundlerRpc: bundlerRpcOverride, paymasterRpc: paymasterRpcOverride, gasTokenAddress }, client$1 = core.getDefaultClient())=>{
50
- const { networkData: activeNetworkData } = await client.getActiveNetworkData({
51
- walletAccount: smartWalletAccount
52
- }, client$1);
53
- core.assertDefined(activeNetworkData, 'No active network data found');
54
- const viemChain = viem.mapNetworkDataToViemChain(activeNetworkData);
51
+ */ const createKernelClientForWalletAccount = async ({ smartWalletAccount, withSponsorship = true, bundlerProvider, networkId, bundlerRpc: bundlerRpcOverride, paymasterRpc: paymasterRpcOverride, gasTokenAddress }, client$1 = core.getDefaultClient())=>{
52
+ let networkData;
53
+ if (networkId) {
54
+ networkData = core.getNetworkDataForNetworkId({
55
+ chain: 'EVM',
56
+ networkId
57
+ }, client$1);
58
+ core.assertDefined(networkData, `No network data found for specified network ID: ${networkId}. Make sure the network is enabled for your project.`);
59
+ } else {
60
+ const activeNetworkData = await client.getActiveNetworkData({
61
+ walletAccount: smartWalletAccount
62
+ }, client$1);
63
+ networkData = activeNetworkData.networkData;
64
+ core.assertDefined(networkData, `No active network data found for this wallet account.`);
65
+ }
66
+ const viemChain = viem.mapNetworkDataToViemChain(networkData);
55
67
  const bundlerRpc = bundlerRpcOverride != null ? bundlerRpcOverride : getZerodevRpc.getZerodevRpc({
56
68
  bundlerProvider,
57
- networkId: activeNetworkData.networkId,
69
+ networkId: networkData.networkId,
58
70
  rpcType: 'bundler'
59
71
  }, client$1);
60
72
  const bundlerTransport = viem$1.http(bundlerRpc);
@@ -68,7 +80,7 @@ function _extends() {
68
80
  }, client$1);
69
81
  const paymasterRpc = paymasterRpcOverride != null ? paymasterRpcOverride : getZerodevRpc.getZerodevRpc({
70
82
  bundlerProvider,
71
- networkId: activeNetworkData.networkId,
83
+ networkId: networkData.networkId,
72
84
  rpcType: 'paymaster'
73
85
  }, client$1);
74
86
  const paymasterConfig = withSponsorship ? getZerodevRpc.getPaymasterConfig({
@@ -145,9 +157,6 @@ const createZerodevWalletProvider = (client$1)=>{
145
157
  addresses: zerodevAddresses
146
158
  };
147
159
  };
148
- const request = async ()=>{
149
- throw new core.MethodNotImplementedError('request');
150
- };
151
160
  const signMessage$1 = async ({ walletAccount, message })=>{
152
161
  core.assertDefined(walletAccount, 'Wallet account is required');
153
162
  if (!evm.isEvmWalletAccount(walletAccount)) {
@@ -185,7 +194,6 @@ const createZerodevWalletProvider = (client$1)=>{
185
194
  displayName: getZerodevRpc.ZERODEV_METADATA.displayName,
186
195
  icon: getZerodevRpc.ZERODEV_METADATA.icon
187
196
  },
188
- request,
189
197
  signMessage: signMessage$1,
190
198
  switchActiveNetwork,
191
199
  walletProviderType
package/index.esm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { assertPackageVersion } from '@dynamic-labs-sdk/assert-package-version';
2
2
  import { Z as ZERODEV_METADATA, g as getZerodevRpc, c as createKernelAccount, a as getPaymasterConfig, s as shouldUseEIP7702, b as getZerodevChainProviderForNetworkId, n as name, v as version } from './getZerodevRpc.esm.js';
3
3
  export { d as getSignerForSmartWalletAccount } from './getZerodevRpc.esm.js';
4
- import { getChainFromVerifiedCredentialChain, getDefaultClient, assertDefined, formatWalletProviderKey, formatWalletProviderGroupKey, getActiveNetworkIdFromLastKnownRegistry, switchActiveNetworkInLastKnownRegistry, MethodNotImplementedError, hasExtension, registerExtension, getWalletProviderRegistry, WalletProviderPriority } from '@dynamic-labs-sdk/client/core';
4
+ import { getChainFromVerifiedCredentialChain, getDefaultClient, getNetworkDataForNetworkId, assertDefined, formatWalletProviderKey, formatWalletProviderGroupKey, getActiveNetworkIdFromLastKnownRegistry, switchActiveNetworkInLastKnownRegistry, hasExtension, registerExtension, getWalletProviderRegistry, WalletProviderPriority } from '@dynamic-labs-sdk/client/core';
5
5
  import { getActiveNetworkData, getOwnerWalletAccountForSmartWalletAccount, signMessage as signMessage$1, UnrecognizedNetworkError, InvalidParamError } from '@dynamic-labs-sdk/client';
6
6
  import { isEvmWalletAccount } from '@dynamic-labs-sdk/evm';
7
7
  import { WalletProviderEnum } from '@dynamic-labs/sdk-api-core';
@@ -40,20 +40,32 @@ function _extends() {
40
40
  * @param params.smartWalletAccount - The smart wallet account to create the KernelClient for.
41
41
  * @param [params.bundlerProvider] - A custom bundler provider to use
42
42
  * @param [params.bundlerRpc] - A custom bundler RPC to use
43
+ * @param [params.networkId] - The network ID to use for the KernelClient.
44
+ * If not provided, the network ID will be fetched from the active network data.
43
45
  * @param [params.paymasterRpc] - A custom paymaster RPC to use
44
46
  * @param [params.gasTokenAddress] - The address of a custom ERC20 token to use as a gas token
45
47
  * @param [params.withSponsorship] - Whether to use sponsorship for the KernelClient or not (default is true).
46
48
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
47
49
  * @returns A promise that resolves to a KernelClient instance.
48
- */ const createKernelClientForWalletAccount = async ({ smartWalletAccount, withSponsorship = true, bundlerProvider, bundlerRpc: bundlerRpcOverride, paymasterRpc: paymasterRpcOverride, gasTokenAddress }, client = getDefaultClient())=>{
49
- const { networkData: activeNetworkData } = await getActiveNetworkData({
50
- walletAccount: smartWalletAccount
51
- }, client);
52
- assertDefined(activeNetworkData, 'No active network data found');
53
- const viemChain = mapNetworkDataToViemChain(activeNetworkData);
50
+ */ const createKernelClientForWalletAccount = async ({ smartWalletAccount, withSponsorship = true, bundlerProvider, networkId, bundlerRpc: bundlerRpcOverride, paymasterRpc: paymasterRpcOverride, gasTokenAddress }, client = getDefaultClient())=>{
51
+ let networkData;
52
+ if (networkId) {
53
+ networkData = getNetworkDataForNetworkId({
54
+ chain: 'EVM',
55
+ networkId
56
+ }, client);
57
+ assertDefined(networkData, `No network data found for specified network ID: ${networkId}. Make sure the network is enabled for your project.`);
58
+ } else {
59
+ const activeNetworkData = await getActiveNetworkData({
60
+ walletAccount: smartWalletAccount
61
+ }, client);
62
+ networkData = activeNetworkData.networkData;
63
+ assertDefined(networkData, `No active network data found for this wallet account.`);
64
+ }
65
+ const viemChain = mapNetworkDataToViemChain(networkData);
54
66
  const bundlerRpc = bundlerRpcOverride != null ? bundlerRpcOverride : getZerodevRpc({
55
67
  bundlerProvider,
56
- networkId: activeNetworkData.networkId,
68
+ networkId: networkData.networkId,
57
69
  rpcType: 'bundler'
58
70
  }, client);
59
71
  const bundlerTransport = http(bundlerRpc);
@@ -67,7 +79,7 @@ function _extends() {
67
79
  }, client);
68
80
  const paymasterRpc = paymasterRpcOverride != null ? paymasterRpcOverride : getZerodevRpc({
69
81
  bundlerProvider,
70
- networkId: activeNetworkData.networkId,
82
+ networkId: networkData.networkId,
71
83
  rpcType: 'paymaster'
72
84
  }, client);
73
85
  const paymasterConfig = withSponsorship ? getPaymasterConfig({
@@ -144,9 +156,6 @@ const createZerodevWalletProvider = (client)=>{
144
156
  addresses: zerodevAddresses
145
157
  };
146
158
  };
147
- const request = async ()=>{
148
- throw new MethodNotImplementedError('request');
149
- };
150
159
  const signMessage$1 = async ({ walletAccount, message })=>{
151
160
  assertDefined(walletAccount, 'Wallet account is required');
152
161
  if (!isEvmWalletAccount(walletAccount)) {
@@ -184,7 +193,6 @@ const createZerodevWalletProvider = (client)=>{
184
193
  displayName: ZERODEV_METADATA.displayName,
185
194
  icon: ZERODEV_METADATA.icon
186
195
  },
187
- request,
188
196
  signMessage: signMessage$1,
189
197
  switchActiveNetwork,
190
198
  walletProviderType
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs-sdk/zerodev",
3
- "version": "0.1.0-alpha.29",
3
+ "version": "0.1.0-alpha.30",
4
4
  "type": "module",
5
5
  "main": "./index.cjs.js",
6
6
  "module": "./index.esm.js",
@@ -19,10 +19,10 @@
19
19
  }
20
20
  },
21
21
  "dependencies": {
22
- "@dynamic-labs-sdk/assert-package-version": "0.1.0-alpha.29",
23
- "@dynamic-labs-sdk/client": "0.1.0-alpha.29",
24
- "@dynamic-labs-sdk/evm": "0.1.0-alpha.29",
25
- "@dynamic-labs/sdk-api-core": "0.0.818",
22
+ "@dynamic-labs-sdk/assert-package-version": "0.1.0-alpha.30",
23
+ "@dynamic-labs-sdk/client": "0.1.0-alpha.30",
24
+ "@dynamic-labs-sdk/evm": "0.1.0-alpha.30",
25
+ "@dynamic-labs/sdk-api-core": "0.0.823",
26
26
  "@zerodev/ecdsa-validator": "5.4.9",
27
27
  "@zerodev/multi-chain-ecdsa-validator": "5.4.5",
28
28
  "@zerodev/sdk": "5.4.36"
@@ -6,6 +6,7 @@ type CreateKernelClientForWalletAccountParams = {
6
6
  bundlerProvider?: ZerodevBundlerProvider;
7
7
  bundlerRpc?: string;
8
8
  gasTokenAddress?: Hex;
9
+ networkId?: string;
9
10
  paymasterRpc?: string;
10
11
  smartWalletAccount: EvmWalletAccount;
11
12
  withSponsorship?: boolean;
@@ -16,12 +17,14 @@ type CreateKernelClientForWalletAccountParams = {
16
17
  * @param params.smartWalletAccount - The smart wallet account to create the KernelClient for.
17
18
  * @param [params.bundlerProvider] - A custom bundler provider to use
18
19
  * @param [params.bundlerRpc] - A custom bundler RPC to use
20
+ * @param [params.networkId] - The network ID to use for the KernelClient.
21
+ * If not provided, the network ID will be fetched from the active network data.
19
22
  * @param [params.paymasterRpc] - A custom paymaster RPC to use
20
23
  * @param [params.gasTokenAddress] - The address of a custom ERC20 token to use as a gas token
21
24
  * @param [params.withSponsorship] - Whether to use sponsorship for the KernelClient or not (default is true).
22
25
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
23
26
  * @returns A promise that resolves to a KernelClient instance.
24
27
  */
25
- export declare const createKernelClientForWalletAccount: ({ smartWalletAccount, withSponsorship, bundlerProvider, bundlerRpc: bundlerRpcOverride, paymasterRpc: paymasterRpcOverride, gasTokenAddress, }: CreateKernelClientForWalletAccountParams, client?: any) => Promise<KernelClient>;
28
+ export declare const createKernelClientForWalletAccount: ({ smartWalletAccount, withSponsorship, bundlerProvider, networkId, bundlerRpc: bundlerRpcOverride, paymasterRpc: paymasterRpcOverride, gasTokenAddress, }: CreateKernelClientForWalletAccountParams, client?: any) => Promise<KernelClient>;
26
29
  export {};
27
30
  //# sourceMappingURL=createKernelClientForWalletAccount.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createKernelClientForWalletAccount.d.ts","sourceRoot":"","sources":["../../../../../packages/zerodev/src/createKernelClientForWalletAccount/createKernelClientForWalletAccount.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAKzE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAGhC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAK1D,KAAK,wCAAwC,GAAG;IAC9C,eAAe,CAAC,EAAE,sBAAsB,CAAC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,GAAG,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,gBAAgB,CAAC;IACrC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kCAAkC,mJAQ1C,wCAAwC,mBAE1C,OAAO,CAAC,YAAY,CAkEtB,CAAC"}
1
+ {"version":3,"file":"createKernelClientForWalletAccount.d.ts","sourceRoot":"","sources":["../../../../../packages/zerodev/src/createKernelClientForWalletAccount/createKernelClientForWalletAccount.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAKzE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAGhC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAK1D,KAAK,wCAAwC,GAAG;IAC9C,eAAe,CAAC,EAAE,sBAAsB,CAAC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,GAAG,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,gBAAgB,CAAC;IACrC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,kCAAkC,8JAS1C,wCAAwC,mBAE1C,OAAO,CAAC,YAAY,CAqFtB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"createZerodevWalletProvider.d.ts","sourceRoot":"","sources":["../../../../../../packages/zerodev/src/utils/createZerodevWalletProvider/createZerodevWalletProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EAInB,MAAM,0BAA0B,CAAC;AASlC,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,uBAAuB,CAAC;AAQ/B,eAAO,MAAM,2BAA2B,WAC9B,aAAa,KACpB,iBA+EF,CAAC"}
1
+ {"version":3,"file":"createZerodevWalletProvider.d.ts","sourceRoot":"","sources":["../../../../../../packages/zerodev/src/utils/createZerodevWalletProvider/createZerodevWalletProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EAInB,MAAM,0BAA0B,CAAC;AAQlC,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,uBAAuB,CAAC;AAQ/B,eAAO,MAAM,2BAA2B,WAC9B,aAAa,KACpB,iBA0EF,CAAC"}