@dynamic-labs/wallet-book 1.1.0-phantom.0 → 1.1.0
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 +143 -2
- package/README.md +5 -1
- package/_virtual/_tslib.cjs +6 -1
- package/_virtual/_tslib.js +6 -1
- package/package.json +4 -2
- package/src/build/index.d.ts +2 -0
- package/src/build/sources/walletConnect/index.d.ts +12 -10
- package/src/components/BrandIcon.cjs +25 -0
- package/src/components/BrandIcon.d.ts +8 -0
- package/src/components/BrandIcon.js +21 -0
- package/src/components/WalletIcon.cjs +2 -1
- package/src/components/WalletIcon.js +2 -1
- package/src/components/index.d.ts +1 -0
- package/src/helpers/findWalletBookWallet.cjs +0 -2
- package/src/helpers/findWalletBookWallet.d.ts +2 -0
- package/src/helpers/findWalletBookWallet.js +0 -2
- package/src/helpers/findWalletGroup.d.ts +9 -0
- package/src/helpers/findWalletGroupOverride.cjs +13 -0
- package/src/helpers/findWalletGroupOverride.d.ts +3 -0
- package/src/helpers/findWalletGroupOverride.js +9 -0
- package/src/helpers/getBrandIconUrl.cjs +17 -0
- package/src/helpers/getBrandIconUrl.d.ts +2 -0
- package/src/helpers/getBrandIconUrl.js +13 -0
- package/src/helpers/getWalletBookWallet.cjs +18 -6
- package/src/helpers/getWalletBookWallet.js +18 -6
- package/src/helpers/getWalletIconUrl.cjs +3 -6
- package/src/helpers/getWalletIconUrl.js +3 -6
- package/src/helpers/index.d.ts +2 -0
- package/src/helpers/normalizeWalletName.cjs +7 -0
- package/src/helpers/normalizeWalletName.js +3 -0
- package/src/hooks/useWalletBookCdn.cjs +22 -16
- package/src/hooks/useWalletBookCdn.d.ts +11 -0
- package/src/hooks/useWalletBookCdn.js +22 -16
- package/src/hooks/useWalletBookContext.cjs +2 -0
- package/src/hooks/useWalletBookContext.js +2 -0
- package/src/index.cjs +6 -0
- package/src/index.d.ts +2 -2
- package/src/index.js +3 -0
- package/src/schemas/walletBookSchema.d.ts +185 -8
- package/src/schemas/walletGroup.cjs +6 -0
- package/src/schemas/walletGroup.d.ts +112 -2
- package/src/schemas/walletGroup.js +6 -0
- package/src/schemas/walletSchema.cjs +25 -20
- package/src/schemas/walletSchema.d.ts +41 -4
- package/src/schemas/walletSchema.js +25 -21
- package/wallet-book-fallbacks.cjs +30 -9
- package/wallet-book-fallbacks.js +30 -9
package/src/helpers/index.d.ts
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
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;
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _tslib = require('../../_virtual/_tslib.cjs');
|
|
6
6
|
var react = require('react');
|
|
7
|
+
var utils = require('@dynamic-labs/utils');
|
|
7
8
|
require('../schemas/walletConnectSourceSchema.cjs');
|
|
8
9
|
var walletBookSchema = require('../schemas/walletBookSchema.cjs');
|
|
9
10
|
require('../schemas/walletSchema.cjs');
|
|
@@ -16,23 +17,28 @@ const useWalletBookCdn = () => {
|
|
|
16
17
|
react.useEffect(() => {
|
|
17
18
|
const fetchWalletBook = () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
18
19
|
const url = getWalletBookCdnUrl.getWalletBookCdnUrl();
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
const fn = () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
21
|
+
const res = yield fetch(url, { mode: 'cors' });
|
|
22
|
+
if (res.ok) {
|
|
23
|
+
const json = yield res.json();
|
|
24
|
+
try {
|
|
25
|
+
const parsedData = walletBookSchema.walletBookSchema.parse(json);
|
|
26
|
+
return parsedData;
|
|
27
|
+
}
|
|
28
|
+
catch (e) {
|
|
29
|
+
logger.logger.error('Error parsing wallet book data', e, json);
|
|
30
|
+
throw e;
|
|
31
|
+
}
|
|
24
32
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
data = walletBookSchema.walletBookSchema.parse(walletBookFallbacks["default"]);
|
|
35
|
-
}
|
|
33
|
+
throw new Error(`Failed to fetch wallet book data from ${url} with status code ${res.status}`);
|
|
34
|
+
});
|
|
35
|
+
const data = yield utils.retryableFn(fn, {
|
|
36
|
+
fallbackValue: walletBookSchema.walletBookSchema.parse(walletBookFallbacks["default"]),
|
|
37
|
+
logger: logger.logger.createLogger('useWalletBookCdn'),
|
|
38
|
+
maxRetries: 3,
|
|
39
|
+
retryStrategy: 'timeout-and-rejection',
|
|
40
|
+
timeoutMs: 30000,
|
|
41
|
+
});
|
|
36
42
|
setWalletBook(data);
|
|
37
43
|
});
|
|
38
44
|
fetchWalletBook();
|
|
@@ -8,6 +8,15 @@ export declare const useWalletBookCdn: () => {
|
|
|
8
8
|
primaryColor?: string | undefined;
|
|
9
9
|
spriteId?: string | undefined;
|
|
10
10
|
} | undefined;
|
|
11
|
+
walletOverrides?: Record<string, {
|
|
12
|
+
brand?: {
|
|
13
|
+
alt?: string | undefined;
|
|
14
|
+
imageId?: string | undefined;
|
|
15
|
+
primaryColor?: string | undefined;
|
|
16
|
+
spriteId?: string | undefined;
|
|
17
|
+
} | undefined;
|
|
18
|
+
name?: string | undefined;
|
|
19
|
+
}> | undefined;
|
|
11
20
|
}>;
|
|
12
21
|
wallets: Record<string, {
|
|
13
22
|
name: string;
|
|
@@ -17,6 +26,7 @@ export declare const useWalletBookCdn: () => {
|
|
|
17
26
|
primaryColor?: string | undefined;
|
|
18
27
|
spriteId?: string | undefined;
|
|
19
28
|
} | undefined;
|
|
29
|
+
chainGroup?: string | undefined;
|
|
20
30
|
chains?: string[] | undefined;
|
|
21
31
|
desktop?: {
|
|
22
32
|
chromeId?: string | undefined;
|
|
@@ -60,5 +70,6 @@ export declare const useWalletBookCdn: () => {
|
|
|
60
70
|
walletConnect?: {
|
|
61
71
|
sdks?: string[] | undefined;
|
|
62
72
|
} | undefined;
|
|
73
|
+
walletGroup?: string | undefined;
|
|
63
74
|
}>;
|
|
64
75
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __awaiter } from '../../_virtual/_tslib.js';
|
|
2
2
|
import { useState, useEffect } from 'react';
|
|
3
|
+
import { retryableFn } from '@dynamic-labs/utils';
|
|
3
4
|
import '../schemas/walletConnectSourceSchema.js';
|
|
4
5
|
import { walletBookSchema } from '../schemas/walletBookSchema.js';
|
|
5
6
|
import '../schemas/walletSchema.js';
|
|
@@ -12,23 +13,28 @@ const useWalletBookCdn = () => {
|
|
|
12
13
|
useEffect(() => {
|
|
13
14
|
const fetchWalletBook = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
14
15
|
const url = getWalletBookCdnUrl();
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
const fn = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
+
const res = yield fetch(url, { mode: 'cors' });
|
|
18
|
+
if (res.ok) {
|
|
19
|
+
const json = yield res.json();
|
|
20
|
+
try {
|
|
21
|
+
const parsedData = walletBookSchema.parse(json);
|
|
22
|
+
return parsedData;
|
|
23
|
+
}
|
|
24
|
+
catch (e) {
|
|
25
|
+
logger.error('Error parsing wallet book data', e, json);
|
|
26
|
+
throw e;
|
|
27
|
+
}
|
|
20
28
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
data = walletBookSchema.parse(walletBookFallbacks);
|
|
31
|
-
}
|
|
29
|
+
throw new Error(`Failed to fetch wallet book data from ${url} with status code ${res.status}`);
|
|
30
|
+
});
|
|
31
|
+
const data = yield retryableFn(fn, {
|
|
32
|
+
fallbackValue: walletBookSchema.parse(walletBookFallbacks),
|
|
33
|
+
logger: logger.createLogger('useWalletBookCdn'),
|
|
34
|
+
maxRetries: 3,
|
|
35
|
+
retryStrategy: 'timeout-and-rejection',
|
|
36
|
+
timeoutMs: 30000,
|
|
37
|
+
});
|
|
32
38
|
setWalletBook(data);
|
|
33
39
|
});
|
|
34
40
|
fetchWalletBook();
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var react = require('react');
|
|
6
|
+
require('../../_virtual/_tslib.cjs');
|
|
6
7
|
require('../helpers/logger.cjs');
|
|
8
|
+
require('@dynamic-labs/utils');
|
|
7
9
|
require('../schemas/walletConnectSourceSchema.cjs');
|
|
8
10
|
require('../schemas/walletBookSchema.cjs');
|
|
9
11
|
require('../schemas/walletSchema.cjs');
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { useContext } from 'react';
|
|
2
|
+
import '../../_virtual/_tslib.js';
|
|
2
3
|
import '../helpers/logger.js';
|
|
4
|
+
import '@dynamic-labs/utils';
|
|
3
5
|
import '../schemas/walletConnectSourceSchema.js';
|
|
4
6
|
import '../schemas/walletBookSchema.js';
|
|
5
7
|
import '../schemas/walletSchema.js';
|
package/src/index.cjs
CHANGED
|
@@ -11,10 +11,13 @@ require('./helpers/logger.cjs');
|
|
|
11
11
|
var getWalletGroup = require('./helpers/getWalletGroup.cjs');
|
|
12
12
|
var findWalletGroup = require('./helpers/findWalletGroup.cjs');
|
|
13
13
|
var getWalletBookCdnUrl = require('./helpers/getWalletBookCdnUrl.cjs');
|
|
14
|
+
var getBrandIconUrl = require('./helpers/getBrandIconUrl.cjs');
|
|
15
|
+
var findWalletGroupOverride = require('./helpers/findWalletGroupOverride.cjs');
|
|
14
16
|
var useWalletBookCdn = require('./hooks/useWalletBookCdn.cjs');
|
|
15
17
|
var useWalletBookContext = require('./hooks/useWalletBookContext.cjs');
|
|
16
18
|
var WalletIcon = require('./components/WalletIcon.cjs');
|
|
17
19
|
var WalletBookContext = require('./components/WalletBookContext.cjs');
|
|
20
|
+
var BrandIcon = require('./components/BrandIcon.cjs');
|
|
18
21
|
|
|
19
22
|
|
|
20
23
|
|
|
@@ -26,7 +29,10 @@ exports.findWalletBookWallet = findWalletBookWallet.findWalletBookWallet;
|
|
|
26
29
|
exports.getWalletGroup = getWalletGroup.getWalletGroup;
|
|
27
30
|
exports.findWalletGroup = findWalletGroup.findWalletGroup;
|
|
28
31
|
exports.getWalletBookCdnUrl = getWalletBookCdnUrl.getWalletBookCdnUrl;
|
|
32
|
+
exports.getBrandIconUrl = getBrandIconUrl.getBrandIconUrl;
|
|
33
|
+
exports.findWalletGroupOverride = findWalletGroupOverride.findWalletGroupOverride;
|
|
29
34
|
exports.useWalletBookCdn = useWalletBookCdn.useWalletBookCdn;
|
|
30
35
|
exports.useWalletBookContext = useWalletBookContext.useWalletBookContext;
|
|
31
36
|
exports.WalletIcon = WalletIcon.WalletIcon;
|
|
32
37
|
exports.WalletBookContextProvider = WalletBookContext.WalletBookContextProvider;
|
|
38
|
+
exports.BrandIcon = BrandIcon.BrandIcon;
|
package/src/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export type { WalletLinks } from './helpers';
|
|
|
7
7
|
/**
|
|
8
8
|
* HELPERS
|
|
9
9
|
*/
|
|
10
|
-
export { getWalletBookWallet, getWalletIconUrl, getWalletLinks, getWalletPrimaryColor, getWalletGroup, getWalletBookCdnUrl, findWalletBookWallet, findWalletGroup, } from './helpers';
|
|
10
|
+
export { getWalletBookWallet, getWalletIconUrl, getWalletLinks, getWalletPrimaryColor, getWalletGroup, getWalletBookCdnUrl, findWalletBookWallet, findWalletGroup, getBrandIconUrl, findWalletGroupOverride, } from './helpers';
|
|
11
11
|
/**
|
|
12
12
|
* HOOKS
|
|
13
13
|
*/
|
|
@@ -15,4 +15,4 @@ export { useWalletBookCdn, useWalletBookContext } from './hooks';
|
|
|
15
15
|
/**
|
|
16
16
|
* COMPONENTS
|
|
17
17
|
*/
|
|
18
|
-
export { WalletIcon, WalletBookContextProvider } from './components';
|
|
18
|
+
export { WalletIcon, WalletBookContextProvider, BrandIcon } from './components';
|
package/src/index.js
CHANGED
|
@@ -7,7 +7,10 @@ import './helpers/logger.js';
|
|
|
7
7
|
export { getWalletGroup } from './helpers/getWalletGroup.js';
|
|
8
8
|
export { findWalletGroup } from './helpers/findWalletGroup.js';
|
|
9
9
|
export { getWalletBookCdnUrl } from './helpers/getWalletBookCdnUrl.js';
|
|
10
|
+
export { getBrandIconUrl } from './helpers/getBrandIconUrl.js';
|
|
11
|
+
export { findWalletGroupOverride } from './helpers/findWalletGroupOverride.js';
|
|
10
12
|
export { useWalletBookCdn } from './hooks/useWalletBookCdn.js';
|
|
11
13
|
export { useWalletBookContext } from './hooks/useWalletBookContext.js';
|
|
12
14
|
export { WalletIcon } from './components/WalletIcon.js';
|
|
13
15
|
export { WalletBookContextProvider } from './components/WalletBookContext.js';
|
|
16
|
+
export { BrandIcon } from './components/BrandIcon.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const walletRecordsSchema: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
3
|
-
brand: z.
|
|
3
|
+
brand: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
4
4
|
alt: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
5
5
|
imageId: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
6
6
|
primaryColor: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
@@ -15,17 +15,18 @@ export declare const walletRecordsSchema: z.ZodRecord<z.ZodString, z.ZodEffects<
|
|
|
15
15
|
imageId?: unknown;
|
|
16
16
|
primaryColor?: unknown;
|
|
17
17
|
spriteId?: unknown;
|
|
18
|
-
}
|
|
18
|
+
}>, {
|
|
19
19
|
alt?: string | undefined;
|
|
20
20
|
imageId?: string | undefined;
|
|
21
21
|
primaryColor?: string | undefined;
|
|
22
22
|
spriteId?: string | undefined;
|
|
23
|
-
}
|
|
23
|
+
}, {
|
|
24
24
|
alt?: unknown;
|
|
25
25
|
imageId?: unknown;
|
|
26
26
|
primaryColor?: unknown;
|
|
27
27
|
spriteId?: unknown;
|
|
28
|
-
}
|
|
28
|
+
}>>;
|
|
29
|
+
chainGroup: z.ZodOptional<z.ZodString>;
|
|
29
30
|
chains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
30
31
|
desktop: z.ZodEffects<z.ZodOptional<z.ZodObject<{
|
|
31
32
|
chromeId: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>, string | undefined, unknown>;
|
|
@@ -178,6 +179,7 @@ export declare const walletRecordsSchema: z.ZodRecord<z.ZodString, z.ZodEffects<
|
|
|
178
179
|
} | undefined, {
|
|
179
180
|
sdks?: unknown;
|
|
180
181
|
} | undefined>;
|
|
182
|
+
walletGroup: z.ZodOptional<z.ZodString>;
|
|
181
183
|
}, "strip", z.ZodTypeAny, {
|
|
182
184
|
name: string;
|
|
183
185
|
brand?: {
|
|
@@ -186,6 +188,7 @@ export declare const walletRecordsSchema: z.ZodRecord<z.ZodString, z.ZodEffects<
|
|
|
186
188
|
primaryColor?: string | undefined;
|
|
187
189
|
spriteId?: string | undefined;
|
|
188
190
|
} | undefined;
|
|
191
|
+
chainGroup?: string | undefined;
|
|
189
192
|
chains?: string[] | undefined;
|
|
190
193
|
desktop?: {
|
|
191
194
|
chromeId?: string | undefined;
|
|
@@ -229,6 +232,7 @@ export declare const walletRecordsSchema: z.ZodRecord<z.ZodString, z.ZodEffects<
|
|
|
229
232
|
walletConnect?: {
|
|
230
233
|
sdks?: string[] | undefined;
|
|
231
234
|
} | undefined;
|
|
235
|
+
walletGroup?: string | undefined;
|
|
232
236
|
}, {
|
|
233
237
|
name: string;
|
|
234
238
|
brand?: {
|
|
@@ -237,6 +241,7 @@ export declare const walletRecordsSchema: z.ZodRecord<z.ZodString, z.ZodEffects<
|
|
|
237
241
|
primaryColor?: unknown;
|
|
238
242
|
spriteId?: unknown;
|
|
239
243
|
} | undefined;
|
|
244
|
+
chainGroup?: string | undefined;
|
|
240
245
|
chains?: string[] | undefined;
|
|
241
246
|
desktop?: {
|
|
242
247
|
chromeId?: unknown;
|
|
@@ -280,6 +285,7 @@ export declare const walletRecordsSchema: z.ZodRecord<z.ZodString, z.ZodEffects<
|
|
|
280
285
|
walletConnect?: {
|
|
281
286
|
sdks?: unknown;
|
|
282
287
|
} | undefined;
|
|
288
|
+
walletGroup?: string | undefined;
|
|
283
289
|
}>, {
|
|
284
290
|
name: string;
|
|
285
291
|
brand?: {
|
|
@@ -288,6 +294,7 @@ export declare const walletRecordsSchema: z.ZodRecord<z.ZodString, z.ZodEffects<
|
|
|
288
294
|
primaryColor?: string | undefined;
|
|
289
295
|
spriteId?: string | undefined;
|
|
290
296
|
} | undefined;
|
|
297
|
+
chainGroup?: string | undefined;
|
|
291
298
|
chains?: string[] | undefined;
|
|
292
299
|
desktop?: {
|
|
293
300
|
chromeId?: string | undefined;
|
|
@@ -331,6 +338,7 @@ export declare const walletRecordsSchema: z.ZodRecord<z.ZodString, z.ZodEffects<
|
|
|
331
338
|
walletConnect?: {
|
|
332
339
|
sdks?: string[] | undefined;
|
|
333
340
|
} | undefined;
|
|
341
|
+
walletGroup?: string | undefined;
|
|
334
342
|
}, unknown>, {
|
|
335
343
|
name: string;
|
|
336
344
|
brand?: {
|
|
@@ -339,6 +347,7 @@ export declare const walletRecordsSchema: z.ZodRecord<z.ZodString, z.ZodEffects<
|
|
|
339
347
|
primaryColor?: string | undefined;
|
|
340
348
|
spriteId?: string | undefined;
|
|
341
349
|
} | undefined;
|
|
350
|
+
chainGroup?: string | undefined;
|
|
342
351
|
chains?: string[] | undefined;
|
|
343
352
|
desktop?: {
|
|
344
353
|
chromeId?: string | undefined;
|
|
@@ -382,6 +391,7 @@ export declare const walletRecordsSchema: z.ZodRecord<z.ZodString, z.ZodEffects<
|
|
|
382
391
|
walletConnect?: {
|
|
383
392
|
sdks?: string[] | undefined;
|
|
384
393
|
} | undefined;
|
|
394
|
+
walletGroup?: string | undefined;
|
|
385
395
|
}, unknown>>;
|
|
386
396
|
export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
|
|
387
397
|
groups: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -413,6 +423,51 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
|
|
|
413
423
|
} | undefined>;
|
|
414
424
|
key: z.ZodString;
|
|
415
425
|
name: z.ZodString;
|
|
426
|
+
walletOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
427
|
+
brand: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
428
|
+
alt: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
429
|
+
imageId: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
430
|
+
primaryColor: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
431
|
+
spriteId: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
432
|
+
}, "strip", z.ZodTypeAny, {
|
|
433
|
+
alt?: string | undefined;
|
|
434
|
+
imageId?: string | undefined;
|
|
435
|
+
primaryColor?: string | undefined;
|
|
436
|
+
spriteId?: string | undefined;
|
|
437
|
+
}, {
|
|
438
|
+
alt?: unknown;
|
|
439
|
+
imageId?: unknown;
|
|
440
|
+
primaryColor?: unknown;
|
|
441
|
+
spriteId?: unknown;
|
|
442
|
+
}>, {
|
|
443
|
+
alt?: string | undefined;
|
|
444
|
+
imageId?: string | undefined;
|
|
445
|
+
primaryColor?: string | undefined;
|
|
446
|
+
spriteId?: string | undefined;
|
|
447
|
+
}, {
|
|
448
|
+
alt?: unknown;
|
|
449
|
+
imageId?: unknown;
|
|
450
|
+
primaryColor?: unknown;
|
|
451
|
+
spriteId?: unknown;
|
|
452
|
+
}>>;
|
|
453
|
+
name: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
454
|
+
}, "strip", z.ZodTypeAny, {
|
|
455
|
+
brand?: {
|
|
456
|
+
alt?: string | undefined;
|
|
457
|
+
imageId?: string | undefined;
|
|
458
|
+
primaryColor?: string | undefined;
|
|
459
|
+
spriteId?: string | undefined;
|
|
460
|
+
} | undefined;
|
|
461
|
+
name?: string | undefined;
|
|
462
|
+
}, {
|
|
463
|
+
brand?: {
|
|
464
|
+
alt?: unknown;
|
|
465
|
+
imageId?: unknown;
|
|
466
|
+
primaryColor?: unknown;
|
|
467
|
+
spriteId?: unknown;
|
|
468
|
+
} | undefined;
|
|
469
|
+
name?: unknown;
|
|
470
|
+
}>>>;
|
|
416
471
|
}, "strip", z.ZodTypeAny, {
|
|
417
472
|
name: string;
|
|
418
473
|
key: string;
|
|
@@ -422,6 +477,15 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
|
|
|
422
477
|
primaryColor?: string | undefined;
|
|
423
478
|
spriteId?: string | undefined;
|
|
424
479
|
} | undefined;
|
|
480
|
+
walletOverrides?: Record<string, {
|
|
481
|
+
brand?: {
|
|
482
|
+
alt?: string | undefined;
|
|
483
|
+
imageId?: string | undefined;
|
|
484
|
+
primaryColor?: string | undefined;
|
|
485
|
+
spriteId?: string | undefined;
|
|
486
|
+
} | undefined;
|
|
487
|
+
name?: string | undefined;
|
|
488
|
+
}> | undefined;
|
|
425
489
|
}, {
|
|
426
490
|
name: string;
|
|
427
491
|
key: string;
|
|
@@ -431,9 +495,18 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
|
|
|
431
495
|
primaryColor?: unknown;
|
|
432
496
|
spriteId?: unknown;
|
|
433
497
|
} | undefined;
|
|
498
|
+
walletOverrides?: Record<string, {
|
|
499
|
+
brand?: {
|
|
500
|
+
alt?: unknown;
|
|
501
|
+
imageId?: unknown;
|
|
502
|
+
primaryColor?: unknown;
|
|
503
|
+
spriteId?: unknown;
|
|
504
|
+
} | undefined;
|
|
505
|
+
name?: unknown;
|
|
506
|
+
}> | undefined;
|
|
434
507
|
}>>;
|
|
435
508
|
wallets: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
436
|
-
brand: z.
|
|
509
|
+
brand: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
437
510
|
alt: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
438
511
|
imageId: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
439
512
|
primaryColor: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
@@ -448,17 +521,18 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
|
|
|
448
521
|
imageId?: unknown;
|
|
449
522
|
primaryColor?: unknown;
|
|
450
523
|
spriteId?: unknown;
|
|
451
|
-
}
|
|
524
|
+
}>, {
|
|
452
525
|
alt?: string | undefined;
|
|
453
526
|
imageId?: string | undefined;
|
|
454
527
|
primaryColor?: string | undefined;
|
|
455
528
|
spriteId?: string | undefined;
|
|
456
|
-
}
|
|
529
|
+
}, {
|
|
457
530
|
alt?: unknown;
|
|
458
531
|
imageId?: unknown;
|
|
459
532
|
primaryColor?: unknown;
|
|
460
533
|
spriteId?: unknown;
|
|
461
|
-
}
|
|
534
|
+
}>>;
|
|
535
|
+
chainGroup: z.ZodOptional<z.ZodString>;
|
|
462
536
|
chains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
463
537
|
desktop: z.ZodEffects<z.ZodOptional<z.ZodObject<{
|
|
464
538
|
chromeId: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>, string | undefined, unknown>;
|
|
@@ -611,6 +685,7 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
|
|
|
611
685
|
} | undefined, {
|
|
612
686
|
sdks?: unknown;
|
|
613
687
|
} | undefined>;
|
|
688
|
+
walletGroup: z.ZodOptional<z.ZodString>;
|
|
614
689
|
}, "strip", z.ZodTypeAny, {
|
|
615
690
|
name: string;
|
|
616
691
|
brand?: {
|
|
@@ -619,6 +694,7 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
|
|
|
619
694
|
primaryColor?: string | undefined;
|
|
620
695
|
spriteId?: string | undefined;
|
|
621
696
|
} | undefined;
|
|
697
|
+
chainGroup?: string | undefined;
|
|
622
698
|
chains?: string[] | undefined;
|
|
623
699
|
desktop?: {
|
|
624
700
|
chromeId?: string | undefined;
|
|
@@ -662,6 +738,7 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
|
|
|
662
738
|
walletConnect?: {
|
|
663
739
|
sdks?: string[] | undefined;
|
|
664
740
|
} | undefined;
|
|
741
|
+
walletGroup?: string | undefined;
|
|
665
742
|
}, {
|
|
666
743
|
name: string;
|
|
667
744
|
brand?: {
|
|
@@ -670,6 +747,7 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
|
|
|
670
747
|
primaryColor?: unknown;
|
|
671
748
|
spriteId?: unknown;
|
|
672
749
|
} | undefined;
|
|
750
|
+
chainGroup?: string | undefined;
|
|
673
751
|
chains?: string[] | undefined;
|
|
674
752
|
desktop?: {
|
|
675
753
|
chromeId?: unknown;
|
|
@@ -713,6 +791,7 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
|
|
|
713
791
|
walletConnect?: {
|
|
714
792
|
sdks?: unknown;
|
|
715
793
|
} | undefined;
|
|
794
|
+
walletGroup?: string | undefined;
|
|
716
795
|
}>, {
|
|
717
796
|
name: string;
|
|
718
797
|
brand?: {
|
|
@@ -721,6 +800,7 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
|
|
|
721
800
|
primaryColor?: string | undefined;
|
|
722
801
|
spriteId?: string | undefined;
|
|
723
802
|
} | undefined;
|
|
803
|
+
chainGroup?: string | undefined;
|
|
724
804
|
chains?: string[] | undefined;
|
|
725
805
|
desktop?: {
|
|
726
806
|
chromeId?: string | undefined;
|
|
@@ -764,6 +844,7 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
|
|
|
764
844
|
walletConnect?: {
|
|
765
845
|
sdks?: string[] | undefined;
|
|
766
846
|
} | undefined;
|
|
847
|
+
walletGroup?: string | undefined;
|
|
767
848
|
}, unknown>, {
|
|
768
849
|
name: string;
|
|
769
850
|
brand?: {
|
|
@@ -772,6 +853,7 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
|
|
|
772
853
|
primaryColor?: string | undefined;
|
|
773
854
|
spriteId?: string | undefined;
|
|
774
855
|
} | undefined;
|
|
856
|
+
chainGroup?: string | undefined;
|
|
775
857
|
chains?: string[] | undefined;
|
|
776
858
|
desktop?: {
|
|
777
859
|
chromeId?: string | undefined;
|
|
@@ -815,6 +897,7 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
|
|
|
815
897
|
walletConnect?: {
|
|
816
898
|
sdks?: string[] | undefined;
|
|
817
899
|
} | undefined;
|
|
900
|
+
walletGroup?: string | undefined;
|
|
818
901
|
}, unknown>>;
|
|
819
902
|
}, "strip", z.ZodTypeAny, {
|
|
820
903
|
groups: Record<string, {
|
|
@@ -826,6 +909,15 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
|
|
|
826
909
|
primaryColor?: string | undefined;
|
|
827
910
|
spriteId?: string | undefined;
|
|
828
911
|
} | undefined;
|
|
912
|
+
walletOverrides?: Record<string, {
|
|
913
|
+
brand?: {
|
|
914
|
+
alt?: string | undefined;
|
|
915
|
+
imageId?: string | undefined;
|
|
916
|
+
primaryColor?: string | undefined;
|
|
917
|
+
spriteId?: string | undefined;
|
|
918
|
+
} | undefined;
|
|
919
|
+
name?: string | undefined;
|
|
920
|
+
}> | undefined;
|
|
829
921
|
}>;
|
|
830
922
|
wallets: Record<string, {
|
|
831
923
|
name: string;
|
|
@@ -835,6 +927,7 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
|
|
|
835
927
|
primaryColor?: string | undefined;
|
|
836
928
|
spriteId?: string | undefined;
|
|
837
929
|
} | undefined;
|
|
930
|
+
chainGroup?: string | undefined;
|
|
838
931
|
chains?: string[] | undefined;
|
|
839
932
|
desktop?: {
|
|
840
933
|
chromeId?: string | undefined;
|
|
@@ -878,6 +971,7 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
|
|
|
878
971
|
walletConnect?: {
|
|
879
972
|
sdks?: string[] | undefined;
|
|
880
973
|
} | undefined;
|
|
974
|
+
walletGroup?: string | undefined;
|
|
881
975
|
}>;
|
|
882
976
|
}, {
|
|
883
977
|
groups: Record<string, {
|
|
@@ -889,6 +983,15 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
|
|
|
889
983
|
primaryColor?: unknown;
|
|
890
984
|
spriteId?: unknown;
|
|
891
985
|
} | undefined;
|
|
986
|
+
walletOverrides?: Record<string, {
|
|
987
|
+
brand?: {
|
|
988
|
+
alt?: unknown;
|
|
989
|
+
imageId?: unknown;
|
|
990
|
+
primaryColor?: unknown;
|
|
991
|
+
spriteId?: unknown;
|
|
992
|
+
} | undefined;
|
|
993
|
+
name?: unknown;
|
|
994
|
+
}> | undefined;
|
|
892
995
|
}>;
|
|
893
996
|
wallets: Record<string, unknown>;
|
|
894
997
|
}>, {
|
|
@@ -901,6 +1004,15 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
|
|
|
901
1004
|
primaryColor?: string | undefined;
|
|
902
1005
|
spriteId?: string | undefined;
|
|
903
1006
|
} | undefined;
|
|
1007
|
+
walletOverrides?: Record<string, {
|
|
1008
|
+
brand?: {
|
|
1009
|
+
alt?: string | undefined;
|
|
1010
|
+
imageId?: string | undefined;
|
|
1011
|
+
primaryColor?: string | undefined;
|
|
1012
|
+
spriteId?: string | undefined;
|
|
1013
|
+
} | undefined;
|
|
1014
|
+
name?: string | undefined;
|
|
1015
|
+
}> | undefined;
|
|
904
1016
|
}>;
|
|
905
1017
|
wallets: Record<string, {
|
|
906
1018
|
name: string;
|
|
@@ -910,6 +1022,7 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
|
|
|
910
1022
|
primaryColor?: string | undefined;
|
|
911
1023
|
spriteId?: string | undefined;
|
|
912
1024
|
} | undefined;
|
|
1025
|
+
chainGroup?: string | undefined;
|
|
913
1026
|
chains?: string[] | undefined;
|
|
914
1027
|
desktop?: {
|
|
915
1028
|
chromeId?: string | undefined;
|
|
@@ -953,6 +1066,7 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
|
|
|
953
1066
|
walletConnect?: {
|
|
954
1067
|
sdks?: string[] | undefined;
|
|
955
1068
|
} | undefined;
|
|
1069
|
+
walletGroup?: string | undefined;
|
|
956
1070
|
}>;
|
|
957
1071
|
}, unknown>;
|
|
958
1072
|
export type WalletBookSchema = z.infer<typeof walletBookSchema>;
|
|
@@ -986,6 +1100,51 @@ declare const WalletGroupRecordSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
986
1100
|
} | undefined>;
|
|
987
1101
|
key: z.ZodString;
|
|
988
1102
|
name: z.ZodString;
|
|
1103
|
+
walletOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1104
|
+
brand: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
1105
|
+
alt: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
1106
|
+
imageId: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
1107
|
+
primaryColor: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
1108
|
+
spriteId: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
1109
|
+
}, "strip", z.ZodTypeAny, {
|
|
1110
|
+
alt?: string | undefined;
|
|
1111
|
+
imageId?: string | undefined;
|
|
1112
|
+
primaryColor?: string | undefined;
|
|
1113
|
+
spriteId?: string | undefined;
|
|
1114
|
+
}, {
|
|
1115
|
+
alt?: unknown;
|
|
1116
|
+
imageId?: unknown;
|
|
1117
|
+
primaryColor?: unknown;
|
|
1118
|
+
spriteId?: unknown;
|
|
1119
|
+
}>, {
|
|
1120
|
+
alt?: string | undefined;
|
|
1121
|
+
imageId?: string | undefined;
|
|
1122
|
+
primaryColor?: string | undefined;
|
|
1123
|
+
spriteId?: string | undefined;
|
|
1124
|
+
}, {
|
|
1125
|
+
alt?: unknown;
|
|
1126
|
+
imageId?: unknown;
|
|
1127
|
+
primaryColor?: unknown;
|
|
1128
|
+
spriteId?: unknown;
|
|
1129
|
+
}>>;
|
|
1130
|
+
name: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
1131
|
+
}, "strip", z.ZodTypeAny, {
|
|
1132
|
+
brand?: {
|
|
1133
|
+
alt?: string | undefined;
|
|
1134
|
+
imageId?: string | undefined;
|
|
1135
|
+
primaryColor?: string | undefined;
|
|
1136
|
+
spriteId?: string | undefined;
|
|
1137
|
+
} | undefined;
|
|
1138
|
+
name?: string | undefined;
|
|
1139
|
+
}, {
|
|
1140
|
+
brand?: {
|
|
1141
|
+
alt?: unknown;
|
|
1142
|
+
imageId?: unknown;
|
|
1143
|
+
primaryColor?: unknown;
|
|
1144
|
+
spriteId?: unknown;
|
|
1145
|
+
} | undefined;
|
|
1146
|
+
name?: unknown;
|
|
1147
|
+
}>>>;
|
|
989
1148
|
}, "strip", z.ZodTypeAny, {
|
|
990
1149
|
name: string;
|
|
991
1150
|
key: string;
|
|
@@ -995,6 +1154,15 @@ declare const WalletGroupRecordSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
995
1154
|
primaryColor?: string | undefined;
|
|
996
1155
|
spriteId?: string | undefined;
|
|
997
1156
|
} | undefined;
|
|
1157
|
+
walletOverrides?: Record<string, {
|
|
1158
|
+
brand?: {
|
|
1159
|
+
alt?: string | undefined;
|
|
1160
|
+
imageId?: string | undefined;
|
|
1161
|
+
primaryColor?: string | undefined;
|
|
1162
|
+
spriteId?: string | undefined;
|
|
1163
|
+
} | undefined;
|
|
1164
|
+
name?: string | undefined;
|
|
1165
|
+
}> | undefined;
|
|
998
1166
|
}, {
|
|
999
1167
|
name: string;
|
|
1000
1168
|
key: string;
|
|
@@ -1004,6 +1172,15 @@ declare const WalletGroupRecordSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
1004
1172
|
primaryColor?: unknown;
|
|
1005
1173
|
spriteId?: unknown;
|
|
1006
1174
|
} | undefined;
|
|
1175
|
+
walletOverrides?: Record<string, {
|
|
1176
|
+
brand?: {
|
|
1177
|
+
alt?: unknown;
|
|
1178
|
+
imageId?: unknown;
|
|
1179
|
+
primaryColor?: unknown;
|
|
1180
|
+
spriteId?: unknown;
|
|
1181
|
+
} | undefined;
|
|
1182
|
+
name?: unknown;
|
|
1183
|
+
}> | undefined;
|
|
1007
1184
|
}>>;
|
|
1008
1185
|
export type WalletGroupRecordSchema = z.infer<typeof WalletGroupRecordSchema>;
|
|
1009
1186
|
export type WalletBookGroupSchema = z.infer<typeof walletBookSchema>['groups'];
|