@dynamic-labs-wallet/node-svm 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
@@ -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, signedSessionId }) {
64
+ */ async createWalletAccount({ thresholdSignatureScheme, password = undefined, onError }) {
65
65
  try {
66
66
  let ceremonyCeremonyCompleteResolver;
67
67
  const ceremonyCompletePromise = new Promise((resolve)=>{
@@ -102,8 +102,7 @@ class DynamicSvmWalletClient extends node.DynamicWalletClient {
102
102
  await this.storeEncryptedBackupByWalletWithRetry({
103
103
  accountAddress,
104
104
  externalServerKeyShares,
105
- password,
106
- signedSessionId
105
+ password
107
106
  });
108
107
  return {
109
108
  accountAddress,
@@ -130,12 +129,11 @@ class DynamicSvmWalletClient extends node.DynamicWalletClient {
130
129
  * @param message The message to sign (Uint8Array)
131
130
  * @param accountAddress Solana address (base58 encoded)
132
131
  * @param password The password for encrypted backup shares
133
- */ async signMessage({ message, accountAddress, password = undefined, signedSessionId }) {
132
+ */ async signMessage({ message, accountAddress, password = undefined }) {
134
133
  await this.verifyPassword({
135
134
  accountAddress,
136
135
  password,
137
- walletOperation: node.WalletOperation.SIGN_MESSAGE,
138
- signedSessionId
136
+ walletOperation: node.WalletOperation.SIGN_MESSAGE
139
137
  });
140
138
  if (!accountAddress) {
141
139
  throw new Error('Account address is required');
@@ -145,8 +143,7 @@ class DynamicSvmWalletClient extends node.DynamicWalletClient {
145
143
  message,
146
144
  accountAddress: accountAddress,
147
145
  chainName: this.chainName,
148
- password,
149
- signedSessionId
146
+ password
150
147
  });
151
148
  const base58Signature = new web3_js.PublicKey(signatureEd25519).toBase58();
152
149
  return base58Signature;
@@ -155,12 +152,11 @@ class DynamicSvmWalletClient extends node.DynamicWalletClient {
155
152
  throw error;
156
153
  }
157
154
  }
158
- async signTransaction({ senderAddress, transaction, password = undefined, signedSessionId }) {
155
+ async signTransaction({ senderAddress, transaction, password = undefined }) {
159
156
  await this.verifyPassword({
160
157
  accountAddress: senderAddress,
161
158
  password,
162
- walletOperation: node.WalletOperation.SIGN_TRANSACTION,
163
- signedSessionId
159
+ walletOperation: node.WalletOperation.SIGN_TRANSACTION
164
160
  });
165
161
  try {
166
162
  let messageToSign;
@@ -177,8 +173,7 @@ class DynamicSvmWalletClient extends node.DynamicWalletClient {
177
173
  message: messageToSign,
178
174
  accountAddress: senderAddress,
179
175
  chainName: this.chainName,
180
- password,
181
- signedSessionId
176
+ password
182
177
  });
183
178
  if (!signatureEd25519) {
184
179
  throw new Error('Signature is undefined');
@@ -204,12 +199,11 @@ class DynamicSvmWalletClient extends node.DynamicWalletClient {
204
199
  * @param accountAddress The account address to export the private key for
205
200
  * @param password The password for encrypted backup shares
206
201
  * @returns The private key
207
- */ async exportPrivateKey({ accountAddress, password = undefined, signedSessionId }) {
202
+ */ async exportPrivateKey({ accountAddress, password = undefined }) {
208
203
  const { derivedPrivateKey } = await this.exportKey({
209
204
  accountAddress,
210
205
  chainName: this.chainName,
211
- password,
212
- signedSessionId
206
+ password
213
207
  });
214
208
  if (!derivedPrivateKey) {
215
209
  throw new Error('Derived private key is undefined');
@@ -263,7 +257,7 @@ class DynamicSvmWalletClient extends node.DynamicWalletClient {
263
257
  * @param thresholdSignatureScheme The threshold signature scheme to use
264
258
  * @param password The password for encrypted backup shares
265
259
  * @returns The account address, raw public key, and client key shares
266
- */ async importPrivateKey({ privateKey, chainName, thresholdSignatureScheme, password = undefined, onError, signedSessionId }) {
260
+ */ async importPrivateKey({ privateKey, chainName, thresholdSignatureScheme, password = undefined, onError }) {
267
261
  let ceremonyCeremonyCompleteResolver;
268
262
  const ceremonyCompletePromise = new Promise((resolve)=>{
269
263
  ceremonyCeremonyCompleteResolver = resolve;
@@ -300,8 +294,7 @@ class DynamicSvmWalletClient extends node.DynamicWalletClient {
300
294
  await this.storeEncryptedBackupByWalletWithRetry({
301
295
  accountAddress,
302
296
  externalServerKeyShares,
303
- password,
304
- signedSessionId
297
+ password
305
298
  });
306
299
  return {
307
300
  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, signedSessionId }) {
62
+ */ async createWalletAccount({ thresholdSignatureScheme, password = undefined, onError }) {
63
63
  try {
64
64
  let ceremonyCeremonyCompleteResolver;
65
65
  const ceremonyCompletePromise = new Promise((resolve)=>{
@@ -100,8 +100,7 @@ class DynamicSvmWalletClient extends DynamicWalletClient {
100
100
  await this.storeEncryptedBackupByWalletWithRetry({
101
101
  accountAddress,
102
102
  externalServerKeyShares,
103
- password,
104
- signedSessionId
103
+ password
105
104
  });
106
105
  return {
107
106
  accountAddress,
@@ -128,12 +127,11 @@ class DynamicSvmWalletClient extends DynamicWalletClient {
128
127
  * @param message The message to sign (Uint8Array)
129
128
  * @param accountAddress Solana address (base58 encoded)
130
129
  * @param password The password for encrypted backup shares
131
- */ async signMessage({ message, accountAddress, password = undefined, signedSessionId }) {
130
+ */ async signMessage({ message, accountAddress, password = undefined }) {
132
131
  await this.verifyPassword({
133
132
  accountAddress,
134
133
  password,
135
- walletOperation: WalletOperation.SIGN_MESSAGE,
136
- signedSessionId
134
+ walletOperation: WalletOperation.SIGN_MESSAGE
137
135
  });
138
136
  if (!accountAddress) {
139
137
  throw new Error('Account address is required');
@@ -143,8 +141,7 @@ class DynamicSvmWalletClient extends DynamicWalletClient {
143
141
  message,
144
142
  accountAddress: accountAddress,
145
143
  chainName: this.chainName,
146
- password,
147
- signedSessionId
144
+ password
148
145
  });
149
146
  const base58Signature = new PublicKey(signatureEd25519).toBase58();
150
147
  return base58Signature;
@@ -153,12 +150,11 @@ class DynamicSvmWalletClient extends DynamicWalletClient {
153
150
  throw error;
154
151
  }
155
152
  }
156
- async signTransaction({ senderAddress, transaction, password = undefined, signedSessionId }) {
153
+ async signTransaction({ senderAddress, transaction, password = undefined }) {
157
154
  await this.verifyPassword({
158
155
  accountAddress: senderAddress,
159
156
  password,
160
- walletOperation: WalletOperation.SIGN_TRANSACTION,
161
- signedSessionId
157
+ walletOperation: WalletOperation.SIGN_TRANSACTION
162
158
  });
163
159
  try {
164
160
  let messageToSign;
@@ -175,8 +171,7 @@ class DynamicSvmWalletClient extends DynamicWalletClient {
175
171
  message: messageToSign,
176
172
  accountAddress: senderAddress,
177
173
  chainName: this.chainName,
178
- password,
179
- signedSessionId
174
+ password
180
175
  });
181
176
  if (!signatureEd25519) {
182
177
  throw new Error('Signature is undefined');
@@ -202,12 +197,11 @@ class DynamicSvmWalletClient extends DynamicWalletClient {
202
197
  * @param accountAddress The account address to export the private key for
203
198
  * @param password The password for encrypted backup shares
204
199
  * @returns The private key
205
- */ async exportPrivateKey({ accountAddress, password = undefined, signedSessionId }) {
200
+ */ async exportPrivateKey({ accountAddress, password = undefined }) {
206
201
  const { derivedPrivateKey } = await this.exportKey({
207
202
  accountAddress,
208
203
  chainName: this.chainName,
209
- password,
210
- signedSessionId
204
+ password
211
205
  });
212
206
  if (!derivedPrivateKey) {
213
207
  throw new Error('Derived private key is undefined');
@@ -261,7 +255,7 @@ class DynamicSvmWalletClient extends DynamicWalletClient {
261
255
  * @param thresholdSignatureScheme The threshold signature scheme to use
262
256
  * @param password The password for encrypted backup shares
263
257
  * @returns The account address, raw public key, and client key shares
264
- */ async importPrivateKey({ privateKey, chainName, thresholdSignatureScheme, password = undefined, onError, signedSessionId }) {
258
+ */ async importPrivateKey({ privateKey, chainName, thresholdSignatureScheme, password = undefined, onError }) {
265
259
  let ceremonyCeremonyCompleteResolver;
266
260
  const ceremonyCompletePromise = new Promise((resolve)=>{
267
261
  ceremonyCeremonyCompleteResolver = resolve;
@@ -298,8 +292,7 @@ class DynamicSvmWalletClient extends DynamicWalletClient {
298
292
  await this.storeEncryptedBackupByWalletWithRetry({
299
293
  accountAddress,
300
294
  externalServerKeyShares,
301
- password,
302
- signedSessionId
295
+ password
303
296
  });
304
297
  return {
305
298
  accountAddress,
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@dynamic-labs-wallet/node-svm",
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
  "@solana/web3.js": "^1.98.2"
8
8
  },
9
9
  "publishConfig": {
@@ -15,11 +15,10 @@ 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, signedSessionId, }: {
18
+ createWalletAccount({ thresholdSignatureScheme, password, onError, }: {
19
19
  thresholdSignatureScheme: ThresholdSignatureScheme;
20
20
  password?: string;
21
21
  onError?: (error: Error) => void;
22
- signedSessionId: string;
23
22
  }): Promise<{
24
23
  accountAddress: string;
25
24
  rawPublicKey: Uint8Array;
@@ -35,17 +34,15 @@ export declare class DynamicSvmWalletClient extends DynamicWalletClient {
35
34
  * @param accountAddress Solana address (base58 encoded)
36
35
  * @param password The password for encrypted backup shares
37
36
  */
38
- signMessage({ message, accountAddress, password, signedSessionId, }: {
37
+ signMessage({ message, accountAddress, password, }: {
39
38
  message: string;
40
39
  accountAddress: string;
41
40
  password?: string;
42
- signedSessionId: string;
43
41
  }): Promise<string>;
44
- signTransaction({ senderAddress, transaction, password, signedSessionId, }: {
42
+ signTransaction({ senderAddress, transaction, password, }: {
45
43
  senderAddress: string;
46
44
  transaction: VersionedTransaction | Transaction;
47
45
  password?: string;
48
- signedSessionId: string;
49
46
  }): Promise<VersionedTransaction | Transaction>;
50
47
  /**
51
48
  * Exports the private key for a given account address
@@ -54,10 +51,9 @@ export declare class DynamicSvmWalletClient extends DynamicWalletClient {
54
51
  * @param password The password for encrypted backup shares
55
52
  * @returns The private key
56
53
  */
57
- exportPrivateKey({ accountAddress, password, signedSessionId, }: {
54
+ exportPrivateKey({ accountAddress, password, }: {
58
55
  accountAddress: string;
59
56
  password?: string;
60
- signedSessionId: string;
61
57
  }): Promise<{
62
58
  derivedPrivateKey: string;
63
59
  }>;
@@ -91,13 +87,12 @@ export declare class DynamicSvmWalletClient extends DynamicWalletClient {
91
87
  * @param password The password for encrypted backup shares
92
88
  * @returns The account address, raw public key, and client key shares
93
89
  */
94
- importPrivateKey({ privateKey, chainName, thresholdSignatureScheme, password, onError, signedSessionId, }: {
90
+ importPrivateKey({ privateKey, chainName, thresholdSignatureScheme, password, onError, }: {
95
91
  privateKey: string;
96
92
  chainName: string;
97
93
  thresholdSignatureScheme: ThresholdSignatureScheme;
98
94
  password?: string;
99
95
  onError?: (error: Error) => void;
100
- signedSessionId: string;
101
96
  }): Promise<{
102
97
  accountAddress: string;
103
98
  rawPublicKey: Uint8Array | 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,E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