@dynamic-labs/ethereum 4.0.0-alpha.14 → 4.0.0-alpha.16

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 CHANGED
@@ -1,4 +1,17 @@
1
1
 
2
+ ## [4.0.0-alpha.16](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.15...v4.0.0-alpha.16) (2024-10-27)
3
+
4
+
5
+ ### Features
6
+
7
+ * add passkey to web-extension ([#7096](https://github.com/dynamic-labs/dynamic-auth/issues/7096)) ([a4b4643](https://github.com/dynamic-labs/dynamic-auth/commit/a4b4643e5307358425c878067bae095090f322ca))
8
+ * add social to web extension ([#7106](https://github.com/dynamic-labs/dynamic-auth/issues/7106)) ([422bc8e](https://github.com/dynamic-labs/dynamic-auth/commit/422bc8e2d276d960a7a76ad55a7b244c3fd83173))
9
+ * add support for compass and leap wallets ([9738749](https://github.com/dynamic-labs/dynamic-auth/commit/9738749bb5ed8e07a2582df255f683e4d408db93))
10
+ * add support for epicgames social ([#7220](https://github.com/dynamic-labs/dynamic-auth/issues/7220)) ([cb5bc30](https://github.com/dynamic-labs/dynamic-auth/commit/cb5bc30bc17d063bdaa9b427a9358b30124c4589))
11
+ * add web-extension to client ([#7180](https://github.com/dynamic-labs/dynamic-auth/issues/7180)) ([e2ccbb7](https://github.com/dynamic-labs/dynamic-auth/commit/e2ccbb77bdd0250d000a6cc4d89a2e5d7d2f4bb2))
12
+
13
+ ## [4.0.0-alpha.15](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.14...v4.0.0-alpha.15) (2024-10-19)
14
+
2
15
  ## [4.0.0-alpha.14](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.13...v4.0.0-alpha.14) (2024-10-18)
3
16
 
4
17
  ## [4.0.0-alpha.13](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.12...v4.0.0-alpha.13) (2024-10-18)
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.0.0-alpha.14";
6
+ var version = "4.0.0-alpha.16";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.0.0-alpha.14";
2
+ var version = "4.0.0-alpha.16";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/ethereum",
3
- "version": "4.0.0-alpha.14",
3
+ "version": "4.0.0-alpha.16",
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.14",
27
- "@dynamic-labs/embedded-wallet-evm": "4.0.0-alpha.14",
28
- "@dynamic-labs/ethereum-core": "4.0.0-alpha.14",
29
- "@dynamic-labs/types": "4.0.0-alpha.14",
30
- "@dynamic-labs/utils": "4.0.0-alpha.14",
31
- "@dynamic-labs/wallet-book": "4.0.0-alpha.14",
32
- "@dynamic-labs/wallet-connector-core": "4.0.0-alpha.14"
26
+ "@dynamic-labs/assert-package-version": "4.0.0-alpha.16",
27
+ "@dynamic-labs/embedded-wallet-evm": "4.0.0-alpha.16",
28
+ "@dynamic-labs/ethereum-core": "4.0.0-alpha.16",
29
+ "@dynamic-labs/types": "4.0.0-alpha.16",
30
+ "@dynamic-labs/utils": "4.0.0-alpha.16",
31
+ "@dynamic-labs/wallet-book": "4.0.0-alpha.16",
32
+ "@dynamic-labs/wallet-connector-core": "4.0.0-alpha.16"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "viem": "^2.7.6"
@@ -12,15 +12,18 @@ var ethereumCore = require('@dynamic-labs/ethereum-core');
12
12
  class EthProviderHelper {
13
13
  constructor(wallet, connector) {
14
14
  this.wallet = wallet;
15
- this.connector = connector;
15
+ this._connector = connector;
16
+ }
17
+ get connector() {
18
+ if (!this._connector) {
19
+ throw new Error('Connect not provided to EthProviderHelper');
20
+ }
21
+ return this._connector;
16
22
  }
17
23
  getInstalledProvider() {
18
- const eip6963Config = this.getEip6963Config();
19
- if (eip6963Config) {
20
- const eip6963Provider = this.eip6963ProviderLookup(eip6963Config.rdns);
21
- if (eip6963Provider) {
22
- return eip6963Provider;
23
- }
24
+ const eip6963Provider = this.getEip6963Provider();
25
+ if (eip6963Provider) {
26
+ return eip6963Provider;
24
27
  }
25
28
  const config = this.getInjectedConfig();
26
29
  if (!config ||
@@ -29,6 +32,13 @@ class EthProviderHelper {
29
32
  return undefined;
30
33
  return this.installedProviderLookup(config.extensionLocators);
31
34
  }
35
+ getEip6963Provider() {
36
+ const eip6963Config = this.getEip6963Config();
37
+ if (eip6963Config) {
38
+ return this.eip6963ProviderLookup(eip6963Config.rdns);
39
+ }
40
+ return undefined;
41
+ }
32
42
  getEip6963Config() {
33
43
  if (!this.wallet || !this.wallet.eip6963Config)
34
44
  return;
@@ -5,9 +5,11 @@ import { IEthereum, ExtensionLocator } from './types';
5
5
  import { InjectedWalletBase } from './injected/InjectedWalletBase';
6
6
  export declare class EthProviderHelper {
7
7
  private wallet;
8
- private connector;
9
- constructor(wallet: WalletSchema, connector: InjectedWalletBase);
8
+ private _connector;
9
+ constructor(wallet: WalletSchema, connector?: InjectedWalletBase);
10
+ private get connector();
10
11
  getInstalledProvider(): IEthereum | undefined;
12
+ getEip6963Provider(): IEthereum | undefined;
11
13
  getEip6963Config(): {
12
14
  rdns: string;
13
15
  } | undefined;
@@ -8,15 +8,18 @@ import { chainsMap } from '@dynamic-labs/ethereum-core';
8
8
  class EthProviderHelper {
9
9
  constructor(wallet, connector) {
10
10
  this.wallet = wallet;
11
- this.connector = connector;
11
+ this._connector = connector;
12
+ }
13
+ get connector() {
14
+ if (!this._connector) {
15
+ throw new Error('Connect not provided to EthProviderHelper');
16
+ }
17
+ return this._connector;
12
18
  }
13
19
  getInstalledProvider() {
14
- const eip6963Config = this.getEip6963Config();
15
- if (eip6963Config) {
16
- const eip6963Provider = this.eip6963ProviderLookup(eip6963Config.rdns);
17
- if (eip6963Provider) {
18
- return eip6963Provider;
19
- }
20
+ const eip6963Provider = this.getEip6963Provider();
21
+ if (eip6963Provider) {
22
+ return eip6963Provider;
20
23
  }
21
24
  const config = this.getInjectedConfig();
22
25
  if (!config ||
@@ -25,6 +28,13 @@ class EthProviderHelper {
25
28
  return undefined;
26
29
  return this.installedProviderLookup(config.extensionLocators);
27
30
  }
31
+ getEip6963Provider() {
32
+ const eip6963Config = this.getEip6963Config();
33
+ if (eip6963Config) {
34
+ return this.eip6963ProviderLookup(eip6963Config.rdns);
35
+ }
36
+ return undefined;
37
+ }
28
38
  getEip6963Config() {
29
39
  if (!this.wallet || !this.wallet.eip6963Config)
30
40
  return;