@dynamic-labs/legacy-solana-extension 5.9.4 → 5.9.6
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 +11 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +7 -7
- package/src/lib/createSigner/createSigner.cjs +8 -10
- package/src/lib/createSigner/createSigner.js +8 -10
- package/src/lib/types.d.ts +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
|
|
2
|
+
### [5.9.6](https://github.com/dynamic-labs/dynamic-auth/compare/v5.9.5...v5.9.6) (2026-10-06)
|
|
3
|
+
|
|
4
|
+
### [5.9.5](https://github.com/dynamic-labs/dynamic-auth/compare/v5.9.4...v5.9.5) (2026-10-06)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
* **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))
|
|
10
|
+
* **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)
|
|
11
|
+
* **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))
|
|
12
|
+
|
|
2
13
|
### [5.9.4](https://github.com/dynamic-labs/dynamic-auth/compare/v5.9.3...v5.9.4) (2026-10-02)
|
|
3
14
|
|
|
4
15
|
### [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/legacy-solana-extension",
|
|
3
|
-
"version": "5.9.
|
|
3
|
+
"version": "5.9.6",
|
|
4
4
|
"main": "./src/index.cjs",
|
|
5
5
|
"module": "./src/index.js",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@dynamic-labs/sdk-api-core": "0.70.0",
|
|
18
|
-
"@dynamic-labs/assert-package-version": "5.9.
|
|
19
|
-
"@dynamic-labs/legacy-client": "5.9.
|
|
20
|
-
"@dynamic-labs/message-transport": "5.9.
|
|
21
|
-
"@dynamic-labs/solana-core": "5.9.
|
|
22
|
-
"@dynamic-labs/types": "5.9.
|
|
23
|
-
"@dynamic-labs/webview-messages": "5.9.
|
|
18
|
+
"@dynamic-labs/assert-package-version": "5.9.6",
|
|
19
|
+
"@dynamic-labs/legacy-client": "5.9.6",
|
|
20
|
+
"@dynamic-labs/message-transport": "5.9.6",
|
|
21
|
+
"@dynamic-labs/solana-core": "5.9.6",
|
|
22
|
+
"@dynamic-labs/types": "5.9.6",
|
|
23
|
+
"@dynamic-labs/webview-messages": "5.9.6"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"@solana/web3.js": "1.98.1"
|
|
@@ -11,11 +11,10 @@ const createSigner = ({ wallet, core, }) => {
|
|
|
11
11
|
const solanaRequestChannel = messageTransport.createRequestChannel(core.messageTransport);
|
|
12
12
|
return {
|
|
13
13
|
publicKey: new web3_js.PublicKey(wallet.address),
|
|
14
|
-
signAllTransactions: (transactions) => solanaRequestChannel
|
|
15
|
-
.request('solana_signAllTransactions', {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
})
|
|
14
|
+
signAllTransactions: (transactions, options) => solanaRequestChannel
|
|
15
|
+
.request('solana_signAllTransactions', Object.assign(Object.assign({ encodedTransactions: transactions.map(solanaCore.encodeTransactionToBase64) }, ((options === null || options === void 0 ? void 0 : options.sponsorshipMode) && {
|
|
16
|
+
sponsorshipMode: options.sponsorshipMode,
|
|
17
|
+
})), { walletId: wallet.id }))
|
|
19
18
|
.then(({ encodedTransactions }) => encodedTransactions.map(solanaCore.decodeTransactionFromBase64)),
|
|
20
19
|
signAndSendTransaction: (transaction, options) => solanaRequestChannel.request('solana_signAndSendTransaction', {
|
|
21
20
|
encodedTransaction: solanaCore.encodeTransactionToBase64(transaction),
|
|
@@ -30,11 +29,10 @@ const createSigner = ({ wallet, core, }) => {
|
|
|
30
29
|
.then(({ signature }) => ({
|
|
31
30
|
signature: new TextEncoder().encode(signature),
|
|
32
31
|
})),
|
|
33
|
-
signTransaction: (transaction) => solanaRequestChannel
|
|
34
|
-
.request('solana_signTransaction', {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
})
|
|
32
|
+
signTransaction: (transaction, options) => solanaRequestChannel
|
|
33
|
+
.request('solana_signTransaction', Object.assign(Object.assign({ encodedTransaction: solanaCore.encodeTransactionToBase64(transaction) }, ((options === null || options === void 0 ? void 0 : options.sponsorshipMode) && {
|
|
34
|
+
sponsorshipMode: options.sponsorshipMode,
|
|
35
|
+
})), { walletId: wallet.id }))
|
|
38
36
|
.then(({ encodedTransaction }) => solanaCore.decodeTransactionFromBase64(encodedTransaction)),
|
|
39
37
|
};
|
|
40
38
|
};
|
|
@@ -7,11 +7,10 @@ const createSigner = ({ wallet, core, }) => {
|
|
|
7
7
|
const solanaRequestChannel = createRequestChannel(core.messageTransport);
|
|
8
8
|
return {
|
|
9
9
|
publicKey: new PublicKey(wallet.address),
|
|
10
|
-
signAllTransactions: (transactions) => solanaRequestChannel
|
|
11
|
-
.request('solana_signAllTransactions', {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
})
|
|
10
|
+
signAllTransactions: (transactions, options) => solanaRequestChannel
|
|
11
|
+
.request('solana_signAllTransactions', Object.assign(Object.assign({ encodedTransactions: transactions.map(encodeTransactionToBase64) }, ((options === null || options === void 0 ? void 0 : options.sponsorshipMode) && {
|
|
12
|
+
sponsorshipMode: options.sponsorshipMode,
|
|
13
|
+
})), { walletId: wallet.id }))
|
|
15
14
|
.then(({ encodedTransactions }) => encodedTransactions.map(decodeTransactionFromBase64)),
|
|
16
15
|
signAndSendTransaction: (transaction, options) => solanaRequestChannel.request('solana_signAndSendTransaction', {
|
|
17
16
|
encodedTransaction: encodeTransactionToBase64(transaction),
|
|
@@ -26,11 +25,10 @@ const createSigner = ({ wallet, core, }) => {
|
|
|
26
25
|
.then(({ signature }) => ({
|
|
27
26
|
signature: new TextEncoder().encode(signature),
|
|
28
27
|
})),
|
|
29
|
-
signTransaction: (transaction) => solanaRequestChannel
|
|
30
|
-
.request('solana_signTransaction', {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
})
|
|
28
|
+
signTransaction: (transaction, options) => solanaRequestChannel
|
|
29
|
+
.request('solana_signTransaction', Object.assign(Object.assign({ encodedTransaction: encodeTransactionToBase64(transaction) }, ((options === null || options === void 0 ? void 0 : options.sponsorshipMode) && {
|
|
30
|
+
sponsorshipMode: options.sponsorshipMode,
|
|
31
|
+
})), { walletId: wallet.id }))
|
|
34
32
|
.then(({ encodedTransaction }) => decodeTransactionFromBase64(encodedTransaction)),
|
|
35
33
|
};
|
|
36
34
|
};
|
package/src/lib/types.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { PublicKey,
|
|
1
|
+
import { PublicKey, Transaction, TransactionSignature, VersionedTransaction } from '@solana/web3.js';
|
|
2
|
+
import { SolanaSendOptions, SolanaTransactionOptions } from '@dynamic-labs/solana-core';
|
|
2
3
|
export type SignedMessage = {
|
|
3
4
|
signature: Uint8Array;
|
|
4
5
|
};
|
|
5
6
|
export type ISolanaSigner = {
|
|
6
7
|
publicKey: PublicKey;
|
|
7
|
-
signTransaction<T extends Transaction | VersionedTransaction>(transaction: T): Promise<T>;
|
|
8
|
-
signAllTransactions<T extends Transaction | VersionedTransaction>(transactions: T[]): Promise<T[]>;
|
|
9
|
-
signAndSendTransaction<T extends Transaction | VersionedTransaction>(transaction: T, options?:
|
|
8
|
+
signTransaction<T extends Transaction | VersionedTransaction>(transaction: T, options?: SolanaTransactionOptions): Promise<T>;
|
|
9
|
+
signAllTransactions<T extends Transaction | VersionedTransaction>(transactions: T[], options?: SolanaTransactionOptions): Promise<T[]>;
|
|
10
|
+
signAndSendTransaction<T extends Transaction | VersionedTransaction>(transaction: T, options?: SolanaSendOptions): Promise<{
|
|
10
11
|
signature: TransactionSignature;
|
|
11
12
|
}>;
|
|
12
13
|
signMessage(message: Uint8Array, encoding?: string): Promise<SignedMessage>;
|