@dynamic-labs/waas-svm 4.18.6 → 4.18.7
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,24 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.18.7](https://github.com/dynamic-labs/dynamic-auth/compare/v4.18.6...v4.18.7) (2025-05-21)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add zero dev kernel migration to v3.3 ([#8747](https://github.com/dynamic-labs/dynamic-auth/issues/8747)) ([ce10ef8](https://github.com/dynamic-labs/dynamic-auth/commit/ce10ef85d12452c2c21758c909f1e28f9fa5fbae))
|
|
8
|
+
* bump [@dynamic-labs-wallet](https://github.com/dynamic-labs-wallet) to v0.0.74 ([#8746](https://github.com/dynamic-labs/dynamic-auth/issues/8746)) ([98e3a0b](https://github.com/dynamic-labs/dynamic-auth/commit/98e3a0b845e7d6c34a2c748597198825713f4bcf))
|
|
9
|
+
* support kernel versio 0.3.2 and 0.3.3 ([#8738](https://github.com/dynamic-labs/dynamic-auth/issues/8738)) ([1115830](https://github.com/dynamic-labs/dynamic-auth/commit/1115830966318960d39a497c8b29188d9d9a447f))
|
|
10
|
+
* v3 solana confirmation ui ([#8731](https://github.com/dynamic-labs/dynamic-auth/issues/8731)) ([cfa5ba0](https://github.com/dynamic-labs/dynamic-auth/commit/cfa5ba07a946b847e60388c80afbd8aa233e9ebf))
|
|
11
|
+
* v3 svm send balance ([#8726](https://github.com/dynamic-labs/dynamic-auth/issues/8726)) ([236ec48](https://github.com/dynamic-labs/dynamic-auth/commit/236ec4843152f4b720aa7332e650db68c2d111b2))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* **alex/qntm-3201:** send empty data field when using zksync sendbalance ([#8733](https://github.com/dynamic-labs/dynamic-auth/issues/8733)) ([4c42035](https://github.com/dynamic-labs/dynamic-auth/commit/4c420350cf7404ac80db8b552594233a3de9fb57))
|
|
17
|
+
* allow for continuing signing if zksync account exists while attempting to deploy ([#8736](https://github.com/dynamic-labs/dynamic-auth/issues/8736)) ([1ff82e4](https://github.com/dynamic-labs/dynamic-auth/commit/1ff82e418e14300b9dec662fba517c5533c1caac))
|
|
18
|
+
* api kernel version on react native extension ([#8754](https://github.com/dynamic-labs/dynamic-auth/issues/8754)) ([c2f0bb4](https://github.com/dynamic-labs/dynamic-auth/commit/c2f0bb4ac86214f4e3bbdac5cf4b481a7a304449))
|
|
19
|
+
* CTRL wallet eip6963 detection ([#8727](https://github.com/dynamic-labs/dynamic-auth/issues/8727)) ([194334f](https://github.com/dynamic-labs/dynamic-auth/commit/194334f7fd541917d9a7f6b452145a47cf7ae853))
|
|
20
|
+
* **QNTM-3249:** fix mobile layout alignment in send view ([#8740](https://github.com/dynamic-labs/dynamic-auth/issues/8740)) ([7d8e02c](https://github.com/dynamic-labs/dynamic-auth/commit/7d8e02c11830f547b6fcfbc7b518ee3f045df41a))
|
|
21
|
+
|
|
2
22
|
### [4.18.6](https://github.com/dynamic-labs/dynamic-auth/compare/v4.18.5...v4.18.6) (2025-05-16)
|
|
3
23
|
|
|
4
24
|
|
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.18.
|
|
3
|
+
"version": "4.18.7",
|
|
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",
|
|
@@ -18,17 +18,17 @@
|
|
|
18
18
|
},
|
|
19
19
|
"homepage": "https://www.dynamic.xyz/",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dynamic-labs-wallet/svm": "0.0.
|
|
21
|
+
"@dynamic-labs-wallet/svm": "0.0.74",
|
|
22
22
|
"@solana/web3.js": "1.98.1",
|
|
23
23
|
"eventemitter3": "5.0.1",
|
|
24
24
|
"bs58": "5.0.0",
|
|
25
|
-
"@dynamic-labs/assert-package-version": "4.18.
|
|
26
|
-
"@dynamic-labs/logger": "4.18.
|
|
27
|
-
"@dynamic-labs/rpc-providers": "4.18.
|
|
28
|
-
"@dynamic-labs/solana-core": "4.18.
|
|
29
|
-
"@dynamic-labs/types": "4.18.
|
|
30
|
-
"@dynamic-labs/utils": "4.18.
|
|
31
|
-
"@dynamic-labs/wallet-connector-core": "4.18.
|
|
25
|
+
"@dynamic-labs/assert-package-version": "4.18.7",
|
|
26
|
+
"@dynamic-labs/logger": "4.18.7",
|
|
27
|
+
"@dynamic-labs/rpc-providers": "4.18.7",
|
|
28
|
+
"@dynamic-labs/solana-core": "4.18.7",
|
|
29
|
+
"@dynamic-labs/types": "4.18.7",
|
|
30
|
+
"@dynamic-labs/utils": "4.18.7",
|
|
31
|
+
"@dynamic-labs/wallet-connector-core": "4.18.7"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {}
|
|
34
34
|
}
|
|
@@ -20,6 +20,7 @@ class DynamicWaasSVMConnector extends solanaCore.SolanaWalletConnector {
|
|
|
20
20
|
this.name = 'Dynamic Waas';
|
|
21
21
|
this.overrideKey = 'dynamicwaas';
|
|
22
22
|
this.isEmbeddedWallet = true;
|
|
23
|
+
this.walletUiUtils = props.walletUiUtils;
|
|
23
24
|
}
|
|
24
25
|
setGetAuthTokenFunction(getAuthToken) {
|
|
25
26
|
this.getAuthToken = getAuthToken;
|
|
@@ -82,7 +83,7 @@ class DynamicWaasSVMConnector extends solanaCore.SolanaWalletConnector {
|
|
|
82
83
|
return createdWallet;
|
|
83
84
|
});
|
|
84
85
|
}
|
|
85
|
-
|
|
86
|
+
internalSignMessage(message) {
|
|
86
87
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
87
88
|
const walletClient = this.getWaasWalletClient();
|
|
88
89
|
if (!this.activeAccountAddress) {
|
|
@@ -95,7 +96,19 @@ class DynamicWaasSVMConnector extends solanaCore.SolanaWalletConnector {
|
|
|
95
96
|
return signedMessage;
|
|
96
97
|
});
|
|
97
98
|
}
|
|
98
|
-
|
|
99
|
+
signMessage(message) {
|
|
100
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
101
|
+
if (!this.activeAccountAddress) {
|
|
102
|
+
throw new Error('Active account address is required');
|
|
103
|
+
}
|
|
104
|
+
return this.walletUiUtils.signMessage({
|
|
105
|
+
handler: () => _tslib.__awaiter(this, void 0, void 0, function* () { return this.internalSignMessage(message); }),
|
|
106
|
+
message,
|
|
107
|
+
walletConnector: this,
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
internalSignTransaction(transaction) {
|
|
99
112
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
100
113
|
const walletClient = this.getWaasWalletClient();
|
|
101
114
|
if (!this.activeAccountAddress) {
|
|
@@ -112,31 +125,59 @@ class DynamicWaasSVMConnector extends solanaCore.SolanaWalletConnector {
|
|
|
112
125
|
});
|
|
113
126
|
}
|
|
114
127
|
catch (err) {
|
|
115
|
-
//this will throw if we signed the tx incorrectly
|
|
116
128
|
logger.logger.warn('[signTransaction] Error signing transaction', err);
|
|
117
129
|
}
|
|
118
130
|
return signedTransaction;
|
|
119
131
|
});
|
|
120
132
|
}
|
|
121
|
-
|
|
133
|
+
signTransaction(transaction) {
|
|
122
134
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
return signedTransactions;
|
|
135
|
+
if (!this.activeAccountAddress) {
|
|
136
|
+
throw new Error('Active account address is required');
|
|
126
137
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
138
|
+
const uiTransaction = new solanaCore.SolanaUiTransaction({
|
|
139
|
+
connection: this.getWalletClient(),
|
|
140
|
+
from: this.activeAccountAddress,
|
|
141
|
+
multipleTransactions: [transaction],
|
|
142
|
+
onSubmit: () => _tslib.__awaiter(this, void 0, void 0, function* () { return this.internalSignTransaction(transaction); }),
|
|
143
|
+
});
|
|
144
|
+
return this.walletUiUtils.signTransaction(this, uiTransaction);
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
internalSignAllTransactions(transactions) {
|
|
148
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
149
|
+
if (!this.activeAccountAddress) {
|
|
150
|
+
throw new Error('Active account address is required');
|
|
151
|
+
}
|
|
152
|
+
const signedTransactions = [];
|
|
153
|
+
for (const transaction of transactions) {
|
|
154
|
+
const signedTx = yield this.internalSignTransaction(transaction);
|
|
155
|
+
signedTransactions.push(signedTx);
|
|
130
156
|
}
|
|
157
|
+
return signedTransactions;
|
|
131
158
|
});
|
|
132
159
|
}
|
|
133
|
-
|
|
160
|
+
signAllTransactions(transactions) {
|
|
161
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
162
|
+
if (!this.activeAccountAddress) {
|
|
163
|
+
throw new Error('Active account address is required');
|
|
164
|
+
}
|
|
165
|
+
const uiTransaction = new solanaCore.SolanaUiTransaction({
|
|
166
|
+
connection: this.getWalletClient(),
|
|
167
|
+
from: this.activeAccountAddress,
|
|
168
|
+
multipleTransactions: transactions,
|
|
169
|
+
onSubmit: () => _tslib.__awaiter(this, void 0, void 0, function* () { return this.internalSignAllTransactions(transactions); }),
|
|
170
|
+
});
|
|
171
|
+
return this.walletUiUtils.signTransaction(this, uiTransaction);
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
internalSignAndSendTransaction(transaction, options) {
|
|
134
175
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
135
176
|
if (!this.activeAccountAddress) {
|
|
136
177
|
throw new Error('Active account address is required');
|
|
137
178
|
}
|
|
138
179
|
const connection = this.getWalletClient();
|
|
139
|
-
const signedTransaction = yield this.
|
|
180
|
+
const signedTransaction = yield this.internalSignTransaction(transaction);
|
|
140
181
|
const signature = yield connection.sendRawTransaction(signedTransaction.serialize({
|
|
141
182
|
requireAllSignatures: false,
|
|
142
183
|
verifySignatures: true,
|
|
@@ -158,9 +199,22 @@ class DynamicWaasSVMConnector extends solanaCore.SolanaWalletConnector {
|
|
|
158
199
|
});
|
|
159
200
|
});
|
|
160
201
|
}
|
|
202
|
+
signAndSendTransaction(transaction, options) {
|
|
203
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
204
|
+
if (!this.activeAccountAddress) {
|
|
205
|
+
throw new Error('Active account address is required');
|
|
206
|
+
}
|
|
207
|
+
const uiTransaction = new solanaCore.SolanaUiTransaction({
|
|
208
|
+
connection: this.getWalletClient(),
|
|
209
|
+
from: this.activeAccountAddress,
|
|
210
|
+
multipleTransactions: [transaction],
|
|
211
|
+
onSubmit: () => _tslib.__awaiter(this, void 0, void 0, function* () { return this.internalSignAndSendTransaction(transaction, options); }),
|
|
212
|
+
});
|
|
213
|
+
return this.walletUiUtils.sendTransaction(this, uiTransaction);
|
|
214
|
+
});
|
|
215
|
+
}
|
|
161
216
|
getSigner() {
|
|
162
217
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
163
|
-
// TODO: remove this unknown
|
|
164
218
|
return new DynamicWaasSVMSigner.DynamicWaasSVMSigner({
|
|
165
219
|
walletConnector: this,
|
|
166
220
|
});
|
|
@@ -208,6 +262,21 @@ class DynamicWaasSVMConnector extends solanaCore.SolanaWalletConnector {
|
|
|
208
262
|
});
|
|
209
263
|
});
|
|
210
264
|
}
|
|
265
|
+
createUiTransaction(from) {
|
|
266
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
267
|
+
yield this.validateActiveWallet(from);
|
|
268
|
+
const transaction = new solanaCore.SolanaUiTransaction({
|
|
269
|
+
connection: this.getWalletClient(),
|
|
270
|
+
from,
|
|
271
|
+
onSubmit: (transaction) => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
272
|
+
if (!transaction)
|
|
273
|
+
return undefined;
|
|
274
|
+
return this.internalSignAndSendTransaction(transaction);
|
|
275
|
+
}),
|
|
276
|
+
});
|
|
277
|
+
return transaction;
|
|
278
|
+
});
|
|
279
|
+
}
|
|
211
280
|
}
|
|
212
281
|
|
|
213
282
|
exports.DynamicWaasSVMConnector = DynamicWaasSVMConnector;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { DynamicSvmWalletClient } from '@dynamic-labs-wallet/svm';
|
|
2
2
|
import { Connection, Transaction, VersionedTransaction, SendOptions } from '@solana/web3.js';
|
|
3
|
+
import { IUITransaction, WalletUiUtils } from '@dynamic-labs/types';
|
|
3
4
|
import { ISolanaSigner, SolanaWalletConnector, SolanaWalletConnectorOpts } from '@dynamic-labs/solana-core';
|
|
4
|
-
import { IDynamicWaasConnector } from '@dynamic-labs/wallet-connector-core';
|
|
5
|
+
import { IDynamicWaasConnector, InternalWalletConnector } from '@dynamic-labs/wallet-connector-core';
|
|
6
|
+
export type DynamicWaasSVMConnectorProps = SolanaWalletConnectorOpts & {
|
|
7
|
+
walletUiUtils: WalletUiUtils<InternalWalletConnector>;
|
|
8
|
+
};
|
|
5
9
|
export declare class DynamicWaasSVMConnector extends SolanaWalletConnector implements IDynamicWaasConnector {
|
|
6
10
|
connect(): Promise<void>;
|
|
7
11
|
name: string;
|
|
@@ -13,7 +17,8 @@ export declare class DynamicWaasSVMConnector extends SolanaWalletConnector imple
|
|
|
13
17
|
activeAccountAddress: string | undefined;
|
|
14
18
|
private baseApiUrl?;
|
|
15
19
|
private relayUrl?;
|
|
16
|
-
|
|
20
|
+
protected walletUiUtils: WalletUiUtils<InternalWalletConnector>;
|
|
21
|
+
constructor(props: DynamicWaasSVMConnectorProps);
|
|
17
22
|
setGetAuthTokenFunction(getAuthToken: () => string): void;
|
|
18
23
|
setEnvironmentId(environmentId: string): void;
|
|
19
24
|
setBaseApiUrl(baseApiUrl: string): void;
|
|
@@ -29,9 +34,13 @@ export declare class DynamicWaasSVMConnector extends SolanaWalletConnector imple
|
|
|
29
34
|
rawPublicKey: Uint8Array;
|
|
30
35
|
clientKeyShares: any[];
|
|
31
36
|
}>;
|
|
37
|
+
internalSignMessage(message: string): Promise<string>;
|
|
32
38
|
signMessage(message: string): Promise<string>;
|
|
39
|
+
internalSignTransaction<T extends Transaction | VersionedTransaction>(transaction: T): Promise<Transaction | VersionedTransaction>;
|
|
33
40
|
signTransaction<T extends Transaction | VersionedTransaction>(transaction: T): Promise<Transaction | VersionedTransaction>;
|
|
41
|
+
internalSignAllTransactions<T extends Transaction | VersionedTransaction>(transactions: T[]): Promise<(Transaction | VersionedTransaction)[]>;
|
|
34
42
|
signAllTransactions<T extends Transaction | VersionedTransaction>(transactions: T[]): Promise<(Transaction | VersionedTransaction)[]>;
|
|
43
|
+
internalSignAndSendTransaction<T extends Transaction | VersionedTransaction>(transaction: T, options?: SendOptions): Promise<string>;
|
|
35
44
|
signAndSendTransaction<T extends Transaction | VersionedTransaction>(transaction: T, options?: SendOptions): Promise<string>;
|
|
36
45
|
getSigner(): Promise<ISolanaSigner>;
|
|
37
46
|
getWalletClientByAddress({ accountAddress, }: {
|
|
@@ -49,4 +58,5 @@ export declare class DynamicWaasSVMConnector extends SolanaWalletConnector imple
|
|
|
49
58
|
exportClientKeyshares({ accountAddress, }: {
|
|
50
59
|
accountAddress: string;
|
|
51
60
|
}): Promise<void>;
|
|
61
|
+
createUiTransaction(from: string): Promise<IUITransaction>;
|
|
52
62
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { __awaiter } from '../../_virtual/_tslib.js';
|
|
3
3
|
import { DynamicSvmWalletClient } from '@dynamic-labs-wallet/svm';
|
|
4
|
-
import { SolanaWalletConnector } from '@dynamic-labs/solana-core';
|
|
4
|
+
import { SolanaWalletConnector, SolanaUiTransaction } from '@dynamic-labs/solana-core';
|
|
5
5
|
import { isSameAddress } from '@dynamic-labs/wallet-connector-core';
|
|
6
6
|
import { DynamicError } from '@dynamic-labs/utils';
|
|
7
7
|
import { logger } from '../../utils/logger.js';
|
|
@@ -16,6 +16,7 @@ class DynamicWaasSVMConnector extends SolanaWalletConnector {
|
|
|
16
16
|
this.name = 'Dynamic Waas';
|
|
17
17
|
this.overrideKey = 'dynamicwaas';
|
|
18
18
|
this.isEmbeddedWallet = true;
|
|
19
|
+
this.walletUiUtils = props.walletUiUtils;
|
|
19
20
|
}
|
|
20
21
|
setGetAuthTokenFunction(getAuthToken) {
|
|
21
22
|
this.getAuthToken = getAuthToken;
|
|
@@ -78,7 +79,7 @@ class DynamicWaasSVMConnector extends SolanaWalletConnector {
|
|
|
78
79
|
return createdWallet;
|
|
79
80
|
});
|
|
80
81
|
}
|
|
81
|
-
|
|
82
|
+
internalSignMessage(message) {
|
|
82
83
|
return __awaiter(this, void 0, void 0, function* () {
|
|
83
84
|
const walletClient = this.getWaasWalletClient();
|
|
84
85
|
if (!this.activeAccountAddress) {
|
|
@@ -91,7 +92,19 @@ class DynamicWaasSVMConnector extends SolanaWalletConnector {
|
|
|
91
92
|
return signedMessage;
|
|
92
93
|
});
|
|
93
94
|
}
|
|
94
|
-
|
|
95
|
+
signMessage(message) {
|
|
96
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
+
if (!this.activeAccountAddress) {
|
|
98
|
+
throw new Error('Active account address is required');
|
|
99
|
+
}
|
|
100
|
+
return this.walletUiUtils.signMessage({
|
|
101
|
+
handler: () => __awaiter(this, void 0, void 0, function* () { return this.internalSignMessage(message); }),
|
|
102
|
+
message,
|
|
103
|
+
walletConnector: this,
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
internalSignTransaction(transaction) {
|
|
95
108
|
return __awaiter(this, void 0, void 0, function* () {
|
|
96
109
|
const walletClient = this.getWaasWalletClient();
|
|
97
110
|
if (!this.activeAccountAddress) {
|
|
@@ -108,31 +121,59 @@ class DynamicWaasSVMConnector extends SolanaWalletConnector {
|
|
|
108
121
|
});
|
|
109
122
|
}
|
|
110
123
|
catch (err) {
|
|
111
|
-
//this will throw if we signed the tx incorrectly
|
|
112
124
|
logger.warn('[signTransaction] Error signing transaction', err);
|
|
113
125
|
}
|
|
114
126
|
return signedTransaction;
|
|
115
127
|
});
|
|
116
128
|
}
|
|
117
|
-
|
|
129
|
+
signTransaction(transaction) {
|
|
118
130
|
return __awaiter(this, void 0, void 0, function* () {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
return signedTransactions;
|
|
131
|
+
if (!this.activeAccountAddress) {
|
|
132
|
+
throw new Error('Active account address is required');
|
|
122
133
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
134
|
+
const uiTransaction = new SolanaUiTransaction({
|
|
135
|
+
connection: this.getWalletClient(),
|
|
136
|
+
from: this.activeAccountAddress,
|
|
137
|
+
multipleTransactions: [transaction],
|
|
138
|
+
onSubmit: () => __awaiter(this, void 0, void 0, function* () { return this.internalSignTransaction(transaction); }),
|
|
139
|
+
});
|
|
140
|
+
return this.walletUiUtils.signTransaction(this, uiTransaction);
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
internalSignAllTransactions(transactions) {
|
|
144
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
145
|
+
if (!this.activeAccountAddress) {
|
|
146
|
+
throw new Error('Active account address is required');
|
|
147
|
+
}
|
|
148
|
+
const signedTransactions = [];
|
|
149
|
+
for (const transaction of transactions) {
|
|
150
|
+
const signedTx = yield this.internalSignTransaction(transaction);
|
|
151
|
+
signedTransactions.push(signedTx);
|
|
126
152
|
}
|
|
153
|
+
return signedTransactions;
|
|
127
154
|
});
|
|
128
155
|
}
|
|
129
|
-
|
|
156
|
+
signAllTransactions(transactions) {
|
|
157
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
158
|
+
if (!this.activeAccountAddress) {
|
|
159
|
+
throw new Error('Active account address is required');
|
|
160
|
+
}
|
|
161
|
+
const uiTransaction = new SolanaUiTransaction({
|
|
162
|
+
connection: this.getWalletClient(),
|
|
163
|
+
from: this.activeAccountAddress,
|
|
164
|
+
multipleTransactions: transactions,
|
|
165
|
+
onSubmit: () => __awaiter(this, void 0, void 0, function* () { return this.internalSignAllTransactions(transactions); }),
|
|
166
|
+
});
|
|
167
|
+
return this.walletUiUtils.signTransaction(this, uiTransaction);
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
internalSignAndSendTransaction(transaction, options) {
|
|
130
171
|
return __awaiter(this, void 0, void 0, function* () {
|
|
131
172
|
if (!this.activeAccountAddress) {
|
|
132
173
|
throw new Error('Active account address is required');
|
|
133
174
|
}
|
|
134
175
|
const connection = this.getWalletClient();
|
|
135
|
-
const signedTransaction = yield this.
|
|
176
|
+
const signedTransaction = yield this.internalSignTransaction(transaction);
|
|
136
177
|
const signature = yield connection.sendRawTransaction(signedTransaction.serialize({
|
|
137
178
|
requireAllSignatures: false,
|
|
138
179
|
verifySignatures: true,
|
|
@@ -154,9 +195,22 @@ class DynamicWaasSVMConnector extends SolanaWalletConnector {
|
|
|
154
195
|
});
|
|
155
196
|
});
|
|
156
197
|
}
|
|
198
|
+
signAndSendTransaction(transaction, options) {
|
|
199
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
200
|
+
if (!this.activeAccountAddress) {
|
|
201
|
+
throw new Error('Active account address is required');
|
|
202
|
+
}
|
|
203
|
+
const uiTransaction = new SolanaUiTransaction({
|
|
204
|
+
connection: this.getWalletClient(),
|
|
205
|
+
from: this.activeAccountAddress,
|
|
206
|
+
multipleTransactions: [transaction],
|
|
207
|
+
onSubmit: () => __awaiter(this, void 0, void 0, function* () { return this.internalSignAndSendTransaction(transaction, options); }),
|
|
208
|
+
});
|
|
209
|
+
return this.walletUiUtils.sendTransaction(this, uiTransaction);
|
|
210
|
+
});
|
|
211
|
+
}
|
|
157
212
|
getSigner() {
|
|
158
213
|
return __awaiter(this, void 0, void 0, function* () {
|
|
159
|
-
// TODO: remove this unknown
|
|
160
214
|
return new DynamicWaasSVMSigner({
|
|
161
215
|
walletConnector: this,
|
|
162
216
|
});
|
|
@@ -204,6 +258,21 @@ class DynamicWaasSVMConnector extends SolanaWalletConnector {
|
|
|
204
258
|
});
|
|
205
259
|
});
|
|
206
260
|
}
|
|
261
|
+
createUiTransaction(from) {
|
|
262
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
263
|
+
yield this.validateActiveWallet(from);
|
|
264
|
+
const transaction = new SolanaUiTransaction({
|
|
265
|
+
connection: this.getWalletClient(),
|
|
266
|
+
from,
|
|
267
|
+
onSubmit: (transaction) => __awaiter(this, void 0, void 0, function* () {
|
|
268
|
+
if (!transaction)
|
|
269
|
+
return undefined;
|
|
270
|
+
return this.internalSignAndSendTransaction(transaction);
|
|
271
|
+
}),
|
|
272
|
+
});
|
|
273
|
+
return transaction;
|
|
274
|
+
});
|
|
275
|
+
}
|
|
207
276
|
}
|
|
208
277
|
|
|
209
278
|
export { DynamicWaasSVMConnector };
|