@dynamic-labs/wallet-book 0.0.16 → 0.0.18
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/dist/cjs/src/helpers/findWalletBookWallet.d.ts +2 -0
- package/dist/cjs/src/helpers/getIconUrl.d.ts +1 -1
- package/dist/cjs/src/helpers/getWalletLinks.js +21 -17
- package/dist/cjs/src/helpers/getWalletLinks.js.map +1 -1
- package/dist/cjs/src/helpers/renderTemplate.d.ts +1 -1
- package/dist/cjs/src/helpers/renderTemplate.js +1 -1
- package/dist/cjs/src/helpers/renderTemplate.js.map +1 -1
- package/dist/cjs/src/hooks/useWalletBookCdn.d.ts +2 -0
- package/dist/cjs/src/schemas/utils/transformIosId.js +7 -2
- package/dist/cjs/src/schemas/utils/transformIosId.js.map +1 -1
- package/dist/cjs/src/schemas/walletBookSchema.d.ts +102 -2
- package/dist/cjs/src/schemas/walletConnectSourceSchema.d.ts +8 -8
- package/dist/cjs/src/schemas/walletSchema.d.ts +49 -1
- package/dist/cjs/src/schemas/walletSchema.js +16 -3
- package/dist/cjs/src/schemas/walletSchema.js.map +1 -1
- package/dist/esm/src/helpers/findWalletBookWallet.d.ts +2 -0
- package/dist/esm/src/helpers/getIconUrl.d.ts +1 -1
- package/dist/esm/src/helpers/getWalletLinks.js +21 -17
- package/dist/esm/src/helpers/getWalletLinks.js.map +1 -1
- package/dist/esm/src/helpers/renderTemplate.d.ts +1 -1
- package/dist/esm/src/helpers/renderTemplate.js +1 -1
- package/dist/esm/src/helpers/renderTemplate.js.map +1 -1
- package/dist/esm/src/hooks/useWalletBookCdn.d.ts +2 -0
- package/dist/esm/src/schemas/utils/transformIosId.js +7 -2
- package/dist/esm/src/schemas/utils/transformIosId.js.map +1 -1
- package/dist/esm/src/schemas/walletBookSchema.d.ts +102 -2
- package/dist/esm/src/schemas/walletConnectSourceSchema.d.ts +8 -8
- package/dist/esm/src/schemas/walletSchema.d.ts +49 -1
- package/dist/esm/src/schemas/walletSchema.js +17 -4
- package/dist/esm/src/schemas/walletSchema.js.map +1 -1
- package/dist/wallet-book.json +1 -1
- package/package.json +1 -1
|
@@ -18,6 +18,8 @@ export declare const findWalletBookWallet: (walletName: string | undefined) => {
|
|
|
18
18
|
mobile?: {
|
|
19
19
|
native?: string | undefined;
|
|
20
20
|
universal?: string | undefined;
|
|
21
|
+
ios?: string | null | undefined;
|
|
22
|
+
android?: string | null | undefined;
|
|
21
23
|
iosId?: string | undefined;
|
|
22
24
|
androidId?: string | undefined;
|
|
23
25
|
} | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getWalletIconUrl: (walletName?: string) => string;
|
|
1
|
+
export declare const getWalletIconUrl: (walletName?: string) => string | undefined;
|
|
@@ -5,24 +5,28 @@ const getWalletBookWallet_1 = require("./getWalletBookWallet");
|
|
|
5
5
|
const renderTemplate_1 = require("./renderTemplate");
|
|
6
6
|
const getWalletLinks = (walletName) => {
|
|
7
7
|
const walletData = (0, getWalletBookWallet_1.getWalletBookWallet)(walletName);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
ios: "",
|
|
16
|
-
};
|
|
17
|
-
return {
|
|
18
|
-
android: (0, renderTemplate_1.renderTemplate)("androidUrl", walletData.mobile?.androidId),
|
|
19
|
-
brave: (0, renderTemplate_1.renderTemplate)("chromeUrl", walletData.desktop?.chromeId),
|
|
20
|
-
chrome: (0, renderTemplate_1.renderTemplate)("chromeUrl", walletData.desktop?.chromeId),
|
|
21
|
-
edge: (0, renderTemplate_1.renderTemplate)("edgeUrl", walletData.desktop?.edgeId) ??
|
|
22
|
-
(0, renderTemplate_1.renderTemplate)("chromeUrl", walletData.desktop?.chromeId),
|
|
23
|
-
firefox: (0, renderTemplate_1.renderTemplate)("firefoxUrl", walletData.desktop?.firefoxId),
|
|
24
|
-
ios: (0, renderTemplate_1.renderTemplate)("iosUrl", walletData.mobile?.iosId),
|
|
8
|
+
const links = {
|
|
9
|
+
brave: "",
|
|
10
|
+
android: "",
|
|
11
|
+
chrome: "",
|
|
12
|
+
edge: "",
|
|
13
|
+
firefox: "",
|
|
14
|
+
ios: "",
|
|
25
15
|
};
|
|
16
|
+
links.brave = (0, renderTemplate_1.renderTemplate)("chromeUrl", walletData.desktop?.chromeId) ?? "";
|
|
17
|
+
links.chrome = (0, renderTemplate_1.renderTemplate)("chromeUrl", walletData.desktop?.chromeId) ?? "";
|
|
18
|
+
links.edge =
|
|
19
|
+
(0, renderTemplate_1.renderTemplate)("edgeUrl", walletData.desktop?.edgeId) ?? "";
|
|
20
|
+
links.firefox = (0, renderTemplate_1.renderTemplate)("firefoxUrl", walletData.desktop?.firefoxId) ?? "";
|
|
21
|
+
links.ios =
|
|
22
|
+
(0, renderTemplate_1.renderTemplate)("iosUrl", walletData.mobile?.iosId) ??
|
|
23
|
+
walletData.mobile?.ios ??
|
|
24
|
+
"";
|
|
25
|
+
links.android =
|
|
26
|
+
(0, renderTemplate_1.renderTemplate)("androidUrl", walletData.mobile?.androidId) ??
|
|
27
|
+
walletData.mobile?.android ??
|
|
28
|
+
"";
|
|
29
|
+
return links;
|
|
26
30
|
};
|
|
27
31
|
exports.getWalletLinks = getWalletLinks;
|
|
28
32
|
//# sourceMappingURL=getWalletLinks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getWalletLinks.js","sourceRoot":"","sources":["../../../../src/helpers/getWalletLinks.ts"],"names":[],"mappings":";;;AAAA,+DAA4D;AAC5D,qDAAkD;AAW3C,MAAM,cAAc,GAAG,CAAC,UAAkB,EAAe,EAAE;IAChE,MAAM,UAAU,GAAG,IAAA,yCAAmB,EAAC,UAAU,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"getWalletLinks.js","sourceRoot":"","sources":["../../../../src/helpers/getWalletLinks.ts"],"names":[],"mappings":";;;AAAA,+DAA4D;AAC5D,qDAAkD;AAW3C,MAAM,c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|
|
10
10
|
export type TemplateName = keyof typeof TEMPLATES;
|
|
11
|
-
export declare const renderTemplate: (templateName: TemplateName, data: any) => string;
|
|
11
|
+
export declare const renderTemplate: (templateName: TemplateName, data: any) => string | undefined;
|
|
12
12
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderTemplate.js","sourceRoot":"","sources":["../../../../src/helpers/renderTemplate.ts"],"names":[],"mappings":";;;AAAA,MAAM,SAAS,GAAG;IAChB,SAAS,EAAE,kEAAkE;IAC7E,gBAAgB,EAAE,sDAAsD;IACxE,MAAM,EAAE,+CAA+C;IACvD,UAAU,EAAE,sDAAsD;IAClE,SAAS,EAAE,kDAAkD;IAC7D,UAAU,EAAE,uDAAuD;IACnE,OAAO,EAAE,0DAA0D;CAC3D,CAAC;AAIJ,MAAM,cAAc,GAAG,CAAC,YAA0B,EAAE,IAAS,EAAE,EAAE;IACtE,IAAI,CAAC,IAAI;QAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"renderTemplate.js","sourceRoot":"","sources":["../../../../src/helpers/renderTemplate.ts"],"names":[],"mappings":";;;AAAA,MAAM,SAAS,GAAG;IAChB,SAAS,EAAE,kEAAkE;IAC7E,gBAAgB,EAAE,sDAAsD;IACxE,MAAM,EAAE,+CAA+C;IACvD,UAAU,EAAE,sDAAsD;IAClE,SAAS,EAAE,kDAAkD;IAC7D,UAAU,EAAE,uDAAuD;IACnE,OAAO,EAAE,0DAA0D;CAC3D,CAAC;AAIJ,MAAM,cAAc,GAAG,CAAC,YAA0B,EAAE,IAAS,EAAE,EAAE;IACtE,IAAI,CAAC,IAAI;QAAE,OAAO,SAAS,CAAC;IAC5B,OAAO,SAAS,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AACzD,CAAC,CAAC;AAHW,QAAA,cAAc,kBAGzB"}
|
|
@@ -19,6 +19,8 @@ export declare const useWalletBookCdn: () => {
|
|
|
19
19
|
mobile?: {
|
|
20
20
|
native?: string | undefined;
|
|
21
21
|
universal?: string | undefined;
|
|
22
|
+
ios?: string | null | undefined;
|
|
23
|
+
android?: string | null | undefined;
|
|
22
24
|
iosId?: string | undefined;
|
|
23
25
|
androidId?: string | undefined;
|
|
24
26
|
} | undefined;
|
|
@@ -8,8 +8,13 @@ const transformIosId = (url) => {
|
|
|
8
8
|
if (url?.match(/^https:\/\/[a-zA-Z0-9-]+\.apple\.com/)) {
|
|
9
9
|
try {
|
|
10
10
|
const urlObject = new URL(url);
|
|
11
|
-
const expectedId = urlObject
|
|
12
|
-
|
|
11
|
+
const expectedId = urlObject
|
|
12
|
+
.pathname
|
|
13
|
+
.replace(/\/$/, "")
|
|
14
|
+
.split("/").at(-1);
|
|
15
|
+
if (expectedId?.match(idRegex)) {
|
|
16
|
+
return expectedId;
|
|
17
|
+
}
|
|
13
18
|
}
|
|
14
19
|
catch {
|
|
15
20
|
// ignore
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformIosId.js","sourceRoot":"","sources":["../../../../../src/schemas/utils/transformIosId.ts"],"names":[],"mappings":";;;AAAA,MAAM,OAAO,GAAG,iBAAiB,CAAC;AAC3B,MAAM,cAAc,GAAG,CAAC,GAAuB,EAAE,EAAE;IACxD,IAAI,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC;QAAE,OAAO,GAAG,CAAC;IAEpC,IAAI,GAAG,EAAE,KAAK,CAAC,sCAAsC,CAAC,EAAE;QACtD,IAAI;YACF,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;YAC/B,MAAM,UAAU,GAAG,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"transformIosId.js","sourceRoot":"","sources":["../../../../../src/schemas/utils/transformIosId.ts"],"names":[],"mappings":";;;AAAA,MAAM,OAAO,GAAG,iBAAiB,CAAC;AAC3B,MAAM,cAAc,GAAG,CAAC,GAAuB,EAAE,EAAE;IACxD,IAAI,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC;QAAE,OAAO,GAAG,CAAC;IAEpC,IAAI,GAAG,EAAE,KAAK,CAAC,sCAAsC,CAAC,EAAE;QACtD,IAAI;YACF,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;YAC/B,MAAM,UAAU,GAAG,SAAS;iBACzB,QAAQ;iBACR,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;iBAClB,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YAErB,IAAG,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,EAAE;gBAC7B,OAAO,UAAU,CAAC;aACnB;SACF;QAAC,MAAM;YACN,SAAS;SACV;KACF;AACH,CAAC,CAAC;AAlBW,QAAA,cAAc,kBAkBzB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const walletRecordsSchema: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodObject<{
|
|
2
|
+
export declare const walletRecordsSchema: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
3
3
|
brand: z.ZodEffects<z.ZodOptional<z.ZodObject<{
|
|
4
4
|
spriteId: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
5
5
|
imageId: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
@@ -70,26 +70,36 @@ export declare const walletRecordsSchema: z.ZodRecord<z.ZodString, z.ZodEffects<
|
|
|
70
70
|
mobile: z.ZodEffects<z.ZodOptional<z.ZodObject<{
|
|
71
71
|
native: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
72
72
|
universal: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
73
|
+
ios: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
74
|
+
android: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
73
75
|
iosId: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>, string | undefined, unknown>;
|
|
74
76
|
androidId: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>, string | undefined, unknown>;
|
|
75
77
|
}, "strip", z.ZodTypeAny, {
|
|
76
78
|
native?: string | undefined;
|
|
77
79
|
universal?: string | undefined;
|
|
80
|
+
ios?: string | null | undefined;
|
|
81
|
+
android?: string | null | undefined;
|
|
78
82
|
iosId?: string | undefined;
|
|
79
83
|
androidId?: string | undefined;
|
|
80
84
|
}, {
|
|
81
85
|
native?: unknown;
|
|
82
86
|
universal?: unknown;
|
|
87
|
+
ios?: string | null | undefined;
|
|
88
|
+
android?: string | null | undefined;
|
|
83
89
|
iosId?: unknown;
|
|
84
90
|
androidId?: unknown;
|
|
85
91
|
}>>, {
|
|
86
92
|
native?: string | undefined;
|
|
87
93
|
universal?: string | undefined;
|
|
94
|
+
ios?: string | null | undefined;
|
|
95
|
+
android?: string | null | undefined;
|
|
88
96
|
iosId?: string | undefined;
|
|
89
97
|
androidId?: string | undefined;
|
|
90
98
|
} | undefined, {
|
|
91
99
|
native?: unknown;
|
|
92
100
|
universal?: unknown;
|
|
101
|
+
ios?: string | null | undefined;
|
|
102
|
+
android?: string | null | undefined;
|
|
93
103
|
iosId?: unknown;
|
|
94
104
|
androidId?: unknown;
|
|
95
105
|
} | undefined>;
|
|
@@ -129,6 +139,8 @@ export declare const walletRecordsSchema: z.ZodRecord<z.ZodString, z.ZodEffects<
|
|
|
129
139
|
mobile?: {
|
|
130
140
|
native?: string | undefined;
|
|
131
141
|
universal?: string | undefined;
|
|
142
|
+
ios?: string | null | undefined;
|
|
143
|
+
android?: string | null | undefined;
|
|
132
144
|
iosId?: string | undefined;
|
|
133
145
|
androidId?: string | undefined;
|
|
134
146
|
} | undefined;
|
|
@@ -159,6 +171,8 @@ export declare const walletRecordsSchema: z.ZodRecord<z.ZodString, z.ZodEffects<
|
|
|
159
171
|
mobile?: {
|
|
160
172
|
native?: unknown;
|
|
161
173
|
universal?: unknown;
|
|
174
|
+
ios?: string | null | undefined;
|
|
175
|
+
android?: string | null | undefined;
|
|
162
176
|
iosId?: unknown;
|
|
163
177
|
androidId?: unknown;
|
|
164
178
|
} | undefined;
|
|
@@ -189,6 +203,40 @@ export declare const walletRecordsSchema: z.ZodRecord<z.ZodString, z.ZodEffects<
|
|
|
189
203
|
mobile?: {
|
|
190
204
|
native?: string | undefined;
|
|
191
205
|
universal?: string | undefined;
|
|
206
|
+
ios?: string | null | undefined;
|
|
207
|
+
android?: string | null | undefined;
|
|
208
|
+
iosId?: string | undefined;
|
|
209
|
+
androidId?: string | undefined;
|
|
210
|
+
} | undefined;
|
|
211
|
+
chains?: string[] | undefined;
|
|
212
|
+
walletConnect?: {
|
|
213
|
+
sdks?: string[] | undefined;
|
|
214
|
+
} | undefined;
|
|
215
|
+
showOnlyIfInstalled?: boolean | undefined;
|
|
216
|
+
switchNetworkOnlyFromWallet?: boolean | undefined;
|
|
217
|
+
shortName?: string | undefined;
|
|
218
|
+
}, unknown>, {
|
|
219
|
+
name: string;
|
|
220
|
+
brand?: {
|
|
221
|
+
spriteId?: string | undefined;
|
|
222
|
+
imageId?: string | undefined;
|
|
223
|
+
alt?: string | undefined;
|
|
224
|
+
primaryColor?: string | undefined;
|
|
225
|
+
} | undefined;
|
|
226
|
+
desktop?: {
|
|
227
|
+
native?: string | undefined;
|
|
228
|
+
universal?: string | undefined;
|
|
229
|
+
chromeId?: string | undefined;
|
|
230
|
+
firefoxId?: string | undefined;
|
|
231
|
+
operaId?: string | undefined;
|
|
232
|
+
edgeId?: string | undefined;
|
|
233
|
+
safariId?: string | undefined;
|
|
234
|
+
} | undefined;
|
|
235
|
+
mobile?: {
|
|
236
|
+
native?: string | undefined;
|
|
237
|
+
universal?: string | undefined;
|
|
238
|
+
ios?: string | null | undefined;
|
|
239
|
+
android?: string | null | undefined;
|
|
192
240
|
iosId?: string | undefined;
|
|
193
241
|
androidId?: string | undefined;
|
|
194
242
|
} | undefined;
|
|
@@ -201,7 +249,7 @@ export declare const walletRecordsSchema: z.ZodRecord<z.ZodString, z.ZodEffects<
|
|
|
201
249
|
shortName?: string | undefined;
|
|
202
250
|
}, unknown>>;
|
|
203
251
|
export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
|
|
204
|
-
wallets: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodObject<{
|
|
252
|
+
wallets: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
205
253
|
brand: z.ZodEffects<z.ZodOptional<z.ZodObject<{
|
|
206
254
|
spriteId: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
207
255
|
imageId: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
@@ -272,26 +320,36 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
|
|
|
272
320
|
mobile: z.ZodEffects<z.ZodOptional<z.ZodObject<{
|
|
273
321
|
native: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
274
322
|
universal: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
323
|
+
ios: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
324
|
+
android: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
275
325
|
iosId: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>, string | undefined, unknown>;
|
|
276
326
|
androidId: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>, string | undefined, unknown>;
|
|
277
327
|
}, "strip", z.ZodTypeAny, {
|
|
278
328
|
native?: string | undefined;
|
|
279
329
|
universal?: string | undefined;
|
|
330
|
+
ios?: string | null | undefined;
|
|
331
|
+
android?: string | null | undefined;
|
|
280
332
|
iosId?: string | undefined;
|
|
281
333
|
androidId?: string | undefined;
|
|
282
334
|
}, {
|
|
283
335
|
native?: unknown;
|
|
284
336
|
universal?: unknown;
|
|
337
|
+
ios?: string | null | undefined;
|
|
338
|
+
android?: string | null | undefined;
|
|
285
339
|
iosId?: unknown;
|
|
286
340
|
androidId?: unknown;
|
|
287
341
|
}>>, {
|
|
288
342
|
native?: string | undefined;
|
|
289
343
|
universal?: string | undefined;
|
|
344
|
+
ios?: string | null | undefined;
|
|
345
|
+
android?: string | null | undefined;
|
|
290
346
|
iosId?: string | undefined;
|
|
291
347
|
androidId?: string | undefined;
|
|
292
348
|
} | undefined, {
|
|
293
349
|
native?: unknown;
|
|
294
350
|
universal?: unknown;
|
|
351
|
+
ios?: string | null | undefined;
|
|
352
|
+
android?: string | null | undefined;
|
|
295
353
|
iosId?: unknown;
|
|
296
354
|
androidId?: unknown;
|
|
297
355
|
} | undefined>;
|
|
@@ -331,6 +389,8 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
|
|
|
331
389
|
mobile?: {
|
|
332
390
|
native?: string | undefined;
|
|
333
391
|
universal?: string | undefined;
|
|
392
|
+
ios?: string | null | undefined;
|
|
393
|
+
android?: string | null | undefined;
|
|
334
394
|
iosId?: string | undefined;
|
|
335
395
|
androidId?: string | undefined;
|
|
336
396
|
} | undefined;
|
|
@@ -361,6 +421,8 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
|
|
|
361
421
|
mobile?: {
|
|
362
422
|
native?: unknown;
|
|
363
423
|
universal?: unknown;
|
|
424
|
+
ios?: string | null | undefined;
|
|
425
|
+
android?: string | null | undefined;
|
|
364
426
|
iosId?: unknown;
|
|
365
427
|
androidId?: unknown;
|
|
366
428
|
} | undefined;
|
|
@@ -391,6 +453,40 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
|
|
|
391
453
|
mobile?: {
|
|
392
454
|
native?: string | undefined;
|
|
393
455
|
universal?: string | undefined;
|
|
456
|
+
ios?: string | null | undefined;
|
|
457
|
+
android?: string | null | undefined;
|
|
458
|
+
iosId?: string | undefined;
|
|
459
|
+
androidId?: string | undefined;
|
|
460
|
+
} | undefined;
|
|
461
|
+
chains?: string[] | undefined;
|
|
462
|
+
walletConnect?: {
|
|
463
|
+
sdks?: string[] | undefined;
|
|
464
|
+
} | undefined;
|
|
465
|
+
showOnlyIfInstalled?: boolean | undefined;
|
|
466
|
+
switchNetworkOnlyFromWallet?: boolean | undefined;
|
|
467
|
+
shortName?: string | undefined;
|
|
468
|
+
}, unknown>, {
|
|
469
|
+
name: string;
|
|
470
|
+
brand?: {
|
|
471
|
+
spriteId?: string | undefined;
|
|
472
|
+
imageId?: string | undefined;
|
|
473
|
+
alt?: string | undefined;
|
|
474
|
+
primaryColor?: string | undefined;
|
|
475
|
+
} | undefined;
|
|
476
|
+
desktop?: {
|
|
477
|
+
native?: string | undefined;
|
|
478
|
+
universal?: string | undefined;
|
|
479
|
+
chromeId?: string | undefined;
|
|
480
|
+
firefoxId?: string | undefined;
|
|
481
|
+
operaId?: string | undefined;
|
|
482
|
+
edgeId?: string | undefined;
|
|
483
|
+
safariId?: string | undefined;
|
|
484
|
+
} | undefined;
|
|
485
|
+
mobile?: {
|
|
486
|
+
native?: string | undefined;
|
|
487
|
+
universal?: string | undefined;
|
|
488
|
+
ios?: string | null | undefined;
|
|
489
|
+
android?: string | null | undefined;
|
|
394
490
|
iosId?: string | undefined;
|
|
395
491
|
androidId?: string | undefined;
|
|
396
492
|
} | undefined;
|
|
@@ -423,6 +519,8 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
|
|
|
423
519
|
mobile?: {
|
|
424
520
|
native?: string | undefined;
|
|
425
521
|
universal?: string | undefined;
|
|
522
|
+
ios?: string | null | undefined;
|
|
523
|
+
android?: string | null | undefined;
|
|
426
524
|
iosId?: string | undefined;
|
|
427
525
|
androidId?: string | undefined;
|
|
428
526
|
} | undefined;
|
|
@@ -457,6 +555,8 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
|
|
|
457
555
|
mobile?: {
|
|
458
556
|
native?: string | undefined;
|
|
459
557
|
universal?: string | undefined;
|
|
558
|
+
ios?: string | null | undefined;
|
|
559
|
+
android?: string | null | undefined;
|
|
460
560
|
iosId?: string | undefined;
|
|
461
561
|
androidId?: string | undefined;
|
|
462
562
|
} | undefined;
|
|
@@ -35,9 +35,9 @@ export declare const walletConnectSourceValueSchema: z.ZodObject<{
|
|
|
35
35
|
edge: z.ZodNullable<z.ZodString>;
|
|
36
36
|
safari: z.ZodNullable<z.ZodString>;
|
|
37
37
|
}, "strip", z.ZodTypeAny, {
|
|
38
|
-
browser: string | null;
|
|
39
38
|
ios: string | null;
|
|
40
39
|
android: string | null;
|
|
40
|
+
browser: string | null;
|
|
41
41
|
mac: string | null;
|
|
42
42
|
windows: string | null;
|
|
43
43
|
linux: string | null;
|
|
@@ -47,9 +47,9 @@ export declare const walletConnectSourceValueSchema: z.ZodObject<{
|
|
|
47
47
|
edge: string | null;
|
|
48
48
|
safari: string | null;
|
|
49
49
|
}, {
|
|
50
|
-
browser: string | null;
|
|
51
50
|
ios: string | null;
|
|
52
51
|
android: string | null;
|
|
52
|
+
browser: string | null;
|
|
53
53
|
mac: string | null;
|
|
54
54
|
windows: string | null;
|
|
55
55
|
linux: string | null;
|
|
@@ -167,9 +167,9 @@ export declare const walletConnectSourceValueSchema: z.ZodObject<{
|
|
|
167
167
|
lg: string;
|
|
168
168
|
};
|
|
169
169
|
app: {
|
|
170
|
-
browser: string | null;
|
|
171
170
|
ios: string | null;
|
|
172
171
|
android: string | null;
|
|
172
|
+
browser: string | null;
|
|
173
173
|
mac: string | null;
|
|
174
174
|
windows: string | null;
|
|
175
175
|
linux: string | null;
|
|
@@ -223,9 +223,9 @@ export declare const walletConnectSourceValueSchema: z.ZodObject<{
|
|
|
223
223
|
lg: string;
|
|
224
224
|
};
|
|
225
225
|
app: {
|
|
226
|
-
browser: string | null;
|
|
227
226
|
ios: string | null;
|
|
228
227
|
android: string | null;
|
|
228
|
+
browser: string | null;
|
|
229
229
|
mac: string | null;
|
|
230
230
|
windows: string | null;
|
|
231
231
|
linux: string | null;
|
|
@@ -287,9 +287,9 @@ export declare const walletConnectSourceSchema: z.ZodRecord<z.ZodString, z.ZodOb
|
|
|
287
287
|
edge: z.ZodNullable<z.ZodString>;
|
|
288
288
|
safari: z.ZodNullable<z.ZodString>;
|
|
289
289
|
}, "strip", z.ZodTypeAny, {
|
|
290
|
-
browser: string | null;
|
|
291
290
|
ios: string | null;
|
|
292
291
|
android: string | null;
|
|
292
|
+
browser: string | null;
|
|
293
293
|
mac: string | null;
|
|
294
294
|
windows: string | null;
|
|
295
295
|
linux: string | null;
|
|
@@ -299,9 +299,9 @@ export declare const walletConnectSourceSchema: z.ZodRecord<z.ZodString, z.ZodOb
|
|
|
299
299
|
edge: string | null;
|
|
300
300
|
safari: string | null;
|
|
301
301
|
}, {
|
|
302
|
-
browser: string | null;
|
|
303
302
|
ios: string | null;
|
|
304
303
|
android: string | null;
|
|
304
|
+
browser: string | null;
|
|
305
305
|
mac: string | null;
|
|
306
306
|
windows: string | null;
|
|
307
307
|
linux: string | null;
|
|
@@ -419,9 +419,9 @@ export declare const walletConnectSourceSchema: z.ZodRecord<z.ZodString, z.ZodOb
|
|
|
419
419
|
lg: string;
|
|
420
420
|
};
|
|
421
421
|
app: {
|
|
422
|
-
browser: string | null;
|
|
423
422
|
ios: string | null;
|
|
424
423
|
android: string | null;
|
|
424
|
+
browser: string | null;
|
|
425
425
|
mac: string | null;
|
|
426
426
|
windows: string | null;
|
|
427
427
|
linux: string | null;
|
|
@@ -475,9 +475,9 @@ export declare const walletConnectSourceSchema: z.ZodRecord<z.ZodString, z.ZodOb
|
|
|
475
475
|
lg: string;
|
|
476
476
|
};
|
|
477
477
|
app: {
|
|
478
|
-
browser: string | null;
|
|
479
478
|
ios: string | null;
|
|
480
479
|
android: string | null;
|
|
480
|
+
browser: string | null;
|
|
481
481
|
mac: string | null;
|
|
482
482
|
windows: string | null;
|
|
483
483
|
linux: string | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const walletSchema: z.ZodEffects<z.ZodObject<{
|
|
2
|
+
export declare const walletSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
3
3
|
brand: z.ZodEffects<z.ZodOptional<z.ZodObject<{
|
|
4
4
|
spriteId: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
5
5
|
imageId: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
@@ -70,26 +70,36 @@ export declare const walletSchema: z.ZodEffects<z.ZodObject<{
|
|
|
70
70
|
mobile: z.ZodEffects<z.ZodOptional<z.ZodObject<{
|
|
71
71
|
native: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
72
72
|
universal: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
73
|
+
ios: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
74
|
+
android: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
73
75
|
iosId: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>, string | undefined, unknown>;
|
|
74
76
|
androidId: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>, string | undefined, unknown>;
|
|
75
77
|
}, "strip", z.ZodTypeAny, {
|
|
76
78
|
native?: string | undefined;
|
|
77
79
|
universal?: string | undefined;
|
|
80
|
+
ios?: string | null | undefined;
|
|
81
|
+
android?: string | null | undefined;
|
|
78
82
|
iosId?: string | undefined;
|
|
79
83
|
androidId?: string | undefined;
|
|
80
84
|
}, {
|
|
81
85
|
native?: unknown;
|
|
82
86
|
universal?: unknown;
|
|
87
|
+
ios?: string | null | undefined;
|
|
88
|
+
android?: string | null | undefined;
|
|
83
89
|
iosId?: unknown;
|
|
84
90
|
androidId?: unknown;
|
|
85
91
|
}>>, {
|
|
86
92
|
native?: string | undefined;
|
|
87
93
|
universal?: string | undefined;
|
|
94
|
+
ios?: string | null | undefined;
|
|
95
|
+
android?: string | null | undefined;
|
|
88
96
|
iosId?: string | undefined;
|
|
89
97
|
androidId?: string | undefined;
|
|
90
98
|
} | undefined, {
|
|
91
99
|
native?: unknown;
|
|
92
100
|
universal?: unknown;
|
|
101
|
+
ios?: string | null | undefined;
|
|
102
|
+
android?: string | null | undefined;
|
|
93
103
|
iosId?: unknown;
|
|
94
104
|
androidId?: unknown;
|
|
95
105
|
} | undefined>;
|
|
@@ -129,6 +139,8 @@ export declare const walletSchema: z.ZodEffects<z.ZodObject<{
|
|
|
129
139
|
mobile?: {
|
|
130
140
|
native?: string | undefined;
|
|
131
141
|
universal?: string | undefined;
|
|
142
|
+
ios?: string | null | undefined;
|
|
143
|
+
android?: string | null | undefined;
|
|
132
144
|
iosId?: string | undefined;
|
|
133
145
|
androidId?: string | undefined;
|
|
134
146
|
} | undefined;
|
|
@@ -159,6 +171,8 @@ export declare const walletSchema: z.ZodEffects<z.ZodObject<{
|
|
|
159
171
|
mobile?: {
|
|
160
172
|
native?: unknown;
|
|
161
173
|
universal?: unknown;
|
|
174
|
+
ios?: string | null | undefined;
|
|
175
|
+
android?: string | null | undefined;
|
|
162
176
|
iosId?: unknown;
|
|
163
177
|
androidId?: unknown;
|
|
164
178
|
} | undefined;
|
|
@@ -189,6 +203,40 @@ export declare const walletSchema: z.ZodEffects<z.ZodObject<{
|
|
|
189
203
|
mobile?: {
|
|
190
204
|
native?: string | undefined;
|
|
191
205
|
universal?: string | undefined;
|
|
206
|
+
ios?: string | null | undefined;
|
|
207
|
+
android?: string | null | undefined;
|
|
208
|
+
iosId?: string | undefined;
|
|
209
|
+
androidId?: string | undefined;
|
|
210
|
+
} | undefined;
|
|
211
|
+
chains?: string[] | undefined;
|
|
212
|
+
walletConnect?: {
|
|
213
|
+
sdks?: string[] | undefined;
|
|
214
|
+
} | undefined;
|
|
215
|
+
showOnlyIfInstalled?: boolean | undefined;
|
|
216
|
+
switchNetworkOnlyFromWallet?: boolean | undefined;
|
|
217
|
+
shortName?: string | undefined;
|
|
218
|
+
}, unknown>, {
|
|
219
|
+
name: string;
|
|
220
|
+
brand?: {
|
|
221
|
+
spriteId?: string | undefined;
|
|
222
|
+
imageId?: string | undefined;
|
|
223
|
+
alt?: string | undefined;
|
|
224
|
+
primaryColor?: string | undefined;
|
|
225
|
+
} | undefined;
|
|
226
|
+
desktop?: {
|
|
227
|
+
native?: string | undefined;
|
|
228
|
+
universal?: string | undefined;
|
|
229
|
+
chromeId?: string | undefined;
|
|
230
|
+
firefoxId?: string | undefined;
|
|
231
|
+
operaId?: string | undefined;
|
|
232
|
+
edgeId?: string | undefined;
|
|
233
|
+
safariId?: string | undefined;
|
|
234
|
+
} | undefined;
|
|
235
|
+
mobile?: {
|
|
236
|
+
native?: string | undefined;
|
|
237
|
+
universal?: string | undefined;
|
|
238
|
+
ios?: string | null | undefined;
|
|
239
|
+
android?: string | null | undefined;
|
|
192
240
|
iosId?: string | undefined;
|
|
193
241
|
androidId?: string | undefined;
|
|
194
242
|
} | undefined;
|
|
@@ -10,7 +10,8 @@ const transformIosId_1 = require("./utils/transformIosId");
|
|
|
10
10
|
const transformAndroidId_1 = require("./utils/transformAndroidId");
|
|
11
11
|
const nonEmptyStringArray_1 = require("./utils/nonEmptyStringArray");
|
|
12
12
|
const filterEmptyObject_1 = require("./utils/filterEmptyObject");
|
|
13
|
-
exports.walletSchema = zod_1.z
|
|
13
|
+
exports.walletSchema = zod_1.z
|
|
14
|
+
.preprocess((val) => {
|
|
14
15
|
return val;
|
|
15
16
|
}, zod_1.z.object({
|
|
16
17
|
brand: zod_1.z
|
|
@@ -24,7 +25,8 @@ exports.walletSchema = zod_1.z.preprocess((val) => {
|
|
|
24
25
|
.refine((val) => {
|
|
25
26
|
if (!val)
|
|
26
27
|
return true;
|
|
27
|
-
if (!(val.spriteId && val.imageId) &&
|
|
28
|
+
if (!(val.spriteId && val.imageId) &&
|
|
29
|
+
(val.spriteId || val.imageId)) {
|
|
28
30
|
return true;
|
|
29
31
|
}
|
|
30
32
|
console.log(JSON.stringify(val, null, 2));
|
|
@@ -48,6 +50,8 @@ exports.walletSchema = zod_1.z.preprocess((val) => {
|
|
|
48
50
|
.object({
|
|
49
51
|
native: nonEmptyString_1.nonEmptyString,
|
|
50
52
|
universal: nonEmptyString_1.nonEmptyString,
|
|
53
|
+
ios: (0, zod_1.string)().nullish(),
|
|
54
|
+
android: (0, zod_1.string)().nullish(),
|
|
51
55
|
iosId: nonEmptyString_1.nonEmptyString.transform(transformIosId_1.transformIosId),
|
|
52
56
|
androidId: nonEmptyString_1.nonEmptyString.transform(transformAndroidId_1.transformAndroidId),
|
|
53
57
|
})
|
|
@@ -64,5 +68,14 @@ exports.walletSchema = zod_1.z.preprocess((val) => {
|
|
|
64
68
|
showOnlyIfInstalled: zod_1.z.boolean().optional(),
|
|
65
69
|
switchNetworkOnlyFromWallet: zod_1.z.boolean().optional(),
|
|
66
70
|
shortName: nonEmptyString_1.nonEmptyString,
|
|
67
|
-
}))
|
|
71
|
+
}))
|
|
72
|
+
.transform((val) => {
|
|
73
|
+
if (val.mobile?.iosId || val.mobile?.ios == null) {
|
|
74
|
+
delete val.mobile?.ios;
|
|
75
|
+
}
|
|
76
|
+
if (val.mobile?.androidId || val.mobile?.android == null) {
|
|
77
|
+
delete val.mobile?.android;
|
|
78
|
+
}
|
|
79
|
+
return val;
|
|
80
|
+
});
|
|
68
81
|
//# sourceMappingURL=walletSchema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"walletSchema.js","sourceRoot":"","sources":["../../../../src/schemas/walletSchema.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"walletSchema.js","sourceRoot":"","sources":["../../../../src/schemas/walletSchema.ts"],"names":[],"mappings":";;;AAAA,6BAAgC;AAChC,2DAAwD;AACxD,mFAAgF;AAChF,+EAA4E;AAC5E,qFAAkF;AAClF,2DAAwD;AAC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
19
19
|
native?: string | undefined;
|
|
20
20
|
universal?: string | undefined;
|
|
21
|
+
ios?: string | null | undefined;
|
|
22
|
+
android?: string | null | undefined;
|
|
21
23
|
iosId?: string | undefined;
|
|
22
24
|
androidId?: string | undefined;
|
|
23
25
|
} | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getWalletIconUrl: (walletName?: string) => string;
|
|
1
|
+
export declare const getWalletIconUrl: (walletName?: string) => string | undefined;
|
|
@@ -2,23 +2,27 @@ import { getWalletBookWallet } from './getWalletBookWallet';
|
|
|
2
2
|
import { renderTemplate } from './renderTemplate';
|
|
3
3
|
export const getWalletLinks = (walletName) => {
|
|
4
4
|
const walletData = getWalletBookWallet(walletName);
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
ios: "",
|
|
13
|
-
};
|
|
14
|
-
return {
|
|
15
|
-
android: renderTemplate("androidUrl", walletData.mobile?.androidId),
|
|
16
|
-
brave: renderTemplate("chromeUrl", walletData.desktop?.chromeId),
|
|
17
|
-
chrome: renderTemplate("chromeUrl", walletData.desktop?.chromeId),
|
|
18
|
-
edge: renderTemplate("edgeUrl", walletData.desktop?.edgeId) ??
|
|
19
|
-
renderTemplate("chromeUrl", walletData.desktop?.chromeId),
|
|
20
|
-
firefox: renderTemplate("firefoxUrl", walletData.desktop?.firefoxId),
|
|
21
|
-
ios: renderTemplate("iosUrl", walletData.mobile?.iosId),
|
|
5
|
+
const links = {
|
|
6
|
+
brave: "",
|
|
7
|
+
android: "",
|
|
8
|
+
chrome: "",
|
|
9
|
+
edge: "",
|
|
10
|
+
firefox: "",
|
|
11
|
+
ios: "",
|
|
22
12
|
};
|
|
13
|
+
links.brave = renderTemplate("chromeUrl", walletData.desktop?.chromeId) ?? "";
|
|
14
|
+
links.chrome = renderTemplate("chromeUrl", walletData.desktop?.chromeId) ?? "";
|
|
15
|
+
links.edge =
|
|
16
|
+
renderTemplate("edgeUrl", walletData.desktop?.edgeId) ?? "";
|
|
17
|
+
links.firefox = renderTemplate("firefoxUrl", walletData.desktop?.firefoxId) ?? "";
|
|
18
|
+
links.ios =
|
|
19
|
+
renderTemplate("iosUrl", walletData.mobile?.iosId) ??
|
|
20
|
+
walletData.mobile?.ios ??
|
|
21
|
+
"";
|
|
22
|
+
links.android =
|
|
23
|
+
renderTemplate("androidUrl", walletData.mobile?.androidId) ??
|
|
24
|
+
walletData.mobile?.android ??
|
|
25
|
+
"";
|
|
26
|
+
return links;
|
|
23
27
|
};
|
|
24
28
|
//# sourceMappingURL=getWalletLinks.js.map
|