@dynamic-labs-wallet/sui 0.0.248 → 0.0.250

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
@@ -82,11 +82,10 @@ class DynamicSuiWalletClient extends browser.DynamicWalletClient {
82
82
  });
83
83
  // Update client key shares in wallet map
84
84
  // warning: this might result in race condition if `onCeremonyComplete` executes at the same time
85
- await this.setClientKeySharesToStorage({
85
+ await this.setClientKeySharesToLocalStorage({
86
86
  accountAddress,
87
87
  clientKeyShares,
88
- overwriteOrMerge: 'overwrite',
89
- chainName: this.chainName
88
+ overwriteOrMerge: 'overwrite'
90
89
  });
91
90
  await this.storeEncryptedBackupByWalletWithRetry({
92
91
  accountAddress,
@@ -120,9 +119,8 @@ class DynamicSuiWalletClient extends browser.DynamicWalletClient {
120
119
  try {
121
120
  // get public key from keyshare
122
121
  // TODO: handle this more gracefully from the client key shares if possible
123
- const clientKeyShares = await this.getClientKeySharesFromStorage({
124
- accountAddress,
125
- chainName: this.chainName
122
+ const clientKeyShares = await this.getClientKeySharesFromLocalStorage({
123
+ accountAddress
126
124
  });
127
125
  const rawPublicKey = await this.getRawPublicKeyFromClientKeyShares({
128
126
  chainName: this.chainName,
@@ -347,11 +345,10 @@ class DynamicSuiWalletClient extends browser.DynamicWalletClient {
347
345
  }
348
346
  // Update client key shares in wallet map
349
347
  // warning: this might result in race condition if `onCeremonyComplete` executes at the same time
350
- await this.setClientKeySharesToStorage({
348
+ await this.setClientKeySharesToLocalStorage({
351
349
  accountAddress,
352
350
  clientKeyShares,
353
- overwriteOrMerge: 'overwrite',
354
- chainName: this.chainName
351
+ overwriteOrMerge: 'overwrite'
355
352
  });
356
353
  await this.storeEncryptedBackupByWalletWithRetry({
357
354
  accountAddress,
@@ -400,7 +397,7 @@ class DynamicSuiWalletClient extends browser.DynamicWalletClient {
400
397
  const suiWallets = wallets.filter((wallet)=>wallet.chainName === 'sui');
401
398
  return suiWallets;
402
399
  }
403
- constructor({ environmentId, authToken, backupServiceAuthToken, baseApiUrl, baseMPCRelayApiUrl, storageKey, debug, featureFlags, authMode = browser.AuthMode.HEADER, sdkVersion, forwardMPCClient }, internalOptions){
400
+ constructor({ environmentId, authToken, backupServiceAuthToken, baseApiUrl, baseMPCRelayApiUrl, storageKey, debug, featureFlags, authMode = browser.AuthMode.HEADER, sdkVersion, forwardMPCClient }){
404
401
  super({
405
402
  environmentId,
406
403
  authToken,
@@ -413,7 +410,7 @@ class DynamicSuiWalletClient extends browser.DynamicWalletClient {
413
410
  authMode,
414
411
  sdkVersion,
415
412
  forwardMPCClient
416
- }, internalOptions), this.chainName = 'SUI';
413
+ }), this.chainName = 'SUI';
417
414
  }
418
415
  }
419
416
 
package/index.esm.js CHANGED
@@ -80,11 +80,10 @@ class DynamicSuiWalletClient extends DynamicWalletClient {
80
80
  });
81
81
  // Update client key shares in wallet map
82
82
  // warning: this might result in race condition if `onCeremonyComplete` executes at the same time
83
- await this.setClientKeySharesToStorage({
83
+ await this.setClientKeySharesToLocalStorage({
84
84
  accountAddress,
85
85
  clientKeyShares,
86
- overwriteOrMerge: 'overwrite',
87
- chainName: this.chainName
86
+ overwriteOrMerge: 'overwrite'
88
87
  });
89
88
  await this.storeEncryptedBackupByWalletWithRetry({
90
89
  accountAddress,
@@ -118,9 +117,8 @@ class DynamicSuiWalletClient extends DynamicWalletClient {
118
117
  try {
119
118
  // get public key from keyshare
120
119
  // TODO: handle this more gracefully from the client key shares if possible
121
- const clientKeyShares = await this.getClientKeySharesFromStorage({
122
- accountAddress,
123
- chainName: this.chainName
120
+ const clientKeyShares = await this.getClientKeySharesFromLocalStorage({
121
+ accountAddress
124
122
  });
125
123
  const rawPublicKey = await this.getRawPublicKeyFromClientKeyShares({
126
124
  chainName: this.chainName,
@@ -345,11 +343,10 @@ class DynamicSuiWalletClient extends DynamicWalletClient {
345
343
  }
346
344
  // Update client key shares in wallet map
347
345
  // warning: this might result in race condition if `onCeremonyComplete` executes at the same time
348
- await this.setClientKeySharesToStorage({
346
+ await this.setClientKeySharesToLocalStorage({
349
347
  accountAddress,
350
348
  clientKeyShares,
351
- overwriteOrMerge: 'overwrite',
352
- chainName: this.chainName
349
+ overwriteOrMerge: 'overwrite'
353
350
  });
354
351
  await this.storeEncryptedBackupByWalletWithRetry({
355
352
  accountAddress,
@@ -398,7 +395,7 @@ class DynamicSuiWalletClient extends DynamicWalletClient {
398
395
  const suiWallets = wallets.filter((wallet)=>wallet.chainName === 'sui');
399
396
  return suiWallets;
400
397
  }
401
- constructor({ environmentId, authToken, backupServiceAuthToken, baseApiUrl, baseMPCRelayApiUrl, storageKey, debug, featureFlags, authMode = AuthMode.HEADER, sdkVersion, forwardMPCClient }, internalOptions){
398
+ constructor({ environmentId, authToken, backupServiceAuthToken, baseApiUrl, baseMPCRelayApiUrl, storageKey, debug, featureFlags, authMode = AuthMode.HEADER, sdkVersion, forwardMPCClient }){
402
399
  super({
403
400
  environmentId,
404
401
  authToken,
@@ -411,7 +408,7 @@ class DynamicSuiWalletClient extends DynamicWalletClient {
411
408
  authMode,
412
409
  sdkVersion,
413
410
  forwardMPCClient
414
- }, internalOptions), this.chainName = 'SUI';
411
+ }), this.chainName = 'SUI';
415
412
  }
416
413
  }
417
414
 
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@dynamic-labs-wallet/sui",
3
- "version": "0.0.248",
3
+ "version": "0.0.250",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "dependencies": {
7
- "@dynamic-labs-wallet/browser": "0.0.248",
7
+ "@dynamic-labs-wallet/browser": "0.0.250",
8
8
  "@mysten/sui": "1.26.0",
9
9
  "@noble/hashes": "1.7.1",
10
10
  "bech32-converting": "^1.0.9",
@@ -1,8 +1,8 @@
1
- import { DynamicWalletClient, type ClientKeyShare, type DynamicWalletClientInternalOptions, type DynamicWalletClientProps, type ThresholdSignatureScheme } from '@dynamic-labs-wallet/browser';
1
+ import { type ClientKeyShare, DynamicWalletClient, type DynamicWalletClientProps, type ThresholdSignatureScheme } from '@dynamic-labs-wallet/browser';
2
2
  import type { SignMessageContext } from '@dynamic-labs/sdk-api-core';
3
3
  export declare class DynamicSuiWalletClient extends DynamicWalletClient {
4
4
  readonly chainName = "SUI";
5
- constructor({ environmentId, authToken, backupServiceAuthToken, baseApiUrl, baseMPCRelayApiUrl, storageKey, debug, featureFlags, authMode, sdkVersion, forwardMPCClient, }: DynamicWalletClientProps, internalOptions?: DynamicWalletClientInternalOptions);
5
+ constructor({ environmentId, authToken, backupServiceAuthToken, baseApiUrl, baseMPCRelayApiUrl, storageKey, debug, featureFlags, authMode, sdkVersion, forwardMPCClient, }: DynamicWalletClientProps);
6
6
  createWalletAccount({ thresholdSignatureScheme, password, onError, signedSessionId, }: {
7
7
  thresholdSignatureScheme: ThresholdSignatureScheme;
8
8
  password?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,mBAAmB,EAWnB,KAAK,cAAc,EACnB,KAAK,kCAAkC,EACvC,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC9B,MAAM,8BAA8B,CAAC;AAWtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE,qBAAa,sBAAuB,SAAQ,mBAAmB;IAC7D,QAAQ,CAAC,SAAS,SAAS;gBAGzB,EACE,aAAa,EACb,SAAS,EACT,sBAAsB,EACtB,UAAU,EACV,kBAAkB,EAClB,UAAU,EACV,KAAK,EACL,YAAY,EACZ,QAA0B,EAC1B,UAAU,EACV,gBAAgB,GACjB,EAAE,wBAAwB,EAC3B,eAAe,CAAC,EAAE,kCAAkC;IAoBhD,mBAAmB,CAAC,EACxB,wBAAwB,EACxB,QAAoB,EACpB,OAAO,EACP,eAAe,GAChB,EAAE;QACD,wBAAwB,EAAE,wBAAwB,CAAC;QACnD,QAAQ,CAAC,EAAE,MAAM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