@dynamic-labs/wallet-connector-core 4.0.0-alpha.26 → 4.0.0-alpha.27

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,18 @@
1
1
 
2
+ ## [4.0.0-alpha.27](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.26...v4.0.0-alpha.27) (2024-11-06)
3
+
4
+
5
+ ### Features
6
+
7
+ * allows adding connection configuration for solana connectors ([#7354](https://github.com/dynamic-labs/dynamic-auth/issues/7354)) ([01e35ee](https://github.com/dynamic-labs/dynamic-auth/commit/01e35ee5bfe4605df48e4188a753111efe483048))
8
+ * allows passing solana connection config to dynamic client ([#7357](https://github.com/dynamic-labs/dynamic-auth/issues/7357)) ([6da14ce](https://github.com/dynamic-labs/dynamic-auth/commit/6da14ceb481147aea31d192fe268be43a8af80e9))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * check legacy vs eip1599 tx in global connectivity ([#7341](https://github.com/dynamic-labs/dynamic-auth/issues/7341)) ([b223ea7](https://github.com/dynamic-labs/dynamic-auth/commit/b223ea7a5ed5637e11da1040c631c48bc23ba76d))
14
+ * global connectivity multiple transactions in a row ([#7342](https://github.com/dynamic-labs/dynamic-auth/issues/7342)) ([d13c1af](https://github.com/dynamic-labs/dynamic-auth/commit/d13c1afec6b3680961621d8317f55549b3ed428f))
15
+
2
16
  ## [4.0.0-alpha.26](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.25...v4.0.0-alpha.26) (2024-11-04)
3
17
 
4
18
  ## [4.0.0-alpha.25](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.24...v4.0.0-alpha.25) (2024-11-01)
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.26";
6
+ var version = "4.0.0-alpha.27";
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.26";
2
+ var version = "4.0.0-alpha.27";
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.26",
3
+ "version": "4.0.0-alpha.27",
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",
@@ -21,12 +21,12 @@
21
21
  "@dynamic-labs/sdk-api-core": "0.0.559"
22
22
  },
23
23
  "peerDependencies": {
24
- "@dynamic-labs/assert-package-version": "4.0.0-alpha.26",
25
- "@dynamic-labs/logger": "4.0.0-alpha.26",
26
- "@dynamic-labs/rpc-providers": "4.0.0-alpha.26",
27
- "@dynamic-labs/types": "4.0.0-alpha.26",
28
- "@dynamic-labs/utils": "4.0.0-alpha.26",
29
- "@dynamic-labs/wallet-book": "4.0.0-alpha.26",
24
+ "@dynamic-labs/assert-package-version": "4.0.0-alpha.27",
25
+ "@dynamic-labs/logger": "4.0.0-alpha.27",
26
+ "@dynamic-labs/rpc-providers": "4.0.0-alpha.27",
27
+ "@dynamic-labs/types": "4.0.0-alpha.27",
28
+ "@dynamic-labs/utils": "4.0.0-alpha.27",
29
+ "@dynamic-labs/wallet-book": "4.0.0-alpha.27",
30
30
  "eventemitter3": "5.0.1"
31
31
  }
32
32
  }
@@ -289,7 +289,7 @@ class WalletConnectorBase extends EventEmitter__default["default"] {
289
289
  }
290
290
  get metadata() {
291
291
  var _a;
292
- return (_a = this._metadata) !== null && _a !== void 0 ? _a : { id: this.key };
292
+ return (_a = this._metadata) !== null && _a !== void 0 ? _a : { icon: '', id: this.key, name: this.name };
293
293
  }
294
294
  /**
295
295
  * Whether the wallet connector should fall back to a different wallet connector
@@ -220,9 +220,7 @@ export declare abstract class WalletConnectorBase<C extends WalletConstructor<an
220
220
  * Override key or the normalized wallet name if needed
221
221
  */
222
222
  get key(): string;
223
- get metadata(): WalletMetadata | {
224
- id: string;
225
- };
223
+ get metadata(): WalletMetadata;
226
224
  /**
227
225
  * Wallet name
228
226
  */
@@ -281,7 +281,7 @@ class WalletConnectorBase extends EventEmitter {
281
281
  }
282
282
  get metadata() {
283
283
  var _a;
284
- return (_a = this._metadata) !== null && _a !== void 0 ? _a : { id: this.key };
284
+ return (_a = this._metadata) !== null && _a !== void 0 ? _a : { icon: '', id: this.key, name: this.name };
285
285
  }
286
286
  /**
287
287
  * Whether the wallet connector should fall back to a different wallet connector
@@ -22,7 +22,7 @@ export type NameServiceData = {
22
22
  name?: string;
23
23
  };
24
24
  export type InternalWalletConnector = WalletConnectorCore.WalletConnector;
25
- export type WalletConnector = Pick<InternalWalletConnector, 'canConnectViaCustodialService' | 'canConnectViaQrCode' | 'canConnectViaSocial' | 'chainRpcProviders' | 'connect' | 'connectedChain' | 'createWallet' | 'constructorProps' | 'endSession' | 'getAddress' | 'getAdditionalAddresses' | 'getConnectedAccounts' | 'getDeepLink' | 'getMobileOrInstalledWallet' | 'getNetwork' | 'getSession' | 'initEventListener' | 'isAvailable' | 'isEmbeddedWallet' | 'isInitialized' | 'isInstalledOnBrowser' | 'isTestnet' | 'isWalletConnect' | 'key' | 'name' | 'parseAddress' | 'proveOwnership' | 'providerResources' | 'supportedChains' | 'supportsNetworkSwitching' | 'switchNetwork' | 'switchNetworkOnlyFromWallet' | 'teardownEventListeners'> & EventEmitter<WalletConnectorEventTypes>;
25
+ export type WalletConnector = Pick<InternalWalletConnector, 'canConnectViaCustodialService' | 'canConnectViaQrCode' | 'canConnectViaSocial' | 'chainRpcProviders' | 'connect' | 'connectedChain' | 'createWallet' | 'constructorProps' | 'endSession' | 'getAddress' | 'getAdditionalAddresses' | 'getConnectedAccounts' | 'getDeepLink' | 'getMobileOrInstalledWallet' | 'getNetwork' | 'getSession' | 'initEventListener' | 'isAvailable' | 'isEmbeddedWallet' | 'isInitialized' | 'isInstalledOnBrowser' | 'isTestnet' | 'isWalletConnect' | 'key' | 'metadata' | 'name' | 'parseAddress' | 'proveOwnership' | 'providerResources' | 'supportedChains' | 'supportsNetworkSwitching' | 'switchNetwork' | 'switchNetworkOnlyFromWallet' | 'teardownEventListeners'> & EventEmitter<WalletConnectorEventTypes>;
26
26
  export interface WalletConnectorConstructor {
27
27
  new (props?: any): InternalWalletConnector;
28
28
  }
@@ -10,12 +10,12 @@ var getDeepLinks = require('./getDeepLinks/getDeepLinks.cjs');
10
10
  var getDownloadLinks = require('./getDownloadLinks/getDownloadLinks.cjs');
11
11
  var getWalletLimitations = require('./getWalletLimitations/getWalletLimitations.cjs');
12
12
 
13
- const getWalletMetadataFromWalletBook = ({ walletKey, walletBookWallet, walletBook: walletBook$1, }) => {
13
+ const getWalletMetadataFromWalletBook = ({ walletKey, walletBookWallet, walletBook: walletBook$1, walletFallback, }) => {
14
14
  var _a, _b, _c, _d, _e;
15
- if (!walletBook$1) {
15
+ if (!walletBook$1 && !walletFallback) {
16
16
  throw new Error('Wallet book is required');
17
17
  }
18
- const wallet = walletBookWallet !== null && walletBookWallet !== void 0 ? walletBookWallet : walletBook.findWalletBookWallet(walletBook$1, walletKey);
18
+ const wallet = walletBookWallet !== null && walletBookWallet !== void 0 ? walletBookWallet : walletBook.getWalletBookWallet(walletBook$1, walletKey, walletFallback);
19
19
  // if no walletBookWallet is provided and no wallet is found in the wallet book, throw an error
20
20
  if (!wallet) {
21
21
  throw new Error('Wallet not found in wallet book');
@@ -4,6 +4,7 @@ type GetWalletMetadataFromWalletBookOpts = {
4
4
  walletKey: string;
5
5
  walletBookWallet?: WalletSchema;
6
6
  walletBook?: WalletBookSchema;
7
+ walletFallback?: WalletSchema;
7
8
  };
8
- export declare const getWalletMetadataFromWalletBook: ({ walletKey, walletBookWallet, walletBook, }: GetWalletMetadataFromWalletBookOpts) => WalletMetadata;
9
+ export declare const getWalletMetadataFromWalletBook: ({ walletKey, walletBookWallet, walletBook, walletFallback, }: GetWalletMetadataFromWalletBookOpts) => WalletMetadata;
9
10
  export {};
@@ -1,17 +1,17 @@
1
1
  'use client'
2
- import { findWalletBookWallet } from '@dynamic-labs/wallet-book';
2
+ import { getWalletBookWallet } from '@dynamic-labs/wallet-book';
3
3
  import { getIconUrl } from './getIconUrl/getIconUrl.js';
4
4
  import { getValidHexColor } from './getValidHexColor/getValidHexColor.js';
5
5
  import { getDeepLinks } from './getDeepLinks/getDeepLinks.js';
6
6
  import { getDownloadLinks } from './getDownloadLinks/getDownloadLinks.js';
7
7
  import { getWalletLimitations } from './getWalletLimitations/getWalletLimitations.js';
8
8
 
9
- const getWalletMetadataFromWalletBook = ({ walletKey, walletBookWallet, walletBook, }) => {
9
+ const getWalletMetadataFromWalletBook = ({ walletKey, walletBookWallet, walletBook, walletFallback, }) => {
10
10
  var _a, _b, _c, _d, _e;
11
- if (!walletBook) {
11
+ if (!walletBook && !walletFallback) {
12
12
  throw new Error('Wallet book is required');
13
13
  }
14
- const wallet = walletBookWallet !== null && walletBookWallet !== void 0 ? walletBookWallet : findWalletBookWallet(walletBook, walletKey);
14
+ const wallet = walletBookWallet !== null && walletBookWallet !== void 0 ? walletBookWallet : getWalletBookWallet(walletBook, walletKey, walletFallback);
15
15
  // if no walletBookWallet is provided and no wallet is found in the wallet book, throw an error
16
16
  if (!wallet) {
17
17
  throw new Error('Wallet not found in wallet book');