@exodus/web3-ethereum 9.5.1 → 10.0.0

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/lib/types.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  /// <reference types="node" resolution-mode="require"/>
2
+ import type { EthereumProvider } from './provider/index.js';
2
3
  import type { EthAggregatedTransactionSimulationResult, EthSimulateTransactionParams, EthTransaction, EthTransactionHash, EthWalletWatchAsset } from '@exodus/web3-ethereum-utils';
4
+ import type { WalletStandardCommonDeps } from '@exodus/web3-provider';
3
5
  import type { CommonDeps } from '@exodus/web3-rpc-handlers';
4
6
  import type { Asset, IAnalyticsModule, IBlockchainMetadataModule, EthereumFeeData, GetFeeDataParams, CreateSimulationServiceParams, NumberUnit } from '@exodus/web3-types';
5
7
  /**
@@ -50,4 +52,7 @@ export declare type EVMDeps = {
50
52
  export declare type Dependencies = {
51
53
  evms: EVMDeps[];
52
54
  } & CommonDeps;
55
+ export interface WalletStandardDeps extends WalletStandardCommonDeps {
56
+ provider: EthereumProvider;
57
+ }
53
58
  export {};
@@ -1,17 +1,19 @@
1
+ import { StandardWallet } from '@exodus/web3-provider';
1
2
  import type { EthereumProvider } from '../provider/provider.js';
3
+ import type { WalletStandardDeps } from '../types.js';
2
4
  import type { Wallet } from '@wallet-standard/base';
3
5
  export declare type EthereumProviderFeature = {
4
6
  'eip1193:provider': {
5
7
  provider: EthereumProvider;
6
8
  };
7
9
  };
8
- export declare class ExodusEthereumWallet implements Wallet {
10
+ export declare class ExodusEthereumWallet extends StandardWallet implements Wallet {
9
11
  #private;
10
12
  get version(): "1.0.0";
11
- get name(): "Exodus";
13
+ get name(): string;
12
14
  get icon(): `data:image/svg+xml;base64,${string}` | `data:image/webp;base64,${string}` | `data:image/png;base64,${string}` | `data:image/gif;base64,${string}`;
13
15
  get chains(): never[];
14
16
  get features(): EthereumProviderFeature;
15
17
  get accounts(): never[];
16
- constructor(ethereumProvider: EthereumProvider);
18
+ constructor({ provider, name, icon }: WalletStandardDeps);
17
19
  }
@@ -1,8 +1,8 @@
1
- import { icon } from './icon.js';
2
- export class ExodusEthereumWallet {
1
+ import { StandardWallet } from '@exodus/web3-provider';
2
+ export class ExodusEthereumWallet extends StandardWallet {
3
3
  #version = '1.0.0';
4
- #name = 'Exodus';
5
- #icon = icon;
4
+ #name;
5
+ #icon;
6
6
  #provider = null;
7
7
  get version() {
8
8
  return this.#version;
@@ -26,10 +26,13 @@ export class ExodusEthereumWallet {
26
26
  get accounts() {
27
27
  return [];
28
28
  }
29
- constructor(ethereumProvider) {
30
- if (!ethereumProvider) {
29
+ constructor({ provider, name, icon }) {
30
+ super({ name, icon });
31
+ if (!provider) {
31
32
  throw new Error('Ethereum Provider is required!');
32
33
  }
33
- this.#provider = ethereumProvider;
34
+ this.#name = name;
35
+ this.#icon = icon;
36
+ this.#provider = provider;
34
37
  }
35
38
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@exodus/web3-ethereum",
3
3
  "description": "Apps connectivity library for EVM-compatible chains.",
4
- "version": "9.5.1",
4
+ "version": "10.0.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "module": "lib/index.js",
@@ -33,10 +33,10 @@
33
33
  "@exodus/currency": "^2.1.2",
34
34
  "@exodus/ethereum-api": "^6.3.33",
35
35
  "@exodus/web3-constants": "^1.29.0",
36
- "@exodus/web3-ethereum-utils": "^3.10.0",
37
- "@exodus/web3-provider": "^2.39.0",
38
- "@exodus/web3-rpc-handlers": "^2.7.1",
39
- "@exodus/web3-utils": "^1.31.0",
36
+ "@exodus/web3-ethereum-utils": "^3.11.0",
37
+ "@exodus/web3-provider": "^3.0.0",
38
+ "@exodus/web3-rpc-handlers": "^2.8.0",
39
+ "@exodus/web3-utils": "^1.32.0",
40
40
  "bn.js": "^5.2.0",
41
41
  "eth-rpc-errors": "^4.0.3"
42
42
  },
@@ -44,12 +44,12 @@
44
44
  "@exodus/assets": "^8.0.95",
45
45
  "@exodus/json-rpc": "^1.11.0",
46
46
  "@exodus/schemasafe": "^1.0.0",
47
- "@exodus/web3-types": "^1.37.0",
47
+ "@exodus/web3-types": "^1.38.0",
48
48
  "@exodus/web3-validation": "^1.37.0",
49
49
  "@wallet-standard/base": "^1.0.1"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "@exodus/assets": "^8.0.95"
53
53
  },
54
- "gitHead": "970c6d2a1e76f4cc5023ca8601756e4f0bbc05f6"
54
+ "gitHead": "ed00773e958c856b5ca67696196d1f2486ec7b0d"
55
55
  }
@@ -1,2 +0,0 @@
1
- import type { WalletIcon } from '@wallet-standard/base';
2
- export declare const icon: WalletIcon;
@@ -1,2 +0,0 @@
1
- import { EXODUS_ICON } from '@exodus/web3-constants';
2
- export const icon = EXODUS_ICON;