@dynamic-labs/wallet-book 2.0.0-alpha.5 → 2.0.0-alpha.7

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,43 @@
1
1
 
2
+ ## [2.0.0-alpha.7](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.6...v2.0.0-alpha.7) (2024-02-28)
3
+
4
+
5
+ ### ⚠ BREAKING CHANGES
6
+
7
+ * add networkValidationMode and remove enableForcedNetworkValidation (#4778)
8
+
9
+ ### Features
10
+
11
+ * add bitget and okx wallets ([51fab41](https://github.com/dynamic-labs/DynamicAuth/commit/51fab413096fd89ce99c6c617cf4f3f5db9bf44d))
12
+ * add networkValidationMode and remove enableForcedNetworkValidation ([#4778](https://github.com/dynamic-labs/DynamicAuth/issues/4778)) ([ccb9576](https://github.com/dynamic-labs/DynamicAuth/commit/ccb9576c81b2c570185f5126d6d1fcfcbb5ac9e3))
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * **GVTY-1243:** non evm onramp urls ([#4791](https://github.com/dynamic-labs/DynamicAuth/issues/4791)) ([fea602e](https://github.com/dynamic-labs/DynamicAuth/commit/fea602e2835b4bb9bc096b96375fa97297bf35f1))
18
+ * revert use enableForcedNetworkValidation on connect-only ([#4750](https://github.com/dynamic-labs/DynamicAuth/issues/4750)) ([#4772](https://github.com/dynamic-labs/DynamicAuth/issues/4772)) ([b871c22](https://github.com/dynamic-labs/DynamicAuth/commit/b871c2295f39230bc34ae1fca5f8817cd9251a17))
19
+ * use correct chromeId for okx and bitget wallets and remove group from coin98 ([#4795](https://github.com/dynamic-labs/DynamicAuth/issues/4795)) ([e63bad7](https://github.com/dynamic-labs/DynamicAuth/commit/e63bad76ed06636151212c915a102359a03b4218))
20
+
21
+ ## [2.0.0-alpha.6](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.5...v2.0.0-alpha.6) (2024-02-26)
22
+
23
+
24
+ ### ⚠ BREAKING CHANGES
25
+
26
+ * setShowAuthFlow opens dynamic profile in non-multi-wallet states
27
+
28
+ ### Features
29
+
30
+ * allow passing prop to hide embedded wallet action confirmation UIs ([#4775](https://github.com/dynamic-labs/DynamicAuth/issues/4775)) ([d7c6a46](https://github.com/dynamic-labs/DynamicAuth/commit/d7c6a4699e41f6a62d31880c3bd0346ebfa0e3ba))
31
+ * make sms mobile keyboard numeric ([#4755](https://github.com/dynamic-labs/DynamicAuth/issues/4755)) ([f36844a](https://github.com/dynamic-labs/DynamicAuth/commit/f36844aeaae240c520181b3242492db8ffc64a50))
32
+ * setShowAuthFlow opens dynamic profile in non-multi-wallet states ([42dbbc0](https://github.com/dynamic-labs/DynamicAuth/commit/42dbbc00a5cebe937dca5a80397cdd3c577f6a45))
33
+
34
+
35
+ ### Bug Fixes
36
+
37
+ * demo one-time codes for solana wallets fix ([#4760](https://github.com/dynamic-labs/DynamicAuth/issues/4760)) ([a5ab2a8](https://github.com/dynamic-labs/DynamicAuth/commit/a5ab2a8bc348a35a898e03db0900bfab88184c17))
38
+ * only store passcode in backend when auto-generated by dynamic ([#4764](https://github.com/dynamic-labs/DynamicAuth/issues/4764)) ([528bedc](https://github.com/dynamic-labs/DynamicAuth/commit/528bedce5cbd3022ddafe4242954a04f5b70ae74))
39
+ * use enableForcedNetworkValidation on connect-only ([#4750](https://github.com/dynamic-labs/DynamicAuth/issues/4750)) ([6299f7c](https://github.com/dynamic-labs/DynamicAuth/commit/6299f7c3ce705ddb19714f6b7a3a488851ed8dde))
40
+
2
41
  ## [2.0.0-alpha.5](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.4...v2.0.0-alpha.5) (2024-02-22)
3
42
 
4
43
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/wallet-book",
3
- "version": "2.0.0-alpha.5",
3
+ "version": "2.0.0-alpha.7",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -26,9 +26,9 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "zod": "3.22.4",
29
- "@dynamic-labs/iconic": "2.0.0-alpha.5",
30
- "@dynamic-labs/logger": "2.0.0-alpha.5",
31
- "@dynamic-labs/utils": "2.0.0-alpha.5",
29
+ "@dynamic-labs/iconic": "2.0.0-alpha.7",
30
+ "@dynamic-labs/logger": "2.0.0-alpha.7",
31
+ "@dynamic-labs/utils": "2.0.0-alpha.7",
32
32
  "util": "0.12.5"
33
33
  },
34
34
  "peerDependencies": {
@@ -1,4 +1,12 @@
1
1
  export declare const walletConnectSourceData: Record<string, {
2
+ id: string;
3
+ metadata: {
4
+ shortName: string | null;
5
+ colors: {
6
+ primary: string | null;
7
+ secondary: string | null;
8
+ };
9
+ };
2
10
  name: string;
3
11
  chains: string[];
4
12
  desktop: {
@@ -28,7 +36,6 @@ export declare const walletConnectSourceData: Record<string, {
28
36
  category: string | null;
29
37
  description: string | null;
30
38
  homepage: string;
31
- id: string;
32
39
  image_id: string;
33
40
  image_url: {
34
41
  lg: string;
@@ -39,22 +46,15 @@ export declare const walletConnectSourceData: Record<string, {
39
46
  injected_id: string;
40
47
  namespace: string;
41
48
  }[] | null;
42
- metadata: {
43
- shortName: string | null;
44
- colors: {
45
- primary: string | null;
46
- secondary: string | null;
47
- };
48
- };
49
49
  slug: string;
50
50
  updatedAt: string;
51
51
  versions: string[];
52
52
  supported_standards?: {
53
53
  id: string;
54
- standard_id: number;
55
- standard_prefix: string;
56
54
  title: string;
57
55
  url: string;
56
+ standard_id: number;
57
+ standard_prefix: string;
58
58
  }[] | undefined;
59
59
  }>;
60
60
  export declare const walletConnectTransformedData: Promise<Record<string, {
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var _tslib = require('../../_virtual/_tslib.cjs');
6
6
  var react = require('react');
7
7
  var getWalletIconUrl = require('../helpers/getWalletIconUrl.cjs');
8
- require('../helpers/logger.cjs');
9
8
  require('../helpers/renderTemplate.cjs');
9
+ require('../helpers/logger.cjs');
10
10
  var getBrandIconUrl = require('../helpers/getBrandIconUrl.cjs');
11
11
 
12
12
  const BrandIcon = (_a) => {
@@ -1,8 +1,8 @@
1
1
  import { __rest } from '../../_virtual/_tslib.js';
2
2
  import { useState, createElement, Fragment } from 'react';
3
3
  import { getDefaultWalletIconUrl } from '../helpers/getWalletIconUrl.js';
4
- import '../helpers/logger.js';
5
4
  import '../helpers/renderTemplate.js';
5
+ import '../helpers/logger.js';
6
6
  import { getBrandIconUrl } from '../helpers/getBrandIconUrl.js';
7
7
 
8
8
  const BrandIcon = (_a) => {
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var _tslib = require('../../_virtual/_tslib.cjs');
6
6
  var react = require('react');
7
7
  var getWalletIconUrl = require('../helpers/getWalletIconUrl.cjs');
8
- require('../helpers/logger.cjs');
9
8
  var findWalletBookWallet = require('../helpers/findWalletBookWallet.cjs');
10
9
  require('../helpers/renderTemplate.cjs');
10
+ require('../helpers/logger.cjs');
11
11
  require('@dynamic-labs/utils');
12
12
  require('../schemas/walletConnectSourceSchema.cjs');
13
13
  require('../schemas/walletBookSchema.cjs');
@@ -1,9 +1,9 @@
1
1
  import { __rest } from '../../_virtual/_tslib.js';
2
2
  import { useState, createElement, Fragment } from 'react';
3
3
  import { getWalletIconUrl, getDefaultWalletIconUrl } from '../helpers/getWalletIconUrl.js';
4
- import '../helpers/logger.js';
5
4
  import { findWalletBookWallet } from '../helpers/findWalletBookWallet.js';
6
5
  import '../helpers/renderTemplate.js';
6
+ import '../helpers/logger.js';
7
7
  import '@dynamic-labs/utils';
8
8
  import '../schemas/walletConnectSourceSchema.js';
9
9
  import '../schemas/walletBookSchema.js';
@@ -2,25 +2,15 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var normalizeWalletName = require('./normalizeWalletName.cjs');
6
- var logger = require('./logger.cjs');
7
-
8
5
  const getWalletBookWallet = (walletBook, walletKey) => {
9
- var _a, _b, _c;
6
+ var _a, _b;
10
7
  if (!walletKey)
11
8
  throw new Error('Wallet key is required. Please pass in a wallet key to getWalletBookWallet');
12
- const walletDataFromKeyLookup = (_a = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) === null || _a === void 0 ? void 0 : _a[walletKey];
13
- if (!walletDataFromKeyLookup) {
14
- // adds fallback support. normalizeWalletName will be removed in v2
15
- const normalizedWalletKey = normalizeWalletName.normalizeWalletName(walletKey);
16
- const walletDataFromNormalizedKeyLookup = (_b = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) === null || _b === void 0 ? void 0 : _b[normalizedWalletKey];
17
- if (walletDataFromNormalizedKeyLookup) {
18
- logger.logger.warn(`deprecated: using walletName: ${walletKey} to look up wallet data is deprecated. use connector.key instead ${normalizedWalletKey}`);
19
- return walletDataFromNormalizedKeyLookup;
20
- }
21
- throw new Error(`Wallet ${normalizedWalletKey} not found in wallet book (${Object.keys((_c = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) !== null && _c !== void 0 ? _c : {}).length} wallets found)`);
9
+ const walletData = (_a = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) === null || _a === void 0 ? void 0 : _a[walletKey];
10
+ if (!walletData) {
11
+ throw new Error(`Wallet ${walletKey} not found in wallet book (${Object.keys((_b = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) !== null && _b !== void 0 ? _b : {}).length} wallets found)`);
22
12
  }
23
- return walletDataFromKeyLookup;
13
+ return walletData;
24
14
  };
25
15
 
26
16
  exports.getWalletBookWallet = getWalletBookWallet;
@@ -1,22 +1,12 @@
1
- import { normalizeWalletName } from './normalizeWalletName.js';
2
- import { logger } from './logger.js';
3
-
4
1
  const getWalletBookWallet = (walletBook, walletKey) => {
5
- var _a, _b, _c;
2
+ var _a, _b;
6
3
  if (!walletKey)
7
4
  throw new Error('Wallet key is required. Please pass in a wallet key to getWalletBookWallet');
8
- const walletDataFromKeyLookup = (_a = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) === null || _a === void 0 ? void 0 : _a[walletKey];
9
- if (!walletDataFromKeyLookup) {
10
- // adds fallback support. normalizeWalletName will be removed in v2
11
- const normalizedWalletKey = normalizeWalletName(walletKey);
12
- const walletDataFromNormalizedKeyLookup = (_b = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) === null || _b === void 0 ? void 0 : _b[normalizedWalletKey];
13
- if (walletDataFromNormalizedKeyLookup) {
14
- logger.warn(`deprecated: using walletName: ${walletKey} to look up wallet data is deprecated. use connector.key instead ${normalizedWalletKey}`);
15
- return walletDataFromNormalizedKeyLookup;
16
- }
17
- throw new Error(`Wallet ${normalizedWalletKey} not found in wallet book (${Object.keys((_c = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) !== null && _c !== void 0 ? _c : {}).length} wallets found)`);
5
+ const walletData = (_a = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) === null || _a === void 0 ? void 0 : _a[walletKey];
6
+ if (!walletData) {
7
+ throw new Error(`Wallet ${walletKey} not found in wallet book (${Object.keys((_b = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) !== null && _b !== void 0 ? _b : {}).length} wallets found)`);
18
8
  }
19
- return walletDataFromKeyLookup;
9
+ return walletData;
20
10
  };
21
11
 
22
12
  export { getWalletBookWallet };
@@ -2,7 +2,6 @@ export * from './getWalletIconUrl';
2
2
  export * from './getWalletBookWallet';
3
3
  export * from './getWalletLinks';
4
4
  export * from './getWalletPrimaryColor';
5
- export * from './normalizeWalletName';
6
5
  export * from './renderTemplate';
7
6
  export * from './findWalletBookWallet';
8
7
  export * from './logger';
@@ -8,8 +8,8 @@ var utils = require('@dynamic-labs/utils');
8
8
  require('../schemas/walletConnectSourceSchema.cjs');
9
9
  var walletBookSchema = require('../schemas/walletBookSchema.cjs');
10
10
  require('../schemas/walletSchema.cjs');
11
- var logger = require('../helpers/logger.cjs');
12
11
  require('../helpers/renderTemplate.cjs');
12
+ var logger = require('../helpers/logger.cjs');
13
13
  var getWalletBookCdnUrl = require('../helpers/getWalletBookCdnUrl.cjs');
14
14
  var walletBookFallbacks = require('../../wallet-book-fallbacks.cjs');
15
15
 
@@ -4,8 +4,8 @@ import { retryableFn } from '@dynamic-labs/utils';
4
4
  import '../schemas/walletConnectSourceSchema.js';
5
5
  import { walletBookSchema } from '../schemas/walletBookSchema.js';
6
6
  import '../schemas/walletSchema.js';
7
- import { logger } from '../helpers/logger.js';
8
7
  import '../helpers/renderTemplate.js';
8
+ import { logger } from '../helpers/logger.js';
9
9
  import { getWalletBookCdnUrl } from '../helpers/getWalletBookCdnUrl.js';
10
10
  import walletBookFallbacks from '../../wallet-book-fallbacks.js';
11
11
 
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var react = require('react');
6
6
  require('../../_virtual/_tslib.cjs');
7
- require('../helpers/logger.cjs');
8
7
  require('../helpers/renderTemplate.cjs');
8
+ require('../helpers/logger.cjs');
9
9
  require('@dynamic-labs/utils');
10
10
  require('../schemas/walletConnectSourceSchema.cjs');
11
11
  require('../schemas/walletBookSchema.cjs');
@@ -1,7 +1,7 @@
1
1
  import { useContext } from 'react';
2
2
  import '../../_virtual/_tslib.js';
3
- import '../helpers/logger.js';
4
3
  import '../helpers/renderTemplate.js';
4
+ import '../helpers/logger.js';
5
5
  import '@dynamic-labs/utils';
6
6
  import '../schemas/walletConnectSourceSchema.js';
7
7
  import '../schemas/walletBookSchema.js';
@@ -12,6 +12,14 @@ var groups = {
12
12
  key: "argentx",
13
13
  name: "ArgentX"
14
14
  },
15
+ bitgetwallet: {
16
+ brand: {
17
+ alt: "Bitget Wallet",
18
+ spriteId: "bitget"
19
+ },
20
+ key: "bitgetwallet",
21
+ name: "Bitget Wallet"
22
+ },
15
23
  blocto: {
16
24
  brand: {
17
25
  alt: "Blocto",
@@ -868,6 +876,60 @@ var wallets = {
868
876
  chromeId: "aflkmfhebedbjioipglgcbcmnbpgliof"
869
877
  },
870
878
  name: "Backpack (EVM)"
879
+ },
880
+ okxwalletbtc: {
881
+ brand: {
882
+ alt: "OKX Wallet",
883
+ spriteId: "okx"
884
+ },
885
+ chainGroup: "okxwallet",
886
+ desktop: {
887
+ chromeId: "mcohilncbfahbmgdjkbpemcciiolgcge"
888
+ },
889
+ group: "okxwallet",
890
+ injectedConfig: [
891
+ {
892
+ chain: "btc",
893
+ extensionLocators: [
894
+ ],
895
+ windowLocations: [
896
+ "okxwallet.bitcoin"
897
+ ]
898
+ }
899
+ ],
900
+ mobile: {
901
+ androidId: "com.okinc.okex.gp",
902
+ iosId: "id1327268470"
903
+ },
904
+ name: "OKX",
905
+ shortName: "OKX Wallet (Bitcoin)"
906
+ },
907
+ unisat: {
908
+ brand: {
909
+ alt: "UniSat",
910
+ spriteId: "unisat"
911
+ },
912
+ desktop: {
913
+ chromeId: "ppbibelpcjmhbdihakflkdcoccbgbkpo"
914
+ },
915
+ injectedConfig: [
916
+ {
917
+ chain: "btc",
918
+ extensionLocators: [
919
+ ],
920
+ windowLocations: [
921
+ "unisat"
922
+ ]
923
+ }
924
+ ],
925
+ name: "UniSat"
926
+ },
927
+ zerodev: {
928
+ brand: {
929
+ alt: "Smart Wallet",
930
+ spriteId: "smartwallet"
931
+ },
932
+ name: "ZeroDev"
871
933
  }
872
934
  };
873
935
  var walletBookFallbacks = {
@@ -8,6 +8,14 @@ var groups = {
8
8
  key: "argentx",
9
9
  name: "ArgentX"
10
10
  },
11
+ bitgetwallet: {
12
+ brand: {
13
+ alt: "Bitget Wallet",
14
+ spriteId: "bitget"
15
+ },
16
+ key: "bitgetwallet",
17
+ name: "Bitget Wallet"
18
+ },
11
19
  blocto: {
12
20
  brand: {
13
21
  alt: "Blocto",
@@ -864,6 +872,60 @@ var wallets = {
864
872
  chromeId: "aflkmfhebedbjioipglgcbcmnbpgliof"
865
873
  },
866
874
  name: "Backpack (EVM)"
875
+ },
876
+ okxwalletbtc: {
877
+ brand: {
878
+ alt: "OKX Wallet",
879
+ spriteId: "okx"
880
+ },
881
+ chainGroup: "okxwallet",
882
+ desktop: {
883
+ chromeId: "mcohilncbfahbmgdjkbpemcciiolgcge"
884
+ },
885
+ group: "okxwallet",
886
+ injectedConfig: [
887
+ {
888
+ chain: "btc",
889
+ extensionLocators: [
890
+ ],
891
+ windowLocations: [
892
+ "okxwallet.bitcoin"
893
+ ]
894
+ }
895
+ ],
896
+ mobile: {
897
+ androidId: "com.okinc.okex.gp",
898
+ iosId: "id1327268470"
899
+ },
900
+ name: "OKX",
901
+ shortName: "OKX Wallet (Bitcoin)"
902
+ },
903
+ unisat: {
904
+ brand: {
905
+ alt: "UniSat",
906
+ spriteId: "unisat"
907
+ },
908
+ desktop: {
909
+ chromeId: "ppbibelpcjmhbdihakflkdcoccbgbkpo"
910
+ },
911
+ injectedConfig: [
912
+ {
913
+ chain: "btc",
914
+ extensionLocators: [
915
+ ],
916
+ windowLocations: [
917
+ "unisat"
918
+ ]
919
+ }
920
+ ],
921
+ name: "UniSat"
922
+ },
923
+ zerodev: {
924
+ brand: {
925
+ alt: "Smart Wallet",
926
+ spriteId: "smartwallet"
927
+ },
928
+ name: "ZeroDev"
867
929
  }
868
930
  };
869
931
  var walletBookFallbacks = {
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const normalizeWalletName = (name) => { var _a; return (_a = name === null || name === void 0 ? void 0 : name.toLowerCase().replace(/\W/g, '')) !== null && _a !== void 0 ? _a : 'undefined-wallet'; };
6
-
7
- exports.normalizeWalletName = normalizeWalletName;
@@ -1 +0,0 @@
1
- export declare const normalizeWalletName: (name?: string) => string;
@@ -1,3 +0,0 @@
1
- const normalizeWalletName = (name) => { var _a; return (_a = name === null || name === void 0 ? void 0 : name.toLowerCase().replace(/\W/g, '')) !== null && _a !== void 0 ? _a : 'undefined-wallet'; };
2
-
3
- export { normalizeWalletName };