@dynamic-labs/ethereum 4.0.0-alpha.29 → 4.0.0-alpha.30
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 +17 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +8 -8
- package/src/coinbase/coinbase.cjs +0 -2
- package/src/coinbase/coinbase.d.ts +0 -3
- package/src/coinbase/coinbase.js +0 -2
- package/src/ethProviderHelper.cjs +4 -9
- package/src/ethProviderHelper.d.ts +0 -3
- package/src/ethProviderHelper.js +4 -9
- package/src/injected/InjectedWalletBase.cjs +1 -3
- package/src/injected/InjectedWalletBase.d.ts +0 -3
- package/src/injected/InjectedWalletBase.js +1 -3
- package/src/injected/fetchInjectedWalletConnectors.cjs +1 -1
- package/src/injected/fetchInjectedWalletConnectors.js +1 -1
- package/src/walletConnect/walletConnect.cjs +0 -2
- package/src/walletConnect/walletConnect.d.ts +1 -3
- package/src/walletConnect/walletConnect.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.0.0-alpha.30](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.29...v4.0.0-alpha.30) (2024-11-13)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### ⚠ BREAKING CHANGES
|
|
6
|
+
|
|
7
|
+
* check wallet limitations from metadata (#7413)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* confirmation ui disabled for solana signall and signTransaction ([#7403](https://github.com/dynamic-labs/dynamic-auth/issues/7403)) ([98a352a](https://github.com/dynamic-labs/dynamic-auth/commit/98a352a826202abad734f00df1b3d19080ecf1e2))
|
|
12
|
+
* get starknet wallets directly from window ([#7421](https://github.com/dynamic-labs/dynamic-auth/issues/7421)) ([13e24f7](https://github.com/dynamic-labs/dynamic-auth/commit/13e24f70accf7747f5137fc3f2b05c00939c3af3))
|
|
13
|
+
* issue with SollanaWalletConnectorWithConfig embedded wallets ([#7405](https://github.com/dynamic-labs/dynamic-auth/issues/7405)) ([f08ecd6](https://github.com/dynamic-labs/dynamic-auth/commit/f08ecd6955faf191177bb9833b7a594637a6c4cc))
|
|
14
|
+
* set override key in starknet injected connector ([#7420](https://github.com/dynamic-labs/dynamic-auth/issues/7420)) ([74b2887](https://github.com/dynamic-labs/dynamic-auth/commit/74b28874661b3bad1e0a0f92aa9d3c987dc71225))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
* check wallet limitations from metadata ([#7413](https://github.com/dynamic-labs/dynamic-auth/issues/7413)) ([a419de6](https://github.com/dynamic-labs/dynamic-auth/commit/a419de643ea4ff240a27825c10670ba92589b71b))
|
|
18
|
+
|
|
2
19
|
## [4.0.0-alpha.29](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.28...v4.0.0-alpha.29) (2024-11-07)
|
|
3
20
|
|
|
4
21
|
## [4.0.0-alpha.28](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.27...v4.0.0-alpha.28) (2024-11-07)
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/ethereum",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.30",
|
|
4
4
|
"description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",
|
|
5
5
|
"author": "Dynamic Labs, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
"@walletconnect/types": "2.10.6",
|
|
24
24
|
"eventemitter3": "5.0.1",
|
|
25
25
|
"buffer": "6.0.3",
|
|
26
|
-
"@dynamic-labs/assert-package-version": "4.0.0-alpha.
|
|
27
|
-
"@dynamic-labs/embedded-wallet-evm": "4.0.0-alpha.
|
|
28
|
-
"@dynamic-labs/ethereum-core": "4.0.0-alpha.
|
|
29
|
-
"@dynamic-labs/types": "4.0.0-alpha.
|
|
30
|
-
"@dynamic-labs/utils": "4.0.0-alpha.
|
|
31
|
-
"@dynamic-labs/wallet-book": "4.0.0-alpha.
|
|
32
|
-
"@dynamic-labs/wallet-connector-core": "4.0.0-alpha.
|
|
26
|
+
"@dynamic-labs/assert-package-version": "4.0.0-alpha.30",
|
|
27
|
+
"@dynamic-labs/embedded-wallet-evm": "4.0.0-alpha.30",
|
|
28
|
+
"@dynamic-labs/ethereum-core": "4.0.0-alpha.30",
|
|
29
|
+
"@dynamic-labs/types": "4.0.0-alpha.30",
|
|
30
|
+
"@dynamic-labs/utils": "4.0.0-alpha.30",
|
|
31
|
+
"@dynamic-labs/wallet-book": "4.0.0-alpha.30",
|
|
32
|
+
"@dynamic-labs/wallet-connector-core": "4.0.0-alpha.30"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"viem": "^2.7.6"
|
|
@@ -15,8 +15,6 @@ class Coinbase extends ethereumCore.EthereumWalletConnector {
|
|
|
15
15
|
super(Object.assign({ evmNetworks }, props));
|
|
16
16
|
this.name = 'Coinbase';
|
|
17
17
|
this.overrideKey = 'coinbase';
|
|
18
|
-
this.supportedChains = ['EVM', 'ETH'];
|
|
19
|
-
this.connectedChain = 'EVM';
|
|
20
18
|
this.canConnectViaQrCode = false;
|
|
21
19
|
this.canConnectViaCustodialService = !this.isInstalledOnBrowser();
|
|
22
20
|
this.coinbaseProviderOpts = {
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { WalletClient, Account, Transport, Chain as ViemChain } from 'viem';
|
|
2
2
|
import { ProviderInterface } from '@coinbase/wallet-sdk';
|
|
3
3
|
import { EthereumWalletConnector } from '@dynamic-labs/ethereum-core';
|
|
4
|
-
import { Chain } from '@dynamic-labs/wallet-connector-core';
|
|
5
4
|
import { CoinbaseOpts, GetCoinbaseProviderOpts } from './types';
|
|
6
5
|
export declare class Coinbase extends EthereumWalletConnector {
|
|
7
6
|
name: string;
|
|
8
7
|
overrideKey: string;
|
|
9
|
-
supportedChains: Chain[];
|
|
10
|
-
connectedChain: Chain;
|
|
11
8
|
canConnectViaQrCode: boolean;
|
|
12
9
|
coinbaseProviderOpts: GetCoinbaseProviderOpts;
|
|
13
10
|
constructor({ appName, appLogoUrl, evmNetworks, coinbaseWalletPreference, ...props }: CoinbaseOpts);
|
package/src/coinbase/coinbase.js
CHANGED
|
@@ -11,8 +11,6 @@ class Coinbase extends EthereumWalletConnector {
|
|
|
11
11
|
super(Object.assign({ evmNetworks }, props));
|
|
12
12
|
this.name = 'Coinbase';
|
|
13
13
|
this.overrideKey = 'coinbase';
|
|
14
|
-
this.supportedChains = ['EVM', 'ETH'];
|
|
15
|
-
this.connectedChain = 'EVM';
|
|
16
14
|
this.canConnectViaQrCode = false;
|
|
17
15
|
this.canConnectViaCustodialService = !this.isInstalledOnBrowser();
|
|
18
16
|
this.coinbaseProviderOpts = {
|
|
@@ -33,16 +33,11 @@ class EthProviderHelper {
|
|
|
33
33
|
return this.installedProviderLookup(config.extensionLocators);
|
|
34
34
|
}
|
|
35
35
|
getEip6963Provider() {
|
|
36
|
-
const
|
|
37
|
-
if (
|
|
38
|
-
return
|
|
36
|
+
const { rdns } = this.connector.metadata;
|
|
37
|
+
if (!rdns) {
|
|
38
|
+
return undefined;
|
|
39
39
|
}
|
|
40
|
-
return
|
|
41
|
-
}
|
|
42
|
-
getEip6963Config() {
|
|
43
|
-
if (!this.wallet || !this.wallet.eip6963Config)
|
|
44
|
-
return;
|
|
45
|
-
return this.wallet.eip6963Config;
|
|
40
|
+
return this.eip6963ProviderLookup(rdns);
|
|
46
41
|
}
|
|
47
42
|
getInjectedConfig() {
|
|
48
43
|
if (!this.wallet || !this.wallet.injectedConfig)
|
|
@@ -10,9 +10,6 @@ export declare class EthProviderHelper {
|
|
|
10
10
|
private get connector();
|
|
11
11
|
getInstalledProvider(): IEthereum | undefined;
|
|
12
12
|
getEip6963Provider(): IEthereum | undefined;
|
|
13
|
-
getEip6963Config(): {
|
|
14
|
-
rdns: string;
|
|
15
|
-
} | undefined;
|
|
16
13
|
getInjectedConfig(): {
|
|
17
14
|
chain: string;
|
|
18
15
|
extensionLocators: {
|
package/src/ethProviderHelper.js
CHANGED
|
@@ -29,16 +29,11 @@ class EthProviderHelper {
|
|
|
29
29
|
return this.installedProviderLookup(config.extensionLocators);
|
|
30
30
|
}
|
|
31
31
|
getEip6963Provider() {
|
|
32
|
-
const
|
|
33
|
-
if (
|
|
34
|
-
return
|
|
32
|
+
const { rdns } = this.connector.metadata;
|
|
33
|
+
if (!rdns) {
|
|
34
|
+
return undefined;
|
|
35
35
|
}
|
|
36
|
-
return
|
|
37
|
-
}
|
|
38
|
-
getEip6963Config() {
|
|
39
|
-
if (!this.wallet || !this.wallet.eip6963Config)
|
|
40
|
-
return;
|
|
41
|
-
return this.wallet.eip6963Config;
|
|
36
|
+
return this.eip6963ProviderLookup(rdns);
|
|
42
37
|
}
|
|
43
38
|
getInjectedConfig() {
|
|
44
39
|
if (!this.wallet || !this.wallet.injectedConfig)
|
|
@@ -13,8 +13,6 @@ var walletConnect = require('../walletConnect/walletConnect.cjs');
|
|
|
13
13
|
class InjectedWalletBase extends ethereumCore.EthereumWalletConnector {
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments);
|
|
16
|
-
this.supportedChains = ['ETH', 'EVM'];
|
|
17
|
-
this.connectedChain = 'EVM';
|
|
18
16
|
this.walletConnectorFallback = false;
|
|
19
17
|
}
|
|
20
18
|
getEthProviderHelper() {
|
|
@@ -40,7 +38,7 @@ class InjectedWalletBase extends ethereumCore.EthereumWalletConnector {
|
|
|
40
38
|
// this is to handle the case where the user is in a webview.
|
|
41
39
|
// when the user is in a webview, customers should set the deepLinkPreference prop to universal,
|
|
42
40
|
// in which case this condition will be false, and the SDK will use WalletConnect (if available)
|
|
43
|
-
if (((_a = this.
|
|
41
|
+
if (((_a = this.metadata) === null || _a === void 0 ? void 0 : _a.inAppBrowserUrl) &&
|
|
44
42
|
this.mobileExperience === 'in-app-browser' &&
|
|
45
43
|
utils.isMobile()) {
|
|
46
44
|
return this;
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { WalletClient, Transport, Account, Chain as ViemChain } from 'viem';
|
|
2
|
-
import { Chain } from '@dynamic-labs/wallet-connector-core';
|
|
3
2
|
import { EvmNetwork } from '@dynamic-labs/types';
|
|
4
3
|
import { WalletSchema } from '@dynamic-labs/wallet-book';
|
|
5
4
|
import { EthereumWalletConnector } from '@dynamic-labs/ethereum-core';
|
|
6
5
|
import { EthProviderHelper } from '../ethProviderHelper';
|
|
7
6
|
import { IEthereum } from '../types';
|
|
8
7
|
export declare abstract class InjectedWalletBase extends EthereumWalletConnector {
|
|
9
|
-
supportedChains: Chain[];
|
|
10
|
-
connectedChain: Chain;
|
|
11
8
|
publicAddress: string | undefined;
|
|
12
9
|
walletConnectorFallback: boolean;
|
|
13
10
|
ethProviderHelper: EthProviderHelper | undefined;
|
|
@@ -9,8 +9,6 @@ import { WalletConnect } from '../walletConnect/walletConnect.js';
|
|
|
9
9
|
class InjectedWalletBase extends EthereumWalletConnector {
|
|
10
10
|
constructor() {
|
|
11
11
|
super(...arguments);
|
|
12
|
-
this.supportedChains = ['ETH', 'EVM'];
|
|
13
|
-
this.connectedChain = 'EVM';
|
|
14
12
|
this.walletConnectorFallback = false;
|
|
15
13
|
}
|
|
16
14
|
getEthProviderHelper() {
|
|
@@ -36,7 +34,7 @@ class InjectedWalletBase extends EthereumWalletConnector {
|
|
|
36
34
|
// this is to handle the case where the user is in a webview.
|
|
37
35
|
// when the user is in a webview, customers should set the deepLinkPreference prop to universal,
|
|
38
36
|
// in which case this condition will be false, and the SDK will use WalletConnect (if available)
|
|
39
|
-
if (((_a = this.
|
|
37
|
+
if (((_a = this.metadata) === null || _a === void 0 ? void 0 : _a.inAppBrowserUrl) &&
|
|
40
38
|
this.mobileExperience === 'in-app-browser' &&
|
|
41
39
|
isMobile()) {
|
|
42
40
|
return this;
|
|
@@ -49,7 +49,7 @@ const fetchInjectedWalletConnector = ({ walletBook, }) => {
|
|
|
49
49
|
if (this.isInstalledOnBrowser()) {
|
|
50
50
|
return _super.getAddress.call(this);
|
|
51
51
|
}
|
|
52
|
-
const inAppBrowserBase = (_a = this.
|
|
52
|
+
const inAppBrowserBase = (_a = this.metadata) === null || _a === void 0 ? void 0 : _a.inAppBrowserUrl;
|
|
53
53
|
if (!inAppBrowserBase) {
|
|
54
54
|
const error = new Error(`No inAppBrowserBase found for ${this.name}.`);
|
|
55
55
|
walletConnectorCore.logger.error(error.message);
|
|
@@ -45,7 +45,7 @@ const fetchInjectedWalletConnector = ({ walletBook, }) => {
|
|
|
45
45
|
if (this.isInstalledOnBrowser()) {
|
|
46
46
|
return _super.getAddress.call(this);
|
|
47
47
|
}
|
|
48
|
-
const inAppBrowserBase = (_a = this.
|
|
48
|
+
const inAppBrowserBase = (_a = this.metadata) === null || _a === void 0 ? void 0 : _a.inAppBrowserUrl;
|
|
49
49
|
if (!inAppBrowserBase) {
|
|
50
50
|
const error = new Error(`No inAppBrowserBase found for ${this.name}.`);
|
|
51
51
|
logger.error(error.message);
|
|
@@ -27,8 +27,6 @@ class WalletConnect extends ethereumCore.EthereumWalletConnector {
|
|
|
27
27
|
constructor(opts) {
|
|
28
28
|
var _a;
|
|
29
29
|
super(opts);
|
|
30
|
-
this.supportedChains = ['EVM', 'ETH'];
|
|
31
|
-
this.connectedChain = 'EVM';
|
|
32
30
|
this.isInitialized = false;
|
|
33
31
|
this.canConnectViaQrCode = true;
|
|
34
32
|
this.isWalletConnect = true;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SessionTypes } from '@walletconnect/types';
|
|
2
2
|
import { WalletClient, Account, Transport, Chain as ViemChain } from 'viem';
|
|
3
|
-
import {
|
|
3
|
+
import { GetAddressOpts, DeepLinkVariant, IWalletConnectConnector } from '@dynamic-labs/wallet-connector-core';
|
|
4
4
|
import { EvmNetwork } from '@dynamic-labs/types';
|
|
5
5
|
import { EthereumWalletConnector, EthereumWalletConnectorOpts } from '@dynamic-labs/ethereum-core';
|
|
6
6
|
export type WalletConnectOpts = EthereumWalletConnectorOpts & {
|
|
@@ -10,8 +10,6 @@ export type WalletConnectOpts = EthereumWalletConnectorOpts & {
|
|
|
10
10
|
walletConnectPreferredChains?: `eip155:${number}`[];
|
|
11
11
|
};
|
|
12
12
|
export declare class WalletConnect extends EthereumWalletConnector implements IWalletConnectConnector {
|
|
13
|
-
supportedChains: Chain[];
|
|
14
|
-
connectedChain: Chain;
|
|
15
13
|
name: string;
|
|
16
14
|
session: SessionTypes.Struct | undefined;
|
|
17
15
|
isInitialized: boolean;
|
|
@@ -18,8 +18,6 @@ class WalletConnect extends EthereumWalletConnector {
|
|
|
18
18
|
constructor(opts) {
|
|
19
19
|
var _a;
|
|
20
20
|
super(opts);
|
|
21
|
-
this.supportedChains = ['EVM', 'ETH'];
|
|
22
|
-
this.connectedChain = 'EVM';
|
|
23
21
|
this.isInitialized = false;
|
|
24
22
|
this.canConnectViaQrCode = true;
|
|
25
23
|
this.isWalletConnect = true;
|