@dynamic-labs-wallet/node-evm 0.0.0-beta-272 → 0.0.0-beta-272.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/index.cjs.js CHANGED
@@ -53,7 +53,7 @@ class DynamicEvmWalletClient extends node.DynamicWalletClient {
53
53
  transport: viem.http(rpcUrl)
54
54
  });
55
55
  }
56
- async createWalletAccount({ thresholdSignatureScheme, password = undefined, onError, signedSessionId }) {
56
+ async createWalletAccount({ thresholdSignatureScheme, password = undefined, onError }) {
57
57
  try {
58
58
  let ceremonyCeremonyCompleteResolver;
59
59
  const ceremonyCompletePromise = new Promise((resolve)=>{
@@ -96,8 +96,7 @@ class DynamicEvmWalletClient extends node.DynamicWalletClient {
96
96
  await this.storeEncryptedBackupByWalletWithRetry({
97
97
  accountAddress,
98
98
  externalServerKeyShares,
99
- password,
100
- signedSessionId
99
+ password
101
100
  });
102
101
  return {
103
102
  accountAddress,
@@ -110,17 +109,15 @@ class DynamicEvmWalletClient extends node.DynamicWalletClient {
110
109
  throw new Error(ERROR_CREATE_WALLET_ACCOUNT);
111
110
  }
112
111
  }
113
- async signMessage({ message, accountAddress, password = undefined, signedSessionId }) {
112
+ async signMessage({ message, accountAddress, password = undefined }) {
114
113
  await this.verifyPassword({
115
114
  accountAddress,
116
115
  password,
117
- walletOperation: node.WalletOperation.SIGN_MESSAGE,
118
- signedSessionId
116
+ walletOperation: node.WalletOperation.SIGN_MESSAGE
119
117
  });
120
118
  await this.getWallet({
121
119
  accountAddress,
122
- walletOperation: node.WalletOperation.SIGN_MESSAGE,
123
- signedSessionId
120
+ walletOperation: node.WalletOperation.SIGN_MESSAGE
124
121
  });
125
122
  try {
126
123
  if (!accountAddress) {
@@ -133,8 +130,7 @@ class DynamicEvmWalletClient extends node.DynamicWalletClient {
133
130
  message: formattedMessage,
134
131
  accountAddress: accountAddress,
135
132
  chainName: this.chainName,
136
- password,
137
- signedSessionId
133
+ password
138
134
  });
139
135
  // Serialize the signature
140
136
  const serializedSignature = serializeECDSASignature(signatureEcdsa);
@@ -161,12 +157,11 @@ class DynamicEvmWalletClient extends node.DynamicWalletClient {
161
157
  throw new Error(ERROR_VERIFY_MESSAGE_SIGNATURE);
162
158
  }
163
159
  }
164
- async signTransaction({ senderAddress, transaction, password = undefined, signedSessionId }) {
160
+ async signTransaction({ senderAddress, transaction, password = undefined }) {
165
161
  await this.verifyPassword({
166
162
  accountAddress: senderAddress,
167
163
  password,
168
- walletOperation: node.WalletOperation.SIGN_TRANSACTION,
169
- signedSessionId
164
+ walletOperation: node.WalletOperation.SIGN_TRANSACTION
170
165
  });
171
166
  const serializedTx = viem.serializeTransaction(transaction);
172
167
  const serializedTxBytes = Uint8Array.from(Buffer.from(serializedTx.slice(2), 'hex'));
@@ -178,8 +173,7 @@ class DynamicEvmWalletClient extends node.DynamicWalletClient {
178
173
  message: serializedTxBytes,
179
174
  accountAddress: senderAddress,
180
175
  chainName: this.chainName,
181
- password,
182
- signedSessionId
176
+ password
183
177
  });
184
178
  if (!('r' in signatureEcdsa && 's' in signatureEcdsa && 'v' in signatureEcdsa)) {
185
179
  throw new Error('Invalid signature format returned from MPC signing');
@@ -200,18 +194,16 @@ class DynamicEvmWalletClient extends node.DynamicWalletClient {
200
194
  throw error;
201
195
  }
202
196
  }
203
- async exportPrivateKey({ accountAddress, password = undefined, signedSessionId }) {
197
+ async exportPrivateKey({ accountAddress, password = undefined }) {
204
198
  await this.verifyPassword({
205
199
  accountAddress,
206
200
  password,
207
- walletOperation: node.WalletOperation.EXPORT_PRIVATE_KEY,
208
- signedSessionId
201
+ walletOperation: node.WalletOperation.EXPORT_PRIVATE_KEY
209
202
  });
210
203
  const { derivedPrivateKey } = await this.exportKey({
211
204
  accountAddress,
212
205
  chainName: this.chainName,
213
- password,
214
- signedSessionId
206
+ password
215
207
  });
216
208
  return {
217
209
  derivedPrivateKey
@@ -227,7 +219,7 @@ class DynamicEvmWalletClient extends node.DynamicWalletClient {
227
219
  derivedPrivateKey
228
220
  };
229
221
  }
230
- async importPrivateKey({ privateKey, chainName, thresholdSignatureScheme, password = undefined, onError, signedSessionId }) {
222
+ async importPrivateKey({ privateKey, chainName, thresholdSignatureScheme, password = undefined, onError }) {
231
223
  let ceremonyCeremonyCompleteResolver;
232
224
  const ceremonyCompletePromise = new Promise((resolve)=>{
233
225
  ceremonyCeremonyCompleteResolver = resolve;
@@ -262,8 +254,7 @@ class DynamicEvmWalletClient extends node.DynamicWalletClient {
262
254
  await this.storeEncryptedBackupByWalletWithRetry({
263
255
  accountAddress,
264
256
  externalServerKeyShares,
265
- password,
266
- signedSessionId
257
+ password
267
258
  });
268
259
  return {
269
260
  accountAddress,
package/index.esm.js CHANGED
@@ -51,7 +51,7 @@ class DynamicEvmWalletClient extends DynamicWalletClient {
51
51
  transport: http(rpcUrl)
52
52
  });
53
53
  }
54
- async createWalletAccount({ thresholdSignatureScheme, password = undefined, onError, signedSessionId }) {
54
+ async createWalletAccount({ thresholdSignatureScheme, password = undefined, onError }) {
55
55
  try {
56
56
  let ceremonyCeremonyCompleteResolver;
57
57
  const ceremonyCompletePromise = new Promise((resolve)=>{
@@ -94,8 +94,7 @@ class DynamicEvmWalletClient extends DynamicWalletClient {
94
94
  await this.storeEncryptedBackupByWalletWithRetry({
95
95
  accountAddress,
96
96
  externalServerKeyShares,
97
- password,
98
- signedSessionId
97
+ password
99
98
  });
100
99
  return {
101
100
  accountAddress,
@@ -108,17 +107,15 @@ class DynamicEvmWalletClient extends DynamicWalletClient {
108
107
  throw new Error(ERROR_CREATE_WALLET_ACCOUNT);
109
108
  }
110
109
  }
111
- async signMessage({ message, accountAddress, password = undefined, signedSessionId }) {
110
+ async signMessage({ message, accountAddress, password = undefined }) {
112
111
  await this.verifyPassword({
113
112
  accountAddress,
114
113
  password,
115
- walletOperation: WalletOperation.SIGN_MESSAGE,
116
- signedSessionId
114
+ walletOperation: WalletOperation.SIGN_MESSAGE
117
115
  });
118
116
  await this.getWallet({
119
117
  accountAddress,
120
- walletOperation: WalletOperation.SIGN_MESSAGE,
121
- signedSessionId
118
+ walletOperation: WalletOperation.SIGN_MESSAGE
122
119
  });
123
120
  try {
124
121
  if (!accountAddress) {
@@ -131,8 +128,7 @@ class DynamicEvmWalletClient extends DynamicWalletClient {
131
128
  message: formattedMessage,
132
129
  accountAddress: accountAddress,
133
130
  chainName: this.chainName,
134
- password,
135
- signedSessionId
131
+ password
136
132
  });
137
133
  // Serialize the signature
138
134
  const serializedSignature = serializeECDSASignature(signatureEcdsa);
@@ -159,12 +155,11 @@ class DynamicEvmWalletClient extends DynamicWalletClient {
159
155
  throw new Error(ERROR_VERIFY_MESSAGE_SIGNATURE);
160
156
  }
161
157
  }
162
- async signTransaction({ senderAddress, transaction, password = undefined, signedSessionId }) {
158
+ async signTransaction({ senderAddress, transaction, password = undefined }) {
163
159
  await this.verifyPassword({
164
160
  accountAddress: senderAddress,
165
161
  password,
166
- walletOperation: WalletOperation.SIGN_TRANSACTION,
167
- signedSessionId
162
+ walletOperation: WalletOperation.SIGN_TRANSACTION
168
163
  });
169
164
  const serializedTx = serializeTransaction(transaction);
170
165
  const serializedTxBytes = Uint8Array.from(Buffer.from(serializedTx.slice(2), 'hex'));
@@ -176,8 +171,7 @@ class DynamicEvmWalletClient extends DynamicWalletClient {
176
171
  message: serializedTxBytes,
177
172
  accountAddress: senderAddress,
178
173
  chainName: this.chainName,
179
- password,
180
- signedSessionId
174
+ password
181
175
  });
182
176
  if (!('r' in signatureEcdsa && 's' in signatureEcdsa && 'v' in signatureEcdsa)) {
183
177
  throw new Error('Invalid signature format returned from MPC signing');
@@ -198,18 +192,16 @@ class DynamicEvmWalletClient extends DynamicWalletClient {
198
192
  throw error;
199
193
  }
200
194
  }
201
- async exportPrivateKey({ accountAddress, password = undefined, signedSessionId }) {
195
+ async exportPrivateKey({ accountAddress, password = undefined }) {
202
196
  await this.verifyPassword({
203
197
  accountAddress,
204
198
  password,
205
- walletOperation: WalletOperation.EXPORT_PRIVATE_KEY,
206
- signedSessionId
199
+ walletOperation: WalletOperation.EXPORT_PRIVATE_KEY
207
200
  });
208
201
  const { derivedPrivateKey } = await this.exportKey({
209
202
  accountAddress,
210
203
  chainName: this.chainName,
211
- password,
212
- signedSessionId
204
+ password
213
205
  });
214
206
  return {
215
207
  derivedPrivateKey
@@ -225,7 +217,7 @@ class DynamicEvmWalletClient extends DynamicWalletClient {
225
217
  derivedPrivateKey
226
218
  };
227
219
  }
228
- async importPrivateKey({ privateKey, chainName, thresholdSignatureScheme, password = undefined, onError, signedSessionId }) {
220
+ async importPrivateKey({ privateKey, chainName, thresholdSignatureScheme, password = undefined, onError }) {
229
221
  let ceremonyCeremonyCompleteResolver;
230
222
  const ceremonyCompletePromise = new Promise((resolve)=>{
231
223
  ceremonyCeremonyCompleteResolver = resolve;
@@ -260,8 +252,7 @@ class DynamicEvmWalletClient extends DynamicWalletClient {
260
252
  await this.storeEncryptedBackupByWalletWithRetry({
261
253
  accountAddress,
262
254
  externalServerKeyShares,
263
- password,
264
- signedSessionId
255
+ password
265
256
  });
266
257
  return {
267
258
  accountAddress,
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@dynamic-labs-wallet/node-evm",
3
- "version": "0.0.0-beta-272",
3
+ "version": "0.0.0-beta-272.3",
4
4
  "license": "MIT",
5
5
  "dependencies": {
6
- "@dynamic-labs-wallet/node": "0.0.0-beta-272"
6
+ "@dynamic-labs-wallet/node": "0.0.0-beta-272.3"
7
7
  },
8
8
  "publishConfig": {
9
9
  "access": "public"
@@ -7,38 +7,34 @@ export declare class DynamicEvmWalletClient extends DynamicWalletClient {
7
7
  chain: Chain;
8
8
  rpcUrl?: string;
9
9
  }): PublicClient;
10
- createWalletAccount({ thresholdSignatureScheme, password, onError, signedSessionId, }: {
10
+ createWalletAccount({ thresholdSignatureScheme, password, onError, }: {
11
11
  thresholdSignatureScheme: ThresholdSignatureScheme;
12
12
  password?: string;
13
13
  onError?: (error: Error) => void;
14
- signedSessionId: string;
15
14
  }): Promise<{
16
15
  accountAddress: string;
17
16
  publicKeyHex: string;
18
17
  rawPublicKey: EcdsaPublicKey | Uint8Array | undefined;
19
18
  externalServerKeyShares: ServerKeyShare[];
20
19
  }>;
21
- signMessage({ message, accountAddress, password, signedSessionId, }: {
20
+ signMessage({ message, accountAddress, password, }: {
22
21
  message: string;
23
22
  accountAddress: string;
24
23
  password?: string;
25
- signedSessionId: string;
26
24
  }): Promise<`0x${string}`>;
27
25
  verifyMessageSignature({ accountAddress, message, signature, }: {
28
26
  accountAddress: string;
29
27
  message: SignableMessage;
30
28
  signature: any;
31
29
  }): Promise<boolean>;
32
- signTransaction({ senderAddress, transaction, password, signedSessionId, }: {
30
+ signTransaction({ senderAddress, transaction, password, }: {
33
31
  senderAddress: string;
34
32
  transaction: TransactionSerializable;
35
33
  password?: string;
36
- signedSessionId: string;
37
34
  }): Promise<string>;
38
- exportPrivateKey({ accountAddress, password, signedSessionId, }: {
35
+ exportPrivateKey({ accountAddress, password, }: {
39
36
  accountAddress: string;
40
37
  password?: string;
41
- signedSessionId: string;
42
38
  }): Promise<{
43
39
  derivedPrivateKey: string | undefined;
44
40
  }>;
@@ -48,13 +44,12 @@ export declare class DynamicEvmWalletClient extends DynamicWalletClient {
48
44
  }): Promise<{
49
45
  derivedPrivateKey: string | undefined;
50
46
  }>;
51
- importPrivateKey({ privateKey, chainName, thresholdSignatureScheme, password, onError, signedSessionId, }: {
47
+ importPrivateKey({ privateKey, chainName, thresholdSignatureScheme, password, onError, }: {
52
48
  privateKey: string;
53
49
  chainName: string;
54
50
  thresholdSignatureScheme: ThresholdSignatureScheme;
55
51
  password?: string;
56
52
  onError?: (error: Error) => void;
57
- signedSessionId: string;
58
53
  }): Promise<{
59
54
  accountAddress: string;
60
55
  publicKeyHex: string;
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd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