@dynamic-labs/wallet-connector-core 4.0.0-alpha.14 → 4.0.0-alpha.15

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,6 @@
1
1
 
2
+ ## [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)
3
+
2
4
  ## [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
5
 
4
6
  ## [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.15";
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.15";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/wallet-connector-core",
3
- "version": "4.0.0-alpha.14",
3
+ "version": "4.0.0-alpha.15",
4
4
  "description": "Core package for utilities and types for handling multiple wallet/chain support Dynamic SDK",
5
5
  "author": "Dynamic Labs, Inc.",
6
6
  "license": "MIT",
@@ -18,15 +18,15 @@
18
18
  },
19
19
  "homepage": "https://www.dynamic.xyz/",
20
20
  "dependencies": {
21
- "@dynamic-labs/sdk-api-core": "0.0.547"
21
+ "@dynamic-labs/sdk-api-core": "0.0.549"
22
22
  },
23
23
  "peerDependencies": {
24
- "@dynamic-labs/assert-package-version": "4.0.0-alpha.14",
25
- "@dynamic-labs/logger": "4.0.0-alpha.14",
26
- "@dynamic-labs/rpc-providers": "4.0.0-alpha.14",
27
- "@dynamic-labs/types": "4.0.0-alpha.14",
28
- "@dynamic-labs/utils": "4.0.0-alpha.14",
29
- "@dynamic-labs/wallet-book": "4.0.0-alpha.14",
24
+ "@dynamic-labs/assert-package-version": "4.0.0-alpha.15",
25
+ "@dynamic-labs/logger": "4.0.0-alpha.15",
26
+ "@dynamic-labs/rpc-providers": "4.0.0-alpha.15",
27
+ "@dynamic-labs/types": "4.0.0-alpha.15",
28
+ "@dynamic-labs/utils": "4.0.0-alpha.15",
29
+ "@dynamic-labs/wallet-book": "4.0.0-alpha.15",
30
30
  "eventemitter3": "5.0.1"
31
31
  }
32
32
  }
@@ -8,11 +8,16 @@ export interface IAccountAbstractionWalletConnector extends WalletConnectorBase
8
8
  disableGasSponsorshipOnce(): void;
9
9
  getAccountAbstractionProvider<T>(props?: GetAccountAbstractionProviderProps): T;
10
10
  getAccountAbstractionProvider(props?: GetAccountAbstractionProviderProps): unknown;
11
- setEoaConnector(connector: WalletConnectorBase): Promise<void>;
12
11
  /**
13
12
  * @deprecated You should get the EOA connector by passing the SCW wallet to getEOAConnector,
14
13
  * from the useSmartWallet hook
15
14
  */
16
15
  getEOAConnector(): WalletConnector | undefined;
16
+ registerEoa({ smartWalletAddress, eoaAddress, eoaConnector, shouldSetEoaConnector, }: {
17
+ smartWalletAddress: string;
18
+ eoaAddress: string;
19
+ eoaConnector: WalletConnectorBase;
20
+ shouldSetEoaConnector?: boolean;
21
+ }): Promise<void>;
17
22
  }
18
23
  export {};
@@ -12,6 +12,7 @@ var isSameAddress = require('../utils/isSameAddress/isSameAddress.cjs');
12
12
  var getMobileExperience = require('../utils/getMobileExperience/getMobileExperience.cjs');
13
13
  var isConnectorMethodSupported = require('../utils/isConnectorMethodSupported/isConnectorMethodSupported.cjs');
14
14
  var WalletBookSingleton = require('./WalletBookSingleton.cjs');
15
+ var walletConnectorEvents = require('./events/walletConnectorEvents.cjs');
15
16
 
16
17
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
17
18
 
@@ -126,6 +127,9 @@ class WalletConnectorBase extends EventEmitter__default["default"] {
126
127
  this.isInitialized = true;
127
128
  this.constructorProps = props;
128
129
  this._walletBookInstance = WalletBookSingleton.WalletBookSingleton.getOrCreate(props.walletBook);
130
+ this.walletConnectorEventsEmitter =
131
+ this.constructorProps.walletConnectorEventsEmitter ||
132
+ walletConnectorEvents.walletConnectorEvents;
129
133
  if (this.walletBook === undefined) {
130
134
  throw new Error('WalletConnectorBase was not called with super(props) and is missing wallet-book');
131
135
  }
@@ -7,6 +7,7 @@ import { WalletBookSingleton } from './WalletBookSingleton';
7
7
  import { WalletConnectorExtension } from './WalletConnectorExtension';
8
8
  import { WalletConnectorCore } from './types';
9
9
  import { WalletConstructor, WalletProps } from './wallets';
10
+ import { WalletConnectorEventEmitter } from './events';
10
11
  export declare const Chains: readonly ["ETH", "FLOW", "SOL", "EVM", "ALGO", "STARK", "ATOM", "COSMOS", "BTC"];
11
12
  export type Chain = typeof Chains[number];
12
13
  export declare const socialProviders: readonly ["google", "facebook", "apple", "github", "bitbucket", "gitlab", "linkedin", "twitter", "discord", "twitch", "microsoft"];
@@ -56,6 +57,7 @@ export declare abstract class WalletConnectorBase<C extends WalletConstructor<an
56
57
  chainRpcProviders: IChainRpcProviders | undefined;
57
58
  constructorProps: any;
58
59
  _walletBookInstance: WalletBookSingleton;
60
+ walletConnectorEventsEmitter: WalletConnectorEventEmitter;
59
61
  walletFallback: WalletSchema | undefined;
60
62
  isGlobalTransaction: boolean;
61
63
  /**
@@ -8,6 +8,7 @@ import { isSameAddress } from '../utils/isSameAddress/isSameAddress.js';
8
8
  import { getMobileExperience } from '../utils/getMobileExperience/getMobileExperience.js';
9
9
  import { isConnectorMethodSupported } from '../utils/isConnectorMethodSupported/isConnectorMethodSupported.js';
10
10
  import { WalletBookSingleton } from './WalletBookSingleton.js';
11
+ import { walletConnectorEvents } from './events/walletConnectorEvents.js';
11
12
 
12
13
  /* eslint-disable @typescript-eslint/triple-slash-reference */
13
14
  /* eslint-disable @typescript-eslint/no-namespace */
@@ -118,6 +119,9 @@ class WalletConnectorBase extends EventEmitter {
118
119
  this.isInitialized = true;
119
120
  this.constructorProps = props;
120
121
  this._walletBookInstance = WalletBookSingleton.getOrCreate(props.walletBook);
122
+ this.walletConnectorEventsEmitter =
123
+ this.constructorProps.walletConnectorEventsEmitter ||
124
+ walletConnectorEvents;
121
125
  if (this.walletBook === undefined) {
122
126
  throw new Error('WalletConnectorBase was not called with super(props) and is missing wallet-book');
123
127
  }