@dynamic-labs/waas-svm 4.22.2 → 4.22.4
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/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.22.4](https://github.com/dynamic-labs/dynamic-auth/compare/v4.22.3...v4.22.4) (2025-07-08)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* intialize waas wallet client in react sdk ([#9125](https://github.com/dynamic-labs/dynamic-auth/issues/9125)) ([c59a3d6](https://github.com/dynamic-labs/dynamic-auth/commit/c59a3d6aeeb3cc001949354a218f1fafc08bd448))
|
|
8
|
+
|
|
9
|
+
### [4.22.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.22.2...v4.22.3) (2025-07-08)
|
|
10
|
+
|
|
2
11
|
### [4.22.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.22.1...v4.22.2) (2025-07-08)
|
|
3
12
|
|
|
4
13
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/waas-svm",
|
|
3
|
-
"version": "4.22.
|
|
3
|
+
"version": "4.22.4",
|
|
4
4
|
"description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",
|
|
5
5
|
"author": "Dynamic Labs, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
"@solana/web3.js": "1.98.1",
|
|
22
22
|
"eventemitter3": "5.0.1",
|
|
23
23
|
"bs58": "5.0.0",
|
|
24
|
-
"@dynamic-labs/assert-package-version": "4.22.
|
|
25
|
-
"@dynamic-labs/logger": "4.22.
|
|
26
|
-
"@dynamic-labs/rpc-providers": "4.22.
|
|
27
|
-
"@dynamic-labs/solana-core": "4.22.
|
|
28
|
-
"@dynamic-labs/types": "4.22.
|
|
29
|
-
"@dynamic-labs/utils": "4.22.
|
|
30
|
-
"@dynamic-labs/waas": "4.22.
|
|
31
|
-
"@dynamic-labs/wallet-connector-core": "4.22.
|
|
24
|
+
"@dynamic-labs/assert-package-version": "4.22.4",
|
|
25
|
+
"@dynamic-labs/logger": "4.22.4",
|
|
26
|
+
"@dynamic-labs/rpc-providers": "4.22.4",
|
|
27
|
+
"@dynamic-labs/solana-core": "4.22.4",
|
|
28
|
+
"@dynamic-labs/types": "4.22.4",
|
|
29
|
+
"@dynamic-labs/utils": "4.22.4",
|
|
30
|
+
"@dynamic-labs/waas": "4.22.4",
|
|
31
|
+
"@dynamic-labs/wallet-connector-core": "4.22.4"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {}
|
|
34
34
|
}
|
|
@@ -45,7 +45,7 @@ class DynamicWaasSVMConnector extends waas.withDynamicWaas(solanaCore.SolanaWall
|
|
|
45
45
|
validateActiveWallet(expectedAddress) {
|
|
46
46
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
47
47
|
var _a, _b;
|
|
48
|
-
const walletClient = this.getWaasWalletClient();
|
|
48
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
49
49
|
const signedSessionId = yield ((_a = this.getSignedSessionId) === null || _a === void 0 ? void 0 : _a.call(this));
|
|
50
50
|
const targetWallet = yield walletClient.getWallet({
|
|
51
51
|
accountAddress: expectedAddress,
|
|
@@ -64,7 +64,7 @@ class DynamicWaasSVMConnector extends waas.withDynamicWaas(solanaCore.SolanaWall
|
|
|
64
64
|
createWalletAccount() {
|
|
65
65
|
return _tslib.__awaiter(this, arguments, void 0, function* ({ thresholdSignatureScheme = 'TWO_OF_TWO', } = {}) {
|
|
66
66
|
var _a, _b;
|
|
67
|
-
const walletClient = this.getWaasWalletClient();
|
|
67
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
68
68
|
const signedSessionId = yield ((_a = this.getSignedSessionId) === null || _a === void 0 ? void 0 : _a.call(this));
|
|
69
69
|
const createdWallet = yield walletClient.createWalletAccount({
|
|
70
70
|
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
@@ -77,7 +77,7 @@ class DynamicWaasSVMConnector extends waas.withDynamicWaas(solanaCore.SolanaWall
|
|
|
77
77
|
internalSignMessage(message) {
|
|
78
78
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
79
79
|
var _a, _b;
|
|
80
|
-
const walletClient = this.getWaasWalletClient();
|
|
80
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
81
81
|
if (!this.activeAccountAddress) {
|
|
82
82
|
throw new Error('Active account address is required');
|
|
83
83
|
}
|
|
@@ -106,7 +106,7 @@ class DynamicWaasSVMConnector extends waas.withDynamicWaas(solanaCore.SolanaWall
|
|
|
106
106
|
internalSignTransaction(transaction) {
|
|
107
107
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
108
108
|
var _a, _b;
|
|
109
|
-
const walletClient = this.getWaasWalletClient();
|
|
109
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
110
110
|
const signedSessionId = yield ((_a = this.getSignedSessionId) === null || _a === void 0 ? void 0 : _a.call(this));
|
|
111
111
|
if (!this.activeAccountAddress) {
|
|
112
112
|
throw new Error('Active account address is required');
|
|
@@ -231,7 +231,7 @@ class DynamicWaasSVMConnector extends waas.withDynamicWaas(solanaCore.SolanaWall
|
|
|
231
231
|
exportPrivateKey() {
|
|
232
232
|
return _tslib.__awaiter(this, arguments, void 0, function* ({ accountAddress, displayContainer, password, } = {}) {
|
|
233
233
|
var _a;
|
|
234
|
-
const walletClient = this.getWaasWalletClient();
|
|
234
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
235
235
|
const targetAccountAddress = accountAddress || this.activeAccountAddress;
|
|
236
236
|
if (!targetAccountAddress) {
|
|
237
237
|
throw new Error('Account address is required');
|
|
@@ -254,7 +254,7 @@ class DynamicWaasSVMConnector extends waas.withDynamicWaas(solanaCore.SolanaWall
|
|
|
254
254
|
importPrivateKey(_a) {
|
|
255
255
|
return _tslib.__awaiter(this, arguments, void 0, function* ({ privateKey, thresholdSignatureScheme = 'TWO_OF_TWO', }) {
|
|
256
256
|
var _b, _c;
|
|
257
|
-
const walletClient = this.getWaasWalletClient();
|
|
257
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
258
258
|
const signedSessionId = yield ((_b = this.getSignedSessionId) === null || _b === void 0 ? void 0 : _b.call(this));
|
|
259
259
|
if (!signedSessionId) {
|
|
260
260
|
throw new Error('Signed session ID is required');
|
|
@@ -272,7 +272,7 @@ class DynamicWaasSVMConnector extends waas.withDynamicWaas(solanaCore.SolanaWall
|
|
|
272
272
|
if (!accountAddress) {
|
|
273
273
|
throw new Error('Account address is required');
|
|
274
274
|
}
|
|
275
|
-
const walletClient = this.getWaasWalletClient();
|
|
275
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
276
276
|
return walletClient.backupKeySharesToGoogleDrive({
|
|
277
277
|
accountAddress,
|
|
278
278
|
password,
|
|
@@ -284,7 +284,7 @@ class DynamicWaasSVMConnector extends waas.withDynamicWaas(solanaCore.SolanaWall
|
|
|
284
284
|
if (!accountAddress) {
|
|
285
285
|
throw new Error('Account address is required');
|
|
286
286
|
}
|
|
287
|
-
const walletClient = this.getWaasWalletClient();
|
|
287
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
288
288
|
return walletClient.refreshWalletAccountShares({
|
|
289
289
|
accountAddress,
|
|
290
290
|
password,
|
|
@@ -296,7 +296,7 @@ class DynamicWaasSVMConnector extends waas.withDynamicWaas(solanaCore.SolanaWall
|
|
|
296
296
|
if (!accountAddress) {
|
|
297
297
|
throw new Error('Account address is required');
|
|
298
298
|
}
|
|
299
|
-
const walletClient = this.getWaasWalletClient();
|
|
299
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
300
300
|
return walletClient.updatePassword({
|
|
301
301
|
accountAddress,
|
|
302
302
|
existingPassword,
|
|
@@ -312,7 +312,7 @@ class DynamicWaasSVMConnector extends waas.withDynamicWaas(solanaCore.SolanaWall
|
|
|
312
312
|
if (message.length !== 64) {
|
|
313
313
|
throw new Error('Message must be 64 characters long');
|
|
314
314
|
}
|
|
315
|
-
const walletClient = this.getWaasWalletClient();
|
|
315
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
316
316
|
return walletClient.signRawMessage({
|
|
317
317
|
accountAddress,
|
|
318
318
|
message,
|
|
@@ -322,7 +322,7 @@ class DynamicWaasSVMConnector extends waas.withDynamicWaas(solanaCore.SolanaWall
|
|
|
322
322
|
exportClientKeyshares(_a) {
|
|
323
323
|
return _tslib.__awaiter(this, arguments, void 0, function* ({ accountAddress, password, }) {
|
|
324
324
|
var _b, _c;
|
|
325
|
-
const walletClient = this.getWaasWalletClient();
|
|
325
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
326
326
|
const targetAccountAddress = accountAddress || this.activeAccountAddress;
|
|
327
327
|
const signedSessionId = yield ((_b = this.getSignedSessionId) === null || _b === void 0 ? void 0 : _b.call(this));
|
|
328
328
|
if (!targetAccountAddress) {
|
|
@@ -356,7 +356,7 @@ class DynamicWaasSVMConnector extends waas.withDynamicWaas(solanaCore.SolanaWall
|
|
|
356
356
|
}
|
|
357
357
|
endSession() {
|
|
358
358
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
359
|
-
const waasSvmClient = this.getWaasWalletClient();
|
|
359
|
+
const waasSvmClient = yield this.getWaasWalletClient();
|
|
360
360
|
if (!waasSvmClient) {
|
|
361
361
|
return;
|
|
362
362
|
}
|
|
@@ -22,8 +22,8 @@ declare const DynamicWaasSVMConnector_base: (abstract new (...args: any[]) => {
|
|
|
22
22
|
setBaseApiUrl(baseApiUrl: string): void;
|
|
23
23
|
setRelayUrl(relayUrl: string): void;
|
|
24
24
|
setGetSignedSessionIdFunction(getSignedSessionId: () => Promise<string>): void;
|
|
25
|
-
createDynamicWaasClient(): import("@dynamic-labs-wallet/browser-wallet-client").DynamicWalletClient
|
|
26
|
-
getWaasWalletClient(): import("@dynamic-labs-wallet/browser-wallet-client").DynamicWalletClient
|
|
25
|
+
createDynamicWaasClient(): Promise<import("@dynamic-labs-wallet/browser-wallet-client").DynamicWalletClient>;
|
|
26
|
+
getWaasWalletClient(): Promise<import("@dynamic-labs-wallet/browser-wallet-client").DynamicWalletClient>;
|
|
27
27
|
}) & typeof SolanaWalletConnector;
|
|
28
28
|
export declare class DynamicWaasSVMConnector extends DynamicWaasSVMConnector_base implements IDynamicWaasConnector {
|
|
29
29
|
connect(): Promise<void>;
|
|
@@ -41,7 +41,7 @@ class DynamicWaasSVMConnector extends withDynamicWaas(SolanaWalletConnector) {
|
|
|
41
41
|
validateActiveWallet(expectedAddress) {
|
|
42
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43
43
|
var _a, _b;
|
|
44
|
-
const walletClient = this.getWaasWalletClient();
|
|
44
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
45
45
|
const signedSessionId = yield ((_a = this.getSignedSessionId) === null || _a === void 0 ? void 0 : _a.call(this));
|
|
46
46
|
const targetWallet = yield walletClient.getWallet({
|
|
47
47
|
accountAddress: expectedAddress,
|
|
@@ -60,7 +60,7 @@ class DynamicWaasSVMConnector extends withDynamicWaas(SolanaWalletConnector) {
|
|
|
60
60
|
createWalletAccount() {
|
|
61
61
|
return __awaiter(this, arguments, void 0, function* ({ thresholdSignatureScheme = 'TWO_OF_TWO', } = {}) {
|
|
62
62
|
var _a, _b;
|
|
63
|
-
const walletClient = this.getWaasWalletClient();
|
|
63
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
64
64
|
const signedSessionId = yield ((_a = this.getSignedSessionId) === null || _a === void 0 ? void 0 : _a.call(this));
|
|
65
65
|
const createdWallet = yield walletClient.createWalletAccount({
|
|
66
66
|
authToken: (_b = this.getAuthToken) === null || _b === void 0 ? void 0 : _b.call(this),
|
|
@@ -73,7 +73,7 @@ class DynamicWaasSVMConnector extends withDynamicWaas(SolanaWalletConnector) {
|
|
|
73
73
|
internalSignMessage(message) {
|
|
74
74
|
return __awaiter(this, void 0, void 0, function* () {
|
|
75
75
|
var _a, _b;
|
|
76
|
-
const walletClient = this.getWaasWalletClient();
|
|
76
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
77
77
|
if (!this.activeAccountAddress) {
|
|
78
78
|
throw new Error('Active account address is required');
|
|
79
79
|
}
|
|
@@ -102,7 +102,7 @@ class DynamicWaasSVMConnector extends withDynamicWaas(SolanaWalletConnector) {
|
|
|
102
102
|
internalSignTransaction(transaction) {
|
|
103
103
|
return __awaiter(this, void 0, void 0, function* () {
|
|
104
104
|
var _a, _b;
|
|
105
|
-
const walletClient = this.getWaasWalletClient();
|
|
105
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
106
106
|
const signedSessionId = yield ((_a = this.getSignedSessionId) === null || _a === void 0 ? void 0 : _a.call(this));
|
|
107
107
|
if (!this.activeAccountAddress) {
|
|
108
108
|
throw new Error('Active account address is required');
|
|
@@ -227,7 +227,7 @@ class DynamicWaasSVMConnector extends withDynamicWaas(SolanaWalletConnector) {
|
|
|
227
227
|
exportPrivateKey() {
|
|
228
228
|
return __awaiter(this, arguments, void 0, function* ({ accountAddress, displayContainer, password, } = {}) {
|
|
229
229
|
var _a;
|
|
230
|
-
const walletClient = this.getWaasWalletClient();
|
|
230
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
231
231
|
const targetAccountAddress = accountAddress || this.activeAccountAddress;
|
|
232
232
|
if (!targetAccountAddress) {
|
|
233
233
|
throw new Error('Account address is required');
|
|
@@ -250,7 +250,7 @@ class DynamicWaasSVMConnector extends withDynamicWaas(SolanaWalletConnector) {
|
|
|
250
250
|
importPrivateKey(_a) {
|
|
251
251
|
return __awaiter(this, arguments, void 0, function* ({ privateKey, thresholdSignatureScheme = 'TWO_OF_TWO', }) {
|
|
252
252
|
var _b, _c;
|
|
253
|
-
const walletClient = this.getWaasWalletClient();
|
|
253
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
254
254
|
const signedSessionId = yield ((_b = this.getSignedSessionId) === null || _b === void 0 ? void 0 : _b.call(this));
|
|
255
255
|
if (!signedSessionId) {
|
|
256
256
|
throw new Error('Signed session ID is required');
|
|
@@ -268,7 +268,7 @@ class DynamicWaasSVMConnector extends withDynamicWaas(SolanaWalletConnector) {
|
|
|
268
268
|
if (!accountAddress) {
|
|
269
269
|
throw new Error('Account address is required');
|
|
270
270
|
}
|
|
271
|
-
const walletClient = this.getWaasWalletClient();
|
|
271
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
272
272
|
return walletClient.backupKeySharesToGoogleDrive({
|
|
273
273
|
accountAddress,
|
|
274
274
|
password,
|
|
@@ -280,7 +280,7 @@ class DynamicWaasSVMConnector extends withDynamicWaas(SolanaWalletConnector) {
|
|
|
280
280
|
if (!accountAddress) {
|
|
281
281
|
throw new Error('Account address is required');
|
|
282
282
|
}
|
|
283
|
-
const walletClient = this.getWaasWalletClient();
|
|
283
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
284
284
|
return walletClient.refreshWalletAccountShares({
|
|
285
285
|
accountAddress,
|
|
286
286
|
password,
|
|
@@ -292,7 +292,7 @@ class DynamicWaasSVMConnector extends withDynamicWaas(SolanaWalletConnector) {
|
|
|
292
292
|
if (!accountAddress) {
|
|
293
293
|
throw new Error('Account address is required');
|
|
294
294
|
}
|
|
295
|
-
const walletClient = this.getWaasWalletClient();
|
|
295
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
296
296
|
return walletClient.updatePassword({
|
|
297
297
|
accountAddress,
|
|
298
298
|
existingPassword,
|
|
@@ -308,7 +308,7 @@ class DynamicWaasSVMConnector extends withDynamicWaas(SolanaWalletConnector) {
|
|
|
308
308
|
if (message.length !== 64) {
|
|
309
309
|
throw new Error('Message must be 64 characters long');
|
|
310
310
|
}
|
|
311
|
-
const walletClient = this.getWaasWalletClient();
|
|
311
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
312
312
|
return walletClient.signRawMessage({
|
|
313
313
|
accountAddress,
|
|
314
314
|
message,
|
|
@@ -318,7 +318,7 @@ class DynamicWaasSVMConnector extends withDynamicWaas(SolanaWalletConnector) {
|
|
|
318
318
|
exportClientKeyshares(_a) {
|
|
319
319
|
return __awaiter(this, arguments, void 0, function* ({ accountAddress, password, }) {
|
|
320
320
|
var _b, _c;
|
|
321
|
-
const walletClient = this.getWaasWalletClient();
|
|
321
|
+
const walletClient = yield this.getWaasWalletClient();
|
|
322
322
|
const targetAccountAddress = accountAddress || this.activeAccountAddress;
|
|
323
323
|
const signedSessionId = yield ((_b = this.getSignedSessionId) === null || _b === void 0 ? void 0 : _b.call(this));
|
|
324
324
|
if (!targetAccountAddress) {
|
|
@@ -352,7 +352,7 @@ class DynamicWaasSVMConnector extends withDynamicWaas(SolanaWalletConnector) {
|
|
|
352
352
|
}
|
|
353
353
|
endSession() {
|
|
354
354
|
return __awaiter(this, void 0, void 0, function* () {
|
|
355
|
-
const waasSvmClient = this.getWaasWalletClient();
|
|
355
|
+
const waasSvmClient = yield this.getWaasWalletClient();
|
|
356
356
|
if (!waasSvmClient) {
|
|
357
357
|
return;
|
|
358
358
|
}
|