@dynamic-labs/solana 1.1.0-alpha.6 → 1.1.0-alpha.8
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 +29 -0
- package/package.json +6 -6
- package/src/Solflare.cjs +4 -8
- package/src/Solflare.js +5 -9
- package/src/injected/Phantom.cjs +19 -0
- package/src/injected/Phantom.d.ts +1 -0
- package/src/injected/Phantom.js +19 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,33 @@
|
|
|
1
1
|
|
|
2
|
+
## [1.1.0-alpha.8](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.7...v1.1.0-alpha.8) (2024-01-03)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add new sdk view section for text ([#4280](https://github.com/dynamic-labs/DynamicAuth/issues/4280)) ([457ae38](https://github.com/dynamic-labs/DynamicAuth/commit/457ae38cd2be8dae078f40b54ffc4704299d4ed9))
|
|
8
|
+
* add new setShowLinkNewWalletModal method ([f46447a](https://github.com/dynamic-labs/DynamicAuth/commit/f46447ab606f4fdbf55e5fef21dd98f8f2650e90))
|
|
9
|
+
* add pk export for hd wallets ([#4266](https://github.com/dynamic-labs/DynamicAuth/issues/4266)) ([44aac69](https://github.com/dynamic-labs/DynamicAuth/commit/44aac69580ed44e66eab971f87cb6061a3fadc90))
|
|
10
|
+
* add starknet support for sopelia ([#4248](https://github.com/dynamic-labs/DynamicAuth/issues/4248)) ([f9a0980](https://github.com/dynamic-labs/DynamicAuth/commit/f9a0980c3cd2d6d95c5dd17b179fbd0931f08b1a))
|
|
11
|
+
* enable hardware wallet for solana wallets ([#4275](https://github.com/dynamic-labs/DynamicAuth/issues/4275)) ([704b380](https://github.com/dynamic-labs/DynamicAuth/commit/704b380186618a5a5793e88f36ccbe84b59a2e4a))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* phantom solana not connecting on mobile ([#4284](https://github.com/dynamic-labs/DynamicAuth/issues/4284)) ([6ad75f1](https://github.com/dynamic-labs/DynamicAuth/commit/6ad75f152896459f5cf658227f998c246b6a572b))
|
|
17
|
+
* use bitcoin payment address for onramp ([#4273](https://github.com/dynamic-labs/DynamicAuth/issues/4273)) ([a2f54e8](https://github.com/dynamic-labs/DynamicAuth/commit/a2f54e812a11a91ee488eca64f14b5eeea1a8874))
|
|
18
|
+
|
|
19
|
+
## [1.1.0-alpha.7](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.6...v1.1.0-alpha.7) (2023-12-28)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* better coinbase deeplinking ux ([#4164](https://github.com/dynamic-labs/DynamicAuth/issues/4164)) ([5252608](https://github.com/dynamic-labs/DynamicAuth/commit/525260851900a33a52f129def338963400344205))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Bug Fixes
|
|
28
|
+
|
|
29
|
+
* don't prompt for connect when selecting bitcoin wallet if already connected ([#4265](https://github.com/dynamic-labs/DynamicAuth/issues/4265)) ([adef402](https://github.com/dynamic-labs/DynamicAuth/commit/adef402ef94270a17fab896a8585a7f2eacd3681))
|
|
30
|
+
|
|
2
31
|
## [1.1.0-alpha.6](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.5...v1.1.0-alpha.6) (2023-12-27)
|
|
3
32
|
|
|
4
33
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/solana",
|
|
3
|
-
"version": "1.1.0-alpha.
|
|
3
|
+
"version": "1.1.0-alpha.8",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@solana/web3.js": "1.70.1",
|
|
30
|
-
"@dynamic-labs/rpc-providers": "1.1.0-alpha.
|
|
31
|
-
"@dynamic-labs/types": "1.1.0-alpha.
|
|
32
|
-
"@dynamic-labs/utils": "1.1.0-alpha.
|
|
33
|
-
"@dynamic-labs/wallet-book": "1.1.0-alpha.
|
|
34
|
-
"@dynamic-labs/wallet-connector-core": "1.1.0-alpha.
|
|
30
|
+
"@dynamic-labs/rpc-providers": "1.1.0-alpha.8",
|
|
31
|
+
"@dynamic-labs/types": "1.1.0-alpha.8",
|
|
32
|
+
"@dynamic-labs/utils": "1.1.0-alpha.8",
|
|
33
|
+
"@dynamic-labs/wallet-book": "1.1.0-alpha.8",
|
|
34
|
+
"@dynamic-labs/wallet-connector-core": "1.1.0-alpha.8",
|
|
35
35
|
"eventemitter3": "5.0.1"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {}
|
package/src/Solflare.cjs
CHANGED
|
@@ -22,14 +22,10 @@ class Solflare extends solWalletConnector.SolWalletConnector {
|
|
|
22
22
|
* this checks if it is not in the in-app browser by checking if the provider is not available.
|
|
23
23
|
*/
|
|
24
24
|
if (utils.isMobile() && !this.isInstalledOnBrowser()) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
window.location.assign(`https://solflare.com/ul/v1/browse/${url}?ref=${ref}`);
|
|
32
|
-
}
|
|
25
|
+
utils.handleMobileWalletRedirect({
|
|
26
|
+
nativeLink: 'solflare://ul/v1/browse',
|
|
27
|
+
universalLink: 'https://solflare.com/ul/v1/browse',
|
|
28
|
+
});
|
|
33
29
|
return;
|
|
34
30
|
}
|
|
35
31
|
return solProviderHelper.SolProviderHelper.fetchPublicAddressWithKey(this.key);
|
package/src/Solflare.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __awaiter } from '../_virtual/_tslib.js';
|
|
2
|
-
import { isMobile,
|
|
2
|
+
import { isMobile, handleMobileWalletRedirect, bufferToBase64 } from '@dynamic-labs/utils';
|
|
3
3
|
import { SolWalletConnector } from './solWalletConnector.js';
|
|
4
4
|
import { SolProviderHelper } from './solProviderHelper.js';
|
|
5
5
|
|
|
@@ -18,14 +18,10 @@ class Solflare extends SolWalletConnector {
|
|
|
18
18
|
* this checks if it is not in the in-app browser by checking if the provider is not available.
|
|
19
19
|
*/
|
|
20
20
|
if (isMobile() && !this.isInstalledOnBrowser()) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
window.location.assign(`https://solflare.com/ul/v1/browse/${url}?ref=${ref}`);
|
|
28
|
-
}
|
|
21
|
+
handleMobileWalletRedirect({
|
|
22
|
+
nativeLink: 'solflare://ul/v1/browse',
|
|
23
|
+
universalLink: 'https://solflare.com/ul/v1/browse',
|
|
24
|
+
});
|
|
29
25
|
return;
|
|
30
26
|
}
|
|
31
27
|
return SolProviderHelper.fetchPublicAddressWithKey(this.key);
|
package/src/injected/Phantom.cjs
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _tslib = require('../../_virtual/_tslib.cjs');
|
|
6
|
+
var utils = require('@dynamic-labs/utils');
|
|
5
7
|
var InjectedWalletBase = require('./InjectedWalletBase.cjs');
|
|
6
8
|
|
|
7
9
|
class Phantom extends InjectedWalletBase.InjectedWalletBase {
|
|
@@ -9,6 +11,23 @@ class Phantom extends InjectedWalletBase.InjectedWalletBase {
|
|
|
9
11
|
super(...arguments);
|
|
10
12
|
this.name = 'Phantom';
|
|
11
13
|
}
|
|
14
|
+
fetchPublicAddress() {
|
|
15
|
+
const _super = Object.create(null, {
|
|
16
|
+
fetchPublicAddress: { get: () => super.fetchPublicAddress }
|
|
17
|
+
});
|
|
18
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
if (this.isInstalledOnBrowser()) {
|
|
20
|
+
return _super.fetchPublicAddress.call(this);
|
|
21
|
+
}
|
|
22
|
+
if (utils.isMobile()) {
|
|
23
|
+
utils.handleMobileWalletRedirect({
|
|
24
|
+
nativeLink: 'phantom://browse',
|
|
25
|
+
universalLink: 'https://phantom.app/ul/browse',
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
return undefined;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
12
31
|
}
|
|
13
32
|
|
|
14
33
|
exports.Phantom = Phantom;
|
package/src/injected/Phantom.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { __awaiter } from '../../_virtual/_tslib.js';
|
|
2
|
+
import { isMobile, handleMobileWalletRedirect } from '@dynamic-labs/utils';
|
|
1
3
|
import { InjectedWalletBase } from './InjectedWalletBase.js';
|
|
2
4
|
|
|
3
5
|
class Phantom extends InjectedWalletBase {
|
|
@@ -5,6 +7,23 @@ class Phantom extends InjectedWalletBase {
|
|
|
5
7
|
super(...arguments);
|
|
6
8
|
this.name = 'Phantom';
|
|
7
9
|
}
|
|
10
|
+
fetchPublicAddress() {
|
|
11
|
+
const _super = Object.create(null, {
|
|
12
|
+
fetchPublicAddress: { get: () => super.fetchPublicAddress }
|
|
13
|
+
});
|
|
14
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
15
|
+
if (this.isInstalledOnBrowser()) {
|
|
16
|
+
return _super.fetchPublicAddress.call(this);
|
|
17
|
+
}
|
|
18
|
+
if (isMobile()) {
|
|
19
|
+
handleMobileWalletRedirect({
|
|
20
|
+
nativeLink: 'phantom://browse',
|
|
21
|
+
universalLink: 'https://phantom.app/ul/browse',
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
});
|
|
26
|
+
}
|
|
8
27
|
}
|
|
9
28
|
|
|
10
29
|
export { Phantom };
|