@dynamic-labs/solana-core 5.9.4 → 5.10.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 +25 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +7 -7
- package/src/connector/SolanaWalletConnector.cjs +3 -0
- package/src/connector/SolanaWalletConnector.d.ts +1 -0
- package/src/connector/SolanaWalletConnector.js +3 -0
- package/src/index.d.ts +1 -1
- package/src/types.d.ts +8 -3
- package/src/utils/SolanaUiTransaction/SolanaUiTransaction.cjs +2 -1
- package/src/utils/SolanaUiTransaction/SolanaUiTransaction.d.ts +4 -1
- package/src/utils/SolanaUiTransaction/SolanaUiTransaction.js +2 -1
- package/src/wallet/SolanaWallet.cjs +27 -6
- package/src/wallet/SolanaWallet.d.ts +1 -0
- package/src/wallet/SolanaWallet.js +28 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,29 @@
|
|
|
1
1
|
|
|
2
|
+
## [5.10.0](https://github.com/dynamic-labs/dynamic-auth/compare/v5.9.6...v5.10.0) (2026-10-09)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add lockWallets/lockWallet to re-lock password-encrypted WaaS wallets ([#12461](https://github.com/dynamic-labs/dynamic-auth/issues/12461)) ([090f544](https://github.com/dynamic-labs/dynamic-auth/commit/090f544150f4359bbfd9c0ffb4c450868adb6759))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* **logger:** scope server error forwarding per instance ([#12477](https://github.com/dynamic-labs/dynamic-auth/issues/12477)) ([baa8c78](https://github.com/dynamic-labs/dynamic-auth/commit/baa8c780f4ef3cc35d62c363e03e74412ece91b9))
|
|
13
|
+
* **waas:** fall back when crypto.randomUUID is unavailable ([#12435](https://github.com/dynamic-labs/dynamic-auth/issues/12435)) ([5756f53](https://github.com/dynamic-labs/dynamic-auth/commit/5756f53423bd8316bce97e46ce38fc923fd5d574))
|
|
14
|
+
* **waas:** include every wallet in password update batches ([#12462](https://github.com/dynamic-labs/dynamic-auth/issues/12462)) ([80218f7](https://github.com/dynamic-labs/dynamic-auth/commit/80218f702dadfee9673cec4037889449bcd5ceb6))
|
|
15
|
+
|
|
16
|
+
### [5.9.6](https://github.com/dynamic-labs/dynamic-auth/compare/v5.9.5...v5.9.6) (2026-10-06)
|
|
17
|
+
|
|
18
|
+
### [5.9.5](https://github.com/dynamic-labs/dynamic-auth/compare/v5.9.4...v5.9.5) (2026-10-06)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* **ton:** move encodeComment to base TonWalletConnector ([#12459](https://github.com/dynamic-labs/dynamic-auth/issues/12459)) ([647df5b](https://github.com/dynamic-labs/dynamic-auth/commit/647df5bc3986d59d89dbe31bbd3ebe1c4605ec40))
|
|
24
|
+
* **waas-svm:** apply overrideBlockhash before sponsorship ([#12319](https://github.com/dynamic-labs/dynamic-auth/issues/12319)) ([074ce3c](https://github.com/dynamic-labs/dynamic-auth/commit/074ce3c4ecfa080b683c84120fa7643e8fe064d4)), closes [#10599](https://github.com/dynamic-labs/dynamic-auth/issues/10599) [#10599](https://github.com/dynamic-labs/dynamic-auth/issues/10599) [#10599](https://github.com/dynamic-labs/dynamic-auth/issues/10599) [#10599](https://github.com/dynamic-labs/dynamic-auth/issues/10599)
|
|
25
|
+
* **wallet-book:** use phantom.com for Phantom in-app-browser links ([#12456](https://github.com/dynamic-labs/dynamic-auth/issues/12456)) ([e762553](https://github.com/dynamic-labs/dynamic-auth/commit/e7625534f8beda3e649f121e637451e2188faef6))
|
|
26
|
+
|
|
2
27
|
### [5.9.4](https://github.com/dynamic-labs/dynamic-auth/compare/v5.9.3...v5.9.4) (2026-10-02)
|
|
3
28
|
|
|
4
29
|
### [5.9.3](https://github.com/dynamic-labs/dynamic-auth/compare/v5.9.2...v5.9.3) (2026-10-02)
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/solana-core",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.10.0",
|
|
4
4
|
"description": "Core package for utilities and types for solana",
|
|
5
5
|
"author": "Dynamic Labs, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
"homepage": "https://www.dynamic.xyz/",
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@dynamic-labs/sdk-api-core": "0.70.0",
|
|
22
|
-
"@dynamic-labs/utils": "5.
|
|
22
|
+
"@dynamic-labs/utils": "5.10.0",
|
|
23
23
|
"@solana/web3.js": "1.98.1",
|
|
24
24
|
"@solana/spl-token": "0.4.14",
|
|
25
|
-
"@dynamic-labs/assert-package-version": "5.
|
|
26
|
-
"@dynamic-labs/rpc-providers": "5.
|
|
27
|
-
"@dynamic-labs/types": "5.
|
|
28
|
-
"@dynamic-labs/wallet-book": "5.
|
|
29
|
-
"@dynamic-labs/wallet-connector-core": "5.
|
|
25
|
+
"@dynamic-labs/assert-package-version": "5.10.0",
|
|
26
|
+
"@dynamic-labs/rpc-providers": "5.10.0",
|
|
27
|
+
"@dynamic-labs/types": "5.10.0",
|
|
28
|
+
"@dynamic-labs/wallet-book": "5.10.0",
|
|
29
|
+
"@dynamic-labs/wallet-connector-core": "5.10.0",
|
|
30
30
|
"eventemitter3": "5.0.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {}
|
|
@@ -25,6 +25,9 @@ class SolanaWalletConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
25
25
|
this.ChainWallet = SolanaWallet.SolanaWallet;
|
|
26
26
|
this.supportedChains = ['SOL'];
|
|
27
27
|
this.connectedChain = 'SOL';
|
|
28
|
+
// Whether the connector can sponsor Solana transactions (overridden by
|
|
29
|
+
// connectors with a sponsorship implementation, e.g. WaaS SVM)
|
|
30
|
+
this.supportsSvmGasSponsorship = false;
|
|
28
31
|
this.solNetworks = getBackwardsCompatibleSolNetworks.getBackwardsCompatibleSolNetworks(opts.solNetworks, opts.connectionConfig);
|
|
29
32
|
this.chainRpcProviders = opts.chainRpcProviders;
|
|
30
33
|
this.connectionConfig = opts.connectionConfig;
|
|
@@ -23,6 +23,7 @@ export declare abstract class SolanaWalletConnector extends WalletConnectorBase<
|
|
|
23
23
|
ChainWallet: typeof SolanaWallet;
|
|
24
24
|
supportedChains: Chain[];
|
|
25
25
|
connectedChain: Chain;
|
|
26
|
+
readonly supportsSvmGasSponsorship: boolean;
|
|
26
27
|
protected connectionConfig: SolanaConnectionConfig | undefined;
|
|
27
28
|
constructor(opts: SolanaWalletConnectorOpts);
|
|
28
29
|
getNetworkId(): string;
|
|
@@ -21,6 +21,9 @@ class SolanaWalletConnector extends WalletConnectorBase {
|
|
|
21
21
|
this.ChainWallet = SolanaWallet;
|
|
22
22
|
this.supportedChains = ['SOL'];
|
|
23
23
|
this.connectedChain = 'SOL';
|
|
24
|
+
// Whether the connector can sponsor Solana transactions (overridden by
|
|
25
|
+
// connectors with a sponsorship implementation, e.g. WaaS SVM)
|
|
26
|
+
this.supportsSvmGasSponsorship = false;
|
|
24
27
|
this.solNetworks = getBackwardsCompatibleSolNetworks(opts.solNetworks, opts.connectionConfig);
|
|
25
28
|
this.chainRpcProviders = opts.chainRpcProviders;
|
|
26
29
|
this.connectionConfig = opts.connectionConfig;
|
package/src/index.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ export * from './rpc';
|
|
|
3
3
|
export * from './utils';
|
|
4
4
|
export * from './wallet';
|
|
5
5
|
export { SOLANA_GENESIS_HASH, DYNAMIC_SVM_NETWORK_ID_LS_KEY, } from './constants';
|
|
6
|
-
export type { ConnectionResult, ExtensionLocator, ISolana, IBackpackSolanaSigner, SignedMessage, ISolanaSigner, SolanaConnectionConfig, ISolanaEvents, } from './types';
|
|
6
|
+
export type { ConnectionResult, ExtensionLocator, ISolana, IBackpackSolanaSigner, SignedMessage, ISolanaSigner, GasSponsorshipMode, SolanaSendOptions, SolanaTransactionOptions, SolanaConnectionConfig, ISolanaEvents, } from './types';
|
package/src/types.d.ts
CHANGED
|
@@ -32,6 +32,11 @@ export interface ISolanaEvents {
|
|
|
32
32
|
export type SignedMessage = {
|
|
33
33
|
signature: Uint8Array;
|
|
34
34
|
};
|
|
35
|
+
export type GasSponsorshipMode = 'auto' | 'off' | 'required';
|
|
36
|
+
export type SolanaTransactionOptions = {
|
|
37
|
+
sponsorshipMode?: GasSponsorshipMode;
|
|
38
|
+
};
|
|
39
|
+
export type SolanaSendOptions = SendOptions & SolanaTransactionOptions;
|
|
35
40
|
type ExtensionLocators = {
|
|
36
41
|
[key in ExtensionLocator]: boolean;
|
|
37
42
|
};
|
|
@@ -41,9 +46,9 @@ export type ISolanaSigner = ExtensionLocators & EventEmitter<ISolanaEvents> & {
|
|
|
41
46
|
};
|
|
42
47
|
isConnected: boolean;
|
|
43
48
|
providers: ISolanaSigner[];
|
|
44
|
-
signTransaction<T extends Transaction | VersionedTransaction>(transaction: T): Promise<T>;
|
|
45
|
-
signAllTransactions<T extends Transaction | VersionedTransaction>(transactions: T[]): Promise<T[]>;
|
|
46
|
-
signAndSendTransaction<T extends Transaction | VersionedTransaction>(transaction: T, options?:
|
|
49
|
+
signTransaction<T extends Transaction | VersionedTransaction>(transaction: T, options?: SolanaTransactionOptions): Promise<T>;
|
|
50
|
+
signAllTransactions<T extends Transaction | VersionedTransaction>(transactions: T[], options?: SolanaTransactionOptions): Promise<T[]>;
|
|
51
|
+
signAndSendTransaction<T extends Transaction | VersionedTransaction>(transaction: T, options?: SolanaSendOptions): Promise<{
|
|
47
52
|
signature: TransactionSignature;
|
|
48
53
|
}>;
|
|
49
54
|
signMessage(message: Uint8Array, encoding?: string): Promise<SignedMessage>;
|
|
@@ -10,7 +10,7 @@ var utils = require('@dynamic-labs/utils');
|
|
|
10
10
|
|
|
11
11
|
const LAMPORTS_PER_SOL = 1000000000;
|
|
12
12
|
class SolanaUiTransaction {
|
|
13
|
-
constructor({ onSubmit, from, connection, multipleTransactions, }) {
|
|
13
|
+
constructor({ onSubmit, from, connection, multipleTransactions, sponsorshipMode, }) {
|
|
14
14
|
this.chain = 'SOL';
|
|
15
15
|
this.data = undefined;
|
|
16
16
|
this.fee = { gas: undefined };
|
|
@@ -19,6 +19,7 @@ class SolanaUiTransaction {
|
|
|
19
19
|
this.onSubmit = onSubmit;
|
|
20
20
|
this.connection = connection;
|
|
21
21
|
this.multipleTransactions = multipleTransactions;
|
|
22
|
+
this.sponsorshipMode = sponsorshipMode;
|
|
22
23
|
}
|
|
23
24
|
fetchFee() {
|
|
24
25
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { Connection, Transaction, VersionedTransaction } from '@solana/web3.js';
|
|
2
2
|
import { IUITransaction, IUITransactionFormatOptions } from '@dynamic-labs/types';
|
|
3
|
+
import { GasSponsorshipMode } from '../../types';
|
|
3
4
|
export declare const LAMPORTS_PER_SOL = 1000000000;
|
|
4
5
|
type SolanaUiTransactionProps = {
|
|
5
6
|
from: string;
|
|
6
7
|
connection: Connection;
|
|
7
8
|
onSubmit: (transaction?: Transaction | VersionedTransaction) => Promise<any>;
|
|
8
9
|
multipleTransactions?: (Transaction | VersionedTransaction)[];
|
|
10
|
+
sponsorshipMode?: GasSponsorshipMode;
|
|
9
11
|
};
|
|
10
12
|
export declare class SolanaUiTransaction implements IUITransaction {
|
|
11
13
|
to: string | undefined;
|
|
@@ -21,9 +23,10 @@ export declare class SolanaUiTransaction implements IUITransaction {
|
|
|
21
23
|
nonNativeAddress?: string;
|
|
22
24
|
nonNativeDecimal?: number;
|
|
23
25
|
nonNativeValue?: bigint;
|
|
26
|
+
sponsorshipMode?: GasSponsorshipMode;
|
|
24
27
|
private onSubmit;
|
|
25
28
|
private connection;
|
|
26
|
-
constructor({ onSubmit, from, connection, multipleTransactions, }: SolanaUiTransactionProps);
|
|
29
|
+
constructor({ onSubmit, from, connection, multipleTransactions, sponsorshipMode, }: SolanaUiTransactionProps);
|
|
27
30
|
nativePrice?: number | undefined;
|
|
28
31
|
fetchFee(): Promise<void>;
|
|
29
32
|
isGasSponsored(): boolean;
|
|
@@ -6,7 +6,7 @@ import { formatNumberText } from '@dynamic-labs/utils';
|
|
|
6
6
|
|
|
7
7
|
const LAMPORTS_PER_SOL = 1000000000;
|
|
8
8
|
class SolanaUiTransaction {
|
|
9
|
-
constructor({ onSubmit, from, connection, multipleTransactions, }) {
|
|
9
|
+
constructor({ onSubmit, from, connection, multipleTransactions, sponsorshipMode, }) {
|
|
10
10
|
this.chain = 'SOL';
|
|
11
11
|
this.data = undefined;
|
|
12
12
|
this.fee = { gas: undefined };
|
|
@@ -15,6 +15,7 @@ class SolanaUiTransaction {
|
|
|
15
15
|
this.onSubmit = onSubmit;
|
|
16
16
|
this.connection = connection;
|
|
17
17
|
this.multipleTransactions = multipleTransactions;
|
|
18
|
+
this.sponsorshipMode = sponsorshipMode;
|
|
18
19
|
}
|
|
19
20
|
fetchFee() {
|
|
20
21
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -78,6 +78,12 @@ class SolanaWallet extends walletConnectorCore.Wallet {
|
|
|
78
78
|
return signature;
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
|
+
assertSponsorshipSupported(options) {
|
|
82
|
+
if ((options === null || options === void 0 ? void 0 : options.sponsorshipMode) === 'required' &&
|
|
83
|
+
!this._connector.supportsSvmGasSponsorship) {
|
|
84
|
+
throw new utils.DynamicError('This wallet does not support gas sponsorship', 'sponsorship_not_supported');
|
|
85
|
+
}
|
|
86
|
+
}
|
|
81
87
|
/**
|
|
82
88
|
* Retrieves the RPC connection
|
|
83
89
|
* @returns A promise that resolves to the RPC connection
|
|
@@ -100,35 +106,50 @@ class SolanaWallet extends walletConnectorCore.Wallet {
|
|
|
100
106
|
}
|
|
101
107
|
try {
|
|
102
108
|
return utils.cloneObjectWithOverrides(signer, {
|
|
103
|
-
signAllTransactions: (transactions) => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
109
|
+
signAllTransactions: (transactions, options) => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
110
|
+
this.assertSponsorshipSupported(options);
|
|
104
111
|
yield this.sync();
|
|
105
112
|
yield screenSolanaTransactions.screenSolanaTransactions({
|
|
106
113
|
senderAddress: this.address,
|
|
107
114
|
transactionScreening: this._connector.transactionScreening,
|
|
108
115
|
transactions,
|
|
109
116
|
});
|
|
117
|
+
if (options) {
|
|
118
|
+
return signer.signAllTransactions(transactions, options);
|
|
119
|
+
}
|
|
110
120
|
return signer.signAllTransactions(transactions);
|
|
111
121
|
}),
|
|
112
|
-
signAndSendTransaction: (transaction,
|
|
122
|
+
signAndSendTransaction: (transaction, options) => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
this.assertSponsorshipSupported(options);
|
|
113
124
|
yield this.sync();
|
|
114
125
|
yield screenSolanaTransactions.screenSolanaTransactions({
|
|
115
126
|
senderAddress: this.address,
|
|
116
127
|
transactionScreening: this._connector.transactionScreening,
|
|
117
128
|
transactions: [transaction],
|
|
118
129
|
});
|
|
119
|
-
|
|
130
|
+
if (options) {
|
|
131
|
+
return signer.signAndSendTransaction(transaction, options);
|
|
132
|
+
}
|
|
133
|
+
return signer.signAndSendTransaction(transaction);
|
|
120
134
|
}),
|
|
121
|
-
signMessage: (message,
|
|
135
|
+
signMessage: (message, encoding) => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
122
136
|
yield this.sync();
|
|
123
|
-
|
|
137
|
+
if (encoding) {
|
|
138
|
+
return signer.signMessage(message, encoding);
|
|
139
|
+
}
|
|
140
|
+
return signer.signMessage(message);
|
|
124
141
|
}),
|
|
125
|
-
signTransaction: (transaction) => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
142
|
+
signTransaction: (transaction, options) => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
143
|
+
this.assertSponsorshipSupported(options);
|
|
126
144
|
yield this.sync();
|
|
127
145
|
yield screenSolanaTransactions.screenSolanaTransactions({
|
|
128
146
|
senderAddress: this.address,
|
|
129
147
|
transactionScreening: this._connector.transactionScreening,
|
|
130
148
|
transactions: [transaction],
|
|
131
149
|
});
|
|
150
|
+
if (options) {
|
|
151
|
+
return signer.signTransaction(transaction, options);
|
|
152
|
+
}
|
|
132
153
|
return signer.signTransaction(transaction);
|
|
133
154
|
}),
|
|
134
155
|
});
|
|
@@ -29,6 +29,7 @@ export declare class SolanaWallet extends Wallet<SolanaWalletConnector> {
|
|
|
29
29
|
createAssociatedTokenAccount({ tokenAddress, }: {
|
|
30
30
|
tokenAddress: string;
|
|
31
31
|
}): Promise<string | undefined>;
|
|
32
|
+
private assertSponsorshipSupported;
|
|
32
33
|
/**
|
|
33
34
|
* Retrieves the RPC connection
|
|
34
35
|
* @returns A promise that resolves to the RPC connection
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { __awaiter } from '../../_virtual/_tslib.js';
|
|
3
3
|
import { Wallet, logger } from '@dynamic-labs/wallet-connector-core';
|
|
4
|
-
import { cloneObjectWithOverrides } from '@dynamic-labs/utils';
|
|
4
|
+
import { DynamicError, cloneObjectWithOverrides } from '@dynamic-labs/utils';
|
|
5
5
|
import '@solana/web3.js';
|
|
6
6
|
import '@solana/spl-token';
|
|
7
7
|
import { createNonNativeTokenTransfer } from '../utils/createNonNativeTokenTransfer/createNonNativeTokenTransfer.js';
|
|
@@ -74,6 +74,12 @@ class SolanaWallet extends Wallet {
|
|
|
74
74
|
return signature;
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
|
+
assertSponsorshipSupported(options) {
|
|
78
|
+
if ((options === null || options === void 0 ? void 0 : options.sponsorshipMode) === 'required' &&
|
|
79
|
+
!this._connector.supportsSvmGasSponsorship) {
|
|
80
|
+
throw new DynamicError('This wallet does not support gas sponsorship', 'sponsorship_not_supported');
|
|
81
|
+
}
|
|
82
|
+
}
|
|
77
83
|
/**
|
|
78
84
|
* Retrieves the RPC connection
|
|
79
85
|
* @returns A promise that resolves to the RPC connection
|
|
@@ -96,35 +102,50 @@ class SolanaWallet extends Wallet {
|
|
|
96
102
|
}
|
|
97
103
|
try {
|
|
98
104
|
return cloneObjectWithOverrides(signer, {
|
|
99
|
-
signAllTransactions: (transactions) => __awaiter(this, void 0, void 0, function* () {
|
|
105
|
+
signAllTransactions: (transactions, options) => __awaiter(this, void 0, void 0, function* () {
|
|
106
|
+
this.assertSponsorshipSupported(options);
|
|
100
107
|
yield this.sync();
|
|
101
108
|
yield screenSolanaTransactions({
|
|
102
109
|
senderAddress: this.address,
|
|
103
110
|
transactionScreening: this._connector.transactionScreening,
|
|
104
111
|
transactions,
|
|
105
112
|
});
|
|
113
|
+
if (options) {
|
|
114
|
+
return signer.signAllTransactions(transactions, options);
|
|
115
|
+
}
|
|
106
116
|
return signer.signAllTransactions(transactions);
|
|
107
117
|
}),
|
|
108
|
-
signAndSendTransaction: (transaction,
|
|
118
|
+
signAndSendTransaction: (transaction, options) => __awaiter(this, void 0, void 0, function* () {
|
|
119
|
+
this.assertSponsorshipSupported(options);
|
|
109
120
|
yield this.sync();
|
|
110
121
|
yield screenSolanaTransactions({
|
|
111
122
|
senderAddress: this.address,
|
|
112
123
|
transactionScreening: this._connector.transactionScreening,
|
|
113
124
|
transactions: [transaction],
|
|
114
125
|
});
|
|
115
|
-
|
|
126
|
+
if (options) {
|
|
127
|
+
return signer.signAndSendTransaction(transaction, options);
|
|
128
|
+
}
|
|
129
|
+
return signer.signAndSendTransaction(transaction);
|
|
116
130
|
}),
|
|
117
|
-
signMessage: (message,
|
|
131
|
+
signMessage: (message, encoding) => __awaiter(this, void 0, void 0, function* () {
|
|
118
132
|
yield this.sync();
|
|
119
|
-
|
|
133
|
+
if (encoding) {
|
|
134
|
+
return signer.signMessage(message, encoding);
|
|
135
|
+
}
|
|
136
|
+
return signer.signMessage(message);
|
|
120
137
|
}),
|
|
121
|
-
signTransaction: (transaction) => __awaiter(this, void 0, void 0, function* () {
|
|
138
|
+
signTransaction: (transaction, options) => __awaiter(this, void 0, void 0, function* () {
|
|
139
|
+
this.assertSponsorshipSupported(options);
|
|
122
140
|
yield this.sync();
|
|
123
141
|
yield screenSolanaTransactions({
|
|
124
142
|
senderAddress: this.address,
|
|
125
143
|
transactionScreening: this._connector.transactionScreening,
|
|
126
144
|
transactions: [transaction],
|
|
127
145
|
});
|
|
146
|
+
if (options) {
|
|
147
|
+
return signer.signTransaction(transaction, options);
|
|
148
|
+
}
|
|
128
149
|
return signer.signTransaction(transaction);
|
|
129
150
|
}),
|
|
130
151
|
});
|