@dynamic-labs/solana-core 4.0.0-alpha.0 → 4.0.0-alpha.1
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 +16 -0
- package/package.json +7 -7
- package/src/wallet/SolanaWallet.cjs +24 -18
- package/src/wallet/SolanaWallet.js +25 -19
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.0.0-alpha.1](https://github.com/dynamic-labs/DynamicAuth/compare/v4.0.0-alpha.0...v4.0.0-alpha.1) (2024-09-17)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* blockaid website scanning for global connectivity ([#6874](https://github.com/dynamic-labs/DynamicAuth/issues/6874)) ([f8cbabd](https://github.com/dynamic-labs/DynamicAuth/commit/f8cbabd92fd4b5b096f47ff8e24c572ad7720dd8))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* deeplinking on ethereum and bitcoin sats connector ([#6917](https://github.com/dynamic-labs/DynamicAuth/issues/6917)) ([3896c3a](https://github.com/dynamic-labs/DynamicAuth/commit/3896c3a97819459da74dc5b4771796d7991c1f07))
|
|
13
|
+
* emit walletAdded event when createEmbeddedWalletAccount called ([#6922](https://github.com/dynamic-labs/DynamicAuth/issues/6922)) ([2a8bdd6](https://github.com/dynamic-labs/DynamicAuth/commit/2a8bdd68c50efd946c6f9b398dfae2b3585db34f))
|
|
14
|
+
* interface for sendBitcoin on unisat ([37a1bc2](https://github.com/dynamic-labs/DynamicAuth/commit/37a1bc216f43eef817c40e23b9161327f9d29c59))
|
|
15
|
+
* remove ballet crypto and duplicate keplr entry ([#6906](https://github.com/dynamic-labs/DynamicAuth/issues/6906)) ([14aeeea](https://github.com/dynamic-labs/DynamicAuth/commit/14aeeeaa8d906344f4aeddf9e73527df346b9ea0))
|
|
16
|
+
* solana and cosmos signers not working properly ([#6898](https://github.com/dynamic-labs/DynamicAuth/issues/6898)) ([6f07981](https://github.com/dynamic-labs/DynamicAuth/commit/6f079811c0d7e45b97d2dae72f4141268ab4fe0c))
|
|
17
|
+
|
|
2
18
|
## [4.0.0-alpha.0](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0...v4.0.0-alpha.0) (2024-09-13)
|
|
3
19
|
|
|
4
20
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/solana-core",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
|
|
@@ -26,16 +26,16 @@
|
|
|
26
26
|
"./package.json": "./package.json"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
29
|
+
"@dynamic-labs/sdk-api-core": "0.0.530",
|
|
30
30
|
"@solana/web3.js": "1.92.1",
|
|
31
31
|
"@solana/spl-token": "0.4.6"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@dynamic-labs/rpc-providers": "4.0.0-alpha.
|
|
35
|
-
"@dynamic-labs/types": "4.0.0-alpha.
|
|
36
|
-
"@dynamic-labs/utils": "4.0.0-alpha.
|
|
37
|
-
"@dynamic-labs/wallet-book": "4.0.0-alpha.
|
|
38
|
-
"@dynamic-labs/wallet-connector-core": "4.0.0-alpha.
|
|
34
|
+
"@dynamic-labs/rpc-providers": "4.0.0-alpha.1",
|
|
35
|
+
"@dynamic-labs/types": "4.0.0-alpha.1",
|
|
36
|
+
"@dynamic-labs/utils": "4.0.0-alpha.1",
|
|
37
|
+
"@dynamic-labs/wallet-book": "4.0.0-alpha.1",
|
|
38
|
+
"@dynamic-labs/wallet-connector-core": "4.0.0-alpha.1",
|
|
39
39
|
"eventemitter3": "5.0.1"
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -28,24 +28,30 @@ class SolanaWallet extends walletConnectorCore.Wallet {
|
|
|
28
28
|
if (!signer) {
|
|
29
29
|
throw new Error('unable to retrieve Solana signer');
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
31
|
+
try {
|
|
32
|
+
return utils.cloneObjectWithOverrides(signer, {
|
|
33
|
+
signAllTransactions: (transactions) => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
yield this.sync();
|
|
35
|
+
return signer.signAllTransactions(transactions);
|
|
36
|
+
}),
|
|
37
|
+
signAndSendTransaction: (transaction, ...args) => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
yield this.sync();
|
|
39
|
+
return signer.signAndSendTransaction(transaction, ...args);
|
|
40
|
+
}),
|
|
41
|
+
signMessage: (message, ...args) => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
yield this.sync();
|
|
43
|
+
return signer.signMessage(message, ...args);
|
|
44
|
+
}),
|
|
45
|
+
signTransaction: (transaction) => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
yield this.sync();
|
|
47
|
+
return signer.signTransaction(transaction);
|
|
48
|
+
}),
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
catch (error) {
|
|
52
|
+
walletConnectorCore.logger.warn(`Failed to add logic to auto-sync the wallet. Signer might be out of sync for wallet: ${this._connector.name} (${this.address})`, error);
|
|
53
|
+
return signer;
|
|
54
|
+
}
|
|
49
55
|
});
|
|
50
56
|
}
|
|
51
57
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { __awaiter } from '../../_virtual/_tslib.js';
|
|
3
|
-
import { Wallet } from '@dynamic-labs/wallet-connector-core';
|
|
3
|
+
import { Wallet, logger } from '@dynamic-labs/wallet-connector-core';
|
|
4
4
|
import { cloneObjectWithOverrides } from '@dynamic-labs/utils';
|
|
5
5
|
|
|
6
6
|
class SolanaWallet extends Wallet {
|
|
@@ -24,24 +24,30 @@ class SolanaWallet extends Wallet {
|
|
|
24
24
|
if (!signer) {
|
|
25
25
|
throw new Error('unable to retrieve Solana signer');
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
27
|
+
try {
|
|
28
|
+
return cloneObjectWithOverrides(signer, {
|
|
29
|
+
signAllTransactions: (transactions) => __awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
yield this.sync();
|
|
31
|
+
return signer.signAllTransactions(transactions);
|
|
32
|
+
}),
|
|
33
|
+
signAndSendTransaction: (transaction, ...args) => __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
yield this.sync();
|
|
35
|
+
return signer.signAndSendTransaction(transaction, ...args);
|
|
36
|
+
}),
|
|
37
|
+
signMessage: (message, ...args) => __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
yield this.sync();
|
|
39
|
+
return signer.signMessage(message, ...args);
|
|
40
|
+
}),
|
|
41
|
+
signTransaction: (transaction) => __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
yield this.sync();
|
|
43
|
+
return signer.signTransaction(transaction);
|
|
44
|
+
}),
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
logger.warn(`Failed to add logic to auto-sync the wallet. Signer might be out of sync for wallet: ${this._connector.name} (${this.address})`, error);
|
|
49
|
+
return signer;
|
|
50
|
+
}
|
|
45
51
|
});
|
|
46
52
|
}
|
|
47
53
|
}
|