@dynamic-labs/stellar 5.10.0 → 5.12.0
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 +18 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +11 -10
- package/src/connectors/DynamicWaasStellarConnector/DynamicWaasStellarConnector.cjs +6 -4
- package/src/connectors/DynamicWaasStellarConnector/DynamicWaasStellarConnector.d.ts +28 -36
- package/src/connectors/DynamicWaasStellarConnector/DynamicWaasStellarConnector.js +6 -4
- package/src/connectors/StellarWalletConnector/StellarWalletConnector.cjs +8 -2
- package/src/connectors/StellarWalletConnector/StellarWalletConnector.d.ts +8 -2
- package/src/connectors/StellarWalletConnector/StellarWalletConnector.js +8 -2
- package/src/wallet/StellarWallet.cjs +4 -4
- package/src/wallet/StellarWallet.d.ts +7 -2
- package/src/wallet/StellarWallet.js +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
|
|
2
|
+
## [5.12.0](https://github.com/dynamic-labs/dynamic-auth/compare/v5.11.0...v5.12.0) (2026-10-16)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* **embedded-wallet-solana:** add getSolanaSponsorAddress ([#12517](https://github.com/dynamic-labs/dynamic-auth/issues/12517)) ([b95c550](https://github.com/dynamic-labs/dynamic-auth/commit/b95c550e3dab783b7ff0b019051a17b22ea44f97))
|
|
8
|
+
* **embedded-wallet:** show chain and wallet in private key export modal ([#12507](https://github.com/dynamic-labs/dynamic-auth/issues/12507)) ([4bfb6d6](https://github.com/dynamic-labs/dynamic-auth/commit/4bfb6d6168aac3f800792fde933e0597f288058f))
|
|
9
|
+
* **sdk-react-core:** send OTP purpose from step-up flows ([#12511](https://github.com/dynamic-labs/dynamic-auth/issues/12511)) ([0d2d8a3](https://github.com/dynamic-labs/dynamic-auth/commit/0d2d8a31058b3e75c71af7a34f459e2a3ddf383b)), closes [#12898](https://github.com/dynamic-labs/dynamic-auth/issues/12898) [#816](https://github.com/dynamic-labs/dynamic-auth/issues/816) [#203](https://github.com/dynamic-labs/dynamic-auth/issues/203) [#12512](https://github.com/dynamic-labs/dynamic-auth/issues/12512)
|
|
10
|
+
* **wallet-connect:** back WalletConnect storage with native secure storage on mobile ([#12515](https://github.com/dynamic-labs/dynamic-auth/issues/12515)) ([7b57903](https://github.com/dynamic-labs/dynamic-auth/commit/7b5790325fce707d73d591483a0130b960ed055c))
|
|
11
|
+
|
|
12
|
+
## [5.11.0](https://github.com/dynamic-labs/dynamic-auth/compare/v5.10.0...v5.11.0) (2026-10-14)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* **react-native:** fall back to a TEE-backed key when StrongBox key generation fails on Android ([#12484](https://github.com/dynamic-labs/dynamic-auth/issues/12484)) ([6884ef1](https://github.com/dynamic-labs/dynamic-auth/commit/6884ef1665e4b18d1b8fdb54ee7cd06861b47fc9))
|
|
18
|
+
* support WaaS password overrides in WebView ([#12509](https://github.com/dynamic-labs/dynamic-auth/issues/12509)) ([fc67fcc](https://github.com/dynamic-labs/dynamic-auth/commit/fc67fccb99be7c0cc8df81a2513ccd3a04db9a61))
|
|
19
|
+
|
|
2
20
|
## [5.10.0](https://github.com/dynamic-labs/dynamic-auth/compare/v5.9.6...v5.10.0) (2026-10-09)
|
|
3
21
|
|
|
4
22
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/stellar",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.12.0",
|
|
4
4
|
"description": "A React SDK for implementing Stellar wallet web3 authentication and authorization to your website.",
|
|
5
5
|
"author": "Dynamic Labs, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -18,18 +18,19 @@
|
|
|
18
18
|
},
|
|
19
19
|
"homepage": "https://www.dynamic.xyz/",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dynamic-labs-
|
|
22
|
-
"@dynamic-labs/
|
|
21
|
+
"@dynamic-labs-wallet/core": "1.1.43",
|
|
22
|
+
"@dynamic-labs-sdk/client": "1.41.0",
|
|
23
|
+
"@dynamic-labs/sdk-api-core": "0.104.0",
|
|
23
24
|
"@stellar/stellar-sdk": "14.4.3",
|
|
24
|
-
"@dynamic-labs/wallet-connector-core": "5.
|
|
25
|
-
"@dynamic-labs/assert-package-version": "5.
|
|
25
|
+
"@dynamic-labs/wallet-connector-core": "5.12.0",
|
|
26
|
+
"@dynamic-labs/assert-package-version": "5.12.0",
|
|
26
27
|
"@lobstrco/signer-extension-api": "2.0.0",
|
|
27
28
|
"@stellar/freighter-api": "6.0.1",
|
|
28
|
-
"@dynamic-labs/logger": "5.
|
|
29
|
-
"@dynamic-labs/types": "5.
|
|
30
|
-
"@dynamic-labs/utils": "5.
|
|
31
|
-
"@dynamic-labs/waas": "5.
|
|
32
|
-
"@dynamic-labs/wallet-book": "5.
|
|
29
|
+
"@dynamic-labs/logger": "5.12.0",
|
|
30
|
+
"@dynamic-labs/types": "5.12.0",
|
|
31
|
+
"@dynamic-labs/utils": "5.12.0",
|
|
32
|
+
"@dynamic-labs/waas": "5.12.0",
|
|
33
|
+
"@dynamic-labs/wallet-book": "5.12.0",
|
|
33
34
|
"eventemitter3": "5.0.1"
|
|
34
35
|
},
|
|
35
36
|
"peerDependencies": {}
|
|
@@ -167,10 +167,10 @@ class DynamicWaasStellarConnector extends waas.withDynamicWaas(StellarWalletConn
|
|
|
167
167
|
* @param message - The message to sign
|
|
168
168
|
* @returns The signed message as a string
|
|
169
169
|
*/
|
|
170
|
-
signMessage(message) {
|
|
170
|
+
signMessage(message, options) {
|
|
171
171
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
172
172
|
return this.walletUiUtils.signMessage({
|
|
173
|
-
handler: () => _tslib.__awaiter(this, void 0, void 0, function* () { return this.internalSignMessage(message); }),
|
|
173
|
+
handler: () => _tslib.__awaiter(this, void 0, void 0, function* () { return this.internalSignMessage(message, options === null || options === void 0 ? void 0 : options.approvalQuorum); }),
|
|
174
174
|
message,
|
|
175
175
|
walletConnector: this,
|
|
176
176
|
});
|
|
@@ -183,7 +183,7 @@ class DynamicWaasStellarConnector extends waas.withDynamicWaas(StellarWalletConn
|
|
|
183
183
|
* @throws {DynamicError} If active account address is not set
|
|
184
184
|
* @throws {DynamicError} If signed session ID is not available
|
|
185
185
|
*/
|
|
186
|
-
internalSignMessage(message) {
|
|
186
|
+
internalSignMessage(message, approvalQuorum) {
|
|
187
187
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
188
188
|
var _a, _b, _c;
|
|
189
189
|
this.ensureActiveAccountFromVerifiedCredentials();
|
|
@@ -203,6 +203,7 @@ class DynamicWaasStellarConnector extends waas.withDynamicWaas(StellarWalletConn
|
|
|
203
203
|
});
|
|
204
204
|
const signedMessage = yield walletClient.signMessage({
|
|
205
205
|
accountAddress: this.activeAccountAddress,
|
|
206
|
+
approvalQuorum,
|
|
206
207
|
authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
|
|
207
208
|
elevatedAccessToken,
|
|
208
209
|
message,
|
|
@@ -244,7 +245,7 @@ class DynamicWaasStellarConnector extends waas.withDynamicWaas(StellarWalletConn
|
|
|
244
245
|
* @param transactionXdr - The XDR-encoded transaction envelope to sign
|
|
245
246
|
* @returns The signed transaction XDR
|
|
246
247
|
*/
|
|
247
|
-
signTransaction(transactionXdr) {
|
|
248
|
+
signTransaction(transactionXdr, options) {
|
|
248
249
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
249
250
|
var _a, _b, _c;
|
|
250
251
|
if (!this.activeAccountAddress) {
|
|
@@ -267,6 +268,7 @@ class DynamicWaasStellarConnector extends waas.withDynamicWaas(StellarWalletConn
|
|
|
267
268
|
// Sign the transaction XDR using MPC
|
|
268
269
|
// The SDK will compute the hash internally and build the context for policy validation
|
|
269
270
|
const signature = yield walletClient.signTransaction({
|
|
271
|
+
approvalQuorum: options === null || options === void 0 ? void 0 : options.approvalQuorum,
|
|
270
272
|
authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
|
|
271
273
|
chainId,
|
|
272
274
|
elevatedAccessToken,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { LogoutReason } from '@dynamic-labs-sdk/client';
|
|
2
|
+
import type { ApprovalQuorumRequestContext } from '@dynamic-labs-wallet/core';
|
|
2
3
|
import { JwtVerifiedCredential, MFAAction, SignMessageContext, TokenScope } from '@dynamic-labs/sdk-api-core';
|
|
3
4
|
import { IUITransaction, WalletUiUtils } from '@dynamic-labs/types';
|
|
4
5
|
import { IDynamicWaasConnector, InternalWalletConnector } from '@dynamic-labs/wallet-connector-core';
|
|
@@ -25,7 +26,9 @@ declare const DynamicWaasStellarConnector_base: (abstract new (...args: any[]) =
|
|
|
25
26
|
scope: TokenScope;
|
|
26
27
|
}) => Promise<string | undefined>) | undefined;
|
|
27
28
|
onUnauthorized?: (() => void | Promise<void>) | undefined;
|
|
28
|
-
environmentId?: string | undefined;
|
|
29
|
+
environmentId?: string | undefined; /**
|
|
30
|
+
* @param props - Constructor properties including walletUiUtils
|
|
31
|
+
*/
|
|
29
32
|
baseApiUrl?: string | undefined;
|
|
30
33
|
relayUrl?: string | undefined;
|
|
31
34
|
baseClientKeysharesRelayApiUrl?: string | undefined;
|
|
@@ -48,26 +51,22 @@ declare const DynamicWaasStellarConnector_base: (abstract new (...args: any[]) =
|
|
|
48
51
|
setGetWalletPasswordFunction(getWalletPassword: import("@dynamic-labs/wallet-connector-core").GetWalletPasswordFn): void;
|
|
49
52
|
getPasswordIfNeeded({ accountAddress, }: {
|
|
50
53
|
accountAddress: string;
|
|
51
|
-
}): Promise<string | undefined>;
|
|
54
|
+
}): Promise<string | undefined>; /**
|
|
55
|
+
* Override setEnvironmentId to ensure it's set on the logger
|
|
56
|
+
*/
|
|
52
57
|
getPassword({ accountAddress, }: {
|
|
53
58
|
accountAddress: string;
|
|
54
59
|
}): Promise<string | undefined>;
|
|
55
|
-
setEnvironmentId(environmentId: string): void;
|
|
56
|
-
* Sets the active account address for this connector
|
|
57
|
-
* @param accountAddress - The Stellar account address to set as active
|
|
58
|
-
*/
|
|
60
|
+
setEnvironmentId(environmentId: string): void;
|
|
59
61
|
setBaseApiUrl(baseApiUrl: string): void;
|
|
60
62
|
setBaseClientKeysharesRelayApiUrl(baseClientKeysharesRelayApiUrl?: string | undefined): void;
|
|
61
63
|
setRelayUrl(relayUrl: string): void;
|
|
62
|
-
setGetSignedSessionIdFunction(getSignedSessionId: () => Promise<string>): void;
|
|
63
|
-
* Called when the user selects this wallet in the modal.
|
|
64
|
-
* Sets the active account so getAddress/getNetwork work correctly during network validation.
|
|
65
|
-
*/
|
|
64
|
+
setGetSignedSessionIdFunction(getSignedSessionId: () => Promise<string>): void;
|
|
66
65
|
setGetSessionPublicKeyFunction(getSessionPublicKey: () => Promise<string | undefined>): void;
|
|
67
66
|
delegateKeyShares({ accountAddress, password, initialSignerRules, }: {
|
|
68
67
|
accountAddress: string;
|
|
69
68
|
password?: string | undefined;
|
|
70
|
-
initialSignerRules?: import("@dynamic-labs/
|
|
69
|
+
initialSignerRules?: import("@dynamic-labs-wallet/core").WaasPolicyRule[] | undefined;
|
|
71
70
|
}): Promise<void>;
|
|
72
71
|
createRevocableSignedSessionCallback(): {
|
|
73
72
|
getSignedSessionId: () => Promise<string>;
|
|
@@ -117,13 +116,7 @@ declare const DynamicWaasStellarConnector_base: (abstract new (...args: any[]) =
|
|
|
117
116
|
} | undefined): Promise<void>;
|
|
118
117
|
getExportHandler(): {
|
|
119
118
|
clear: () => void;
|
|
120
|
-
};
|
|
121
|
-
* Internal method to sign a message with MFA token
|
|
122
|
-
* @param message - The message to sign
|
|
123
|
-
* @returns The signed message as a string
|
|
124
|
-
* @throws {DynamicError} If active account address is not set
|
|
125
|
-
* @throws {DynamicError} If signed session ID is not available
|
|
126
|
-
*/
|
|
119
|
+
};
|
|
127
120
|
exportClientKeyshares({ accountAddress, password, }: import("@dynamic-labs/wallet-connector-core").ExportClientKeysharesParams): Promise<void>;
|
|
128
121
|
runBackupLifecycle({ provider, accountAddress, password, performBackup, }: {
|
|
129
122
|
provider: string;
|
|
@@ -144,17 +137,16 @@ declare const DynamicWaasStellarConnector_base: (abstract new (...args: any[]) =
|
|
|
144
137
|
exportClientKeysharesFromGoogleDrive({ accountAddress, password, }: {
|
|
145
138
|
accountAddress: string;
|
|
146
139
|
password?: string | undefined;
|
|
147
|
-
}): Promise<void>;
|
|
140
|
+
}): Promise<void>; /**
|
|
141
|
+
* Converts network passphrase to numeric chainId for policy validation
|
|
142
|
+
* ChainIds: '1' = pubnet (mainnet), '2' = testnet, '3' = futurenet
|
|
143
|
+
*/
|
|
148
144
|
backupKeySharesToICloud({ accountAddress, password, }: {
|
|
149
145
|
accountAddress: string;
|
|
150
146
|
password?: string | undefined;
|
|
151
147
|
}): Promise<void>;
|
|
152
148
|
displayICloudSignIn({ displayContainer, }: {
|
|
153
|
-
displayContainer: HTMLElement;
|
|
154
|
-
* Signs a Stellar transaction XDR.
|
|
155
|
-
* @param transactionXdr - The XDR-encoded transaction envelope to sign
|
|
156
|
-
* @returns The signed transaction XDR
|
|
157
|
-
*/
|
|
149
|
+
displayContainer: HTMLElement;
|
|
158
150
|
}): Promise<void>;
|
|
159
151
|
hideICloudSignIn(): Promise<void>;
|
|
160
152
|
isICloudAuthenticated(): Promise<boolean>;
|
|
@@ -164,13 +156,14 @@ declare const DynamicWaasStellarConnector_base: (abstract new (...args: any[]) =
|
|
|
164
156
|
accountAddress: string;
|
|
165
157
|
password?: string | undefined;
|
|
166
158
|
}): Promise<void>;
|
|
167
|
-
updatePassword({ accountAddress, existingPassword, newPassword, }: import("@dynamic-labs/wallet-connector-core").UpdatePasswordParams): Promise<void>;
|
|
159
|
+
updatePassword({ accountAddress, existingPassword, newPassword, passwordOverrides, }: import("@dynamic-labs/wallet-connector-core").UpdatePasswordParams): Promise<void>;
|
|
168
160
|
setPassword({ accountAddress, newPassword, }: {
|
|
169
161
|
accountAddress: string;
|
|
170
162
|
newPassword: string;
|
|
171
163
|
}): Promise<void>;
|
|
172
|
-
signRawMessage({ accountAddress, context, message, password, }: {
|
|
164
|
+
signRawMessage({ accountAddress, approvalQuorum, context, message, password, }: {
|
|
173
165
|
accountAddress: string;
|
|
166
|
+
approvalQuorum?: ApprovalQuorumRequestContext | undefined;
|
|
174
167
|
context?: SignMessageContext | undefined;
|
|
175
168
|
message: string;
|
|
176
169
|
password?: string | undefined;
|
|
@@ -178,22 +171,17 @@ declare const DynamicWaasStellarConnector_base: (abstract new (...args: any[]) =
|
|
|
178
171
|
unlockWallet({ accountAddress, password, }: {
|
|
179
172
|
accountAddress: string;
|
|
180
173
|
password?: string | undefined;
|
|
181
|
-
}): Promise<import("@dynamic-labs-wallet/
|
|
174
|
+
}): Promise<import("@dynamic-labs-wallet/core").GetWalletResponse>;
|
|
182
175
|
lockWallets(): Promise<void>;
|
|
183
176
|
lockWallet({ accountAddress }: {
|
|
184
177
|
accountAddress: string;
|
|
185
178
|
}): Promise<void>;
|
|
186
179
|
getWalletRecoveryState({ accountAddress, }: {
|
|
187
180
|
accountAddress: string;
|
|
188
|
-
}): Promise<import("@dynamic-labs-wallet/
|
|
181
|
+
}): Promise<import("@dynamic-labs-wallet/core").WalletRecoveryState>;
|
|
189
182
|
createOfflineRecoveryShares({ accountAddress, password, cloudProviderAccessToken, mfaToken, }: {
|
|
190
183
|
accountAddress: string;
|
|
191
184
|
password?: string | undefined;
|
|
192
|
-
/**
|
|
193
|
-
* Creates a UI transaction for the send balance flow
|
|
194
|
-
* @param from - The sender's address (Stellar public key)
|
|
195
|
-
* @returns A new StellarUiTransaction instance
|
|
196
|
-
*/
|
|
197
185
|
cloudProviderAccessToken?: string | undefined;
|
|
198
186
|
mfaToken?: string | undefined;
|
|
199
187
|
}): Promise<void>;
|
|
@@ -323,7 +311,9 @@ export declare class DynamicWaasStellarConnector extends DynamicWaasStellarConne
|
|
|
323
311
|
* @param message - The message to sign
|
|
324
312
|
* @returns The signed message as a string
|
|
325
313
|
*/
|
|
326
|
-
signMessage(message: string
|
|
314
|
+
signMessage(message: string, options?: {
|
|
315
|
+
approvalQuorum?: ApprovalQuorumRequestContext;
|
|
316
|
+
}): Promise<string>;
|
|
327
317
|
/**
|
|
328
318
|
* Internal method to sign a message with MFA token
|
|
329
319
|
* @param message - The message to sign
|
|
@@ -331,7 +321,7 @@ export declare class DynamicWaasStellarConnector extends DynamicWaasStellarConne
|
|
|
331
321
|
* @throws {DynamicError} If active account address is not set
|
|
332
322
|
* @throws {DynamicError} If signed session ID is not available
|
|
333
323
|
*/
|
|
334
|
-
internalSignMessage(message: string): Promise<string>;
|
|
324
|
+
internalSignMessage(message: string, approvalQuorum?: ApprovalQuorumRequestContext): Promise<string>;
|
|
335
325
|
/**
|
|
336
326
|
* Ends the current session and clears the active account address
|
|
337
327
|
*/
|
|
@@ -346,7 +336,9 @@ export declare class DynamicWaasStellarConnector extends DynamicWaasStellarConne
|
|
|
346
336
|
* @param transactionXdr - The XDR-encoded transaction envelope to sign
|
|
347
337
|
* @returns The signed transaction XDR
|
|
348
338
|
*/
|
|
349
|
-
signTransaction(transactionXdr: string
|
|
339
|
+
signTransaction(transactionXdr: string, options?: {
|
|
340
|
+
approvalQuorum?: ApprovalQuorumRequestContext;
|
|
341
|
+
}): Promise<string>;
|
|
350
342
|
/**
|
|
351
343
|
* Creates a UI transaction for the send balance flow
|
|
352
344
|
* @param from - The sender's address (Stellar public key)
|
|
@@ -163,10 +163,10 @@ class DynamicWaasStellarConnector extends withDynamicWaas(StellarWalletConnector
|
|
|
163
163
|
* @param message - The message to sign
|
|
164
164
|
* @returns The signed message as a string
|
|
165
165
|
*/
|
|
166
|
-
signMessage(message) {
|
|
166
|
+
signMessage(message, options) {
|
|
167
167
|
return __awaiter(this, void 0, void 0, function* () {
|
|
168
168
|
return this.walletUiUtils.signMessage({
|
|
169
|
-
handler: () => __awaiter(this, void 0, void 0, function* () { return this.internalSignMessage(message); }),
|
|
169
|
+
handler: () => __awaiter(this, void 0, void 0, function* () { return this.internalSignMessage(message, options === null || options === void 0 ? void 0 : options.approvalQuorum); }),
|
|
170
170
|
message,
|
|
171
171
|
walletConnector: this,
|
|
172
172
|
});
|
|
@@ -179,7 +179,7 @@ class DynamicWaasStellarConnector extends withDynamicWaas(StellarWalletConnector
|
|
|
179
179
|
* @throws {DynamicError} If active account address is not set
|
|
180
180
|
* @throws {DynamicError} If signed session ID is not available
|
|
181
181
|
*/
|
|
182
|
-
internalSignMessage(message) {
|
|
182
|
+
internalSignMessage(message, approvalQuorum) {
|
|
183
183
|
return __awaiter(this, void 0, void 0, function* () {
|
|
184
184
|
var _a, _b, _c;
|
|
185
185
|
this.ensureActiveAccountFromVerifiedCredentials();
|
|
@@ -199,6 +199,7 @@ class DynamicWaasStellarConnector extends withDynamicWaas(StellarWalletConnector
|
|
|
199
199
|
});
|
|
200
200
|
const signedMessage = yield walletClient.signMessage({
|
|
201
201
|
accountAddress: this.activeAccountAddress,
|
|
202
|
+
approvalQuorum,
|
|
202
203
|
authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
|
|
203
204
|
elevatedAccessToken,
|
|
204
205
|
message,
|
|
@@ -240,7 +241,7 @@ class DynamicWaasStellarConnector extends withDynamicWaas(StellarWalletConnector
|
|
|
240
241
|
* @param transactionXdr - The XDR-encoded transaction envelope to sign
|
|
241
242
|
* @returns The signed transaction XDR
|
|
242
243
|
*/
|
|
243
|
-
signTransaction(transactionXdr) {
|
|
244
|
+
signTransaction(transactionXdr, options) {
|
|
244
245
|
return __awaiter(this, void 0, void 0, function* () {
|
|
245
246
|
var _a, _b, _c;
|
|
246
247
|
if (!this.activeAccountAddress) {
|
|
@@ -263,6 +264,7 @@ class DynamicWaasStellarConnector extends withDynamicWaas(StellarWalletConnector
|
|
|
263
264
|
// Sign the transaction XDR using MPC
|
|
264
265
|
// The SDK will compute the hash internally and build the context for policy validation
|
|
265
266
|
const signature = yield walletClient.signTransaction({
|
|
267
|
+
approvalQuorum: options === null || options === void 0 ? void 0 : options.approvalQuorum,
|
|
266
268
|
authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
|
|
267
269
|
chainId,
|
|
268
270
|
elevatedAccessToken,
|
|
@@ -207,7 +207,10 @@ class StellarWalletConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
207
207
|
/**
|
|
208
208
|
* Signs a Stellar transaction XDR.
|
|
209
209
|
*/
|
|
210
|
-
signTransaction(transactionXdr
|
|
210
|
+
signTransaction(transactionXdr,
|
|
211
|
+
// Non-WaaS providers have no approvalQuorum channel; only the WaaS connector consumes it
|
|
212
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
213
|
+
_options) {
|
|
211
214
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
212
215
|
const provider = this.getProvider();
|
|
213
216
|
if (!provider) {
|
|
@@ -256,7 +259,10 @@ class StellarWalletConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
256
259
|
* For hardware wallets (e.g. Ledger via Freighter), falls back to signing a
|
|
257
260
|
* ManageData transaction because hardware wallets cannot sign arbitrary data.
|
|
258
261
|
*/
|
|
259
|
-
signMessage(messageToSign
|
|
262
|
+
signMessage(messageToSign,
|
|
263
|
+
// Non-WaaS providers have no approvalQuorum channel; only the WaaS connector consumes it
|
|
264
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
265
|
+
_options) {
|
|
260
266
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
261
267
|
const provider = this.getProvider();
|
|
262
268
|
if (!provider) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Horizon } from '@stellar/stellar-sdk';
|
|
2
|
+
import type { ApprovalQuorumRequestContext } from '@dynamic-labs-wallet/core';
|
|
2
3
|
import { Logger } from '@dynamic-labs/logger';
|
|
3
4
|
import type { GenericNetwork, IUITransaction } from '@dynamic-labs/types';
|
|
4
5
|
import { type Chain, WalletConnectorBase } from '@dynamic-labs/wallet-connector-core';
|
|
@@ -62,7 +63,9 @@ export declare abstract class StellarWalletConnector extends WalletConnectorBase
|
|
|
62
63
|
/**
|
|
63
64
|
* Signs a Stellar transaction XDR.
|
|
64
65
|
*/
|
|
65
|
-
signTransaction(transactionXdr: string
|
|
66
|
+
signTransaction(transactionXdr: string, _options?: {
|
|
67
|
+
approvalQuorum?: ApprovalQuorumRequestContext;
|
|
68
|
+
}): Promise<string>;
|
|
66
69
|
/**
|
|
67
70
|
* Signs a message using a Stellar ManageData transaction.
|
|
68
71
|
* Used as a fallback for hardware wallets (e.g. Ledger via Freighter) that
|
|
@@ -74,7 +77,10 @@ export declare abstract class StellarWalletConnector extends WalletConnectorBase
|
|
|
74
77
|
* For hardware wallets (e.g. Ledger via Freighter), falls back to signing a
|
|
75
78
|
* ManageData transaction because hardware wallets cannot sign arbitrary data.
|
|
76
79
|
*/
|
|
77
|
-
signMessage(messageToSign: string
|
|
80
|
+
signMessage(messageToSign: string, _options?: {
|
|
81
|
+
address?: string;
|
|
82
|
+
approvalQuorum?: ApprovalQuorumRequestContext;
|
|
83
|
+
}): Promise<string | undefined>;
|
|
78
84
|
getHorizonServer(): Promise<Horizon.Server>;
|
|
79
85
|
/**
|
|
80
86
|
* Gets the network passphrase for the current network.
|
|
@@ -203,7 +203,10 @@ class StellarWalletConnector extends WalletConnectorBase {
|
|
|
203
203
|
/**
|
|
204
204
|
* Signs a Stellar transaction XDR.
|
|
205
205
|
*/
|
|
206
|
-
signTransaction(transactionXdr
|
|
206
|
+
signTransaction(transactionXdr,
|
|
207
|
+
// Non-WaaS providers have no approvalQuorum channel; only the WaaS connector consumes it
|
|
208
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
209
|
+
_options) {
|
|
207
210
|
return __awaiter(this, void 0, void 0, function* () {
|
|
208
211
|
const provider = this.getProvider();
|
|
209
212
|
if (!provider) {
|
|
@@ -252,7 +255,10 @@ class StellarWalletConnector extends WalletConnectorBase {
|
|
|
252
255
|
* For hardware wallets (e.g. Ledger via Freighter), falls back to signing a
|
|
253
256
|
* ManageData transaction because hardware wallets cannot sign arbitrary data.
|
|
254
257
|
*/
|
|
255
|
-
signMessage(messageToSign
|
|
258
|
+
signMessage(messageToSign,
|
|
259
|
+
// Non-WaaS providers have no approvalQuorum channel; only the WaaS connector consumes it
|
|
260
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
261
|
+
_options) {
|
|
256
262
|
return __awaiter(this, void 0, void 0, function* () {
|
|
257
263
|
const provider = this.getProvider();
|
|
258
264
|
if (!provider) {
|
|
@@ -137,10 +137,10 @@ class StellarWallet extends walletConnectorCore.Wallet {
|
|
|
137
137
|
* @param transactionXdr - The transaction XDR to sign
|
|
138
138
|
* @returns The signed transaction XDR
|
|
139
139
|
*/
|
|
140
|
-
signTransaction(transactionXdr) {
|
|
140
|
+
signTransaction(transactionXdr, options) {
|
|
141
141
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
142
142
|
yield this._connector.connect();
|
|
143
|
-
return this._connector.signTransaction(transactionXdr);
|
|
143
|
+
return this._connector.signTransaction(transactionXdr, options);
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
146
|
/**
|
|
@@ -149,10 +149,10 @@ class StellarWallet extends walletConnectorCore.Wallet {
|
|
|
149
149
|
* @param message - The message to sign
|
|
150
150
|
* @returns The signature
|
|
151
151
|
*/
|
|
152
|
-
signMessage(message) {
|
|
152
|
+
signMessage(message, options) {
|
|
153
153
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
154
154
|
yield this._connector.connect();
|
|
155
|
-
const result = yield this._connector.signMessage(message);
|
|
155
|
+
const result = yield this._connector.signMessage(message, options);
|
|
156
156
|
if (!result) {
|
|
157
157
|
throw new Error('Failed to sign message');
|
|
158
158
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Horizon } from '@stellar/stellar-sdk';
|
|
2
|
+
import type { ApprovalQuorumRequestContext } from '@dynamic-labs-wallet/core';
|
|
2
3
|
import { Wallet } from '@dynamic-labs/wallet-connector-core';
|
|
3
4
|
import type { StellarWalletConnector } from '../connectors/StellarWalletConnector/StellarWalletConnector';
|
|
4
5
|
import type { StellarSendBalanceProps } from '../types';
|
|
@@ -52,14 +53,18 @@ export declare class StellarWallet extends Wallet<StellarWalletConnector> {
|
|
|
52
53
|
* @param transactionXdr - The transaction XDR to sign
|
|
53
54
|
* @returns The signed transaction XDR
|
|
54
55
|
*/
|
|
55
|
-
signTransaction(transactionXdr: string
|
|
56
|
+
signTransaction(transactionXdr: string, options?: {
|
|
57
|
+
approvalQuorum?: ApprovalQuorumRequestContext;
|
|
58
|
+
}): Promise<string>;
|
|
56
59
|
/**
|
|
57
60
|
* Signs a message.
|
|
58
61
|
*
|
|
59
62
|
* @param message - The message to sign
|
|
60
63
|
* @returns The signature
|
|
61
64
|
*/
|
|
62
|
-
signMessage(message: string
|
|
65
|
+
signMessage(message: string, options?: {
|
|
66
|
+
approvalQuorum?: ApprovalQuorumRequestContext;
|
|
67
|
+
}): Promise<string | undefined>;
|
|
63
68
|
/**
|
|
64
69
|
* Returns the wallet's current network.
|
|
65
70
|
*
|
|
@@ -133,10 +133,10 @@ class StellarWallet extends Wallet {
|
|
|
133
133
|
* @param transactionXdr - The transaction XDR to sign
|
|
134
134
|
* @returns The signed transaction XDR
|
|
135
135
|
*/
|
|
136
|
-
signTransaction(transactionXdr) {
|
|
136
|
+
signTransaction(transactionXdr, options) {
|
|
137
137
|
return __awaiter(this, void 0, void 0, function* () {
|
|
138
138
|
yield this._connector.connect();
|
|
139
|
-
return this._connector.signTransaction(transactionXdr);
|
|
139
|
+
return this._connector.signTransaction(transactionXdr, options);
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
142
|
/**
|
|
@@ -145,10 +145,10 @@ class StellarWallet extends Wallet {
|
|
|
145
145
|
* @param message - The message to sign
|
|
146
146
|
* @returns The signature
|
|
147
147
|
*/
|
|
148
|
-
signMessage(message) {
|
|
148
|
+
signMessage(message, options) {
|
|
149
149
|
return __awaiter(this, void 0, void 0, function* () {
|
|
150
150
|
yield this._connector.connect();
|
|
151
|
-
const result = yield this._connector.signMessage(message);
|
|
151
|
+
const result = yield this._connector.signMessage(message, options);
|
|
152
152
|
if (!result) {
|
|
153
153
|
throw new Error('Failed to sign message');
|
|
154
154
|
}
|