@dynamic-labs-wallet/node-svm 0.0.133 → 0.0.135

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
@@ -61,7 +61,7 @@ class DynamicSvmWalletClient extends node.DynamicWalletClient {
61
61
  *
62
62
  * @param thresholdSignatureScheme The threshold signature scheme to use
63
63
  * @returns The account address, public key hex, raw public key, and client key shares
64
- */ async createWalletAccount({ thresholdSignatureScheme, password = undefined, onError }) {
64
+ */ async createWalletAccount({ thresholdSignatureScheme, password = undefined, onError, backUpToClientShareService = false }) {
65
65
  try {
66
66
  let ceremonyCeremonyCompleteResolver;
67
67
  const ceremonyCompletePromise = new Promise((resolve)=>{
@@ -102,7 +102,8 @@ class DynamicSvmWalletClient extends node.DynamicWalletClient {
102
102
  await this.storeEncryptedBackupByWalletWithRetry({
103
103
  accountAddress,
104
104
  externalServerKeyShares,
105
- password
105
+ password,
106
+ backUpToClientShareService
106
107
  });
107
108
  return {
108
109
  accountAddress,
@@ -258,7 +259,7 @@ class DynamicSvmWalletClient extends node.DynamicWalletClient {
258
259
  * @param thresholdSignatureScheme The threshold signature scheme to use
259
260
  * @param password The password for encrypted backup shares
260
261
  * @returns The account address, raw public key, and client key shares
261
- */ async importPrivateKey({ privateKey, chainName, thresholdSignatureScheme, password = undefined, onError }) {
262
+ */ async importPrivateKey({ privateKey, chainName, thresholdSignatureScheme, password = undefined, onError, backUpToClientShareService = false }) {
262
263
  let ceremonyCeremonyCompleteResolver;
263
264
  const ceremonyCompletePromise = new Promise((resolve)=>{
264
265
  ceremonyCeremonyCompleteResolver = resolve;
@@ -295,7 +296,8 @@ class DynamicSvmWalletClient extends node.DynamicWalletClient {
295
296
  await this.storeEncryptedBackupByWalletWithRetry({
296
297
  accountAddress,
297
298
  externalServerKeyShares,
298
- password
299
+ password,
300
+ backUpToClientShareService
299
301
  });
300
302
  return {
301
303
  accountAddress,
package/index.esm.js CHANGED
@@ -59,7 +59,7 @@ class DynamicSvmWalletClient extends DynamicWalletClient {
59
59
  *
60
60
  * @param thresholdSignatureScheme The threshold signature scheme to use
61
61
  * @returns The account address, public key hex, raw public key, and client key shares
62
- */ async createWalletAccount({ thresholdSignatureScheme, password = undefined, onError }) {
62
+ */ async createWalletAccount({ thresholdSignatureScheme, password = undefined, onError, backUpToClientShareService = false }) {
63
63
  try {
64
64
  let ceremonyCeremonyCompleteResolver;
65
65
  const ceremonyCompletePromise = new Promise((resolve)=>{
@@ -100,7 +100,8 @@ class DynamicSvmWalletClient extends DynamicWalletClient {
100
100
  await this.storeEncryptedBackupByWalletWithRetry({
101
101
  accountAddress,
102
102
  externalServerKeyShares,
103
- password
103
+ password,
104
+ backUpToClientShareService
104
105
  });
105
106
  return {
106
107
  accountAddress,
@@ -256,7 +257,7 @@ class DynamicSvmWalletClient extends DynamicWalletClient {
256
257
  * @param thresholdSignatureScheme The threshold signature scheme to use
257
258
  * @param password The password for encrypted backup shares
258
259
  * @returns The account address, raw public key, and client key shares
259
- */ async importPrivateKey({ privateKey, chainName, thresholdSignatureScheme, password = undefined, onError }) {
260
+ */ async importPrivateKey({ privateKey, chainName, thresholdSignatureScheme, password = undefined, onError, backUpToClientShareService = false }) {
260
261
  let ceremonyCeremonyCompleteResolver;
261
262
  const ceremonyCompletePromise = new Promise((resolve)=>{
262
263
  ceremonyCeremonyCompleteResolver = resolve;
@@ -293,7 +294,8 @@ class DynamicSvmWalletClient extends DynamicWalletClient {
293
294
  await this.storeEncryptedBackupByWalletWithRetry({
294
295
  accountAddress,
295
296
  externalServerKeyShares,
296
- password
297
+ password,
298
+ backUpToClientShareService
297
299
  });
298
300
  return {
299
301
  accountAddress,
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@dynamic-labs-wallet/node-svm",
3
- "version": "0.0.133",
3
+ "version": "0.0.135",
4
4
  "license": "MIT",
5
5
  "dependencies": {
6
- "@dynamic-labs-wallet/node": "0.0.133",
6
+ "@dynamic-labs-wallet/node": "0.0.135",
7
7
  "@solana/web3.js": "^1.98.2"
8
8
  },
9
9
  "publishConfig": {
@@ -15,10 +15,11 @@ export declare class DynamicSvmWalletClient extends DynamicWalletClient {
15
15
  * @param thresholdSignatureScheme The threshold signature scheme to use
16
16
  * @returns The account address, public key hex, raw public key, and client key shares
17
17
  */
18
- createWalletAccount({ thresholdSignatureScheme, password, onError, }: {
18
+ createWalletAccount({ thresholdSignatureScheme, password, onError, backUpToClientShareService, }: {
19
19
  thresholdSignatureScheme: ThresholdSignatureScheme;
20
20
  password?: string;
21
21
  onError?: (error: Error) => void;
22
+ backUpToClientShareService?: boolean;
22
23
  }): Promise<{
23
24
  accountAddress: string;
24
25
  rawPublicKey: Uint8Array | string;
@@ -38,13 +39,13 @@ export declare class DynamicSvmWalletClient extends DynamicWalletClient {
38
39
  message: string;
39
40
  accountAddress: string;
40
41
  password?: string;
41
- externalServerKeyShares: ServerKeyShare[];
42
+ externalServerKeyShares?: ServerKeyShare[];
42
43
  }): Promise<string>;
43
44
  signTransaction({ senderAddress, transaction, password, externalServerKeyShares, }: {
44
45
  senderAddress: string;
45
46
  transaction: VersionedTransaction | Transaction;
46
47
  password?: string;
47
- externalServerKeyShares: ServerKeyShare[];
48
+ externalServerKeyShares?: ServerKeyShare[];
48
49
  }): Promise<VersionedTransaction | Transaction>;
49
50
  /**
50
51
  * Exports the private key for a given account address
@@ -56,7 +57,7 @@ export declare class DynamicSvmWalletClient extends DynamicWalletClient {
56
57
  exportPrivateKey({ accountAddress, password, externalServerKeyShares, }: {
57
58
  accountAddress: string;
58
59
  password?: string;
59
- externalServerKeyShares: ServerKeyShare[];
60
+ externalServerKeyShares?: ServerKeyShare[];
60
61
  }): Promise<string>;
61
62
  /**
62
63
  * Exports the private key for a given account address
@@ -88,12 +89,13 @@ export declare class DynamicSvmWalletClient extends DynamicWalletClient {
88
89
  * @param password The password for encrypted backup shares
89
90
  * @returns The account address, raw public key, and client key shares
90
91
  */
91
- importPrivateKey({ privateKey, chainName, thresholdSignatureScheme, password, onError, }: {
92
+ importPrivateKey({ privateKey, chainName, thresholdSignatureScheme, password, onError, backUpToClientShareService, }: {
92
93
  privateKey: string;
93
94
  chainName: string;
94
95
  thresholdSignatureScheme: ThresholdSignatureScheme;
95
96
  password?: string;
96
97
  onError?: (error: Error) => void;
98
+ backUpToClientShareService?: boolean;
97
99
  }): Promise<{
98
100
  accountAddress: string;
99
101
  rawPublicKey: Uint8Array | string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,wBAAwB,EAGzB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEL,WAAW,EACX,oBAAoB,EAErB,MAAM,iBAAiB,CAAC;AAIzB,qBAAa,sBAAuB,SAAQ,mBAAmB;IAC7D,QAAQ,CAAC,SAAS,SAAS;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;gBAEZ,EACV,aAAa,EACb,UAAU,EACV,kBAAkB,GACnB,EAAE;QACD,aAAa,EAAE,MAAM,CAAC;QACtB,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;KAC7B;IAQD;;;;;OAKG;IACG,mBAAmB,CAAC,EACxB,wBAAwB,EACxB,QAAoB,EACpB,OAAO,GACR,EAAE;QACD,wBAAwB,EAAE,wBAAwB,CAAC;QACnD,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;KAClC,GAAG,OAAO,CAAC;QACV,cAAc,EAAE,MAAM,CAAC;QACvB,YAAY,EAAE,UAAU,GAAG,MAAM,CAAC;QAClC,uBAAuB,EAAE,cAAc,EAAE,CAAC;KAC3C,CAAC;IAqEI,oBAAoB,CAAC,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