@dynamic-labs/wallet-book 0.0.18 → 0.0.20
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 +1 -0
- package/dist/cjs/src/helpers/findWalletGroup.d.ts +43 -0
- package/dist/cjs/src/helpers/findWalletGroup.js +16 -0
- package/dist/cjs/src/helpers/findWalletGroup.js.map +1 -0
- package/dist/cjs/src/helpers/getWalletGroup.d.ts +2 -0
- package/dist/cjs/src/helpers/getWalletGroup.js +13 -0
- package/dist/cjs/src/helpers/getWalletGroup.js.map +1 -0
- package/dist/cjs/src/helpers/index.d.ts +2 -0
- package/dist/cjs/src/helpers/index.js +2 -0
- package/dist/cjs/src/helpers/index.js.map +1 -1
- package/dist/cjs/src/hooks/useWalletBookCdn.d.ts +44 -0
- package/dist/cjs/src/index.d.ts +1 -1
- package/dist/cjs/src/index.js +2 -1
- package/dist/cjs/src/index.js.map +1 -1
- package/dist/cjs/src/schemas/walletBookSchema.d.ts +744 -0
- package/dist/cjs/src/schemas/walletBookSchema.js +4 -0
- package/dist/cjs/src/schemas/walletBookSchema.js.map +1 -1
- package/dist/cjs/src/schemas/walletGroup.d.ts +336 -0
- package/dist/cjs/src/schemas/walletGroup.js +29 -0
- package/dist/cjs/src/schemas/walletGroup.js.map +1 -0
- package/dist/cjs/src/schemas/walletSchema.d.ts +5 -0
- package/dist/cjs/src/schemas/walletSchema.js +1 -1
- package/dist/cjs/src/schemas/walletSchema.js.map +1 -1
- package/dist/esm/src/helpers/findWalletBookWallet.d.ts +1 -0
- package/dist/esm/src/helpers/findWalletGroup.d.ts +43 -0
- package/dist/esm/src/helpers/findWalletGroup.js +12 -0
- package/dist/esm/src/helpers/findWalletGroup.js.map +1 -0
- package/dist/esm/src/helpers/getWalletGroup.d.ts +2 -0
- package/dist/esm/src/helpers/getWalletGroup.js +9 -0
- package/dist/esm/src/helpers/getWalletGroup.js.map +1 -0
- package/dist/esm/src/helpers/index.d.ts +2 -0
- package/dist/esm/src/helpers/index.js +2 -0
- package/dist/esm/src/helpers/index.js.map +1 -1
- package/dist/esm/src/hooks/useWalletBookCdn.d.ts +44 -0
- package/dist/esm/src/index.d.ts +1 -1
- package/dist/esm/src/index.js +1 -1
- package/dist/esm/src/index.js.map +1 -1
- package/dist/esm/src/schemas/walletBookSchema.d.ts +744 -0
- package/dist/esm/src/schemas/walletBookSchema.js +4 -0
- package/dist/esm/src/schemas/walletBookSchema.js.map +1 -1
- package/dist/esm/src/schemas/walletGroup.d.ts +336 -0
- package/dist/esm/src/schemas/walletGroup.js +26 -0
- package/dist/esm/src/schemas/walletGroup.js.map +1 -0
- package/dist/esm/src/schemas/walletSchema.d.ts +5 -0
- package/dist/esm/src/schemas/walletSchema.js +1 -1
- package/dist/esm/src/schemas/walletSchema.js.map +1 -1
- package/dist/wallet-book.json +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare const findWalletGroup: (walletGroup: string) => {
|
|
2
|
+
key: string;
|
|
3
|
+
wallets: {
|
|
4
|
+
name: string;
|
|
5
|
+
brand?: {
|
|
6
|
+
spriteId?: string | undefined;
|
|
7
|
+
imageId?: string | undefined;
|
|
8
|
+
alt?: string | undefined;
|
|
9
|
+
primaryColor?: string | undefined;
|
|
10
|
+
} | undefined;
|
|
11
|
+
desktop?: {
|
|
12
|
+
native?: string | undefined;
|
|
13
|
+
universal?: string | undefined;
|
|
14
|
+
chromeId?: string | undefined;
|
|
15
|
+
firefoxId?: string | undefined;
|
|
16
|
+
operaId?: string | undefined;
|
|
17
|
+
edgeId?: string | undefined;
|
|
18
|
+
safariId?: string | undefined;
|
|
19
|
+
} | undefined;
|
|
20
|
+
mobile?: {
|
|
21
|
+
native?: string | undefined;
|
|
22
|
+
universal?: string | undefined;
|
|
23
|
+
ios?: string | null | undefined;
|
|
24
|
+
android?: string | null | undefined;
|
|
25
|
+
iosId?: string | undefined;
|
|
26
|
+
androidId?: string | undefined;
|
|
27
|
+
} | undefined;
|
|
28
|
+
chains?: string[] | undefined;
|
|
29
|
+
walletConnect?: {
|
|
30
|
+
sdks?: string[] | undefined;
|
|
31
|
+
} | undefined;
|
|
32
|
+
showOnlyIfInstalled?: boolean | undefined;
|
|
33
|
+
switchNetworkOnlyFromWallet?: boolean | undefined;
|
|
34
|
+
shortName?: string | undefined;
|
|
35
|
+
group?: string | undefined;
|
|
36
|
+
}[];
|
|
37
|
+
brand?: {
|
|
38
|
+
spriteId?: string | undefined;
|
|
39
|
+
imageId?: string | undefined;
|
|
40
|
+
alt?: string | undefined;
|
|
41
|
+
primaryColor?: string | undefined;
|
|
42
|
+
} | undefined;
|
|
43
|
+
} | undefined;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.findWalletGroup = void 0;
|
|
4
|
+
const getWalletGroup_1 = require("./getWalletGroup");
|
|
5
|
+
const logger_1 = require("./logger");
|
|
6
|
+
const findWalletGroup = (walletGroup) => {
|
|
7
|
+
try {
|
|
8
|
+
return (0, getWalletGroup_1.getWalletGroup)(walletGroup);
|
|
9
|
+
}
|
|
10
|
+
catch (err) {
|
|
11
|
+
logger_1.logger.error(err);
|
|
12
|
+
return undefined;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
exports.findWalletGroup = findWalletGroup;
|
|
16
|
+
//# sourceMappingURL=findWalletGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findWalletGroup.js","sourceRoot":"","sources":["../../../../src/helpers/findWalletGroup.ts"],"names":[],"mappings":";;;AAAA,qDAAkD;AAClD,qCAAkC;AAE3B,MAAM,eAAe,GAAG,CAAC,WAAmB,EAAE,EAAE;IACrD,IAAI;QACF,OAAO,IAAA,+BAAc,EAAC,WAAW,CAAC,CAAC;KACpC;IAAC,OAAM,GAAG,EAAE;QACX,eAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAClB,OAAO,SAAS,CAAC;KAClB;AACH,CAAC,CAAA;AAPY,QAAA,eAAe,mBAO3B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getWalletGroup = void 0;
|
|
4
|
+
const hooks_1 = require("../hooks");
|
|
5
|
+
const getWalletGroup = (key) => {
|
|
6
|
+
const walletBook = (0, hooks_1.useWalletBook)();
|
|
7
|
+
const group = walletBook.groups[key];
|
|
8
|
+
if (!group)
|
|
9
|
+
throw new Error(`Group ${key} not found in wallet book`);
|
|
10
|
+
return group;
|
|
11
|
+
};
|
|
12
|
+
exports.getWalletGroup = getWalletGroup;
|
|
13
|
+
//# sourceMappingURL=getWalletGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getWalletGroup.js","sourceRoot":"","sources":["../../../../src/helpers/getWalletGroup.ts"],"names":[],"mappings":";;;AAAA,oCAAyC;AAGlC,MAAM,cAAc,GAAG,CAAC,GAAW,EAAqB,EAAE;IAC/D,MAAM,UAAU,GAAG,IAAA,qBAAa,GAAE,CAAC;IACnC,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACrC,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,SAAS,GAAG,2BAA2B,CAAC,CAAC;IACrE,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AALW,QAAA,cAAc,kBAKzB"}
|
|
@@ -22,4 +22,6 @@ __exportStar(require("./normalizeWalletName"), exports);
|
|
|
22
22
|
__exportStar(require("./renderTemplate"), exports);
|
|
23
23
|
__exportStar(require("./findWalletBookWallet"), exports);
|
|
24
24
|
__exportStar(require("./logger"), exports);
|
|
25
|
+
__exportStar(require("./getWalletGroup"), exports);
|
|
26
|
+
__exportStar(require("./findWalletGroup"), exports);
|
|
25
27
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/helpers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,wDAAsC;AACtC,mDAAiC;AACjC,0DAAwC;AACxC,wDAAsC;AACtC,mDAAiC;AACjC,yDAAuC;AACvC,2CAAyB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/helpers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,wDAAsC;AACtC,mDAAiC;AACjC,0DAAwC;AACxC,wDAAsC;AACtC,mDAAiC;AACjC,yDAAuC;AACvC,2CAAyB;AACzB,mDAAiC;AACjC,oDAAkC"}
|
|
@@ -31,5 +31,49 @@ export declare const useWalletBookCdn: () => {
|
|
|
31
31
|
showOnlyIfInstalled?: boolean | undefined;
|
|
32
32
|
switchNetworkOnlyFromWallet?: boolean | undefined;
|
|
33
33
|
shortName?: string | undefined;
|
|
34
|
+
group?: string | undefined;
|
|
35
|
+
}>;
|
|
36
|
+
groups: Record<string, {
|
|
37
|
+
key: string;
|
|
38
|
+
wallets: {
|
|
39
|
+
name: string;
|
|
40
|
+
brand?: {
|
|
41
|
+
spriteId?: string | undefined;
|
|
42
|
+
imageId?: string | undefined;
|
|
43
|
+
alt?: string | undefined;
|
|
44
|
+
primaryColor?: string | undefined;
|
|
45
|
+
} | undefined;
|
|
46
|
+
desktop?: {
|
|
47
|
+
native?: string | undefined;
|
|
48
|
+
universal?: string | undefined;
|
|
49
|
+
chromeId?: string | undefined;
|
|
50
|
+
firefoxId?: string | undefined;
|
|
51
|
+
operaId?: string | undefined;
|
|
52
|
+
edgeId?: string | undefined;
|
|
53
|
+
safariId?: string | undefined;
|
|
54
|
+
} | undefined;
|
|
55
|
+
mobile?: {
|
|
56
|
+
native?: string | undefined;
|
|
57
|
+
universal?: string | undefined;
|
|
58
|
+
ios?: string | null | undefined;
|
|
59
|
+
android?: string | null | undefined;
|
|
60
|
+
iosId?: string | undefined;
|
|
61
|
+
androidId?: string | undefined;
|
|
62
|
+
} | undefined;
|
|
63
|
+
chains?: string[] | undefined;
|
|
64
|
+
walletConnect?: {
|
|
65
|
+
sdks?: string[] | undefined;
|
|
66
|
+
} | undefined;
|
|
67
|
+
showOnlyIfInstalled?: boolean | undefined;
|
|
68
|
+
switchNetworkOnlyFromWallet?: boolean | undefined;
|
|
69
|
+
shortName?: string | undefined;
|
|
70
|
+
group?: string | undefined;
|
|
71
|
+
}[];
|
|
72
|
+
brand?: {
|
|
73
|
+
spriteId?: string | undefined;
|
|
74
|
+
imageId?: string | undefined;
|
|
75
|
+
alt?: string | undefined;
|
|
76
|
+
primaryColor?: string | undefined;
|
|
77
|
+
} | undefined;
|
|
34
78
|
}>;
|
|
35
79
|
};
|
package/dist/cjs/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, } from "./helpers";
|
|
10
|
+
export { getWalletBookWallet, getWalletIconUrl, getWalletLinks, getWalletPrimaryColor, getWalletGroup } from "./helpers";
|
|
11
11
|
/**
|
|
12
12
|
* HOOKS
|
|
13
13
|
*/
|
package/dist/cjs/src/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WalletIcon = exports.useWalletBook = exports.getWalletPrimaryColor = exports.getWalletLinks = exports.getWalletIconUrl = exports.getWalletBookWallet = void 0;
|
|
3
|
+
exports.WalletIcon = exports.useWalletBook = exports.getWalletGroup = exports.getWalletPrimaryColor = exports.getWalletLinks = exports.getWalletIconUrl = exports.getWalletBookWallet = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* HELPERS
|
|
6
6
|
*/
|
|
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "getWalletBookWallet", { enumerable: true, get: f
|
|
|
9
9
|
Object.defineProperty(exports, "getWalletIconUrl", { enumerable: true, get: function () { return helpers_1.getWalletIconUrl; } });
|
|
10
10
|
Object.defineProperty(exports, "getWalletLinks", { enumerable: true, get: function () { return helpers_1.getWalletLinks; } });
|
|
11
11
|
Object.defineProperty(exports, "getWalletPrimaryColor", { enumerable: true, get: function () { return helpers_1.getWalletPrimaryColor; } });
|
|
12
|
+
Object.defineProperty(exports, "getWalletGroup", { enumerable: true, get: function () { return helpers_1.getWalletGroup; } });
|
|
12
13
|
/**
|
|
13
14
|
* HOOKS
|
|
14
15
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":";;;AAWA;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":";;;AAWA;;GAEG;AACH,qCAMmB;AALjB,8GAAA,mBAAmB,OAAA;AACnB,2GAAA,gBAAgB,OAAA;AAChB,yGAAA,cAAc,OAAA;AACd,gHAAA,qBAAqB,OAAA;AACrB,yGAAA,cAAc,OAAA;AAGhB;;GAEG;AACH,iCAAwC;AAA/B,sGAAA,aAAa,OAAA;AAEtB;;GAEG;AACH,2CAA0C;AAAjC,wGAAA,UAAU,OAAA"}
|