@dynamic-labs-wallet/node-evm 0.0.319 → 0.0.320

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/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@dynamic-labs-wallet/node-evm",
3
- "version": "0.0.319",
3
+ "version": "0.0.320",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "dependencies": {
7
- "@dynamic-labs-wallet/node": "0.0.319",
7
+ "@dynamic-labs-wallet/node": "0.0.320",
8
8
  "@dynamic-labs/sdk-api-core": "^0.0.900",
9
9
  "@dynamic-labs-sdk/client": "0.3.0",
10
10
  "@dynamic-labs-sdk/zerodev": "0.3.0",
@@ -1,17 +0,0 @@
1
- import type { ServerKeyShare } from '@dynamic-labs-wallet/node';
2
- import type { Account } from 'viem';
3
- import { type createDelegatedEvmWalletClient } from '../delegatedClient.js';
4
- import type { EvmClientBase } from '../zerodev/types.js';
5
- export declare const createAccountAdapter: ({ evmClient, accountAddress, password, externalServerKeyShares, delegated, }: {
6
- evmClient: EvmClientBase;
7
- accountAddress: `0x${string}`;
8
- password?: string;
9
- externalServerKeyShares?: ServerKeyShare[];
10
- delegated?: {
11
- delegatedClient: ReturnType<typeof createDelegatedEvmWalletClient>;
12
- walletId: string;
13
- walletApiKey: string;
14
- keyShare: ServerKeyShare;
15
- };
16
- }) => Account;
17
- //# sourceMappingURL=accountAdapter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"accountAdapter.d.ts","sourceRoot":"","sources":["../../src/client/accountAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,OAAO,EAAkB,MAAM,MAAM,CAAC;AAGpD,OAAO,EACL,KAAK,8BAA8B,EAKpC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,eAAO,MAAM,oBAAoB,iFAM9B;IACD,SAAS,EAAE,aAAa,CAAC;IACzB,cAAc,EAAE,KAAK,MAAM,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uBAAuB,CAAC,EAAE,cAAc,EAAE,CAAC;IAC3C,SAAS,CAAC,EAAE;QACV,eAAe,EAAE,UAAU,CAAC,OAAO,8BAA8B,CAAC,CAAC;QACnE,QAAQ,EAAE,MAAM,CAAC;QACjB,YAAY,EAAE,MAAM,CAAC;QACrB,QAAQ,EAAE,cAAc,CAAC;KAC1B,CAAC;CACH,KAAG,OA6FH,CAAC"}
@@ -1,133 +0,0 @@
1
- import { DynamicWalletClient, type DynamicWalletClientProps, type EcdsaKeygenResult, type EcdsaPublicKey, type Ed25519KeygenResult, type ServerKeyShare, type ThresholdSignatureScheme } from '@dynamic-labs-wallet/node';
2
- import type { SignMessageContext } from '@dynamic-labs/sdk-api-core';
3
- import { type Account, type Chain, type PublicClient, type SignableMessage, type TransactionSerializable, type Transport, type TypedData, type WalletClient } from 'viem';
4
- export declare class DynamicEvmWalletClient extends DynamicWalletClient {
5
- readonly chainName = "EVM";
6
- constructor({ environmentId, baseApiUrl, baseMPCRelayApiUrl, debug, enableMPCAccelerator, logger, }: DynamicWalletClientProps);
7
- get jwtAuthToken(): string | undefined;
8
- get apiUrl(): string | undefined;
9
- createViemPublicClient({ chain, rpcUrl }: {
10
- chain: Chain;
11
- rpcUrl?: string;
12
- }): PublicClient;
13
- getWalletClient({ accountAddress, password, externalServerKeyShares, chain, chainId, rpcUrl, }: {
14
- accountAddress: string;
15
- password?: string;
16
- externalServerKeyShares?: ServerKeyShare[];
17
- chain?: Chain;
18
- chainId?: number;
19
- rpcUrl?: string;
20
- }): Promise<WalletClient<Transport, Chain, Account>>;
21
- /**
22
- * Creates a new wallet account and stores the key shares in the wallet map.
23
- * @param thresholdSignatureScheme - The threshold signature scheme to use for the wallet.
24
- * @param password - The password to use for the wallet.
25
- * @param onError - The function to call if an error occurs.
26
- * @param backUpToClientShareService - Whether to back up the external server key shares to the client share service. By default, it is false.
27
- * @returns The account address, public key, raw public key, external server key shares, and wallet id.
28
- */
29
- createWalletAccount({ thresholdSignatureScheme, password, onError, backUpToClientShareService, }: {
30
- thresholdSignatureScheme: ThresholdSignatureScheme;
31
- password?: string;
32
- onError?: (error: Error) => void;
33
- backUpToClientShareService?: boolean;
34
- }): Promise<{
35
- accountAddress: string;
36
- publicKeyHex: string;
37
- rawPublicKey: EcdsaPublicKey | Uint8Array | string | undefined;
38
- /** @deprecated Use externalKeySharesWithBackupStatus instead */
39
- externalServerKeyShares: ServerKeyShare[];
40
- externalKeySharesWithBackupStatus: Array<{
41
- share: ServerKeyShare;
42
- backedUpToClientKeyShareService: boolean;
43
- }>;
44
- walletId: string;
45
- }>;
46
- signMessage({ message, accountAddress, password, externalServerKeyShares, context, onError, }: {
47
- message: string;
48
- accountAddress: string;
49
- password?: string;
50
- externalServerKeyShares?: ServerKeyShare[];
51
- context?: SignMessageContext;
52
- onError?: (error: Error) => void;
53
- }): Promise<`0x${string}`>;
54
- isSignAuthorizationSupported(): boolean;
55
- signAuthorization({ authorization, accountAddress, password, externalServerKeyShares, onError, }: {
56
- authorization: any;
57
- accountAddress: string;
58
- password?: string;
59
- externalServerKeyShares?: ServerKeyShare[];
60
- onError?: (error: Error) => void;
61
- }): Promise<{
62
- r: `0x${string}`;
63
- s: `0x${string}`;
64
- v: bigint;
65
- yParity: number;
66
- } | {
67
- r: `0x${string}`;
68
- s: `0x${string}`;
69
- yParity: number;
70
- v?: never;
71
- }>;
72
- signTypedData({ accountAddress, typedData, password, externalServerKeyShares, onError, }: {
73
- accountAddress: string;
74
- typedData: TypedData;
75
- password?: string;
76
- externalServerKeyShares?: ServerKeyShare[];
77
- onError?: (error: Error) => void;
78
- }): Promise<`0x${string}`>;
79
- verifyMessageSignature({ accountAddress, message, signature, }: {
80
- accountAddress: string;
81
- message: SignableMessage;
82
- signature: any;
83
- }): Promise<boolean>;
84
- signTransaction({ senderAddress, transaction, password, externalServerKeyShares, }: {
85
- senderAddress: string;
86
- transaction: TransactionSerializable;
87
- password?: string;
88
- externalServerKeyShares?: ServerKeyShare[];
89
- }): Promise<string>;
90
- exportPrivateKey({ accountAddress, password, externalServerKeyShares, }: {
91
- accountAddress: string;
92
- password?: string;
93
- externalServerKeyShares?: ServerKeyShare[];
94
- }): Promise<{
95
- derivedPrivateKey: string | undefined;
96
- }>;
97
- offlineExportPrivateKey({ keyShares, derivationPath, }: {
98
- keyShares: (EcdsaKeygenResult | Ed25519KeygenResult)[];
99
- derivationPath?: string;
100
- }): Promise<{
101
- derivedPrivateKey: string | undefined;
102
- }>;
103
- /**
104
- * Imports a private key and stores the key shares in the wallet map.
105
- * @param privateKey - The private key to import.
106
- * @param chainName - The chain name to use for the wallet.
107
- * @param thresholdSignatureScheme - The threshold signature scheme to use for the wallet.
108
- * @param password - The password to use for the wallet.
109
- * @param onError - The function to call if an error occurs.
110
- * @param backUpToClientShareService - Whether to back up the external server key shares to the client share service. By default, it is false.
111
- * @returns The account address, public key, raw public key, external server key shares.
112
- */
113
- importPrivateKey({ privateKey, chainName, thresholdSignatureScheme, password, backUpToClientShareService, onError, }: {
114
- privateKey: string;
115
- chainName: string;
116
- thresholdSignatureScheme: ThresholdSignatureScheme;
117
- password?: string;
118
- backUpToClientShareService?: boolean;
119
- onError?: (error: Error) => void;
120
- }): Promise<{
121
- accountAddress: string;
122
- publicKeyHex: string;
123
- rawPublicKey: EcdsaPublicKey | Uint8Array | string | undefined;
124
- /** @deprecated Use externalKeySharesWithBackupStatus instead */
125
- externalServerKeyShares: ServerKeyShare[];
126
- externalKeySharesWithBackupStatus: Array<{
127
- share: ServerKeyShare;
128
- backedUpToClientKeyShareService: boolean;
129
- }>;
130
- }>;
131
- getEvmWallets(): Promise<import("@dynamic-labs-wallet/node").WalletProperties[]>;
132
- }
133
- //# sourceMappingURL=client.d.ts.map
@@ -1 +0,0 @@
1
-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E,MAAM,CAAC;KACzB;;;IASD;;;;;;;;;OASG;IACG,gBAAgB,CAAC,EACrB,UAAU,EACV,SAAS,EACT,wBAAwB,EACxB,QAAoB,EACpB,0BAAkC,EAClC,OAAO,GACR,EAAE;QACD,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,wBAAwB,EAAE,wBAAwB,CAAC;QACnD,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,0BAA0B,CAAC,EAAE,OAAO,CAAC;QACrC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;KAClC,GAAG,OAAO,CAAC;QACV,cAAc,EAAE,MAAM,CAAC;QACvB,YAAY,EAAE,MAAM,CAAC;QACrB,YAAY,EAAE,cAAc,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,CAAC;QAC/D,gEAAgE;QAChE,uBAAuB,EAAE,cAAc,EAAE,CAAC;QAC1C,iCAAiC,EAAE,KAAK,CAAC;YACvC,KAAK,EAAE,cAAc,CAAC;YACtB,+BAA+B,EAAE,OAAO,CAAC;SAC1C,CAAC,CAAC;KACJ,CAAC;IA+DI,aAAa;CAKpB"}
@@ -1,8 +0,0 @@
1
- export declare const EVM_SIGN_MESSAGE_PREFIX = "\u0019Ethereum Signed Message:\n";
2
- export declare const ERROR_KEYGEN_FAILED = "Error with keygen";
3
- export declare const ERROR_CREATE_WALLET_ACCOUNT = "Error creating evm wallet account";
4
- export declare const ERROR_SIGN_MESSAGE = "Error signing message";
5
- export declare const ERROR_SIGN_TYPED_DATA = "Error signing typed data";
6
- export declare const ERROR_ACCOUNT_ADDRESS_REQUIRED = "Account address is required";
7
- export declare const ERROR_VERIFY_MESSAGE_SIGNATURE = "Error verifying message signature";
8
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/client/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,qCAAmC,CAAC;AAGxE,eAAO,MAAM,mBAAmB,sBAAsB,CAAC;AAEvD,eAAO,MAAM,2BAA2B,sCAAsC,CAAC;AAE/E,eAAO,MAAM,kBAAkB,0BAA0B,CAAC;AAE1D,eAAO,MAAM,qBAAqB,6BAA6B,CAAC;AAEhE,eAAO,MAAM,8BAA8B,gCAAgC,CAAC;AAE5E,eAAO,MAAM,8BAA8B,sCAAsC,CAAC"}
@@ -1,5 +0,0 @@
1
- export * from './accountAdapter.js';
2
- export * from './client.js';
3
- export * from './constants.js';
4
- export * from '../utils.js';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC"}
@@ -1,60 +0,0 @@
1
- import type { DelegatedWalletClient, ServerKeyShare } from '@dynamic-labs-wallet/node';
2
- import type { SignMessageContext } from '@dynamic-labs/sdk-api-core';
3
- import { type TransactionSerializable, type TypedData } from 'viem';
4
- export type DelegatedEvmClientConfig = {
5
- environmentId: string;
6
- baseApiUrl?: string;
7
- baseMPCRelayApiUrl?: string;
8
- apiKey: string;
9
- debug?: boolean;
10
- };
11
- export type DelegatedEvmWalletClient = DelegatedWalletClient & {
12
- readonly chainName: 'EVM';
13
- };
14
- /**
15
- * Creates a delegated EVM wallet client for functional operations
16
- */
17
- export declare const createDelegatedEvmWalletClient: ({ environmentId, baseApiUrl, baseMPCRelayApiUrl, apiKey, debug, }: DelegatedEvmClientConfig) => DelegatedEvmWalletClient;
18
- /**
19
- * Signs a message using delegated signing for EVM
20
- */
21
- export declare const delegatedSignMessage: (client: DelegatedEvmWalletClient, { walletId, walletApiKey, keyShare, message, context, onError, }: {
22
- walletId: string;
23
- walletApiKey: string;
24
- keyShare: ServerKeyShare;
25
- message: string;
26
- context?: SignMessageContext;
27
- onError?: (error: Error) => void;
28
- }) => Promise<string>;
29
- /**
30
- * Signs a transaction using delegated signing for EVM
31
- */
32
- export declare const delegatedSignTransaction: (client: DelegatedEvmWalletClient, { walletId, walletApiKey, keyShare, transaction, }: {
33
- walletId: string;
34
- walletApiKey: string;
35
- keyShare: ServerKeyShare;
36
- transaction: TransactionSerializable;
37
- }) => Promise<string>;
38
- /**
39
- * Signs typed data using delegated signing for EVM
40
- */
41
- export declare const delegatedSignTypedData: (client: DelegatedEvmWalletClient, { walletId, walletApiKey, keyShare, typedData, }: {
42
- walletId: string;
43
- walletApiKey: string;
44
- keyShare: ServerKeyShare;
45
- typedData: TypedData;
46
- }) => Promise<string>;
47
- /**
48
- * Signs EIP-7702 authorization using delegated signing for EVM
49
- */
50
- export declare const delegatedSignAuthorization: (client: DelegatedEvmWalletClient, { walletId, walletApiKey, keyShare, authorization, }: {
51
- walletId: string;
52
- walletApiKey: string;
53
- keyShare: ServerKeyShare;
54
- authorization: any;
55
- }) => Promise<any>;
56
- /**
57
- * Revoke delegation - delegates to the node package
58
- */
59
- export declare const revokeDelegation: (client: DelegatedEvmWalletClient, params: any) => Promise<void>;
60
- //# sourceMappingURL=delegatedClient.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"delegatedClient.d.ts","sourceRoot":"","sources":["../../packages/src/delegatedClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAkB,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAOvG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAwC,KAAK,uBAAuB,EAAE,KAAK,SAAS,EAAE,MAAM,MAAM,CAAC;AAM1G,MAAM,MAAM,wBAAwB,GAAG;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,EAAE,MAA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GAAG,CAiCb,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,WAAkB,wBAAwB,UAAU,GAAG,kBAEnF,CAAC"}
package/src/index.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export * from './client/index.js';
2
- export * from './delegatedClient.js';
3
- export * from './zerodev/index.js';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC"}
package/src/utils.d.ts DELETED
@@ -1,16 +0,0 @@
1
- import { type EcdsaPublicKey, type EcdsaSignature } from '@dynamic-labs-wallet/node';
2
- import { type TypedData } from 'viem';
3
- export declare const formatEVMMessage: (message_: string | {
4
- raw: string | Uint8Array;
5
- }) => `0x${string}`;
6
- export declare const formatTypedData: (typedData: TypedData | {
7
- [key: string]: unknown;
8
- }) => string;
9
- export declare const serializeECDSASignature: (signature: EcdsaSignature) => `0x${string}`;
10
- export declare const deriveAccountAddress: ({ rawPublicKey }: {
11
- rawPublicKey: EcdsaPublicKey;
12
- }) => {
13
- accountAddress: `0x${string}`;
14
- publicKeyHex: string;
15
- };
16
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../packages/src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAe,MAAM,2BAA2B,CAAC;AAClG,OAAO,EASL,KAAK,SAAS,EACf,MAAM,MAAM,CAAC;AAGd,eAAO,MAAM,gBAAgB,aAAc,MAAM,GAAG;IAAE,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;CAAE,kBAQ/E,CAAC;AAEF,eAAO,MAAM,eAAe,cAAe,SAAS,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,WAEhF,CAAC;AAEF,eAAO,MAAM,uBAAuB,cAAe,cAAc,kBAMhE,CAAC;AAEF,eAAO,MAAM,oBAAoB,qBAAsB;IAAE,YAAY,EAAE,cAAc,CAAA;CAAE;;;CAQtF,CAAC"}
@@ -1,15 +0,0 @@
1
- import type { EvmClientBase, KernelClient, ZeroDevKernelOptions } from './types.js';
2
- export declare class DynamicEvmZeroDevClient {
3
- private readonly dynamicClient;
4
- private readonly evmClient;
5
- constructor(evmClient: EvmClientBase);
6
- initialize(): Promise<void>;
7
- /**
8
- * Get network data by networkId from project configuration
9
- */
10
- private getNetworkData;
11
- createKernelClientForAddress(options: ZeroDevKernelOptions): Promise<KernelClient>;
12
- private createKernelAccountWithCustomSigner;
13
- }
14
- export declare const createZerodevClient: (evmClient: EvmClientBase) => Promise<DynamicEvmZeroDevClient>;
15
- //# sourceMappingURL=client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/zerodev/client.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEpF,qBAAa,uBAAuB;IAClC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAyC;IACvE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAgB;gBAE9B,SAAS,EAAE,aAAa;IAqB9B,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IASjC;;OAEG;IACH,OAAO,CAAC,cAAc;IAehB,4BAA4B,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,YAAY,CAAC;YAuE1E,mCAAmC;CAgElD;AAED,eAAO,MAAM,mBAAmB,cAAqB,aAAa,KAAG,OAAO,CAAC,uBAAuB,CAMnG,CAAC"}
@@ -1,3 +0,0 @@
1
- export { createZerodevClient } from './client.js';
2
- export type { KernelClient } from './types.js';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/zerodev/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC"}
@@ -1,17 +0,0 @@
1
- export interface StorageAdapter {
2
- getItem: (key: string) => Promise<string | null>;
3
- setItem: (key: string, value: string) => Promise<void>;
4
- removeItem: (key: string) => Promise<void>;
5
- }
6
- export declare class MemoryStorageAdapter implements StorageAdapter {
7
- private readonly store;
8
- private readonly jwt;
9
- constructor(jwt: string | null);
10
- getItem(key: string): Promise<string | null>;
11
- setItem(key: string, value: string): Promise<void>;
12
- removeItem(key: string): Promise<void>;
13
- clear(): void;
14
- get size(): number;
15
- }
16
- export declare const createMemoryStorageAdapter: (jwt: string | null) => StorageAdapter;
17
- //# sourceMappingURL=storage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/zerodev/storage.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACjD,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5C;AAED,qBAAa,oBAAqB,YAAW,cAAc;IACzD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAkC;IACxD,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAgB;gBAExB,GAAG,EAAE,MAAM,GAAG,IAAI;IAIxB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAkB5C,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIlD,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI5C,KAAK,IAAI,IAAI;IAIb,IAAI,IAAI,IAAI,MAAM,CAEjB;CACF;AAED,eAAO,MAAM,0BAA0B,QAAS,MAAM,GAAG,IAAI,KAAG,cAE/D,CAAC"}
@@ -1,27 +0,0 @@
1
- import type { ServerKeyShare } from '@dynamic-labs-wallet/node';
2
- import type { ZerodevBundlerProvider } from '@dynamic-labs/sdk-api-core';
3
- import type { KernelAccountClient } from '@zerodev/sdk';
4
- import type { Chain, Client, Hex, RpcSchema, Transport } from 'viem';
5
- import type { SmartAccount } from 'viem/account-abstraction';
6
- import type { DynamicEvmWalletClient } from '../client/client.js';
7
- import type { createDelegatedEvmWalletClient, DelegatedEvmWalletClient } from '../delegatedClient.js';
8
- export type ZeroDevKernelOptions = {
9
- address: `0x${string}`;
10
- networkId: string;
11
- password?: string;
12
- externalServerKeyShares?: ServerKeyShare[];
13
- delegated?: {
14
- delegatedClient: ReturnType<typeof createDelegatedEvmWalletClient>;
15
- walletId: string;
16
- walletApiKey: string;
17
- keyShare: ServerKeyShare;
18
- };
19
- withSponsorship?: boolean;
20
- bundlerProvider?: ZerodevBundlerProvider;
21
- bundlerRpc?: string;
22
- paymasterRpc?: string;
23
- gasTokenAddress?: Hex;
24
- };
25
- export type KernelClient = KernelAccountClient<Transport, Chain, SmartAccount, Client, RpcSchema>;
26
- export type EvmClientBase = DynamicEvmWalletClient | DelegatedEvmWalletClient;
27
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/zerodev/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACz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