@dynamic-labs/solana 2.0.0-alpha.10 → 2.0.0-alpha.11
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 +27 -0
- package/package.json +8 -8
- package/src/CoinbaseSolana.cjs +1 -1
- package/src/CoinbaseSolana.js +1 -1
- package/src/Slope.cjs +1 -1
- package/src/Slope.d.ts +1 -1
- package/src/Slope.js +1 -1
- package/src/Solflare.d.ts +1 -1
- package/src/injected/BackpackSol.cjs +1 -1
- package/src/injected/BackpackSol.js +1 -1
- package/src/injected/InjectedWalletBase.cjs +3 -3
- package/src/injected/InjectedWalletBase.d.ts +1 -1
- package/src/injected/InjectedWalletBase.js +3 -3
- package/src/injected/PhantomInjected.cjs +3 -3
- package/src/injected/PhantomInjected.d.ts +1 -1
- package/src/injected/PhantomInjected.js +3 -3
- package/src/phantomRedirect/PhantomRedirect.cjs +1 -1
- package/src/phantomRedirect/PhantomRedirect.d.ts +1 -1
- package/src/phantomRedirect/PhantomRedirect.js +1 -1
- package/src/solProviderHelper.cjs +2 -2
- package/src/solProviderHelper.d.ts +1 -1
- package/src/solProviderHelper.js +2 -2
- package/src/solWalletConnector.cjs +1 -1
- package/src/solWalletConnector.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,31 @@
|
|
|
1
1
|
|
|
2
|
+
## [2.0.0-alpha.11](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.10...v2.0.0-alpha.11) (2024-03-12)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### ⚠ BREAKING CHANGES
|
|
6
|
+
|
|
7
|
+
* rename FetchPublicAddressOpts to GetAddressOpts (#4910)
|
|
8
|
+
* remove use effect in useWalletEventListeners (#4843)
|
|
9
|
+
* rename fetchPublicAddress to getAddress (#4851)
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* Add farcaster to iconic ([#4925](https://github.com/dynamic-labs/DynamicAuth/issues/4925)) ([ab282dc](https://github.com/dynamic-labs/DynamicAuth/commit/ab282dc9cdcc0fe11f014d002b056ef4d3b34234))
|
|
14
|
+
* use transaction confirmation ui on signAndSendTransaction for solana embedded wallets ([#4909](https://github.com/dynamic-labs/DynamicAuth/issues/4909)) ([d77e89e](https://github.com/dynamic-labs/DynamicAuth/commit/d77e89ecff9dfc67ed48537f541a9995b2662e1e))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* add back connect button css variables ([#4922](https://github.com/dynamic-labs/DynamicAuth/issues/4922)) ([1119d62](https://github.com/dynamic-labs/DynamicAuth/commit/1119d62c2db6504952393060930524c3823e4a00))
|
|
20
|
+
* keep adaptive wallet list height ([#4916](https://github.com/dynamic-labs/DynamicAuth/issues/4916)) ([62aa54e](https://github.com/dynamic-labs/DynamicAuth/commit/62aa54e81d563082f7aa519f2ff2b5132e7dd83d))
|
|
21
|
+
* pass account and chain to walletClient ([#4865](https://github.com/dynamic-labs/DynamicAuth/issues/4865)) ([17a143f](https://github.com/dynamic-labs/DynamicAuth/commit/17a143f87a77e56227b2517038c20cf67f8e08bf))
|
|
22
|
+
* update walletbook to fix zerion in-app browser detection issue ([#4917](https://github.com/dynamic-labs/DynamicAuth/issues/4917)) ([48b05d7](https://github.com/dynamic-labs/DynamicAuth/commit/48b05d78e4f7add09787b64505723d4eca34d3e0))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
* remove use effect in useWalletEventListeners ([#4843](https://github.com/dynamic-labs/DynamicAuth/issues/4843)) ([2e948bb](https://github.com/dynamic-labs/DynamicAuth/commit/2e948bbca0dbdceab7460a844d0988eacd47f581))
|
|
26
|
+
* rename fetchPublicAddress to getAddress ([#4851](https://github.com/dynamic-labs/DynamicAuth/issues/4851)) ([668e7dd](https://github.com/dynamic-labs/DynamicAuth/commit/668e7dd62e1f323dbe64209b5c59c2cd0ee45d61))
|
|
27
|
+
* rename FetchPublicAddressOpts to GetAddressOpts ([#4910](https://github.com/dynamic-labs/DynamicAuth/issues/4910)) ([e5e4b1b](https://github.com/dynamic-labs/DynamicAuth/commit/e5e4b1b08a4e010afa44f8abb0bf6af7f236a86a))
|
|
28
|
+
|
|
2
29
|
## [2.0.0-alpha.10](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.9...v2.0.0-alpha.10) (2024-03-08)
|
|
3
30
|
|
|
4
31
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/solana",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.11",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
"@dynamic-labs/sdk-api": "0.0.376",
|
|
31
31
|
"bs58": "5.0.0",
|
|
32
32
|
"tweetnacl": "1.0.3",
|
|
33
|
-
"@dynamic-labs/rpc-provider-solana": "2.0.0-alpha.
|
|
34
|
-
"@dynamic-labs/rpc-providers": "2.0.0-alpha.
|
|
35
|
-
"@dynamic-labs/turnkey": "2.0.0-alpha.
|
|
36
|
-
"@dynamic-labs/types": "2.0.0-alpha.
|
|
37
|
-
"@dynamic-labs/utils": "2.0.0-alpha.
|
|
38
|
-
"@dynamic-labs/wallet-book": "2.0.0-alpha.
|
|
39
|
-
"@dynamic-labs/wallet-connector-core": "2.0.0-alpha.
|
|
33
|
+
"@dynamic-labs/rpc-provider-solana": "2.0.0-alpha.11",
|
|
34
|
+
"@dynamic-labs/rpc-providers": "2.0.0-alpha.11",
|
|
35
|
+
"@dynamic-labs/turnkey": "2.0.0-alpha.11",
|
|
36
|
+
"@dynamic-labs/types": "2.0.0-alpha.11",
|
|
37
|
+
"@dynamic-labs/utils": "2.0.0-alpha.11",
|
|
38
|
+
"@dynamic-labs/wallet-book": "2.0.0-alpha.11",
|
|
39
|
+
"@dynamic-labs/wallet-connector-core": "2.0.0-alpha.11",
|
|
40
40
|
"eventemitter3": "5.0.1"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {}
|
package/src/CoinbaseSolana.cjs
CHANGED
|
@@ -30,7 +30,7 @@ class CoinbaseSolana extends InjectedWalletBase.InjectedWalletBase {
|
|
|
30
30
|
}
|
|
31
31
|
signMessage(messageToSign) {
|
|
32
32
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
33
|
-
const walletAddress = yield this.
|
|
33
|
+
const walletAddress = yield this.getAddress();
|
|
34
34
|
if (!walletAddress) {
|
|
35
35
|
return undefined;
|
|
36
36
|
}
|
package/src/CoinbaseSolana.js
CHANGED
|
@@ -26,7 +26,7 @@ class CoinbaseSolana extends InjectedWalletBase {
|
|
|
26
26
|
}
|
|
27
27
|
signMessage(messageToSign) {
|
|
28
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
const walletAddress = yield this.
|
|
29
|
+
const walletAddress = yield this.getAddress();
|
|
30
30
|
if (!walletAddress) {
|
|
31
31
|
return undefined;
|
|
32
32
|
}
|
package/src/Slope.cjs
CHANGED
|
@@ -55,7 +55,7 @@ class Slope extends solWalletConnector.SolWalletConnector {
|
|
|
55
55
|
isInstalledOnBrowser() {
|
|
56
56
|
return typeof window.Slope === 'function';
|
|
57
57
|
}
|
|
58
|
-
|
|
58
|
+
getAddress() {
|
|
59
59
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
60
60
|
try {
|
|
61
61
|
if (this.wallet === undefined)
|
package/src/Slope.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export declare class Slope extends SolWalletConnector {
|
|
|
21
21
|
isInstalledOnBrowser(): boolean;
|
|
22
22
|
isConnectData: (value: unknown) => value is ConnectData;
|
|
23
23
|
isSignatureData: (value: unknown) => value is SignatureData;
|
|
24
|
-
|
|
24
|
+
getAddress(): Promise<string | undefined>;
|
|
25
25
|
signMessage(messageToSign: string): Promise<string | undefined>;
|
|
26
26
|
getConnectedAccounts(): Promise<string[]>;
|
|
27
27
|
}
|
package/src/Slope.js
CHANGED
|
@@ -51,7 +51,7 @@ class Slope extends SolWalletConnector {
|
|
|
51
51
|
isInstalledOnBrowser() {
|
|
52
52
|
return typeof window.Slope === 'function';
|
|
53
53
|
}
|
|
54
|
-
|
|
54
|
+
getAddress() {
|
|
55
55
|
return __awaiter(this, void 0, void 0, function* () {
|
|
56
56
|
try {
|
|
57
57
|
if (this.wallet === undefined)
|
package/src/Solflare.d.ts
CHANGED
|
@@ -4,6 +4,6 @@ export declare class Solflare extends InjectedWalletBase {
|
|
|
4
4
|
name: string;
|
|
5
5
|
overrideKey: string;
|
|
6
6
|
constructor(opts: SolWalletConnectorOpts);
|
|
7
|
-
|
|
7
|
+
getAddress(): Promise<string | undefined>;
|
|
8
8
|
signMessage(messageToSign: string): Promise<string | undefined>;
|
|
9
9
|
}
|
|
@@ -22,7 +22,7 @@ class BackpackSol extends InjectedWalletBase.InjectedWalletBase {
|
|
|
22
22
|
}
|
|
23
23
|
signMessage(messageToSign) {
|
|
24
24
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
25
|
-
const publicAddress = yield this.
|
|
25
|
+
const publicAddress = yield this.getAddress();
|
|
26
26
|
if (!publicAddress) {
|
|
27
27
|
return undefined;
|
|
28
28
|
}
|
|
@@ -18,7 +18,7 @@ class BackpackSol extends InjectedWalletBase {
|
|
|
18
18
|
}
|
|
19
19
|
signMessage(messageToSign) {
|
|
20
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const publicAddress = yield this.
|
|
21
|
+
const publicAddress = yield this.getAddress();
|
|
22
22
|
if (!publicAddress) {
|
|
23
23
|
return undefined;
|
|
24
24
|
}
|
|
@@ -42,18 +42,18 @@ class InjectedWalletBase extends solWalletConnector.SolWalletConnector {
|
|
|
42
42
|
var _a;
|
|
43
43
|
return Boolean((_a = this.getSolProviderHelper()) === null || _a === void 0 ? void 0 : _a.isInstalledHelper());
|
|
44
44
|
}
|
|
45
|
-
|
|
45
|
+
getAddress() {
|
|
46
46
|
var _a;
|
|
47
47
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
48
48
|
if (!this.isInstalledOnBrowser())
|
|
49
49
|
return;
|
|
50
|
-
return (_a = this.getSolProviderHelper()) === null || _a === void 0 ? void 0 : _a.
|
|
50
|
+
return (_a = this.getSolProviderHelper()) === null || _a === void 0 ? void 0 : _a.getAddress();
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
signMessage(messageToSign) {
|
|
54
54
|
var _a, _b;
|
|
55
55
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
56
|
-
const walletAddress = yield ((_a = this.getSolProviderHelper()) === null || _a === void 0 ? void 0 : _a.
|
|
56
|
+
const walletAddress = yield ((_a = this.getSolProviderHelper()) === null || _a === void 0 ? void 0 : _a.getAddress());
|
|
57
57
|
if (walletAddress && this.isLedgerAddress(walletAddress)) {
|
|
58
58
|
throw new SignMessageNotSupportedError.SignMessageNotSupportedError(this.name);
|
|
59
59
|
}
|
|
@@ -11,7 +11,7 @@ export declare abstract class InjectedWalletBase extends SolWalletConnector {
|
|
|
11
11
|
connect(): Promise<void>;
|
|
12
12
|
getSigner<T = ISolana>(): Promise<T | undefined>;
|
|
13
13
|
isInstalledOnBrowser(): boolean;
|
|
14
|
-
|
|
14
|
+
getAddress(): Promise<string | undefined>;
|
|
15
15
|
signMessage(messageToSign: string): Promise<string | undefined>;
|
|
16
16
|
getConnectedAccounts(): Promise<string[]>;
|
|
17
17
|
}
|
|
@@ -38,18 +38,18 @@ class InjectedWalletBase extends SolWalletConnector {
|
|
|
38
38
|
var _a;
|
|
39
39
|
return Boolean((_a = this.getSolProviderHelper()) === null || _a === void 0 ? void 0 : _a.isInstalledHelper());
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
getAddress() {
|
|
42
42
|
var _a;
|
|
43
43
|
return __awaiter(this, void 0, void 0, function* () {
|
|
44
44
|
if (!this.isInstalledOnBrowser())
|
|
45
45
|
return;
|
|
46
|
-
return (_a = this.getSolProviderHelper()) === null || _a === void 0 ? void 0 : _a.
|
|
46
|
+
return (_a = this.getSolProviderHelper()) === null || _a === void 0 ? void 0 : _a.getAddress();
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
signMessage(messageToSign) {
|
|
50
50
|
var _a, _b;
|
|
51
51
|
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
-
const walletAddress = yield ((_a = this.getSolProviderHelper()) === null || _a === void 0 ? void 0 : _a.
|
|
52
|
+
const walletAddress = yield ((_a = this.getSolProviderHelper()) === null || _a === void 0 ? void 0 : _a.getAddress());
|
|
53
53
|
if (walletAddress && this.isLedgerAddress(walletAddress)) {
|
|
54
54
|
throw new SignMessageNotSupportedError(this.name);
|
|
55
55
|
}
|
|
@@ -14,13 +14,13 @@ class PhantomInjected extends InjectedWalletBase.InjectedWalletBase {
|
|
|
14
14
|
this.overrideKey = 'phantom';
|
|
15
15
|
this.wallet = walletBook.findWalletBookWallet(this.walletBook, this.key);
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
getAddress() {
|
|
18
18
|
const _super = Object.create(null, {
|
|
19
|
-
|
|
19
|
+
getAddress: { get: () => super.getAddress }
|
|
20
20
|
});
|
|
21
21
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
22
22
|
if (this.isInstalledOnBrowser()) {
|
|
23
|
-
return _super.
|
|
23
|
+
return _super.getAddress.call(this);
|
|
24
24
|
}
|
|
25
25
|
if (utils.isMobile()) {
|
|
26
26
|
utils.handleMobileWalletRedirect({
|
|
@@ -10,13 +10,13 @@ class PhantomInjected extends InjectedWalletBase {
|
|
|
10
10
|
this.overrideKey = 'phantom';
|
|
11
11
|
this.wallet = findWalletBookWallet(this.walletBook, this.key);
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
getAddress() {
|
|
14
14
|
const _super = Object.create(null, {
|
|
15
|
-
|
|
15
|
+
getAddress: { get: () => super.getAddress }
|
|
16
16
|
});
|
|
17
17
|
return __awaiter(this, void 0, void 0, function* () {
|
|
18
18
|
if (this.isInstalledOnBrowser()) {
|
|
19
|
-
return _super.
|
|
19
|
+
return _super.getAddress.call(this);
|
|
20
20
|
}
|
|
21
21
|
if (isMobile()) {
|
|
22
22
|
handleMobileWalletRedirect({
|
|
@@ -21,7 +21,7 @@ class PhantomRedirect extends solWalletConnector.SolWalletConnector {
|
|
|
21
21
|
this.name = 'Phantom';
|
|
22
22
|
this.overrideKey = 'phantom';
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
getAddress() {
|
|
25
25
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
26
26
|
const address = storage.storage.address.get();
|
|
27
27
|
if (address) {
|
|
@@ -5,7 +5,7 @@ export declare class PhantomRedirect extends SolWalletConnector implements IPhan
|
|
|
5
5
|
name: string;
|
|
6
6
|
overrideKey: string;
|
|
7
7
|
constructor(props: any);
|
|
8
|
-
|
|
8
|
+
getAddress(): Promise<string | undefined>;
|
|
9
9
|
connect(): Promise<void>;
|
|
10
10
|
getSession(): Promise<string>;
|
|
11
11
|
signMessage(messageToSign: string): Promise<string | undefined>;
|
|
@@ -12,7 +12,7 @@ class PhantomRedirect extends SolWalletConnector {
|
|
|
12
12
|
this.name = 'Phantom';
|
|
13
13
|
this.overrideKey = 'phantom';
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
getAddress() {
|
|
16
16
|
return __awaiter(this, void 0, void 0, function* () {
|
|
17
17
|
const address = storage.address.get();
|
|
18
18
|
if (address) {
|
|
@@ -60,7 +60,7 @@ class SolProviderHelper {
|
|
|
60
60
|
isInstalledHelper() {
|
|
61
61
|
return this.findProvider() !== undefined;
|
|
62
62
|
}
|
|
63
|
-
|
|
63
|
+
getAddress() {
|
|
64
64
|
var _a;
|
|
65
65
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
66
66
|
const provider = this.findProvider();
|
|
@@ -91,7 +91,7 @@ class SolProviderHelper {
|
|
|
91
91
|
}
|
|
92
92
|
signMessage(messageToSign) {
|
|
93
93
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
94
|
-
const walletAddress = yield this.
|
|
94
|
+
const walletAddress = yield this.getAddress();
|
|
95
95
|
if (!walletAddress)
|
|
96
96
|
return undefined;
|
|
97
97
|
const provider = this.findProvider();
|
|
@@ -22,7 +22,7 @@ export declare class SolProviderHelper {
|
|
|
22
22
|
installedProviderLookup(providerFlags: Array<ProviderCondition<ProviderFlag>>): ISolana | undefined;
|
|
23
23
|
findProvider(): ISolana | undefined;
|
|
24
24
|
isInstalledHelper(): boolean;
|
|
25
|
-
|
|
25
|
+
getAddress(): Promise<string | undefined>;
|
|
26
26
|
connect(): Promise<ISolana | undefined>;
|
|
27
27
|
signMessage(messageToSign: string): Promise<string | undefined>;
|
|
28
28
|
handleAccountChange(walletConnector: WalletConnector, web3Provider: ISolana, address: string): Promise<void>;
|
package/src/solProviderHelper.js
CHANGED
|
@@ -56,7 +56,7 @@ class SolProviderHelper {
|
|
|
56
56
|
isInstalledHelper() {
|
|
57
57
|
return this.findProvider() !== undefined;
|
|
58
58
|
}
|
|
59
|
-
|
|
59
|
+
getAddress() {
|
|
60
60
|
var _a;
|
|
61
61
|
return __awaiter(this, void 0, void 0, function* () {
|
|
62
62
|
const provider = this.findProvider();
|
|
@@ -87,7 +87,7 @@ class SolProviderHelper {
|
|
|
87
87
|
}
|
|
88
88
|
signMessage(messageToSign) {
|
|
89
89
|
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
-
const walletAddress = yield this.
|
|
90
|
+
const walletAddress = yield this.getAddress();
|
|
91
91
|
if (!walletAddress)
|
|
92
92
|
return undefined;
|
|
93
93
|
const provider = this.findProvider();
|
|
@@ -113,7 +113,7 @@ class SolWalletConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
113
113
|
}
|
|
114
114
|
signMessageViaTransaction(messageToSign) {
|
|
115
115
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
116
|
-
const address = yield this.
|
|
116
|
+
const address = yield this.getAddress();
|
|
117
117
|
if (!address) {
|
|
118
118
|
throw new utils.DynamicError('Address missing');
|
|
119
119
|
}
|
|
@@ -109,7 +109,7 @@ class SolWalletConnector extends WalletConnectorBase {
|
|
|
109
109
|
}
|
|
110
110
|
signMessageViaTransaction(messageToSign) {
|
|
111
111
|
return __awaiter(this, void 0, void 0, function* () {
|
|
112
|
-
const address = yield this.
|
|
112
|
+
const address = yield this.getAddress();
|
|
113
113
|
if (!address) {
|
|
114
114
|
throw new DynamicError('Address missing');
|
|
115
115
|
}
|