@dynamic-labs/wallet-book 1.1.0-alpha.7 → 1.1.0-alpha.9
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 +31 -0
- package/package.json +2 -2
- package/src/build/sources/walletConnect/index.d.ts +15 -15
- package/src/build/sources/walletConnect/preprocessors.d.ts +1 -0
- package/src/build/sources/walletConnectOverrides/index.d.ts +40 -0
- package/src/helpers/getWalletBookWallet.cjs +4 -6
- package/src/helpers/getWalletBookWallet.d.ts +1 -1
- package/src/helpers/getWalletBookWallet.js +4 -6
- package/wallet-book-fallbacks.cjs +19 -1
- package/wallet-book-fallbacks.js +19 -1
- package/src/helpers/normalizeWalletName.cjs +0 -7
- package/src/helpers/normalizeWalletName.js +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,35 @@
|
|
|
1
1
|
|
|
2
|
+
## [1.1.0-alpha.9](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.8...v1.1.0-alpha.9) (2024-01-04)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add solana magic support ([#4258](https://github.com/dynamic-labs/DynamicAuth/issues/4258)) ([da726aa](https://github.com/dynamic-labs/DynamicAuth/commit/da726aa78466c52ee3e1f18952e4351cde754cbc))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* edge case with unlinking wallet ([#4285](https://github.com/dynamic-labs/DynamicAuth/issues/4285)) ([1057fe4](https://github.com/dynamic-labs/DynamicAuth/commit/1057fe47599381f5d9dc39ce4cbeca2041c70319))
|
|
13
|
+
* remove normalizeWalletName from DynamicAuth ([5592817](https://github.com/dynamic-labs/DynamicAuth/commit/5592817b62e345319e04cca9a98276ffad87cfc2))
|
|
14
|
+
* **useFetchBalance:** ensure the latest wallet balance is fetched ([#4288](https://github.com/dynamic-labs/DynamicAuth/issues/4288)) ([25dd035](https://github.com/dynamic-labs/DynamicAuth/commit/25dd035cf8893b7cd28f550026134ba0eecda142))
|
|
15
|
+
|
|
16
|
+
## [1.1.0-alpha.8](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.7...v1.1.0-alpha.8) (2024-01-03)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* add new sdk view section for text ([#4280](https://github.com/dynamic-labs/DynamicAuth/issues/4280)) ([457ae38](https://github.com/dynamic-labs/DynamicAuth/commit/457ae38cd2be8dae078f40b54ffc4704299d4ed9))
|
|
22
|
+
* add new setShowLinkNewWalletModal method ([f46447a](https://github.com/dynamic-labs/DynamicAuth/commit/f46447ab606f4fdbf55e5fef21dd98f8f2650e90))
|
|
23
|
+
* add pk export for hd wallets ([#4266](https://github.com/dynamic-labs/DynamicAuth/issues/4266)) ([44aac69](https://github.com/dynamic-labs/DynamicAuth/commit/44aac69580ed44e66eab971f87cb6061a3fadc90))
|
|
24
|
+
* add starknet support for sopelia ([#4248](https://github.com/dynamic-labs/DynamicAuth/issues/4248)) ([f9a0980](https://github.com/dynamic-labs/DynamicAuth/commit/f9a0980c3cd2d6d95c5dd17b179fbd0931f08b1a))
|
|
25
|
+
* enable hardware wallet for solana wallets ([#4275](https://github.com/dynamic-labs/DynamicAuth/issues/4275)) ([704b380](https://github.com/dynamic-labs/DynamicAuth/commit/704b380186618a5a5793e88f36ccbe84b59a2e4a))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* phantom solana not connecting on mobile ([#4284](https://github.com/dynamic-labs/DynamicAuth/issues/4284)) ([6ad75f1](https://github.com/dynamic-labs/DynamicAuth/commit/6ad75f152896459f5cf658227f998c246b6a572b))
|
|
31
|
+
* use bitcoin payment address for onramp ([#4273](https://github.com/dynamic-labs/DynamicAuth/issues/4273)) ([a2f54e8](https://github.com/dynamic-labs/DynamicAuth/commit/a2f54e812a11a91ee488eca64f14b5eeea1a8874))
|
|
32
|
+
|
|
2
33
|
## [1.1.0-alpha.7](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.6...v1.1.0-alpha.7) (2023-12-28)
|
|
3
34
|
|
|
4
35
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/wallet-book",
|
|
3
|
-
"version": "1.1.0-alpha.
|
|
3
|
+
"version": "1.1.0-alpha.9",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"zod": "3.22.4",
|
|
29
|
-
"@dynamic-labs/logger": "1.1.0-alpha.
|
|
29
|
+
"@dynamic-labs/logger": "1.1.0-alpha.9"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"react": "^17.0.2 || ^18.0.0",
|
|
@@ -1,32 +1,25 @@
|
|
|
1
1
|
export declare const walletConnectSourceData: Record<string, {
|
|
2
|
-
name: string;
|
|
3
|
-
chains: string[];
|
|
4
|
-
desktop: {
|
|
5
|
-
native: string | null;
|
|
6
|
-
universal: string | null;
|
|
7
|
-
};
|
|
8
|
-
rdns: string | null;
|
|
9
|
-
mobile: {
|
|
10
|
-
native: string | null;
|
|
11
|
-
universal: string | null;
|
|
12
|
-
};
|
|
13
|
-
sdks: string[];
|
|
14
2
|
app: {
|
|
15
3
|
android: string | null;
|
|
16
|
-
ios: string | null;
|
|
17
|
-
opera: string | null;
|
|
18
4
|
browser: string | null;
|
|
19
5
|
chrome: string | null;
|
|
20
6
|
edge: string | null;
|
|
21
7
|
firefox: string | null;
|
|
8
|
+
ios: string | null;
|
|
22
9
|
linux: string | null;
|
|
23
10
|
mac: string | null;
|
|
11
|
+
opera: string | null;
|
|
24
12
|
safari: string | null;
|
|
25
13
|
windows: string | null;
|
|
26
14
|
};
|
|
27
15
|
app_type: string;
|
|
28
16
|
category: string | null;
|
|
17
|
+
chains: string[];
|
|
29
18
|
description: string | null;
|
|
19
|
+
desktop: {
|
|
20
|
+
native: string | null;
|
|
21
|
+
universal: string | null;
|
|
22
|
+
};
|
|
30
23
|
homepage: string;
|
|
31
24
|
id: string;
|
|
32
25
|
image_id: string;
|
|
@@ -40,12 +33,19 @@ export declare const walletConnectSourceData: Record<string, {
|
|
|
40
33
|
namespace: string;
|
|
41
34
|
}[] | null;
|
|
42
35
|
metadata: {
|
|
43
|
-
shortName: string | null;
|
|
44
36
|
colors: {
|
|
45
37
|
primary: string | null;
|
|
46
38
|
secondary: string | null;
|
|
47
39
|
};
|
|
40
|
+
shortName: string | null;
|
|
48
41
|
};
|
|
42
|
+
mobile: {
|
|
43
|
+
native: string | null;
|
|
44
|
+
universal: string | null;
|
|
45
|
+
};
|
|
46
|
+
name: string;
|
|
47
|
+
rdns: string | null;
|
|
48
|
+
sdks: string[];
|
|
49
49
|
slug: string;
|
|
50
50
|
updatedAt: string;
|
|
51
51
|
versions: string[];
|
|
@@ -3,6 +3,7 @@ export declare const preprocessBrand: (sourceData: any) => void;
|
|
|
3
3
|
export declare const preprocessDesktop: (sourceData: any) => void;
|
|
4
4
|
export declare const preprocessMobile: (sourceData: any) => void;
|
|
5
5
|
export declare const preprocessSdks: (sourceData: any) => void;
|
|
6
|
+
export declare const preprocessRdns: (sourceData: any) => void;
|
|
6
7
|
export declare const preprocessUniversal: (data: any) => Promise<void>;
|
|
7
8
|
export declare const preprocessNative: (data: any) => void;
|
|
8
9
|
/**
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
export declare const WALLET_CONNECT_ENTRIES_TO_REMOVE: string[];
|
|
2
2
|
export declare const applyOverrides: (sourceData: any, overrides?: {
|
|
3
3
|
cryptocom: {
|
|
4
|
+
eip6963Config: {
|
|
5
|
+
action: string;
|
|
6
|
+
value: {
|
|
7
|
+
rdns: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
4
10
|
mobile: {
|
|
5
11
|
action: string;
|
|
6
12
|
value: null;
|
|
@@ -107,11 +113,25 @@ export declare const applyOverrides: (sourceData: any, overrides?: {
|
|
|
107
113
|
};
|
|
108
114
|
};
|
|
109
115
|
safepal: {
|
|
116
|
+
eip6963Config: {
|
|
117
|
+
action: string;
|
|
118
|
+
value: {
|
|
119
|
+
rdns: string;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
110
122
|
switchNetworkOnlyFromWallet: {
|
|
111
123
|
action: string;
|
|
112
124
|
value: boolean;
|
|
113
125
|
};
|
|
114
126
|
};
|
|
127
|
+
sequence: {
|
|
128
|
+
eip6963Config: {
|
|
129
|
+
action: string;
|
|
130
|
+
value: {
|
|
131
|
+
rdns: string;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
};
|
|
115
135
|
trust: {
|
|
116
136
|
chains: {
|
|
117
137
|
action: string;
|
|
@@ -145,6 +165,12 @@ export declare const applyOverrides: (sourceData: any, overrides?: {
|
|
|
145
165
|
}) => void;
|
|
146
166
|
export declare const walletConnectOverrides: {
|
|
147
167
|
cryptocom: {
|
|
168
|
+
eip6963Config: {
|
|
169
|
+
action: string;
|
|
170
|
+
value: {
|
|
171
|
+
rdns: string;
|
|
172
|
+
};
|
|
173
|
+
};
|
|
148
174
|
mobile: {
|
|
149
175
|
action: string;
|
|
150
176
|
value: null;
|
|
@@ -251,11 +277,25 @@ export declare const walletConnectOverrides: {
|
|
|
251
277
|
};
|
|
252
278
|
};
|
|
253
279
|
safepal: {
|
|
280
|
+
eip6963Config: {
|
|
281
|
+
action: string;
|
|
282
|
+
value: {
|
|
283
|
+
rdns: string;
|
|
284
|
+
};
|
|
285
|
+
};
|
|
254
286
|
switchNetworkOnlyFromWallet: {
|
|
255
287
|
action: string;
|
|
256
288
|
value: boolean;
|
|
257
289
|
};
|
|
258
290
|
};
|
|
291
|
+
sequence: {
|
|
292
|
+
eip6963Config: {
|
|
293
|
+
action: string;
|
|
294
|
+
value: {
|
|
295
|
+
rdns: string;
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
};
|
|
259
299
|
trust: {
|
|
260
300
|
chains: {
|
|
261
301
|
action: string;
|
|
@@ -2,14 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const getWalletBookWallet = (walletBook, walletName) => {
|
|
5
|
+
const getWalletBookWallet = (walletBook, walletKey) => {
|
|
8
6
|
var _a, _b;
|
|
9
|
-
const
|
|
10
|
-
const walletData = (_a = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) === null || _a === void 0 ? void 0 : _a[
|
|
7
|
+
const walletKeyOrDefault = walletKey !== null && walletKey !== void 0 ? walletKey : 'undefined-wallet-key';
|
|
8
|
+
const walletData = (_a = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) === null || _a === void 0 ? void 0 : _a[walletKeyOrDefault];
|
|
11
9
|
if (!walletData)
|
|
12
|
-
throw new Error(`Wallet ${
|
|
10
|
+
throw new Error(`Wallet ${walletKeyOrDefault} 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)`);
|
|
13
11
|
return walletData;
|
|
14
12
|
};
|
|
15
13
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { WalletBookSchema, WalletSchema } from '../schemas';
|
|
2
|
-
export declare const getWalletBookWallet: (walletBook: WalletBookSchema,
|
|
2
|
+
export declare const getWalletBookWallet: (walletBook: WalletBookSchema, walletKey: string | undefined) => WalletSchema;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const getWalletBookWallet = (walletBook, walletName) => {
|
|
1
|
+
const getWalletBookWallet = (walletBook, walletKey) => {
|
|
4
2
|
var _a, _b;
|
|
5
|
-
const
|
|
6
|
-
const walletData = (_a = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) === null || _a === void 0 ? void 0 : _a[
|
|
3
|
+
const walletKeyOrDefault = walletKey !== null && walletKey !== void 0 ? walletKey : 'undefined-wallet-key';
|
|
4
|
+
const walletData = (_a = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) === null || _a === void 0 ? void 0 : _a[walletKeyOrDefault];
|
|
7
5
|
if (!walletData)
|
|
8
|
-
throw new Error(`Wallet ${
|
|
6
|
+
throw new Error(`Wallet ${walletKeyOrDefault} 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)`);
|
|
9
7
|
return walletData;
|
|
10
8
|
};
|
|
11
9
|
|
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var groups = {
|
|
6
|
+
argentx: {
|
|
7
|
+
brand: {
|
|
8
|
+
alt: "ArgentX",
|
|
9
|
+
imageId: "argentx",
|
|
10
|
+
primaryColor: "#FF875B"
|
|
11
|
+
},
|
|
12
|
+
key: "argentx",
|
|
13
|
+
name: "ArgentX"
|
|
14
|
+
},
|
|
6
15
|
blocto: {
|
|
7
16
|
brand: {
|
|
8
17
|
alt: "Blocto",
|
|
@@ -261,7 +270,7 @@ var wallets = {
|
|
|
261
270
|
},
|
|
262
271
|
argentx: {
|
|
263
272
|
brand: {
|
|
264
|
-
alt: "Argent Wallet",
|
|
273
|
+
alt: "Argent X Wallet",
|
|
265
274
|
primaryColor: "#FF875B",
|
|
266
275
|
spriteId: "argentx"
|
|
267
276
|
},
|
|
@@ -339,6 +348,9 @@ var wallets = {
|
|
|
339
348
|
desktop: {
|
|
340
349
|
chromeId: "egjidjbpglichdcondbcbdnbeeppgdph"
|
|
341
350
|
},
|
|
351
|
+
eip6963Config: {
|
|
352
|
+
rdns: "com.trustwallet.app"
|
|
353
|
+
},
|
|
342
354
|
filterFromWalletConnect: true,
|
|
343
355
|
injectedConfig: [
|
|
344
356
|
{
|
|
@@ -389,6 +401,9 @@ var wallets = {
|
|
|
389
401
|
edgeId: "cpojfbodiccabbabgimdeohkkpjfpbnf",
|
|
390
402
|
firefoxId: "rainbow-extension"
|
|
391
403
|
},
|
|
404
|
+
eip6963Config: {
|
|
405
|
+
rdns: "me.rainbow"
|
|
406
|
+
},
|
|
392
407
|
filterFromWalletConnect: true,
|
|
393
408
|
injectedConfig: [
|
|
394
409
|
{
|
|
@@ -612,6 +627,9 @@ var wallets = {
|
|
|
612
627
|
desktop: {
|
|
613
628
|
chromeId: "mcohilncbfahbmgdjkbpemcciiolgcge"
|
|
614
629
|
},
|
|
630
|
+
eip6963Config: {
|
|
631
|
+
rdns: "com.okex.wallet"
|
|
632
|
+
},
|
|
615
633
|
filterFromWalletConnect: true,
|
|
616
634
|
injectedConfig: [
|
|
617
635
|
{
|
package/wallet-book-fallbacks.js
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
var groups = {
|
|
2
|
+
argentx: {
|
|
3
|
+
brand: {
|
|
4
|
+
alt: "ArgentX",
|
|
5
|
+
imageId: "argentx",
|
|
6
|
+
primaryColor: "#FF875B"
|
|
7
|
+
},
|
|
8
|
+
key: "argentx",
|
|
9
|
+
name: "ArgentX"
|
|
10
|
+
},
|
|
2
11
|
blocto: {
|
|
3
12
|
brand: {
|
|
4
13
|
alt: "Blocto",
|
|
@@ -257,7 +266,7 @@ var wallets = {
|
|
|
257
266
|
},
|
|
258
267
|
argentx: {
|
|
259
268
|
brand: {
|
|
260
|
-
alt: "Argent Wallet",
|
|
269
|
+
alt: "Argent X Wallet",
|
|
261
270
|
primaryColor: "#FF875B",
|
|
262
271
|
spriteId: "argentx"
|
|
263
272
|
},
|
|
@@ -335,6 +344,9 @@ var wallets = {
|
|
|
335
344
|
desktop: {
|
|
336
345
|
chromeId: "egjidjbpglichdcondbcbdnbeeppgdph"
|
|
337
346
|
},
|
|
347
|
+
eip6963Config: {
|
|
348
|
+
rdns: "com.trustwallet.app"
|
|
349
|
+
},
|
|
338
350
|
filterFromWalletConnect: true,
|
|
339
351
|
injectedConfig: [
|
|
340
352
|
{
|
|
@@ -385,6 +397,9 @@ var wallets = {
|
|
|
385
397
|
edgeId: "cpojfbodiccabbabgimdeohkkpjfpbnf",
|
|
386
398
|
firefoxId: "rainbow-extension"
|
|
387
399
|
},
|
|
400
|
+
eip6963Config: {
|
|
401
|
+
rdns: "me.rainbow"
|
|
402
|
+
},
|
|
388
403
|
filterFromWalletConnect: true,
|
|
389
404
|
injectedConfig: [
|
|
390
405
|
{
|
|
@@ -608,6 +623,9 @@ var wallets = {
|
|
|
608
623
|
desktop: {
|
|
609
624
|
chromeId: "mcohilncbfahbmgdjkbpemcciiolgcge"
|
|
610
625
|
},
|
|
626
|
+
eip6963Config: {
|
|
627
|
+
rdns: "com.okex.wallet"
|
|
628
|
+
},
|
|
611
629
|
filterFromWalletConnect: true,
|
|
612
630
|
injectedConfig: [
|
|
613
631
|
{
|
|
@@ -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;
|