@dynamic-labs-wallet/node-evm 0.0.317 → 0.0.319-beta.1

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/index.cjs.js CHANGED
@@ -434,7 +434,7 @@ class DynamicEvmWalletClient extends node.DynamicWalletClient {
434
434
  const { accountAddress, publicKeyHex } = deriveAccountAddress({
435
435
  rawPublicKey: rawPublicKey
436
436
  });
437
- await this.storeEncryptedBackupByWalletWithRetry({
437
+ const externalKeySharesWithBackupStatus = await this.storeEncryptedBackupByWalletWithRetry({
438
438
  accountAddress,
439
439
  externalServerKeyShares,
440
440
  password,
@@ -445,7 +445,8 @@ class DynamicEvmWalletClient extends node.DynamicWalletClient {
445
445
  accountAddress,
446
446
  rawPublicKey,
447
447
  publicKeyHex,
448
- externalServerKeyShares
448
+ externalServerKeyShares,
449
+ externalKeySharesWithBackupStatus
449
450
  };
450
451
  } catch (error) {
451
452
  logError({
@@ -739,7 +740,7 @@ class DynamicEvmWalletClient extends node.DynamicWalletClient {
739
740
  const { accountAddress, publicKeyHex } = deriveAccountAddress({
740
741
  rawPublicKey: rawPublicKey
741
742
  });
742
- await this.storeEncryptedBackupByWalletWithRetry({
743
+ const externalKeySharesWithBackupStatus = await this.storeEncryptedBackupByWalletWithRetry({
743
744
  accountAddress,
744
745
  externalServerKeyShares,
745
746
  password,
@@ -749,7 +750,8 @@ class DynamicEvmWalletClient extends node.DynamicWalletClient {
749
750
  accountAddress,
750
751
  rawPublicKey,
751
752
  publicKeyHex,
752
- externalServerKeyShares
753
+ externalServerKeyShares,
754
+ externalKeySharesWithBackupStatus
753
755
  };
754
756
  }
755
757
  async getEvmWallets() {
package/index.esm.js CHANGED
@@ -432,7 +432,7 @@ class DynamicEvmWalletClient extends DynamicWalletClient {
432
432
  const { accountAddress, publicKeyHex } = deriveAccountAddress({
433
433
  rawPublicKey: rawPublicKey
434
434
  });
435
- await this.storeEncryptedBackupByWalletWithRetry({
435
+ const externalKeySharesWithBackupStatus = await this.storeEncryptedBackupByWalletWithRetry({
436
436
  accountAddress,
437
437
  externalServerKeyShares,
438
438
  password,
@@ -443,7 +443,8 @@ class DynamicEvmWalletClient extends DynamicWalletClient {
443
443
  accountAddress,
444
444
  rawPublicKey,
445
445
  publicKeyHex,
446
- externalServerKeyShares
446
+ externalServerKeyShares,
447
+ externalKeySharesWithBackupStatus
447
448
  };
448
449
  } catch (error) {
449
450
  logError({
@@ -737,7 +738,7 @@ class DynamicEvmWalletClient extends DynamicWalletClient {
737
738
  const { accountAddress, publicKeyHex } = deriveAccountAddress({
738
739
  rawPublicKey: rawPublicKey
739
740
  });
740
- await this.storeEncryptedBackupByWalletWithRetry({
741
+ const externalKeySharesWithBackupStatus = await this.storeEncryptedBackupByWalletWithRetry({
741
742
  accountAddress,
742
743
  externalServerKeyShares,
743
744
  password,
@@ -747,7 +748,8 @@ class DynamicEvmWalletClient extends DynamicWalletClient {
747
748
  accountAddress,
748
749
  rawPublicKey,
749
750
  publicKeyHex,
750
- externalServerKeyShares
751
+ externalServerKeyShares,
752
+ externalKeySharesWithBackupStatus
751
753
  };
752
754
  }
753
755
  async getEvmWallets() {
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@dynamic-labs-wallet/node-evm",
3
- "version": "0.0.317",
3
+ "version": "0.0.319-beta.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "dependencies": {
7
- "@dynamic-labs-wallet/node": "0.0.317",
7
+ "@dynamic-labs-wallet/node": "0.0.319-beta.1",
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,123 +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
- externalServerKeyShares: ServerKeyShare[];
39
- walletId: string;
40
- }>;
41
- signMessage({ message, accountAddress, password, externalServerKeyShares, context, onError, }: {
42
- message: string;
43
- accountAddress: string;
44
- password?: string;
45
- externalServerKeyShares?: ServerKeyShare[];
46
- context?: SignMessageContext;
47
- onError?: (error: Error) => void;
48
- }): Promise<`0x${string}`>;
49
- isSignAuthorizationSupported(): boolean;
50
- signAuthorization({ authorization, accountAddress, password, externalServerKeyShares, onError, }: {
51
- authorization: any;
52
- accountAddress: string;
53
- password?: string;
54
- externalServerKeyShares?: ServerKeyShare[];
55
- onError?: (error: Error) => void;
56
- }): Promise<{
57
- r: `0x${string}`;
58
- s: `0x${string}`;
59
- v: bigint;
60
- yParity: number;
61
- } | {
62
- r: `0x${string}`;
63
- s: `0x${string}`;
64
- yParity: number;
65
- v?: never;
66
- }>;
67
- signTypedData({ accountAddress, typedData, password, externalServerKeyShares, onError, }: {
68
- accountAddress: string;
69
- typedData: TypedData;
70
- password?: string;
71
- externalServerKeyShares?: ServerKeyShare[];
72
- onError?: (error: Error) => void;
73
- }): Promise<`0x${string}`>;
74
- verifyMessageSignature({ accountAddress, message, signature, }: {
75
- accountAddress: string;
76
- message: SignableMessage;
77
- signature: any;
78
- }): Promise<boolean>;
79
- signTransaction({ senderAddress, transaction, password, externalServerKeyShares, }: {
80
- senderAddress: string;
81
- transaction: TransactionSerializable;
82
- password?: string;
83
- externalServerKeyShares?: ServerKeyShare[];
84
- }): Promise<string>;
85
- exportPrivateKey({ accountAddress, password, externalServerKeyShares, }: {
86
- accountAddress: string;
87
- password?: string;
88
- externalServerKeyShares?: ServerKeyShare[];
89
- }): Promise<{
90
- derivedPrivateKey: string | undefined;
91
- }>;
92
- offlineExportPrivateKey({ keyShares, derivationPath, }: {
93
- keyShares: (EcdsaKeygenResult | Ed25519KeygenResult)[];
94
- derivationPath?: string;
95
- }): Promise<{
96
- derivedPrivateKey: string | undefined;
97
- }>;
98
- /**
99
- * Imports a private key and stores the key shares in the wallet map.
100
- * @param privateKey - The private key to import.
101
- * @param chainName - The chain name to use for the wallet.
102
- * @param thresholdSignatureScheme - The threshold signature scheme to use for the wallet.
103
- * @param password - The password to use for the wallet.
104
- * @param onError - The function to call if an error occurs.
105
- * @param backUpToClientShareService - Whether to back up the external server key shares to the client share service. By default, it is false.
106
- * @returns The account address, public key, raw public key, external server key shares.
107
- */
108
- importPrivateKey({ privateKey, chainName, thresholdSignatureScheme, password, backUpToClientShareService, onError, }: {
109
- privateKey: string;
110
- chainName: string;
111
- thresholdSignatureScheme: ThresholdSignatureScheme;
112
- password?: string;
113
- backUpToClientShareService?: boolean;
114
- onError?: (error: Error) => void;
115
- }): Promise<{
116
- accountAddress: string;
117
- publicKeyHex: string;
118
- rawPublicKey: EcdsaPublicKey | Uint8Array | string | undefined;
119
- externalServerKeyShares: ServerKeyShare[];
120
- }>;
121
- getEvmWallets(): Promise<import("@dynamic-labs-wallet/node").WalletProperties[]>;
122
- }
123
- //# sourceMappingURL=client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,cAAc,EAEnB,KAAK,mBAAmB,EAGxB,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAE9B,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,KAAK,EAOV,KAAK,YAAY,EAEjB,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,YAAY,EAClB,MAAM,MAAM,CAAC;AAgBd,qBAAa,sBAAuB,SAAQ,mBAAmB;IAC7D,QAAQ,CAAC,SAAS,SAAS;gBAEf,EACV,aAAa,EACb,UAAU,EACV,kBAAkB,EAClB,KAAK,EACL,oBAAoB,EACpB,MAAM,GACP,EAAE,wBAAwB;IAW3B,IAAI,YAAY,IAAI,MAAM,GAAG,SAAS,CAErC;IAED,IAAI,MAAM,IAAI,MAAM,GAAG,SAAS,CAE/B;IAED,sBAAsB,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;QAAE,KAAK,EAAE,KAAK,CAAC;QAAC,MAAM,CAAC,EAAE,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E,MAAM,CAAC;QACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,uBAAuB,CAAC,EAAE,cAAc,EAAE,CAAC;KAC5C;;;IAyBK,uBAAuB,CAAC,EAC5B,SAAS,EACT,cAAc,GACf,EAAE;QACD,SAAS,EAAE,CAAC,iBAAiB,GAAG,mBAAmB,CAAC,EAAE,CAAC;QACvD,cAAc,CAAC,EAAE,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,uBAAuB,EAAE,cAAc,EAAE,CAAC;KAC3C,CAAC;IA8DI,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,aA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AAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,cAAc,CAAC;IACzB,aAAa,EAAE,GAAG,CAAC;CACpB,KACA,OAAO,CAAC,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":"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