@dynamic-labs/ethereum 4.0.0-alpha.22 → 4.0.0-alpha.23
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 +7 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +8 -8
- package/src/coinbase/coinbase.cjs +1 -1
- package/src/coinbase/coinbase.d.ts +2 -2
- package/src/coinbase/coinbase.js +2 -2
- package/src/coinbase/types.d.ts +2 -2
- package/src/index.cjs +4 -0
- package/src/index.d.ts +1 -1
- package/src/index.js +1 -1
- package/src/injected/ExodusEvm.d.ts +2 -2
- package/src/injected/FallbackEvmConnector.d.ts +2 -2
- package/src/injected/InjectedWalletBase.cjs +1 -1
- package/src/injected/InjectedWalletBase.d.ts +2 -2
- package/src/injected/InjectedWalletBase.js +2 -2
- package/src/injected/PhantomEvm.d.ts +2 -2
- package/src/injected/UnknownInjected.d.ts +2 -2
- package/src/walletConnect/walletConnect.cjs +1 -1
- package/src/walletConnect/walletConnect.d.ts +3 -3
- package/src/walletConnect/walletConnect.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.0.0-alpha.23](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.22...v4.0.0-alpha.23) (2024-10-31)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* allow deletion of embedded wallets ([#7170](https://github.com/dynamic-labs/dynamic-auth/issues/7170)) ([40c5478](https://github.com/dynamic-labs/dynamic-auth/commit/40c54789594ba265a63b24f936da4e72b5b1c5b9))
|
|
8
|
+
|
|
2
9
|
## [4.0.0-alpha.22](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.21...v4.0.0-alpha.22) (2024-10-30)
|
|
3
10
|
|
|
4
11
|
|
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.23",
|
|
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.23",
|
|
27
|
+
"@dynamic-labs/embedded-wallet-evm": "4.0.0-alpha.23",
|
|
28
|
+
"@dynamic-labs/ethereum-core": "4.0.0-alpha.23",
|
|
29
|
+
"@dynamic-labs/types": "4.0.0-alpha.23",
|
|
30
|
+
"@dynamic-labs/utils": "4.0.0-alpha.23",
|
|
31
|
+
"@dynamic-labs/wallet-book": "4.0.0-alpha.23",
|
|
32
|
+
"@dynamic-labs/wallet-connector-core": "4.0.0-alpha.23"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"viem": "^2.7.6"
|
|
@@ -9,7 +9,7 @@ var ethereumCore = require('@dynamic-labs/ethereum-core');
|
|
|
9
9
|
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
10
10
|
var helpers = require('./helpers.cjs');
|
|
11
11
|
|
|
12
|
-
class Coinbase extends ethereumCore.
|
|
12
|
+
class Coinbase extends ethereumCore.EthereumWalletConnector {
|
|
13
13
|
constructor(_a) {
|
|
14
14
|
var { appName, appLogoUrl, evmNetworks, coinbaseWalletPreference } = _a, props = _tslib.__rest(_a, ["appName", "appLogoUrl", "evmNetworks", "coinbaseWalletPreference"]);
|
|
15
15
|
super(Object.assign({ evmNetworks }, props));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { WalletClient, Account, Transport, Chain as ViemChain } from 'viem';
|
|
2
2
|
import { ProviderInterface } from '@coinbase/wallet-sdk';
|
|
3
|
-
import {
|
|
3
|
+
import { EthereumWalletConnector } from '@dynamic-labs/ethereum-core';
|
|
4
4
|
import { Chain } from '@dynamic-labs/wallet-connector-core';
|
|
5
5
|
import { CoinbaseOpts, GetCoinbaseProviderOpts } from './types';
|
|
6
|
-
export declare class Coinbase extends
|
|
6
|
+
export declare class Coinbase extends EthereumWalletConnector {
|
|
7
7
|
name: string;
|
|
8
8
|
overrideKey: string;
|
|
9
9
|
supportedChains: Chain[];
|
package/src/coinbase/coinbase.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { __rest, __awaiter } from '../../_virtual/_tslib.js';
|
|
3
3
|
import { toHex, toBytes, createWalletClient, custom } from 'viem';
|
|
4
|
-
import {
|
|
4
|
+
import { EthereumWalletConnector, chainsMap } from '@dynamic-labs/ethereum-core';
|
|
5
5
|
import { eventListenerHandlers } from '@dynamic-labs/wallet-connector-core';
|
|
6
6
|
import { getCoinbaseProvider } from './helpers.js';
|
|
7
7
|
|
|
8
|
-
class Coinbase extends
|
|
8
|
+
class Coinbase extends EthereumWalletConnector {
|
|
9
9
|
constructor(_a) {
|
|
10
10
|
var { appName, appLogoUrl, evmNetworks, coinbaseWalletPreference } = _a, props = __rest(_a, ["appName", "appLogoUrl", "evmNetworks", "coinbaseWalletPreference"]);
|
|
11
11
|
super(Object.assign({ evmNetworks }, props));
|
package/src/coinbase/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ProviderInterface } from '@coinbase/wallet-sdk';
|
|
2
2
|
import { type CoinbaseWalletPreference, type GenericNetwork } from '@dynamic-labs/types';
|
|
3
|
-
import { type
|
|
3
|
+
import { type EthereumWalletConnectorOpts } from '@dynamic-labs/ethereum-core';
|
|
4
4
|
export type GetCoinbaseProviderOpts = {
|
|
5
5
|
appLogoUrl?: string;
|
|
6
6
|
appName?: string;
|
|
@@ -11,7 +11,7 @@ export type CoinbaseProviderHandlerOpts = {
|
|
|
11
11
|
onDisconnect(): Promise<void>;
|
|
12
12
|
};
|
|
13
13
|
export type GetCoinbaseProvider = (opts?: GetCoinbaseProviderOpts) => ProviderInterface;
|
|
14
|
-
export type CoinbaseOpts =
|
|
14
|
+
export type CoinbaseOpts = EthereumWalletConnectorOpts & {
|
|
15
15
|
appLogoUrl?: string;
|
|
16
16
|
appName?: string;
|
|
17
17
|
coinbaseWalletPreference?: CoinbaseWalletPreference;
|
package/src/index.cjs
CHANGED
|
@@ -39,6 +39,10 @@ exports.FallbackEvmConnector = FallbackEvmConnector.FallbackEvmConnector;
|
|
|
39
39
|
exports.fetchInjectedWalletConnector = fetchInjectedWalletConnectors.fetchInjectedWalletConnector;
|
|
40
40
|
exports.injectedWalletOverrides = fetchInjectedWalletConnectors.injectedWalletOverrides;
|
|
41
41
|
exports.EthereumInjectedConnector = InjectedWalletBase.InjectedWalletBase;
|
|
42
|
+
Object.defineProperty(exports, 'EthereumWalletConnector', {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () { return ethereumCore.EthereumWalletConnector; }
|
|
45
|
+
});
|
|
42
46
|
Object.defineProperty(exports, 'isEthereumWallet', {
|
|
43
47
|
enumerable: true,
|
|
44
48
|
get: function () { return ethereumCore.isEthereumWallet; }
|
package/src/index.d.ts
CHANGED
|
@@ -6,4 +6,4 @@ export * from './ethProviderHelper';
|
|
|
6
6
|
export * from './constants';
|
|
7
7
|
export * from './types';
|
|
8
8
|
export declare const EthereumWalletConnectors: (props: any) => WalletConnectorConstructor[];
|
|
9
|
-
export { isEthereumWallet } from '@dynamic-labs/ethereum-core';
|
|
9
|
+
export { isEthereumWallet, EthereumWalletConnector, } from '@dynamic-labs/ethereum-core';
|
package/src/index.js
CHANGED
|
@@ -15,7 +15,7 @@ export { InjectedWalletBase as EthereumInjectedConnector } from './injected/Inje
|
|
|
15
15
|
import './walletConnect/walletConnect.js';
|
|
16
16
|
import { fetchWalletConnectWallets, getWalletConnectConnector } from './walletConnect/fetchWalletConnectWallets.js';
|
|
17
17
|
import { Coinbase } from './coinbase/coinbase.js';
|
|
18
|
-
export { isEthereumWallet } from '@dynamic-labs/ethereum-core';
|
|
18
|
+
export { EthereumWalletConnector, isEthereumWallet } from '@dynamic-labs/ethereum-core';
|
|
19
19
|
export { EthProviderHelper } from './ethProviderHelper.js';
|
|
20
20
|
export { INFURA_ID } from './constants.js';
|
|
21
21
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EthereumWalletConnectorOpts } from '@dynamic-labs/ethereum-core';
|
|
2
2
|
import { InjectedWalletBase } from './InjectedWalletBase';
|
|
3
3
|
export declare class ExodusEvm extends InjectedWalletBase {
|
|
4
4
|
name: string;
|
|
5
5
|
overrideKey: string;
|
|
6
6
|
walletConnectorFallback: boolean;
|
|
7
|
-
constructor(props:
|
|
7
|
+
constructor(props: EthereumWalletConnectorOpts);
|
|
8
8
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EthereumWalletConnectorOpts } from '@dynamic-labs/ethereum-core';
|
|
2
2
|
import { InjectedWalletBase } from './InjectedWalletBase';
|
|
3
3
|
export declare class FallbackEvmConnector extends InjectedWalletBase {
|
|
4
4
|
name: string;
|
|
5
5
|
overrideKey: string;
|
|
6
6
|
isAvailable: boolean;
|
|
7
|
-
constructor(props:
|
|
7
|
+
constructor(props: EthereumWalletConnectorOpts);
|
|
8
8
|
isInstalledOnBrowser(): boolean;
|
|
9
9
|
}
|
|
@@ -10,7 +10,7 @@ var ethereumCore = require('@dynamic-labs/ethereum-core');
|
|
|
10
10
|
var ethProviderHelper = require('../ethProviderHelper.cjs');
|
|
11
11
|
var walletConnect = require('../walletConnect/walletConnect.cjs');
|
|
12
12
|
|
|
13
|
-
class InjectedWalletBase extends ethereumCore.
|
|
13
|
+
class InjectedWalletBase extends ethereumCore.EthereumWalletConnector {
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments);
|
|
16
16
|
this.supportedChains = ['ETH', 'EVM'];
|
|
@@ -2,10 +2,10 @@ import { WalletClient, Transport, Account, Chain as ViemChain } from 'viem';
|
|
|
2
2
|
import { Chain } from '@dynamic-labs/wallet-connector-core';
|
|
3
3
|
import { EvmNetwork } from '@dynamic-labs/types';
|
|
4
4
|
import { WalletSchema } from '@dynamic-labs/wallet-book';
|
|
5
|
-
import {
|
|
5
|
+
import { EthereumWalletConnector } from '@dynamic-labs/ethereum-core';
|
|
6
6
|
import { EthProviderHelper } from '../ethProviderHelper';
|
|
7
7
|
import { IEthereum } from '../types';
|
|
8
|
-
export declare abstract class InjectedWalletBase extends
|
|
8
|
+
export declare abstract class InjectedWalletBase extends EthereumWalletConnector {
|
|
9
9
|
supportedChains: Chain[];
|
|
10
10
|
connectedChain: Chain;
|
|
11
11
|
publicAddress: string | undefined;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import { __awaiter } from '../../_virtual/_tslib.js';
|
|
3
3
|
import { findWalletBookWallet } from '@dynamic-labs/wallet-book';
|
|
4
4
|
import { isMobile } from '@dynamic-labs/utils';
|
|
5
|
-
import {
|
|
5
|
+
import { EthereumWalletConnector } from '@dynamic-labs/ethereum-core';
|
|
6
6
|
import { EthProviderHelper } from '../ethProviderHelper.js';
|
|
7
7
|
import { WalletConnect } from '../walletConnect/walletConnect.js';
|
|
8
8
|
|
|
9
|
-
class InjectedWalletBase extends
|
|
9
|
+
class InjectedWalletBase extends EthereumWalletConnector {
|
|
10
10
|
constructor() {
|
|
11
11
|
super(...arguments);
|
|
12
12
|
this.supportedChains = ['ETH', 'EVM'];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EthereumWalletConnectorOpts } from '@dynamic-labs/ethereum-core';
|
|
2
2
|
import { InjectedWalletBase } from './InjectedWalletBase';
|
|
3
3
|
export declare class PhantomEvm extends InjectedWalletBase {
|
|
4
4
|
name: string;
|
|
5
5
|
overrideKey: string;
|
|
6
|
-
constructor(props:
|
|
6
|
+
constructor(props: EthereumWalletConnectorOpts);
|
|
7
7
|
getAddress(): Promise<string | undefined>;
|
|
8
8
|
canGetChainAddress(): boolean;
|
|
9
9
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EthereumWalletConnectorOpts } from '@dynamic-labs/ethereum-core';
|
|
2
2
|
import { InjectedWalletBase } from './InjectedWalletBase';
|
|
3
3
|
export declare class UnknownInjected extends InjectedWalletBase {
|
|
4
4
|
name: string;
|
|
5
5
|
overrideKey: string;
|
|
6
|
-
constructor(props:
|
|
6
|
+
constructor(props: EthereumWalletConnectorOpts);
|
|
7
7
|
isInstalledOnBrowser(): boolean;
|
|
8
8
|
}
|
|
@@ -23,7 +23,7 @@ const sessionTopicKey = (walletName) => `dynamic-wc2-session-topic-${walletName}
|
|
|
23
23
|
const swicthedNetworkKey = (walletName) => `dynamic-wc2-switched-network-${walletName}`;
|
|
24
24
|
const currentChainKey = (walletName) => `dynamic-wc2-current-chain-${walletName}`;
|
|
25
25
|
const ee = new EventEmitter__default["default"]();
|
|
26
|
-
class WalletConnect extends ethereumCore.
|
|
26
|
+
class WalletConnect extends ethereumCore.EthereumWalletConnector {
|
|
27
27
|
constructor(opts) {
|
|
28
28
|
var _a;
|
|
29
29
|
super(opts);
|
|
@@ -2,14 +2,14 @@ import type { SessionTypes } from '@walletconnect/types';
|
|
|
2
2
|
import { WalletClient, Account, Transport, Chain as ViemChain } from 'viem';
|
|
3
3
|
import { Chain, GetAddressOpts, DeepLinkVariant, IWalletConnectConnector } from '@dynamic-labs/wallet-connector-core';
|
|
4
4
|
import { EvmNetwork } from '@dynamic-labs/types';
|
|
5
|
-
import {
|
|
6
|
-
export type WalletConnectOpts =
|
|
5
|
+
import { EthereumWalletConnector, EthereumWalletConnectorOpts } from '@dynamic-labs/ethereum-core';
|
|
6
|
+
export type WalletConnectOpts = EthereumWalletConnectorOpts & {
|
|
7
7
|
projectId?: string;
|
|
8
8
|
walletName: string;
|
|
9
9
|
deepLinkPreference?: DeepLinkVariant;
|
|
10
10
|
walletConnectPreferredChains?: `eip155:${number}`[];
|
|
11
11
|
};
|
|
12
|
-
export declare class WalletConnect extends
|
|
12
|
+
export declare class WalletConnect extends EthereumWalletConnector implements IWalletConnectConnector {
|
|
13
13
|
supportedChains: Chain[];
|
|
14
14
|
connectedChain: Chain;
|
|
15
15
|
name: string;
|
|
@@ -6,7 +6,7 @@ import { createWalletClient, custom } from 'viem';
|
|
|
6
6
|
import { logger, performPlatformSpecificConnectionMethod, getDeepLink } from '@dynamic-labs/wallet-connector-core';
|
|
7
7
|
import { getWalletBookWallet } from '@dynamic-labs/wallet-book';
|
|
8
8
|
import { DynamicError, sleep, isMobile } from '@dynamic-labs/utils';
|
|
9
|
-
import {
|
|
9
|
+
import { EthereumWalletConnector, chainsMap } from '@dynamic-labs/ethereum-core';
|
|
10
10
|
import { parseIntSafe } from '../utils/parseIntSafe.js';
|
|
11
11
|
|
|
12
12
|
const activeAccountKey = (walletName) => `dynamic-wc2-active-account-${walletName}`;
|
|
@@ -14,7 +14,7 @@ const sessionTopicKey = (walletName) => `dynamic-wc2-session-topic-${walletName}
|
|
|
14
14
|
const swicthedNetworkKey = (walletName) => `dynamic-wc2-switched-network-${walletName}`;
|
|
15
15
|
const currentChainKey = (walletName) => `dynamic-wc2-current-chain-${walletName}`;
|
|
16
16
|
const ee = new EventEmitter();
|
|
17
|
-
class WalletConnect extends
|
|
17
|
+
class WalletConnect extends EthereumWalletConnector {
|
|
18
18
|
constructor(opts) {
|
|
19
19
|
var _a;
|
|
20
20
|
super(opts);
|