@dynamic-labs-wallet/evm 0.0.69 → 0.0.71

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
@@ -92,8 +92,6 @@ class DynamicEvmWalletClient extends browser.DynamicWalletClient {
92
92
  rawPublicKey: rawPublicKey
93
93
  });
94
94
  // Update client key shares in wallet map
95
- // warning: this might result in race condition if `onCeremonyComplete` executes at the same time
96
- // TODO: remove this once iframe handling for secret shares is implemented
97
95
  await this.setClientKeySharesToLocalStorage({
98
96
  accountAddress,
99
97
  clientKeyShares,
@@ -108,8 +106,7 @@ class DynamicEvmWalletClient extends browser.DynamicWalletClient {
108
106
  return {
109
107
  accountAddress,
110
108
  rawPublicKey,
111
- publicKeyHex,
112
- clientKeyShares
109
+ publicKeyHex
113
110
  };
114
111
  } catch (error) {
115
112
  this.logger.error(ERROR_CREATE_WALLET_ACCOUNT, error);
@@ -209,7 +206,7 @@ class DynamicEvmWalletClient extends browser.DynamicWalletClient {
209
206
  publicKeyHex
210
207
  };
211
208
  }
212
- async exportPrivateKey({ accountAddress, displayContainer, password = undefined }) {
209
+ async exportPrivateKey({ accountAddress, password = undefined }) {
213
210
  await this.verifyPassword({
214
211
  accountAddress,
215
212
  password,
@@ -220,11 +217,7 @@ class DynamicEvmWalletClient extends browser.DynamicWalletClient {
220
217
  chainName: this.chainName,
221
218
  password
222
219
  });
223
- // Display the private key in the container via iframe
224
- const { iframeDisplay } = await this.initializeIframeDisplayForContainer({
225
- container: displayContainer
226
- });
227
- iframeDisplay.displayPrivateKey(derivedPrivateKey);
220
+ return derivedPrivateKey;
228
221
  }
229
222
  async offlineExportPrivateKey({ keyShares, derivationPath }) {
230
223
  const { derivedPrivateKey } = await this.offlineExportKey({
@@ -263,8 +256,6 @@ class DynamicEvmWalletClient extends browser.DynamicWalletClient {
263
256
  rawPublicKey: rawPublicKey
264
257
  });
265
258
  // Update client key shares in wallet map
266
- // warning: this might result in race condition if `onCeremonyComplete` executes at the same time
267
- // TODO: remove this once iframe handling for secret shares is implemented
268
259
  await this.setClientKeySharesToLocalStorage({
269
260
  accountAddress,
270
261
  clientKeyShares,
@@ -279,8 +270,7 @@ class DynamicEvmWalletClient extends browser.DynamicWalletClient {
279
270
  return {
280
271
  accountAddress,
281
272
  rawPublicKey,
282
- publicKeyHex,
283
- clientKeyShares
273
+ publicKeyHex
284
274
  };
285
275
  }
286
276
  async getEvmWallets() {
package/index.esm.js CHANGED
@@ -90,8 +90,6 @@ class DynamicEvmWalletClient extends DynamicWalletClient {
90
90
  rawPublicKey: rawPublicKey
91
91
  });
92
92
  // Update client key shares in wallet map
93
- // warning: this might result in race condition if `onCeremonyComplete` executes at the same time
94
- // TODO: remove this once iframe handling for secret shares is implemented
95
93
  await this.setClientKeySharesToLocalStorage({
96
94
  accountAddress,
97
95
  clientKeyShares,
@@ -106,8 +104,7 @@ class DynamicEvmWalletClient extends DynamicWalletClient {
106
104
  return {
107
105
  accountAddress,
108
106
  rawPublicKey,
109
- publicKeyHex,
110
- clientKeyShares
107
+ publicKeyHex
111
108
  };
112
109
  } catch (error) {
113
110
  this.logger.error(ERROR_CREATE_WALLET_ACCOUNT, error);
@@ -207,7 +204,7 @@ class DynamicEvmWalletClient extends DynamicWalletClient {
207
204
  publicKeyHex
208
205
  };
209
206
  }
210
- async exportPrivateKey({ accountAddress, displayContainer, password = undefined }) {
207
+ async exportPrivateKey({ accountAddress, password = undefined }) {
211
208
  await this.verifyPassword({
212
209
  accountAddress,
213
210
  password,
@@ -218,11 +215,7 @@ class DynamicEvmWalletClient extends DynamicWalletClient {
218
215
  chainName: this.chainName,
219
216
  password
220
217
  });
221
- // Display the private key in the container via iframe
222
- const { iframeDisplay } = await this.initializeIframeDisplayForContainer({
223
- container: displayContainer
224
- });
225
- iframeDisplay.displayPrivateKey(derivedPrivateKey);
218
+ return derivedPrivateKey;
226
219
  }
227
220
  async offlineExportPrivateKey({ keyShares, derivationPath }) {
228
221
  const { derivedPrivateKey } = await this.offlineExportKey({
@@ -261,8 +254,6 @@ class DynamicEvmWalletClient extends DynamicWalletClient {
261
254
  rawPublicKey: rawPublicKey
262
255
  });
263
256
  // Update client key shares in wallet map
264
- // warning: this might result in race condition if `onCeremonyComplete` executes at the same time
265
- // TODO: remove this once iframe handling for secret shares is implemented
266
257
  await this.setClientKeySharesToLocalStorage({
267
258
  accountAddress,
268
259
  clientKeyShares,
@@ -277,8 +268,7 @@ class DynamicEvmWalletClient extends DynamicWalletClient {
277
268
  return {
278
269
  accountAddress,
279
270
  rawPublicKey,
280
- publicKeyHex,
281
- clientKeyShares
271
+ publicKeyHex
282
272
  };
283
273
  }
284
274
  async getEvmWallets() {
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@dynamic-labs-wallet/evm",
3
- "version": "0.0.69",
3
+ "version": "0.0.71",
4
4
  "license": "MIT",
5
5
  "dependencies": {
6
- "@dynamic-labs-wallet/browser": "0.0.69"
6
+ "@dynamic-labs-wallet/browser": "0.0.71"
7
7
  },
8
8
  "peerDependencies": {
9
9
  "viem": "^2.22.1"
@@ -1,4 +1,4 @@
1
- import { ClientKeyShare, DynamicWalletClient, EcdsaKeygenResult, EcdsaPublicKey, Ed25519KeygenResult, ThresholdSignatureScheme, DynamicWalletClientProps } from '@dynamic-labs-wallet/browser';
1
+ import { DynamicWalletClient, EcdsaKeygenResult, EcdsaPublicKey, Ed25519KeygenResult, ThresholdSignatureScheme, DynamicWalletClientProps } from '@dynamic-labs-wallet/browser';
2
2
  import { type PublicClient, type Chain, type SignableMessage, type TransactionSerializable } from 'viem';
3
3
  export declare class DynamicEvmWalletClient extends DynamicWalletClient {
4
4
  readonly chainName = "EVM";
@@ -15,7 +15,6 @@ export declare class DynamicEvmWalletClient extends DynamicWalletClient {
15
15
  accountAddress: string;
16
16
  publicKeyHex: string;
17
17
  rawPublicKey: EcdsaPublicKey | Uint8Array | string | undefined;
18
- clientKeyShares: ClientKeyShare[];
19
18
  }>;
20
19
  signMessage({ message, accountAddress, password, }: {
21
20
  message: string;
@@ -38,11 +37,10 @@ export declare class DynamicEvmWalletClient extends DynamicWalletClient {
38
37
  accountAddress: `0x${string}`;
39
38
  publicKeyHex: any;
40
39
  };
41
- exportPrivateKey({ accountAddress, displayContainer, password, }: {
40
+ exportPrivateKey({ accountAddress, password, }: {
42
41
  accountAddress: string;
43
- displayContainer: HTMLElement;
44
42
  password?: string;
45
- }): Promise<void>;
43
+ }): Promise<string | undefined>;
46
44
  offlineExportPrivateKey({ keyShares, derivationPath, }: {
47
45
  keyShares: (EcdsaKeygenResult | Ed25519KeygenResult)[];
48
46
  derivationPath?: string;
@@ -59,7 +57,6 @@ export declare class DynamicEvmWalletClient extends DynamicWalletClient {
59
57
  accountAddress: string;
60
58
  publicKeyHex: string;
61
59
  rawPublicKey: EcdsaPublicKey | Uint8Array | string | undefined;
62
- clientKeyShares: ClientKeyShare[];
63
60
  }>;
64
61
  getEvmWallets(): Promise<any>;
65
62
  }
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EAEd,mBAAmB,EACnB,wBAAwB,EACxB,wBAAwB,EAIzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,KAAK,EAEV,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAE7B,MAAM,MAAM,CAAC;AAYd,qBAAa,sBAAuB,SAAQ,mBAAmB;IAC7D,QAAQ,CAAC,SAAS,SAAS;gBAEf,EACV,aAAa,EACb,SAAS,EACT,UAAU,EACV,kBAAkB,EAClB,UAAU,EACV,KAAK,GACN,EAAE,wBAAwB;IAW3B,sBAAsB,CAAC,EACrB,KAAK,EACL,MAAM,GACP,EAAE;QACD,KAAK,EAAE,KAAK,CAAC;QACb,MAAM,CAAC,EAAE,MAAM,CA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