@dynamic-labs/wallet-book 1.1.0-alpha.0 → 1.1.0-alpha.2
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 +9 -0
- package/package.json +2 -2
- package/src/build/index.d.ts +5 -0
- package/src/build/sources/walletConnect/index.d.ts +5 -0
- package/src/schemas/walletSchema.cjs +4 -0
- package/src/schemas/walletSchema.d.ts +57 -0
- package/src/schemas/walletSchema.js +4 -0
- package/wallet-book-fallbacks.cjs +28 -0
- package/wallet-book-fallbacks.js +28 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
|
|
2
|
+
## [1.1.0-alpha.2](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.1...v1.1.0-alpha.2) (2023-12-18)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* increase timeout when fetching wallet network ([#4197](https://github.com/dynamic-labs/DynamicAuth/issues/4197)) ([bd43d45](https://github.com/dynamic-labs/DynamicAuth/commit/bd43d452dccf36f68bd012e5737480599b93c3b5))
|
|
8
|
+
|
|
9
|
+
## [1.1.0-alpha.1](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.0...v1.1.0-alpha.1) (2023-12-15)
|
|
10
|
+
|
|
2
11
|
## [1.1.0-alpha.0](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.14...v1.1.0-alpha.0) (2023-12-12)
|
|
3
12
|
|
|
4
13
|
|
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.2",
|
|
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.2"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"react": "^17.0.2 || ^18.0.0",
|
package/src/build/index.d.ts
CHANGED
|
@@ -34,6 +34,10 @@ export declare const generateWalletFallbacks: (wallets: WalletRecordsSchema) =>
|
|
|
34
34
|
value: boolean;
|
|
35
35
|
flag: string;
|
|
36
36
|
}[];
|
|
37
|
+
walletStandard?: {
|
|
38
|
+
name: string;
|
|
39
|
+
features: string[];
|
|
40
|
+
} | undefined;
|
|
37
41
|
windowLocations?: string[] | undefined;
|
|
38
42
|
}[] | undefined;
|
|
39
43
|
mobile?: {
|
|
@@ -50,4 +54,5 @@ export declare const generateWalletFallbacks: (wallets: WalletRecordsSchema) =>
|
|
|
50
54
|
walletConnect?: {
|
|
51
55
|
sdks?: string[] | undefined;
|
|
52
56
|
} | undefined;
|
|
57
|
+
walletStandardId?: string | undefined;
|
|
53
58
|
}>;
|
|
@@ -86,6 +86,10 @@ export declare const walletConnectTransformedData: Promise<Record<string, {
|
|
|
86
86
|
value: boolean;
|
|
87
87
|
flag: string;
|
|
88
88
|
}[];
|
|
89
|
+
walletStandard?: {
|
|
90
|
+
name: string;
|
|
91
|
+
features: string[];
|
|
92
|
+
} | undefined;
|
|
89
93
|
windowLocations?: string[] | undefined;
|
|
90
94
|
}[] | undefined;
|
|
91
95
|
mobile?: {
|
|
@@ -102,4 +106,5 @@ export declare const walletConnectTransformedData: Promise<Record<string, {
|
|
|
102
106
|
walletConnect?: {
|
|
103
107
|
sdks?: string[] | undefined;
|
|
104
108
|
} | undefined;
|
|
109
|
+
walletStandardId?: string | undefined;
|
|
105
110
|
}>>;
|
|
@@ -18,6 +18,9 @@ const injectedConfigSchema = zod.z.object({
|
|
|
18
18
|
flag: zod.z.string(),
|
|
19
19
|
value: zod.z.boolean().optional().default(true),
|
|
20
20
|
})),
|
|
21
|
+
walletStandard: zod.z
|
|
22
|
+
.object({ features: zod.z.array(zod.z.string()), name: zod.z.string() })
|
|
23
|
+
.optional(),
|
|
21
24
|
windowLocations: zod.z
|
|
22
25
|
.array(zod.z.string())
|
|
23
26
|
.optional()
|
|
@@ -92,6 +95,7 @@ const walletSchema = zod.z
|
|
|
92
95
|
})
|
|
93
96
|
.optional()
|
|
94
97
|
.transform(filterEmptyObject.filterEmptyObject),
|
|
98
|
+
walletStandardId: zod.z.string().optional(),
|
|
95
99
|
}))
|
|
96
100
|
.transform((val) => {
|
|
97
101
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -11,6 +11,16 @@ declare const injectedConfigSchema: z.ZodObject<{
|
|
|
11
11
|
flag: string;
|
|
12
12
|
value?: boolean | undefined;
|
|
13
13
|
}>, "many">;
|
|
14
|
+
walletStandard: z.ZodOptional<z.ZodObject<{
|
|
15
|
+
features: z.ZodArray<z.ZodString, "many">;
|
|
16
|
+
name: z.ZodString;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
features: string[];
|
|
19
|
+
name: string;
|
|
20
|
+
}, {
|
|
21
|
+
features: string[];
|
|
22
|
+
name: string;
|
|
23
|
+
}>>;
|
|
14
24
|
windowLocations: z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodString, "many">>, string[] | undefined, string[] | undefined>;
|
|
15
25
|
}, "strip", z.ZodTypeAny, {
|
|
16
26
|
chain: string;
|
|
@@ -18,6 +28,10 @@ declare const injectedConfigSchema: z.ZodObject<{
|
|
|
18
28
|
value: boolean;
|
|
19
29
|
flag: string;
|
|
20
30
|
}[];
|
|
31
|
+
walletStandard?: {
|
|
32
|
+
features: string[];
|
|
33
|
+
name: string;
|
|
34
|
+
} | undefined;
|
|
21
35
|
windowLocations?: string[] | undefined;
|
|
22
36
|
}, {
|
|
23
37
|
chain: string;
|
|
@@ -25,6 +39,10 @@ declare const injectedConfigSchema: z.ZodObject<{
|
|
|
25
39
|
flag: string;
|
|
26
40
|
value?: boolean | undefined;
|
|
27
41
|
}[];
|
|
42
|
+
walletStandard?: {
|
|
43
|
+
features: string[];
|
|
44
|
+
name: string;
|
|
45
|
+
} | undefined;
|
|
28
46
|
windowLocations?: string[] | undefined;
|
|
29
47
|
}>;
|
|
30
48
|
export declare const walletSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
@@ -117,6 +135,16 @@ export declare const walletSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
117
135
|
flag: string;
|
|
118
136
|
value?: boolean | undefined;
|
|
119
137
|
}>, "many">;
|
|
138
|
+
walletStandard: z.ZodOptional<z.ZodObject<{
|
|
139
|
+
features: z.ZodArray<z.ZodString, "many">;
|
|
140
|
+
name: z.ZodString;
|
|
141
|
+
}, "strip", z.ZodTypeAny, {
|
|
142
|
+
features: string[];
|
|
143
|
+
name: string;
|
|
144
|
+
}, {
|
|
145
|
+
features: string[];
|
|
146
|
+
name: string;
|
|
147
|
+
}>>;
|
|
120
148
|
windowLocations: z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodString, "many">>, string[] | undefined, string[] | undefined>;
|
|
121
149
|
}, "strip", z.ZodTypeAny, {
|
|
122
150
|
chain: string;
|
|
@@ -124,6 +152,10 @@ export declare const walletSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
124
152
|
value: boolean;
|
|
125
153
|
flag: string;
|
|
126
154
|
}[];
|
|
155
|
+
walletStandard?: {
|
|
156
|
+
features: string[];
|
|
157
|
+
name: string;
|
|
158
|
+
} | undefined;
|
|
127
159
|
windowLocations?: string[] | undefined;
|
|
128
160
|
}, {
|
|
129
161
|
chain: string;
|
|
@@ -131,6 +163,10 @@ export declare const walletSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
131
163
|
flag: string;
|
|
132
164
|
value?: boolean | undefined;
|
|
133
165
|
}[];
|
|
166
|
+
walletStandard?: {
|
|
167
|
+
features: string[];
|
|
168
|
+
name: string;
|
|
169
|
+
} | undefined;
|
|
134
170
|
windowLocations?: string[] | undefined;
|
|
135
171
|
}>, "many">>;
|
|
136
172
|
mobile: z.ZodEffects<z.ZodOptional<z.ZodObject<{
|
|
@@ -184,6 +220,7 @@ export declare const walletSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
184
220
|
} | undefined, {
|
|
185
221
|
sdks?: unknown;
|
|
186
222
|
} | undefined>;
|
|
223
|
+
walletStandardId: z.ZodOptional<z.ZodString>;
|
|
187
224
|
}, "strip", z.ZodTypeAny, {
|
|
188
225
|
name: string;
|
|
189
226
|
brand?: {
|
|
@@ -213,6 +250,10 @@ export declare const walletSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
213
250
|
value: boolean;
|
|
214
251
|
flag: string;
|
|
215
252
|
}[];
|
|
253
|
+
walletStandard?: {
|
|
254
|
+
features: string[];
|
|
255
|
+
name: string;
|
|
256
|
+
} | undefined;
|
|
216
257
|
windowLocations?: string[] | undefined;
|
|
217
258
|
}[] | undefined;
|
|
218
259
|
mobile?: {
|
|
@@ -229,6 +270,7 @@ export declare const walletSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
229
270
|
walletConnect?: {
|
|
230
271
|
sdks?: string[] | undefined;
|
|
231
272
|
} | undefined;
|
|
273
|
+
walletStandardId?: string | undefined;
|
|
232
274
|
}, {
|
|
233
275
|
name: string;
|
|
234
276
|
brand?: {
|
|
@@ -258,6 +300,10 @@ export declare const walletSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
258
300
|
flag: string;
|
|
259
301
|
value?: boolean | undefined;
|
|
260
302
|
}[];
|
|
303
|
+
walletStandard?: {
|
|
304
|
+
features: string[];
|
|
305
|
+
name: string;
|
|
306
|
+
} | undefined;
|
|
261
307
|
windowLocations?: string[] | undefined;
|
|
262
308
|
}[] | undefined;
|
|
263
309
|
mobile?: {
|
|
@@ -274,6 +320,7 @@ export declare const walletSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
274
320
|
walletConnect?: {
|
|
275
321
|
sdks?: unknown;
|
|
276
322
|
} | undefined;
|
|
323
|
+
walletStandardId?: string | undefined;
|
|
277
324
|
}>, {
|
|
278
325
|
name: string;
|
|
279
326
|
brand?: {
|
|
@@ -303,6 +350,10 @@ export declare const walletSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
303
350
|
value: boolean;
|
|
304
351
|
flag: string;
|
|
305
352
|
}[];
|
|
353
|
+
walletStandard?: {
|
|
354
|
+
features: string[];
|
|
355
|
+
name: string;
|
|
356
|
+
} | undefined;
|
|
306
357
|
windowLocations?: string[] | undefined;
|
|
307
358
|
}[] | undefined;
|
|
308
359
|
mobile?: {
|
|
@@ -319,6 +370,7 @@ export declare const walletSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
319
370
|
walletConnect?: {
|
|
320
371
|
sdks?: string[] | undefined;
|
|
321
372
|
} | undefined;
|
|
373
|
+
walletStandardId?: string | undefined;
|
|
322
374
|
}, unknown>, {
|
|
323
375
|
name: string;
|
|
324
376
|
brand?: {
|
|
@@ -348,6 +400,10 @@ export declare const walletSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
348
400
|
value: boolean;
|
|
349
401
|
flag: string;
|
|
350
402
|
}[];
|
|
403
|
+
walletStandard?: {
|
|
404
|
+
features: string[];
|
|
405
|
+
name: string;
|
|
406
|
+
} | undefined;
|
|
351
407
|
windowLocations?: string[] | undefined;
|
|
352
408
|
}[] | undefined;
|
|
353
409
|
mobile?: {
|
|
@@ -364,6 +420,7 @@ export declare const walletSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
364
420
|
walletConnect?: {
|
|
365
421
|
sdks?: string[] | undefined;
|
|
366
422
|
} | undefined;
|
|
423
|
+
walletStandardId?: string | undefined;
|
|
367
424
|
}, unknown>;
|
|
368
425
|
export type WalletSchema = z.infer<typeof walletSchema>;
|
|
369
426
|
export type WalletInjectedConfigSchema = z.infer<typeof injectedConfigSchema>;
|
|
@@ -14,6 +14,9 @@ const injectedConfigSchema = z.object({
|
|
|
14
14
|
flag: z.string(),
|
|
15
15
|
value: z.boolean().optional().default(true),
|
|
16
16
|
})),
|
|
17
|
+
walletStandard: z
|
|
18
|
+
.object({ features: z.array(z.string()), name: z.string() })
|
|
19
|
+
.optional(),
|
|
17
20
|
windowLocations: z
|
|
18
21
|
.array(z.string())
|
|
19
22
|
.optional()
|
|
@@ -88,6 +91,7 @@ const walletSchema = z
|
|
|
88
91
|
})
|
|
89
92
|
.optional()
|
|
90
93
|
.transform(filterEmptyObject),
|
|
94
|
+
walletStandardId: z.string().optional(),
|
|
91
95
|
}))
|
|
92
96
|
.transform((val) => {
|
|
93
97
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -166,6 +166,20 @@ var wallets = {
|
|
|
166
166
|
rdns: "com.coinbase"
|
|
167
167
|
},
|
|
168
168
|
group: "coinbase",
|
|
169
|
+
injectedConfig: [
|
|
170
|
+
{
|
|
171
|
+
chain: "evm",
|
|
172
|
+
extensionLocators: [
|
|
173
|
+
{
|
|
174
|
+
flag: "isCoinbaseWallet",
|
|
175
|
+
value: true
|
|
176
|
+
}
|
|
177
|
+
],
|
|
178
|
+
windowLocations: [
|
|
179
|
+
"coinbaseWalletExtension"
|
|
180
|
+
]
|
|
181
|
+
}
|
|
182
|
+
],
|
|
169
183
|
mobile: {
|
|
170
184
|
androidId: "org.toshi",
|
|
171
185
|
iosId: "id1278383455"
|
|
@@ -282,6 +296,20 @@ var wallets = {
|
|
|
282
296
|
chromeId: "egjidjbpglichdcondbcbdnbeeppgdph"
|
|
283
297
|
},
|
|
284
298
|
filterFromWalletConnect: true,
|
|
299
|
+
injectedConfig: [
|
|
300
|
+
{
|
|
301
|
+
chain: "evm",
|
|
302
|
+
extensionLocators: [
|
|
303
|
+
{
|
|
304
|
+
flag: "isTrustWallet",
|
|
305
|
+
value: true
|
|
306
|
+
}
|
|
307
|
+
],
|
|
308
|
+
windowLocations: [
|
|
309
|
+
"trustWallet"
|
|
310
|
+
]
|
|
311
|
+
}
|
|
312
|
+
],
|
|
285
313
|
mobile: {
|
|
286
314
|
androidId: "com.wallet.crypto.trustapp",
|
|
287
315
|
iosId: "id1288339409",
|
package/wallet-book-fallbacks.js
CHANGED
|
@@ -162,6 +162,20 @@ var wallets = {
|
|
|
162
162
|
rdns: "com.coinbase"
|
|
163
163
|
},
|
|
164
164
|
group: "coinbase",
|
|
165
|
+
injectedConfig: [
|
|
166
|
+
{
|
|
167
|
+
chain: "evm",
|
|
168
|
+
extensionLocators: [
|
|
169
|
+
{
|
|
170
|
+
flag: "isCoinbaseWallet",
|
|
171
|
+
value: true
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
windowLocations: [
|
|
175
|
+
"coinbaseWalletExtension"
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
],
|
|
165
179
|
mobile: {
|
|
166
180
|
androidId: "org.toshi",
|
|
167
181
|
iosId: "id1278383455"
|
|
@@ -278,6 +292,20 @@ var wallets = {
|
|
|
278
292
|
chromeId: "egjidjbpglichdcondbcbdnbeeppgdph"
|
|
279
293
|
},
|
|
280
294
|
filterFromWalletConnect: true,
|
|
295
|
+
injectedConfig: [
|
|
296
|
+
{
|
|
297
|
+
chain: "evm",
|
|
298
|
+
extensionLocators: [
|
|
299
|
+
{
|
|
300
|
+
flag: "isTrustWallet",
|
|
301
|
+
value: true
|
|
302
|
+
}
|
|
303
|
+
],
|
|
304
|
+
windowLocations: [
|
|
305
|
+
"trustWallet"
|
|
306
|
+
]
|
|
307
|
+
}
|
|
308
|
+
],
|
|
281
309
|
mobile: {
|
|
282
310
|
androidId: "com.wallet.crypto.trustapp",
|
|
283
311
|
iosId: "id1288339409",
|