@latticexyz/schema-type 2.0.0-next.14 → 2.0.0-next.16

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.
@@ -0,0 +1,650 @@
1
+ import { AbiType as AbiType$1, AbiTypeToPrimitiveType as AbiTypeToPrimitiveType$1 } from 'abitype';
2
+
3
+ declare enum SchemaType {
4
+ UINT8 = 0,
5
+ UINT16 = 1,
6
+ UINT24 = 2,
7
+ UINT32 = 3,
8
+ UINT40 = 4,
9
+ UINT48 = 5,
10
+ UINT56 = 6,
11
+ UINT64 = 7,
12
+ UINT72 = 8,
13
+ UINT80 = 9,
14
+ UINT88 = 10,
15
+ UINT96 = 11,
16
+ UINT104 = 12,
17
+ UINT112 = 13,
18
+ UINT120 = 14,
19
+ UINT128 = 15,
20
+ UINT136 = 16,
21
+ UINT144 = 17,
22
+ UINT152 = 18,
23
+ UINT160 = 19,
24
+ UINT168 = 20,
25
+ UINT176 = 21,
26
+ UINT184 = 22,
27
+ UINT192 = 23,
28
+ UINT200 = 24,
29
+ UINT208 = 25,
30
+ UINT216 = 26,
31
+ UINT224 = 27,
32
+ UINT232 = 28,
33
+ UINT240 = 29,
34
+ UINT248 = 30,
35
+ UINT256 = 31,
36
+ INT8 = 32,
37
+ INT16 = 33,
38
+ INT24 = 34,
39
+ INT32 = 35,
40
+ INT40 = 36,
41
+ INT48 = 37,
42
+ INT56 = 38,
43
+ INT64 = 39,
44
+ INT72 = 40,
45
+ INT80 = 41,
46
+ INT88 = 42,
47
+ INT96 = 43,
48
+ INT104 = 44,
49
+ INT112 = 45,
50
+ INT120 = 46,
51
+ INT128 = 47,
52
+ INT136 = 48,
53
+ INT144 = 49,
54
+ INT152 = 50,
55
+ INT160 = 51,
56
+ INT168 = 52,
57
+ INT176 = 53,
58
+ INT184 = 54,
59
+ INT192 = 55,
60
+ INT200 = 56,
61
+ INT208 = 57,
62
+ INT216 = 58,
63
+ INT224 = 59,
64
+ INT232 = 60,
65
+ INT240 = 61,
66
+ INT248 = 62,
67
+ INT256 = 63,
68
+ BYTES1 = 64,
69
+ BYTES2 = 65,
70
+ BYTES3 = 66,
71
+ BYTES4 = 67,
72
+ BYTES5 = 68,
73
+ BYTES6 = 69,
74
+ BYTES7 = 70,
75
+ BYTES8 = 71,
76
+ BYTES9 = 72,
77
+ BYTES10 = 73,
78
+ BYTES11 = 74,
79
+ BYTES12 = 75,
80
+ BYTES13 = 76,
81
+ BYTES14 = 77,
82
+ BYTES15 = 78,
83
+ BYTES16 = 79,
84
+ BYTES17 = 80,
85
+ BYTES18 = 81,
86
+ BYTES19 = 82,
87
+ BYTES20 = 83,
88
+ BYTES21 = 84,
89
+ BYTES22 = 85,
90
+ BYTES23 = 86,
91
+ BYTES24 = 87,
92
+ BYTES25 = 88,
93
+ BYTES26 = 89,
94
+ BYTES27 = 90,
95
+ BYTES28 = 91,
96
+ BYTES29 = 92,
97
+ BYTES30 = 93,
98
+ BYTES31 = 94,
99
+ BYTES32 = 95,
100
+ BOOL = 96,
101
+ ADDRESS = 97,
102
+ UINT8_ARRAY = 98,
103
+ UINT16_ARRAY = 99,
104
+ UINT24_ARRAY = 100,
105
+ UINT32_ARRAY = 101,
106
+ UINT40_ARRAY = 102,
107
+ UINT48_ARRAY = 103,
108
+ UINT56_ARRAY = 104,
109
+ UINT64_ARRAY = 105,
110
+ UINT72_ARRAY = 106,
111
+ UINT80_ARRAY = 107,
112
+ UINT88_ARRAY = 108,
113
+ UINT96_ARRAY = 109,
114
+ UINT104_ARRAY = 110,
115
+ UINT112_ARRAY = 111,
116
+ UINT120_ARRAY = 112,
117
+ UINT128_ARRAY = 113,
118
+ UINT136_ARRAY = 114,
119
+ UINT144_ARRAY = 115,
120
+ UINT152_ARRAY = 116,
121
+ UINT160_ARRAY = 117,
122
+ UINT168_ARRAY = 118,
123
+ UINT176_ARRAY = 119,
124
+ UINT184_ARRAY = 120,
125
+ UINT192_ARRAY = 121,
126
+ UINT200_ARRAY = 122,
127
+ UINT208_ARRAY = 123,
128
+ UINT216_ARRAY = 124,
129
+ UINT224_ARRAY = 125,
130
+ UINT232_ARRAY = 126,
131
+ UINT240_ARRAY = 127,
132
+ UINT248_ARRAY = 128,
133
+ UINT256_ARRAY = 129,
134
+ INT8_ARRAY = 130,
135
+ INT16_ARRAY = 131,
136
+ INT24_ARRAY = 132,
137
+ INT32_ARRAY = 133,
138
+ INT40_ARRAY = 134,
139
+ INT48_ARRAY = 135,
140
+ INT56_ARRAY = 136,
141
+ INT64_ARRAY = 137,
142
+ INT72_ARRAY = 138,
143
+ INT80_ARRAY = 139,
144
+ INT88_ARRAY = 140,
145
+ INT96_ARRAY = 141,
146
+ INT104_ARRAY = 142,
147
+ INT112_ARRAY = 143,
148
+ INT120_ARRAY = 144,
149
+ INT128_ARRAY = 145,
150
+ INT136_ARRAY = 146,
151
+ INT144_ARRAY = 147,
152
+ INT152_ARRAY = 148,
153
+ INT160_ARRAY = 149,
154
+ INT168_ARRAY = 150,
155
+ INT176_ARRAY = 151,
156
+ INT184_ARRAY = 152,
157
+ INT192_ARRAY = 153,
158
+ INT200_ARRAY = 154,
159
+ INT208_ARRAY = 155,
160
+ INT216_ARRAY = 156,
161
+ INT224_ARRAY = 157,
162
+ INT232_ARRAY = 158,
163
+ INT240_ARRAY = 159,
164
+ INT248_ARRAY = 160,
165
+ INT256_ARRAY = 161,
166
+ BYTES1_ARRAY = 162,
167
+ BYTES2_ARRAY = 163,
168
+ BYTES3_ARRAY = 164,
169
+ BYTES4_ARRAY = 165,
170
+ BYTES5_ARRAY = 166,
171
+ BYTES6_ARRAY = 167,
172
+ BYTES7_ARRAY = 168,
173
+ BYTES8_ARRAY = 169,
174
+ BYTES9_ARRAY = 170,
175
+ BYTES10_ARRAY = 171,
176
+ BYTES11_ARRAY = 172,
177
+ BYTES12_ARRAY = 173,
178
+ BYTES13_ARRAY = 174,
179
+ BYTES14_ARRAY = 175,
180
+ BYTES15_ARRAY = 176,
181
+ BYTES16_ARRAY = 177,
182
+ BYTES17_ARRAY = 178,
183
+ BYTES18_ARRAY = 179,
184
+ BYTES19_ARRAY = 180,
185
+ BYTES20_ARRAY = 181,
186
+ BYTES21_ARRAY = 182,
187
+ BYTES22_ARRAY = 183,
188
+ BYTES23_ARRAY = 184,
189
+ BYTES24_ARRAY = 185,
190
+ BYTES25_ARRAY = 186,
191
+ BYTES26_ARRAY = 187,
192
+ BYTES27_ARRAY = 188,
193
+ BYTES28_ARRAY = 189,
194
+ BYTES29_ARRAY = 190,
195
+ BYTES30_ARRAY = 191,
196
+ BYTES31_ARRAY = 192,
197
+ BYTES32_ARRAY = 193,
198
+ BOOL_ARRAY = 194,
199
+ ADDRESS_ARRAY = 195,
200
+ BYTES = 196,
201
+ STRING = 197
202
+ }
203
+
204
+ declare const SchemaTypeToAbiType: {
205
+ readonly 0: "uint8";
206
+ readonly 1: "uint16";
207
+ readonly 2: "uint24";
208
+ readonly 3: "uint32";
209
+ readonly 4: "uint40";
210
+ readonly 5: "uint48";
211
+ readonly 6: "uint56";
212
+ readonly 7: "uint64";
213
+ readonly 8: "uint72";
214
+ readonly 9: "uint80";
215
+ readonly 10: "uint88";
216
+ readonly 11: "uint96";
217
+ readonly 12: "uint104";
218
+ readonly 13: "uint112";
219
+ readonly 14: "uint120";
220
+ readonly 15: "uint128";
221
+ readonly 16: "uint136";
222
+ readonly 17: "uint144";
223
+ readonly 18: "uint152";
224
+ readonly 19: "uint160";
225
+ readonly 20: "uint168";
226
+ readonly 21: "uint176";
227
+ readonly 22: "uint184";
228
+ readonly 23: "uint192";
229
+ readonly 24: "uint200";
230
+ readonly 25: "uint208";
231
+ readonly 26: "uint216";
232
+ readonly 27: "uint224";
233
+ readonly 28: "uint232";
234
+ readonly 29: "uint240";
235
+ readonly 30: "uint248";
236
+ readonly 31: "uint256";
237
+ readonly 32: "int8";
238
+ readonly 33: "int16";
239
+ readonly 34: "int24";
240
+ readonly 35: "int32";
241
+ readonly 36: "int40";
242
+ readonly 37: "int48";
243
+ readonly 38: "int56";
244
+ readonly 39: "int64";
245
+ readonly 40: "int72";
246
+ readonly 41: "int80";
247
+ readonly 42: "int88";
248
+ readonly 43: "int96";
249
+ readonly 44: "int104";
250
+ readonly 45: "int112";
251
+ readonly 46: "int120";
252
+ readonly 47: "int128";
253
+ readonly 48: "int136";
254
+ readonly 49: "int144";
255
+ readonly 50: "int152";
256
+ readonly 51: "int160";
257
+ readonly 52: "int168";
258
+ readonly 53: "int176";
259
+ readonly 54: "int184";
260
+ readonly 55: "int192";
261
+ readonly 56: "int200";
262
+ readonly 57: "int208";
263
+ readonly 58: "int216";
264
+ readonly 59: "int224";
265
+ readonly 60: "int232";
266
+ readonly 61: "int240";
267
+ readonly 62: "int248";
268
+ readonly 63: "int256";
269
+ readonly 64: "bytes1";
270
+ readonly 65: "bytes2";
271
+ readonly 66: "bytes3";
272
+ readonly 67: "bytes4";
273
+ readonly 68: "bytes5";
274
+ readonly 69: "bytes6";
275
+ readonly 70: "bytes7";
276
+ readonly 71: "bytes8";
277
+ readonly 72: "bytes9";
278
+ readonly 73: "bytes10";
279
+ readonly 74: "bytes11";
280
+ readonly 75: "bytes12";
281
+ readonly 76: "bytes13";
282
+ readonly 77: "bytes14";
283
+ readonly 78: "bytes15";
284
+ readonly 79: "bytes16";
285
+ readonly 80: "bytes17";
286
+ readonly 81: "bytes18";
287
+ readonly 82: "bytes19";
288
+ readonly 83: "bytes20";
289
+ readonly 84: "bytes21";
290
+ readonly 85: "bytes22";
291
+ readonly 86: "bytes23";
292
+ readonly 87: "bytes24";
293
+ readonly 88: "bytes25";
294
+ readonly 89: "bytes26";
295
+ readonly 90: "bytes27";
296
+ readonly 91: "bytes28";
297
+ readonly 92: "bytes29";
298
+ readonly 93: "bytes30";
299
+ readonly 94: "bytes31";
300
+ readonly 95: "bytes32";
301
+ readonly 96: "bool";
302
+ readonly 97: "address";
303
+ readonly 98: "uint8[]";
304
+ readonly 99: "uint16[]";
305
+ readonly 100: "uint24[]";
306
+ readonly 101: "uint32[]";
307
+ readonly 102: "uint40[]";
308
+ readonly 103: "uint48[]";
309
+ readonly 104: "uint56[]";
310
+ readonly 105: "uint64[]";
311
+ readonly 106: "uint72[]";
312
+ readonly 107: "uint80[]";
313
+ readonly 108: "uint88[]";
314
+ readonly 109: "uint96[]";
315
+ readonly 110: "uint104[]";
316
+ readonly 111: "uint112[]";
317
+ readonly 112: "uint120[]";
318
+ readonly 113: "uint128[]";
319
+ readonly 114: "uint136[]";
320
+ readonly 115: "uint144[]";
321
+ readonly 116: "uint152[]";
322
+ readonly 117: "uint160[]";
323
+ readonly 118: "uint168[]";
324
+ readonly 119: "uint176[]";
325
+ readonly 120: "uint184[]";
326
+ readonly 121: "uint192[]";
327
+ readonly 122: "uint200[]";
328
+ readonly 123: "uint208[]";
329
+ readonly 124: "uint216[]";
330
+ readonly 125: "uint224[]";
331
+ readonly 126: "uint232[]";
332
+ readonly 127: "uint240[]";
333
+ readonly 128: "uint248[]";
334
+ readonly 129: "uint256[]";
335
+ readonly 130: "int8[]";
336
+ readonly 131: "int16[]";
337
+ readonly 132: "int24[]";
338
+ readonly 133: "int32[]";
339
+ readonly 134: "int40[]";
340
+ readonly 135: "int48[]";
341
+ readonly 136: "int56[]";
342
+ readonly 137: "int64[]";
343
+ readonly 138: "int72[]";
344
+ readonly 139: "int80[]";
345
+ readonly 140: "int88[]";
346
+ readonly 141: "int96[]";
347
+ readonly 142: "int104[]";
348
+ readonly 143: "int112[]";
349
+ readonly 144: "int120[]";
350
+ readonly 145: "int128[]";
351
+ readonly 146: "int136[]";
352
+ readonly 147: "int144[]";
353
+ readonly 148: "int152[]";
354
+ readonly 149: "int160[]";
355
+ readonly 150: "int168[]";
356
+ readonly 151: "int176[]";
357
+ readonly 152: "int184[]";
358
+ readonly 153: "int192[]";
359
+ readonly 154: "int200[]";
360
+ readonly 155: "int208[]";
361
+ readonly 156: "int216[]";
362
+ readonly 157: "int224[]";
363
+ readonly 158: "int232[]";
364
+ readonly 159: "int240[]";
365
+ readonly 160: "int248[]";
366
+ readonly 161: "int256[]";
367
+ readonly 162: "bytes1[]";
368
+ readonly 163: "bytes2[]";
369
+ readonly 164: "bytes3[]";
370
+ readonly 165: "bytes4[]";
371
+ readonly 166: "bytes5[]";
372
+ readonly 167: "bytes6[]";
373
+ readonly 168: "bytes7[]";
374
+ readonly 169: "bytes8[]";
375
+ readonly 170: "bytes9[]";
376
+ readonly 171: "bytes10[]";
377
+ readonly 172: "bytes11[]";
378
+ readonly 173: "bytes12[]";
379
+ readonly 174: "bytes13[]";
380
+ readonly 175: "bytes14[]";
381
+ readonly 176: "bytes15[]";
382
+ readonly 177: "bytes16[]";
383
+ readonly 178: "bytes17[]";
384
+ readonly 179: "bytes18[]";
385
+ readonly 180: "bytes19[]";
386
+ readonly 181: "bytes20[]";
387
+ readonly 182: "bytes21[]";
388
+ readonly 183: "bytes22[]";
389
+ readonly 184: "bytes23[]";
390
+ readonly 185: "bytes24[]";
391
+ readonly 186: "bytes25[]";
392
+ readonly 187: "bytes26[]";
393
+ readonly 188: "bytes27[]";
394
+ readonly 189: "bytes28[]";
395
+ readonly 190: "bytes29[]";
396
+ readonly 191: "bytes30[]";
397
+ readonly 192: "bytes31[]";
398
+ readonly 193: "bytes32[]";
399
+ readonly 194: "bool[]";
400
+ readonly 195: "address[]";
401
+ readonly 196: "bytes";
402
+ readonly 197: "string";
403
+ };
404
+
405
+ type AbiType = (typeof SchemaTypeToAbiType)[SchemaType];
406
+ declare const AbiTypes: ("string" | "uint8" | "uint16" | "uint24" | "uint32" | "uint40" | "uint48" | "uint56" | "uint64" | "uint72" | "uint80" | "uint88" | "uint96" | "uint104" | "uint112" | "uint120" | "uint128" | "uint136" | "uint144" | "uint152" | "uint160" | "uint168" | "uint176" | "uint184" | "uint192" | "uint200" | "uint208" | "uint216" | "uint224" | "uint232" | "uint240" | "uint248" | "uint256" | "int8" | "int16" | "int24" | "int32" | "int40" | "int48" | "int56" | "int64" | "int72" | "int80" | "int88" | "int96" | "int104" | "int112" | "int120" | "int128" | "int136" | "int144" | "int152" | "int160" | "int168" | "int176" | "int184" | "int192" | "int200" | "int208" | "int216" | "int224" | "int232" | "int240" | "int248" | "int256" | "bytes1" | "bytes2" | "bytes3" | "bytes4" | "bytes5" | "bytes6" | "bytes7" | "bytes8" | "bytes9" | "bytes10" | "bytes11" | "bytes12" | "bytes13" | "bytes14" | "bytes15" | "bytes16" | "bytes17" | "bytes18" | "bytes19" | "bytes20" | "bytes21" | "bytes22" | "bytes23" | "bytes24" | "bytes25" | "bytes26" | "bytes27" | "bytes28" | "bytes29" | "bytes30" | "bytes31" | "bytes32" | "bool" | "address" | "uint8[]" | "uint16[]" | "uint24[]" | "uint32[]" | "uint40[]" | "uint48[]" | "uint56[]" | "uint64[]" | "uint72[]" | "uint80[]" | "uint88[]" | "uint96[]" | "uint104[]" | "uint112[]" | "uint120[]" | "uint128[]" | "uint136[]" | "uint144[]" | "uint152[]" | "uint160[]" | "uint168[]" | "uint176[]" | "uint184[]" | "uint192[]" | "uint200[]" | "uint208[]" | "uint216[]" | "uint224[]" | "uint232[]" | "uint240[]" | "uint248[]" | "uint256[]" | "int8[]" | "int16[]" | "int24[]" | "int32[]" | "int40[]" | "int48[]" | "int56[]" | "int64[]" | "int72[]" | "int80[]" | "int88[]" | "int96[]" | "int104[]" | "int112[]" | "int120[]" | "int128[]" | "int136[]" | "int144[]" | "int152[]" | "int160[]" | "int168[]" | "int176[]" | "int184[]" | "int192[]" | "int200[]" | "int208[]" | "int216[]" | "int224[]" | "int232[]" | "int240[]" | "int248[]" | "int256[]" | "bytes1[]" | "bytes2[]" | "bytes3[]" | "bytes4[]" | "bytes5[]" | "bytes6[]" | "bytes7[]" | "bytes8[]" | "bytes9[]" | "bytes10[]" | "bytes11[]" | "bytes12[]" | "bytes13[]" | "bytes14[]" | "bytes15[]" | "bytes16[]" | "bytes17[]" | "bytes18[]" | "bytes19[]" | "bytes20[]" | "bytes21[]" | "bytes22[]" | "bytes23[]" | "bytes24[]" | "bytes25[]" | "bytes26[]" | "bytes27[]" | "bytes28[]" | "bytes29[]" | "bytes30[]" | "bytes31[]" | "bytes32[]" | "bool[]" | "address[]" | "bytes")[];
407
+
408
+ type ArraySchemaType = SchemaType.UINT8_ARRAY | SchemaType.UINT16_ARRAY | SchemaType.UINT24_ARRAY | SchemaType.UINT32_ARRAY | SchemaType.UINT40_ARRAY | SchemaType.UINT48_ARRAY | SchemaType.UINT56_ARRAY | SchemaType.UINT64_ARRAY | SchemaType.UINT72_ARRAY | SchemaType.UINT80_ARRAY | SchemaType.UINT88_ARRAY | SchemaType.UINT96_ARRAY | SchemaType.UINT104_ARRAY | SchemaType.UINT112_ARRAY | SchemaType.UINT120_ARRAY | SchemaType.UINT128_ARRAY | SchemaType.UINT136_ARRAY | SchemaType.UINT144_ARRAY | SchemaType.UINT152_ARRAY | SchemaType.UINT160_ARRAY | SchemaType.UINT168_ARRAY | SchemaType.UINT176_ARRAY | SchemaType.UINT184_ARRAY | SchemaType.UINT192_ARRAY | SchemaType.UINT200_ARRAY | SchemaType.UINT208_ARRAY | SchemaType.UINT216_ARRAY | SchemaType.UINT224_ARRAY | SchemaType.UINT232_ARRAY | SchemaType.UINT240_ARRAY | SchemaType.UINT248_ARRAY | SchemaType.UINT256_ARRAY | SchemaType.INT8_ARRAY | SchemaType.INT16_ARRAY | SchemaType.INT24_ARRAY | SchemaType.INT32_ARRAY | SchemaType.INT40_ARRAY | SchemaType.INT48_ARRAY | SchemaType.INT56_ARRAY | SchemaType.INT64_ARRAY | SchemaType.INT72_ARRAY | SchemaType.INT80_ARRAY | SchemaType.INT88_ARRAY | SchemaType.INT96_ARRAY | SchemaType.INT104_ARRAY | SchemaType.INT112_ARRAY | SchemaType.INT120_ARRAY | SchemaType.INT128_ARRAY | SchemaType.INT136_ARRAY | SchemaType.INT144_ARRAY | SchemaType.INT152_ARRAY | SchemaType.INT160_ARRAY | SchemaType.INT168_ARRAY | SchemaType.INT176_ARRAY | SchemaType.INT184_ARRAY | SchemaType.INT192_ARRAY | SchemaType.INT200_ARRAY | SchemaType.INT208_ARRAY | SchemaType.INT216_ARRAY | SchemaType.INT224_ARRAY | SchemaType.INT232_ARRAY | SchemaType.INT240_ARRAY | SchemaType.INT248_ARRAY | SchemaType.INT256_ARRAY | SchemaType.BYTES1_ARRAY | SchemaType.BYTES2_ARRAY | SchemaType.BYTES3_ARRAY | SchemaType.BYTES4_ARRAY | SchemaType.BYTES5_ARRAY | SchemaType.BYTES6_ARRAY | SchemaType.BYTES7_ARRAY | SchemaType.BYTES8_ARRAY | SchemaType.BYTES9_ARRAY | SchemaType.BYTES10_ARRAY | SchemaType.BYTES11_ARRAY | SchemaType.BYTES12_ARRAY | SchemaType.BYTES13_ARRAY | SchemaType.BYTES14_ARRAY | SchemaType.BYTES15_ARRAY | SchemaType.BYTES16_ARRAY | SchemaType.BYTES17_ARRAY | SchemaType.BYTES18_ARRAY | SchemaType.BYTES19_ARRAY | SchemaType.BYTES20_ARRAY | SchemaType.BYTES21_ARRAY | SchemaType.BYTES22_ARRAY | SchemaType.BYTES23_ARRAY | SchemaType.BYTES24_ARRAY | SchemaType.BYTES25_ARRAY | SchemaType.BYTES26_ARRAY | SchemaType.BYTES27_ARRAY | SchemaType.BYTES28_ARRAY | SchemaType.BYTES29_ARRAY | SchemaType.BYTES30_ARRAY | SchemaType.BYTES31_ARRAY | SchemaType.BYTES32_ARRAY | SchemaType.BOOL_ARRAY | SchemaType.ADDRESS_ARRAY;
409
+
410
+ type DynamicSchemaType = ArraySchemaType | SchemaType.BYTES | SchemaType.STRING;
411
+
412
+ type StaticSchemaType = Exclude<SchemaType, DynamicSchemaType>;
413
+
414
+ type StaticAbiType = (typeof SchemaTypeToAbiType)[StaticSchemaType];
415
+ declare const StaticAbiTypes: StaticAbiType[];
416
+
417
+ type StaticArray = `${StaticAbiType}[${number}]`;
418
+
419
+ declare const AbiTypeToSchemaType: {
420
+ [k: string]: SchemaType;
421
+ };
422
+
423
+ declare const SchemaTypeArrayToElement: {
424
+ 0: never;
425
+ 1: never;
426
+ 2: never;
427
+ 3: never;
428
+ 4: never;
429
+ 5: never;
430
+ 6: never;
431
+ 7: never;
432
+ 8: never;
433
+ 9: never;
434
+ 10: never;
435
+ 11: never;
436
+ 12: never;
437
+ 13: never;
438
+ 14: never;
439
+ 15: never;
440
+ 16: never;
441
+ 17: never;
442
+ 18: never;
443
+ 19: never;
444
+ 20: never;
445
+ 21: never;
446
+ 22: never;
447
+ 23: never;
448
+ 24: never;
449
+ 25: never;
450
+ 26: never;
451
+ 27: never;
452
+ 28: never;
453
+ 29: never;
454
+ 30: never;
455
+ 31: never;
456
+ 32: never;
457
+ 33: never;
458
+ 34: never;
459
+ 35: never;
460
+ 36: never;
461
+ 37: never;
462
+ 38: never;
463
+ 39: never;
464
+ 40: never;
465
+ 41: never;
466
+ 42: never;
467
+ 43: never;
468
+ 44: never;
469
+ 45: never;
470
+ 46: never;
471
+ 47: never;
472
+ 48: never;
473
+ 49: never;
474
+ 50: never;
475
+ 51: never;
476
+ 52: never;
477
+ 53: never;
478
+ 54: never;
479
+ 55: never;
480
+ 56: never;
481
+ 57: never;
482
+ 58: never;
483
+ 59: never;
484
+ 60: never;
485
+ 61: never;
486
+ 62: never;
487
+ 63: never;
488
+ 64: never;
489
+ 65: never;
490
+ 66: never;
491
+ 67: never;
492
+ 68: never;
493
+ 69: never;
494
+ 70: never;
495
+ 71: never;
496
+ 72: never;
497
+ 73: never;
498
+ 74: never;
499
+ 75: never;
500
+ 76: never;
501
+ 77: never;
502
+ 78: never;
503
+ 79: never;
504
+ 80: never;
505
+ 81: never;
506
+ 82: never;
507
+ 83: never;
508
+ 84: never;
509
+ 85: never;
510
+ 86: never;
511
+ 87: never;
512
+ 88: never;
513
+ 89: never;
514
+ 90: never;
515
+ 91: never;
516
+ 92: never;
517
+ 93: never;
518
+ 94: never;
519
+ 95: never;
520
+ 96: never;
521
+ 97: never;
522
+ 98: StaticSchemaType;
523
+ 99: StaticSchemaType;
524
+ 100: StaticSchemaType;
525
+ 101: StaticSchemaType;
526
+ 102: StaticSchemaType;
527
+ 103: StaticSchemaType;
528
+ 104: StaticSchemaType;
529
+ 105: StaticSchemaType;
530
+ 106: StaticSchemaType;
531
+ 107: StaticSchemaType;
532
+ 108: StaticSchemaType;
533
+ 109: StaticSchemaType;
534
+ 110: StaticSchemaType;
535
+ 111: StaticSchemaType;
536
+ 112: StaticSchemaType;
537
+ 113: StaticSchemaType;
538
+ 114: StaticSchemaType;
539
+ 115: StaticSchemaType;
540
+ 116: StaticSchemaType;
541
+ 117: StaticSchemaType;
542
+ 118: StaticSchemaType;
543
+ 119: StaticSchemaType;
544
+ 120: StaticSchemaType;
545
+ 121: StaticSchemaType;
546
+ 122: StaticSchemaType;
547
+ 123: StaticSchemaType;
548
+ 124: StaticSchemaType;
549
+ 125: StaticSchemaType;
550
+ 126: StaticSchemaType;
551
+ 127: StaticSchemaType;
552
+ 128: StaticSchemaType;
553
+ 129: StaticSchemaType;
554
+ 130: StaticSchemaType;
555
+ 131: StaticSchemaType;
556
+ 132: StaticSchemaType;
557
+ 133: StaticSchemaType;
558
+ 134: StaticSchemaType;
559
+ 135: StaticSchemaType;
560
+ 136: StaticSchemaType;
561
+ 137: StaticSchemaType;
562
+ 138: StaticSchemaType;
563
+ 139: StaticSchemaType;
564
+ 140: StaticSchemaType;
565
+ 141: StaticSchemaType;
566
+ 142: StaticSchemaType;
567
+ 143: StaticSchemaType;
568
+ 144: StaticSchemaType;
569
+ 145: StaticSchemaType;
570
+ 146: StaticSchemaType;
571
+ 147: StaticSchemaType;
572
+ 148: StaticSchemaType;
573
+ 149: StaticSchemaType;
574
+ 150: StaticSchemaType;
575
+ 151: StaticSchemaType;
576
+ 152: StaticSchemaType;
577
+ 153: StaticSchemaType;
578
+ 154: StaticSchemaType;
579
+ 155: StaticSchemaType;
580
+ 156: StaticSchemaType;
581
+ 157: StaticSchemaType;
582
+ 158: StaticSchemaType;
583
+ 159: StaticSchemaType;
584
+ 160: StaticSchemaType;
585
+ 161: StaticSchemaType;
586
+ 162: StaticSchemaType;
587
+ 163: StaticSchemaType;
588
+ 164: StaticSchemaType;
589
+ 165: StaticSchemaType;
590
+ 166: StaticSchemaType;
591
+ 167: StaticSchemaType;
592
+ 168: StaticSchemaType;
593
+ 169: StaticSchemaType;
594
+ 170: StaticSchemaType;
595
+ 171: StaticSchemaType;
596
+ 172: StaticSchemaType;
597
+ 173: StaticSchemaType;
598
+ 174: StaticSchemaType;
599
+ 175: StaticSchemaType;
600
+ 176: StaticSchemaType;
601
+ 177: StaticSchemaType;
602
+ 178: StaticSchemaType;
603
+ 179: StaticSchemaType;
604
+ 180: StaticSchemaType;
605
+ 181: StaticSchemaType;
606
+ 182: StaticSchemaType;
607
+ 183: StaticSchemaType;
608
+ 184: StaticSchemaType;
609
+ 185: StaticSchemaType;
610
+ 186: StaticSchemaType;
611
+ 187: StaticSchemaType;
612
+ 188: StaticSchemaType;
613
+ 189: StaticSchemaType;
614
+ 190: StaticSchemaType;
615
+ 191: StaticSchemaType;
616
+ 192: StaticSchemaType;
617
+ 193: StaticSchemaType;
618
+ 194: StaticSchemaType;
619
+ 195: StaticSchemaType;
620
+ 196: never;
621
+ 197: never;
622
+ };
623
+
624
+ /**
625
+ * Like abitype's AbiTypeToPrimitiveType but adding support for arrays and using strings as input
626
+ */
627
+ type AbiTypeToPrimitiveType<T extends string> = T extends `${infer StaticAbiType}[${string}]` ? StaticAbiType extends AbiType$1 ? AbiTypeToPrimitiveType$1<StaticAbiType>[] : never : T extends AbiType$1 ? AbiTypeToPrimitiveType$1<T> : never;
628
+
629
+ type SchemaTypeToPrimitiveType<S extends SchemaType> = SchemaTypeToPrimitiveTypeLookup[S];
630
+ type SchemaTypeToPrimitiveTypeLookup = {
631
+ [SchemaType in keyof typeof SchemaTypeToAbiType]: AbiTypeToPrimitiveType<(typeof SchemaTypeToAbiType)[SchemaType]>;
632
+ };
633
+
634
+ /**
635
+ * Encode a table schema into a bytes32 hex string
636
+ * Port of `Schema.sol` from `@latticexyz/store`
637
+ * @param schema The schema to encode SchemaType[]
638
+ * @returns The encoded schema as a 32 byte hex string
639
+ * @deprecated use `schemaToHex` from `protocol-parser` instead
640
+ */
641
+ declare function encodeSchema(schema: SchemaType[]): Uint8Array;
642
+
643
+ declare function getStaticByteLength(schemaType: SchemaType): number;
644
+
645
+ /**
646
+ * Return a value corresponding to the Solidity default value for a given abi type
647
+ */
648
+ declare function getAbiTypeDefaultValue<T extends string>(abiType: T): AbiTypeToPrimitiveType<T>;
649
+
650
+ export { AbiType, AbiTypeToPrimitiveType, AbiTypeToSchemaType, AbiTypes, ArraySchemaType, DynamicSchemaType, SchemaType, SchemaTypeArrayToElement, SchemaTypeToAbiType, SchemaTypeToPrimitiveType, StaticAbiType, StaticAbiTypes, StaticArray, StaticSchemaType, encodeSchema, getAbiTypeDefaultValue, getStaticByteLength };
@@ -0,0 +1,530 @@
1
+ import { Hex } from 'viem';
2
+
3
+ declare const schemaAbiTypes: readonly ["uint8", "uint16", "uint24", "uint32", "uint40", "uint48", "uint56", "uint64", "uint72", "uint80", "uint88", "uint96", "uint104", "uint112", "uint120", "uint128", "uint136", "uint144", "uint152", "uint160", "uint168", "uint176", "uint184", "uint192", "uint200", "uint208", "uint216", "uint224", "uint232", "uint240", "uint248", "uint256", "int8", "int16", "int24", "int32", "int40", "int48", "int56", "int64", "int72", "int80", "int88", "int96", "int104", "int112", "int120", "int128", "int136", "int144", "int152", "int160", "int168", "int176", "int184", "int192", "int200", "int208", "int216", "int224", "int232", "int240", "int248", "int256", "bytes1", "bytes2", "bytes3", "bytes4", "bytes5", "bytes6", "bytes7", "bytes8", "bytes9", "bytes10", "bytes11", "bytes12", "bytes13", "bytes14", "bytes15", "bytes16", "bytes17", "bytes18", "bytes19", "bytes20", "bytes21", "bytes22", "bytes23", "bytes24", "bytes25", "bytes26", "bytes27", "bytes28", "bytes29", "bytes30", "bytes31", "bytes32", "bool", "address", "uint8[]", "uint16[]", "uint24[]", "uint32[]", "uint40[]", "uint48[]", "uint56[]", "uint64[]", "uint72[]", "uint80[]", "uint88[]", "uint96[]", "uint104[]", "uint112[]", "uint120[]", "uint128[]", "uint136[]", "uint144[]", "uint152[]", "uint160[]", "uint168[]", "uint176[]", "uint184[]", "uint192[]", "uint200[]", "uint208[]", "uint216[]", "uint224[]", "uint232[]", "uint240[]", "uint248[]", "uint256[]", "int8[]", "int16[]", "int24[]", "int32[]", "int40[]", "int48[]", "int56[]", "int64[]", "int72[]", "int80[]", "int88[]", "int96[]", "int104[]", "int112[]", "int120[]", "int128[]", "int136[]", "int144[]", "int152[]", "int160[]", "int168[]", "int176[]", "int184[]", "int192[]", "int200[]", "int208[]", "int216[]", "int224[]", "int232[]", "int240[]", "int248[]", "int256[]", "bytes1[]", "bytes2[]", "bytes3[]", "bytes4[]", "bytes5[]", "bytes6[]", "bytes7[]", "bytes8[]", "bytes9[]", "bytes10[]", "bytes11[]", "bytes12[]", "bytes13[]", "bytes14[]", "bytes15[]", "bytes16[]", "bytes17[]", "bytes18[]", "bytes19[]", "bytes20[]", "bytes21[]", "bytes22[]", "bytes23[]", "bytes24[]", "bytes25[]", "bytes26[]", "bytes27[]", "bytes28[]", "bytes29[]", "bytes30[]", "bytes31[]", "bytes32[]", "bool[]", "address[]", "bytes", "string"];
4
+ type SchemaAbiType = (typeof schemaAbiTypes)[number];
5
+ declare const staticAbiTypes: readonly ["uint8", "uint16", "uint24", "uint32", "uint40", "uint48", "uint56", "uint64", "uint72", "uint80", "uint88", "uint96", "uint104", "uint112", "uint120", "uint128", "uint136", "uint144", "uint152", "uint160", "uint168", "uint176", "uint184", "uint192", "uint200", "uint208", "uint216", "uint224", "uint232", "uint240", "uint248", "uint256", "int8", "int16", "int24", "int32", "int40", "int48", "int56", "int64", "int72", "int80", "int88", "int96", "int104", "int112", "int120", "int128", "int136", "int144", "int152", "int160", "int168", "int176", "int184", "int192", "int200", "int208", "int216", "int224", "int232", "int240", "int248", "int256", "bytes1", "bytes2", "bytes3", "bytes4", "bytes5", "bytes6", "bytes7", "bytes8", "bytes9", "bytes10", "bytes11", "bytes12", "bytes13", "bytes14", "bytes15", "bytes16", "bytes17", "bytes18", "bytes19", "bytes20", "bytes21", "bytes22", "bytes23", "bytes24", "bytes25", "bytes26", "bytes27", "bytes28", "bytes29", "bytes30", "bytes31", "bytes32", "bool", "address"];
6
+ declare const dynamicAbiTypes: readonly ["uint8[]", "uint16[]", "uint24[]", "uint32[]", "uint40[]", "uint48[]", "uint56[]", "uint64[]", "uint72[]", "uint80[]", "uint88[]", "uint96[]", "uint104[]", "uint112[]", "uint120[]", "uint128[]", "uint136[]", "uint144[]", "uint152[]", "uint160[]", "uint168[]", "uint176[]", "uint184[]", "uint192[]", "uint200[]", "uint208[]", "uint216[]", "uint224[]", "uint232[]", "uint240[]", "uint248[]", "uint256[]", "int8[]", "int16[]", "int24[]", "int32[]", "int40[]", "int48[]", "int56[]", "int64[]", "int72[]", "int80[]", "int88[]", "int96[]", "int104[]", "int112[]", "int120[]", "int128[]", "int136[]", "int144[]", "int152[]", "int160[]", "int168[]", "int176[]", "int184[]", "int192[]", "int200[]", "int208[]", "int216[]", "int224[]", "int232[]", "int240[]", "int248[]", "int256[]", "bytes1[]", "bytes2[]", "bytes3[]", "bytes4[]", "bytes5[]", "bytes6[]", "bytes7[]", "bytes8[]", "bytes9[]", "bytes10[]", "bytes11[]", "bytes12[]", "bytes13[]", "bytes14[]", "bytes15[]", "bytes16[]", "bytes17[]", "bytes18[]", "bytes19[]", "bytes20[]", "bytes21[]", "bytes22[]", "bytes23[]", "bytes24[]", "bytes25[]", "bytes26[]", "bytes27[]", "bytes28[]", "bytes29[]", "bytes30[]", "bytes31[]", "bytes32[]", "bool[]", "address[]", "bytes", "string"];
7
+ type StaticAbiType = (typeof staticAbiTypes)[number];
8
+ type DynamicAbiType = (typeof dynamicAbiTypes)[number];
9
+ declare function isSchemaAbiType(abiType: unknown): abiType is SchemaAbiType;
10
+
11
+ type ArrayAbiTypeToStaticAbiType<T extends string> = T extends `${infer StaticAbiType}[]` ? StaticAbiType : never;
12
+ declare function isArrayAbiType<T extends `${StaticAbiType}[]`>(abiType: string): abiType is T;
13
+ declare function arrayAbiTypeToStaticAbiType<T extends `${StaticAbiType}[]`>(abiType: T): ArrayAbiTypeToStaticAbiType<T>;
14
+
15
+ type LiteralToBroad<T> = T extends Readonly<Array<infer Element>> ? readonly LiteralToBroad<Element>[] : T extends Array<infer Element> ? LiteralToBroad<Element>[] : T extends number ? number : T extends bigint ? bigint : T extends Hex ? Hex : T extends boolean ? boolean : T extends string ? string : never;
16
+
17
+ type DynamicPrimitiveType = readonly number[] | readonly bigint[] | readonly Hex[] | readonly boolean[] | Hex | string;
18
+ declare const dynamicAbiTypeToDefaultValue: {
19
+ readonly "uint8[]": readonly number[];
20
+ readonly "uint16[]": readonly number[];
21
+ readonly "uint24[]": readonly number[];
22
+ readonly "uint32[]": readonly number[];
23
+ readonly "uint40[]": readonly number[];
24
+ readonly "uint48[]": readonly number[];
25
+ readonly "uint56[]": readonly bigint[];
26
+ readonly "uint64[]": readonly bigint[];
27
+ readonly "uint72[]": readonly bigint[];
28
+ readonly "uint80[]": readonly bigint[];
29
+ readonly "uint88[]": readonly bigint[];
30
+ readonly "uint96[]": readonly bigint[];
31
+ readonly "uint104[]": readonly bigint[];
32
+ readonly "uint112[]": readonly bigint[];
33
+ readonly "uint120[]": readonly bigint[];
34
+ readonly "uint128[]": readonly bigint[];
35
+ readonly "uint136[]": readonly bigint[];
36
+ readonly "uint144[]": readonly bigint[];
37
+ readonly "uint152[]": readonly bigint[];
38
+ readonly "uint160[]": readonly bigint[];
39
+ readonly "uint168[]": readonly bigint[];
40
+ readonly "uint176[]": readonly bigint[];
41
+ readonly "uint184[]": readonly bigint[];
42
+ readonly "uint192[]": readonly bigint[];
43
+ readonly "uint200[]": readonly bigint[];
44
+ readonly "uint208[]": readonly bigint[];
45
+ readonly "uint216[]": readonly bigint[];
46
+ readonly "uint224[]": readonly bigint[];
47
+ readonly "uint232[]": readonly bigint[];
48
+ readonly "uint240[]": readonly bigint[];
49
+ readonly "uint248[]": readonly bigint[];
50
+ readonly "uint256[]": readonly bigint[];
51
+ readonly "int8[]": readonly number[];
52
+ readonly "int16[]": readonly number[];
53
+ readonly "int24[]": readonly number[];
54
+ readonly "int32[]": readonly number[];
55
+ readonly "int40[]": readonly number[];
56
+ readonly "int48[]": readonly number[];
57
+ readonly "int56[]": readonly bigint[];
58
+ readonly "int64[]": readonly bigint[];
59
+ readonly "int72[]": readonly bigint[];
60
+ readonly "int80[]": readonly bigint[];
61
+ readonly "int88[]": readonly bigint[];
62
+ readonly "int96[]": readonly bigint[];
63
+ readonly "int104[]": readonly bigint[];
64
+ readonly "int112[]": readonly bigint[];
65
+ readonly "int120[]": readonly bigint[];
66
+ readonly "int128[]": readonly bigint[];
67
+ readonly "int136[]": readonly bigint[];
68
+ readonly "int144[]": readonly bigint[];
69
+ readonly "int152[]": readonly bigint[];
70
+ readonly "int160[]": readonly bigint[];
71
+ readonly "int168[]": readonly bigint[];
72
+ readonly "int176[]": readonly bigint[];
73
+ readonly "int184[]": readonly bigint[];
74
+ readonly "int192[]": readonly bigint[];
75
+ readonly "int200[]": readonly bigint[];
76
+ readonly "int208[]": readonly bigint[];
77
+ readonly "int216[]": readonly bigint[];
78
+ readonly "int224[]": readonly bigint[];
79
+ readonly "int232[]": readonly bigint[];
80
+ readonly "int240[]": readonly bigint[];
81
+ readonly "int248[]": readonly bigint[];
82
+ readonly "int256[]": readonly bigint[];
83
+ readonly "bytes1[]": readonly `0x${string}`[];
84
+ readonly "bytes2[]": readonly `0x${string}`[];
85
+ readonly "bytes3[]": readonly `0x${string}`[];
86
+ readonly "bytes4[]": readonly `0x${string}`[];
87
+ readonly "bytes5[]": readonly `0x${string}`[];
88
+ readonly "bytes6[]": readonly `0x${string}`[];
89
+ readonly "bytes7[]": readonly `0x${string}`[];
90
+ readonly "bytes8[]": readonly `0x${string}`[];
91
+ readonly "bytes9[]": readonly `0x${string}`[];
92
+ readonly "bytes10[]": readonly `0x${string}`[];
93
+ readonly "bytes11[]": readonly `0x${string}`[];
94
+ readonly "bytes12[]": readonly `0x${string}`[];
95
+ readonly "bytes13[]": readonly `0x${string}`[];
96
+ readonly "bytes14[]": readonly `0x${string}`[];
97
+ readonly "bytes15[]": readonly `0x${string}`[];
98
+ readonly "bytes16[]": readonly `0x${string}`[];
99
+ readonly "bytes17[]": readonly `0x${string}`[];
100
+ readonly "bytes18[]": readonly `0x${string}`[];
101
+ readonly "bytes19[]": readonly `0x${string}`[];
102
+ readonly "bytes20[]": readonly `0x${string}`[];
103
+ readonly "bytes21[]": readonly `0x${string}`[];
104
+ readonly "bytes22[]": readonly `0x${string}`[];
105
+ readonly "bytes23[]": readonly `0x${string}`[];
106
+ readonly "bytes24[]": readonly `0x${string}`[];
107
+ readonly "bytes25[]": readonly `0x${string}`[];
108
+ readonly "bytes26[]": readonly `0x${string}`[];
109
+ readonly "bytes27[]": readonly `0x${string}`[];
110
+ readonly "bytes28[]": readonly `0x${string}`[];
111
+ readonly "bytes29[]": readonly `0x${string}`[];
112
+ readonly "bytes30[]": readonly `0x${string}`[];
113
+ readonly "bytes31[]": readonly `0x${string}`[];
114
+ readonly "bytes32[]": readonly `0x${string}`[];
115
+ readonly "bool[]": readonly boolean[];
116
+ readonly "address[]": readonly `0x${string}`[];
117
+ readonly bytes: "0x";
118
+ readonly string: "";
119
+ };
120
+ type DynamicAbiTypeToPrimitiveType<TDynamicAbiType extends DynamicAbiType = DynamicAbiType> = LiteralToBroad<(typeof dynamicAbiTypeToDefaultValue)[TDynamicAbiType]>;
121
+ declare function isDynamicAbiType(abiType: string): abiType is DynamicAbiType;
122
+
123
+ declare const schemaAbiTypeToDefaultValue: {
124
+ readonly "uint8[]": readonly number[];
125
+ readonly "uint16[]": readonly number[];
126
+ readonly "uint24[]": readonly number[];
127
+ readonly "uint32[]": readonly number[];
128
+ readonly "uint40[]": readonly number[];
129
+ readonly "uint48[]": readonly number[];
130
+ readonly "uint56[]": readonly bigint[];
131
+ readonly "uint64[]": readonly bigint[];
132
+ readonly "uint72[]": readonly bigint[];
133
+ readonly "uint80[]": readonly bigint[];
134
+ readonly "uint88[]": readonly bigint[];
135
+ readonly "uint96[]": readonly bigint[];
136
+ readonly "uint104[]": readonly bigint[];
137
+ readonly "uint112[]": readonly bigint[];
138
+ readonly "uint120[]": readonly bigint[];
139
+ readonly "uint128[]": readonly bigint[];
140
+ readonly "uint136[]": readonly bigint[];
141
+ readonly "uint144[]": readonly bigint[];
142
+ readonly "uint152[]": readonly bigint[];
143
+ readonly "uint160[]": readonly bigint[];
144
+ readonly "uint168[]": readonly bigint[];
145
+ readonly "uint176[]": readonly bigint[];
146
+ readonly "uint184[]": readonly bigint[];
147
+ readonly "uint192[]": readonly bigint[];
148
+ readonly "uint200[]": readonly bigint[];
149
+ readonly "uint208[]": readonly bigint[];
150
+ readonly "uint216[]": readonly bigint[];
151
+ readonly "uint224[]": readonly bigint[];
152
+ readonly "uint232[]": readonly bigint[];
153
+ readonly "uint240[]": readonly bigint[];
154
+ readonly "uint248[]": readonly bigint[];
155
+ readonly "uint256[]": readonly bigint[];
156
+ readonly "int8[]": readonly number[];
157
+ readonly "int16[]": readonly number[];
158
+ readonly "int24[]": readonly number[];
159
+ readonly "int32[]": readonly number[];
160
+ readonly "int40[]": readonly number[];
161
+ readonly "int48[]": readonly number[];
162
+ readonly "int56[]": readonly bigint[];
163
+ readonly "int64[]": readonly bigint[];
164
+ readonly "int72[]": readonly bigint[];
165
+ readonly "int80[]": readonly bigint[];
166
+ readonly "int88[]": readonly bigint[];
167
+ readonly "int96[]": readonly bigint[];
168
+ readonly "int104[]": readonly bigint[];
169
+ readonly "int112[]": readonly bigint[];
170
+ readonly "int120[]": readonly bigint[];
171
+ readonly "int128[]": readonly bigint[];
172
+ readonly "int136[]": readonly bigint[];
173
+ readonly "int144[]": readonly bigint[];
174
+ readonly "int152[]": readonly bigint[];
175
+ readonly "int160[]": readonly bigint[];
176
+ readonly "int168[]": readonly bigint[];
177
+ readonly "int176[]": readonly bigint[];
178
+ readonly "int184[]": readonly bigint[];
179
+ readonly "int192[]": readonly bigint[];
180
+ readonly "int200[]": readonly bigint[];
181
+ readonly "int208[]": readonly bigint[];
182
+ readonly "int216[]": readonly bigint[];
183
+ readonly "int224[]": readonly bigint[];
184
+ readonly "int232[]": readonly bigint[];
185
+ readonly "int240[]": readonly bigint[];
186
+ readonly "int248[]": readonly bigint[];
187
+ readonly "int256[]": readonly bigint[];
188
+ readonly "bytes1[]": readonly `0x${string}`[];
189
+ readonly "bytes2[]": readonly `0x${string}`[];
190
+ readonly "bytes3[]": readonly `0x${string}`[];
191
+ readonly "bytes4[]": readonly `0x${string}`[];
192
+ readonly "bytes5[]": readonly `0x${string}`[];
193
+ readonly "bytes6[]": readonly `0x${string}`[];
194
+ readonly "bytes7[]": readonly `0x${string}`[];
195
+ readonly "bytes8[]": readonly `0x${string}`[];
196
+ readonly "bytes9[]": readonly `0x${string}`[];
197
+ readonly "bytes10[]": readonly `0x${string}`[];
198
+ readonly "bytes11[]": readonly `0x${string}`[];
199
+ readonly "bytes12[]": readonly `0x${string}`[];
200
+ readonly "bytes13[]": readonly `0x${string}`[];
201
+ readonly "bytes14[]": readonly `0x${string}`[];
202
+ readonly "bytes15[]": readonly `0x${string}`[];
203
+ readonly "bytes16[]": readonly `0x${string}`[];
204
+ readonly "bytes17[]": readonly `0x${string}`[];
205
+ readonly "bytes18[]": readonly `0x${string}`[];
206
+ readonly "bytes19[]": readonly `0x${string}`[];
207
+ readonly "bytes20[]": readonly `0x${string}`[];
208
+ readonly "bytes21[]": readonly `0x${string}`[];
209
+ readonly "bytes22[]": readonly `0x${string}`[];
210
+ readonly "bytes23[]": readonly `0x${string}`[];
211
+ readonly "bytes24[]": readonly `0x${string}`[];
212
+ readonly "bytes25[]": readonly `0x${string}`[];
213
+ readonly "bytes26[]": readonly `0x${string}`[];
214
+ readonly "bytes27[]": readonly `0x${string}`[];
215
+ readonly "bytes28[]": readonly `0x${string}`[];
216
+ readonly "bytes29[]": readonly `0x${string}`[];
217
+ readonly "bytes30[]": readonly `0x${string}`[];
218
+ readonly "bytes31[]": readonly `0x${string}`[];
219
+ readonly "bytes32[]": readonly `0x${string}`[];
220
+ readonly "bool[]": readonly boolean[];
221
+ readonly "address[]": readonly `0x${string}`[];
222
+ readonly bytes: "0x";
223
+ readonly string: "";
224
+ readonly uint8: 0;
225
+ readonly uint16: 0;
226
+ readonly uint24: 0;
227
+ readonly uint32: 0;
228
+ readonly uint40: 0;
229
+ readonly uint48: 0;
230
+ readonly uint56: 0n;
231
+ readonly uint64: 0n;
232
+ readonly uint72: 0n;
233
+ readonly uint80: 0n;
234
+ readonly uint88: 0n;
235
+ readonly uint96: 0n;
236
+ readonly uint104: 0n;
237
+ readonly uint112: 0n;
238
+ readonly uint120: 0n;
239
+ readonly uint128: 0n;
240
+ readonly uint136: 0n;
241
+ readonly uint144: 0n;
242
+ readonly uint152: 0n;
243
+ readonly uint160: 0n;
244
+ readonly uint168: 0n;
245
+ readonly uint176: 0n;
246
+ readonly uint184: 0n;
247
+ readonly uint192: 0n;
248
+ readonly uint200: 0n;
249
+ readonly uint208: 0n;
250
+ readonly uint216: 0n;
251
+ readonly uint224: 0n;
252
+ readonly uint232: 0n;
253
+ readonly uint240: 0n;
254
+ readonly uint248: 0n;
255
+ readonly uint256: 0n;
256
+ readonly int8: 0;
257
+ readonly int16: 0;
258
+ readonly int24: 0;
259
+ readonly int32: 0;
260
+ readonly int40: 0;
261
+ readonly int48: 0;
262
+ readonly int56: 0n;
263
+ readonly int64: 0n;
264
+ readonly int72: 0n;
265
+ readonly int80: 0n;
266
+ readonly int88: 0n;
267
+ readonly int96: 0n;
268
+ readonly int104: 0n;
269
+ readonly int112: 0n;
270
+ readonly int120: 0n;
271
+ readonly int128: 0n;
272
+ readonly int136: 0n;
273
+ readonly int144: 0n;
274
+ readonly int152: 0n;
275
+ readonly int160: 0n;
276
+ readonly int168: 0n;
277
+ readonly int176: 0n;
278
+ readonly int184: 0n;
279
+ readonly int192: 0n;
280
+ readonly int200: 0n;
281
+ readonly int208: 0n;
282
+ readonly int216: 0n;
283
+ readonly int224: 0n;
284
+ readonly int232: 0n;
285
+ readonly int240: 0n;
286
+ readonly int248: 0n;
287
+ readonly int256: 0n;
288
+ readonly bytes1: "0x00";
289
+ readonly bytes2: "0x0000";
290
+ readonly bytes3: "0x000000";
291
+ readonly bytes4: "0x00000000";
292
+ readonly bytes5: "0x0000000000";
293
+ readonly bytes6: "0x000000000000";
294
+ readonly bytes7: "0x00000000000000";
295
+ readonly bytes8: "0x0000000000000000";
296
+ readonly bytes9: "0x000000000000000000";
297
+ readonly bytes10: "0x00000000000000000000";
298
+ readonly bytes11: "0x0000000000000000000000";
299
+ readonly bytes12: "0x000000000000000000000000";
300
+ readonly bytes13: "0x00000000000000000000000000";
301
+ readonly bytes14: "0x0000000000000000000000000000";
302
+ readonly bytes15: "0x000000000000000000000000000000";
303
+ readonly bytes16: "0x00000000000000000000000000000000";
304
+ readonly bytes17: "0x0000000000000000000000000000000000";
305
+ readonly bytes18: "0x000000000000000000000000000000000000";
306
+ readonly bytes19: "0x00000000000000000000000000000000000000";
307
+ readonly bytes20: "0x0000000000000000000000000000000000000000";
308
+ readonly bytes21: "0x000000000000000000000000000000000000000000";
309
+ readonly bytes22: "0x00000000000000000000000000000000000000000000";
310
+ readonly bytes23: "0x0000000000000000000000000000000000000000000000";
311
+ readonly bytes24: "0x000000000000000000000000000000000000000000000000";
312
+ readonly bytes25: "0x00000000000000000000000000000000000000000000000000";
313
+ readonly bytes26: "0x0000000000000000000000000000000000000000000000000000";
314
+ readonly bytes27: "0x000000000000000000000000000000000000000000000000000000";
315
+ readonly bytes28: "0x00000000000000000000000000000000000000000000000000000000";
316
+ readonly bytes29: "0x0000000000000000000000000000000000000000000000000000000000";
317
+ readonly bytes30: "0x000000000000000000000000000000000000000000000000000000000000";
318
+ readonly bytes31: "0x00000000000000000000000000000000000000000000000000000000000000";
319
+ readonly bytes32: "0x0000000000000000000000000000000000000000000000000000000000000000";
320
+ readonly bool: false;
321
+ readonly address: "0x0000000000000000000000000000000000000000";
322
+ };
323
+
324
+ type StaticPrimitiveType = number | bigint | boolean | Hex;
325
+ declare const staticAbiTypeToDefaultValue: {
326
+ readonly uint8: 0;
327
+ readonly uint16: 0;
328
+ readonly uint24: 0;
329
+ readonly uint32: 0;
330
+ readonly uint40: 0;
331
+ readonly uint48: 0;
332
+ readonly uint56: 0n;
333
+ readonly uint64: 0n;
334
+ readonly uint72: 0n;
335
+ readonly uint80: 0n;
336
+ readonly uint88: 0n;
337
+ readonly uint96: 0n;
338
+ readonly uint104: 0n;
339
+ readonly uint112: 0n;
340
+ readonly uint120: 0n;
341
+ readonly uint128: 0n;
342
+ readonly uint136: 0n;
343
+ readonly uint144: 0n;
344
+ readonly uint152: 0n;
345
+ readonly uint160: 0n;
346
+ readonly uint168: 0n;
347
+ readonly uint176: 0n;
348
+ readonly uint184: 0n;
349
+ readonly uint192: 0n;
350
+ readonly uint200: 0n;
351
+ readonly uint208: 0n;
352
+ readonly uint216: 0n;
353
+ readonly uint224: 0n;
354
+ readonly uint232: 0n;
355
+ readonly uint240: 0n;
356
+ readonly uint248: 0n;
357
+ readonly uint256: 0n;
358
+ readonly int8: 0;
359
+ readonly int16: 0;
360
+ readonly int24: 0;
361
+ readonly int32: 0;
362
+ readonly int40: 0;
363
+ readonly int48: 0;
364
+ readonly int56: 0n;
365
+ readonly int64: 0n;
366
+ readonly int72: 0n;
367
+ readonly int80: 0n;
368
+ readonly int88: 0n;
369
+ readonly int96: 0n;
370
+ readonly int104: 0n;
371
+ readonly int112: 0n;
372
+ readonly int120: 0n;
373
+ readonly int128: 0n;
374
+ readonly int136: 0n;
375
+ readonly int144: 0n;
376
+ readonly int152: 0n;
377
+ readonly int160: 0n;
378
+ readonly int168: 0n;
379
+ readonly int176: 0n;
380
+ readonly int184: 0n;
381
+ readonly int192: 0n;
382
+ readonly int200: 0n;
383
+ readonly int208: 0n;
384
+ readonly int216: 0n;
385
+ readonly int224: 0n;
386
+ readonly int232: 0n;
387
+ readonly int240: 0n;
388
+ readonly int248: 0n;
389
+ readonly int256: 0n;
390
+ readonly bytes1: "0x00";
391
+ readonly bytes2: "0x0000";
392
+ readonly bytes3: "0x000000";
393
+ readonly bytes4: "0x00000000";
394
+ readonly bytes5: "0x0000000000";
395
+ readonly bytes6: "0x000000000000";
396
+ readonly bytes7: "0x00000000000000";
397
+ readonly bytes8: "0x0000000000000000";
398
+ readonly bytes9: "0x000000000000000000";
399
+ readonly bytes10: "0x00000000000000000000";
400
+ readonly bytes11: "0x0000000000000000000000";
401
+ readonly bytes12: "0x000000000000000000000000";
402
+ readonly bytes13: "0x00000000000000000000000000";
403
+ readonly bytes14: "0x0000000000000000000000000000";
404
+ readonly bytes15: "0x000000000000000000000000000000";
405
+ readonly bytes16: "0x00000000000000000000000000000000";
406
+ readonly bytes17: "0x0000000000000000000000000000000000";
407
+ readonly bytes18: "0x000000000000000000000000000000000000";
408
+ readonly bytes19: "0x00000000000000000000000000000000000000";
409
+ readonly bytes20: "0x0000000000000000000000000000000000000000";
410
+ readonly bytes21: "0x000000000000000000000000000000000000000000";
411
+ readonly bytes22: "0x00000000000000000000000000000000000000000000";
412
+ readonly bytes23: "0x0000000000000000000000000000000000000000000000";
413
+ readonly bytes24: "0x000000000000000000000000000000000000000000000000";
414
+ readonly bytes25: "0x00000000000000000000000000000000000000000000000000";
415
+ readonly bytes26: "0x0000000000000000000000000000000000000000000000000000";
416
+ readonly bytes27: "0x000000000000000000000000000000000000000000000000000000";
417
+ readonly bytes28: "0x00000000000000000000000000000000000000000000000000000000";
418
+ readonly bytes29: "0x0000000000000000000000000000000000000000000000000000000000";
419
+ readonly bytes30: "0x000000000000000000000000000000000000000000000000000000000000";
420
+ readonly bytes31: "0x00000000000000000000000000000000000000000000000000000000000000";
421
+ readonly bytes32: "0x0000000000000000000000000000000000000000000000000000000000000000";
422
+ readonly bool: false;
423
+ readonly address: "0x0000000000000000000000000000000000000000";
424
+ };
425
+ type StaticAbiTypeToPrimitiveType<TStaticAbiType extends StaticAbiType = StaticAbiType> = LiteralToBroad<(typeof staticAbiTypeToDefaultValue)[TStaticAbiType]>;
426
+ declare const staticAbiTypeToByteLength: {
427
+ readonly uint8: 1;
428
+ readonly uint16: 2;
429
+ readonly uint24: 3;
430
+ readonly uint32: 4;
431
+ readonly uint40: 5;
432
+ readonly uint48: 6;
433
+ readonly uint56: 7;
434
+ readonly uint64: 8;
435
+ readonly uint72: 9;
436
+ readonly uint80: 10;
437
+ readonly uint88: 11;
438
+ readonly uint96: 12;
439
+ readonly uint104: 13;
440
+ readonly uint112: 14;
441
+ readonly uint120: 15;
442
+ readonly uint128: 16;
443
+ readonly uint136: 17;
444
+ readonly uint144: 18;
445
+ readonly uint152: 19;
446
+ readonly uint160: 20;
447
+ readonly uint168: 21;
448
+ readonly uint176: 22;
449
+ readonly uint184: 23;
450
+ readonly uint192: 24;
451
+ readonly uint200: 25;
452
+ readonly uint208: 26;
453
+ readonly uint216: 27;
454
+ readonly uint224: 28;
455
+ readonly uint232: 29;
456
+ readonly uint240: 30;
457
+ readonly uint248: 31;
458
+ readonly uint256: 32;
459
+ readonly int8: 1;
460
+ readonly int16: 2;
461
+ readonly int24: 3;
462
+ readonly int32: 4;
463
+ readonly int40: 5;
464
+ readonly int48: 6;
465
+ readonly int56: 7;
466
+ readonly int64: 8;
467
+ readonly int72: 9;
468
+ readonly int80: 10;
469
+ readonly int88: 11;
470
+ readonly int96: 12;
471
+ readonly int104: 13;
472
+ readonly int112: 14;
473
+ readonly int120: 15;
474
+ readonly int128: 16;
475
+ readonly int136: 17;
476
+ readonly int144: 18;
477
+ readonly int152: 19;
478
+ readonly int160: 20;
479
+ readonly int168: 21;
480
+ readonly int176: 22;
481
+ readonly int184: 23;
482
+ readonly int192: 24;
483
+ readonly int200: 25;
484
+ readonly int208: 26;
485
+ readonly int216: 27;
486
+ readonly int224: 28;
487
+ readonly int232: 29;
488
+ readonly int240: 30;
489
+ readonly int248: 31;
490
+ readonly int256: 32;
491
+ readonly bytes1: 1;
492
+ readonly bytes2: 2;
493
+ readonly bytes3: 3;
494
+ readonly bytes4: 4;
495
+ readonly bytes5: 5;
496
+ readonly bytes6: 6;
497
+ readonly bytes7: 7;
498
+ readonly bytes8: 8;
499
+ readonly bytes9: 9;
500
+ readonly bytes10: 10;
501
+ readonly bytes11: 11;
502
+ readonly bytes12: 12;
503
+ readonly bytes13: 13;
504
+ readonly bytes14: 14;
505
+ readonly bytes15: 15;
506
+ readonly bytes16: 16;
507
+ readonly bytes17: 17;
508
+ readonly bytes18: 18;
509
+ readonly bytes19: 19;
510
+ readonly bytes20: 20;
511
+ readonly bytes21: 21;
512
+ readonly bytes22: 22;
513
+ readonly bytes23: 23;
514
+ readonly bytes24: 24;
515
+ readonly bytes25: 25;
516
+ readonly bytes26: 26;
517
+ readonly bytes27: 27;
518
+ readonly bytes28: 28;
519
+ readonly bytes29: 29;
520
+ readonly bytes30: 30;
521
+ readonly bytes31: 31;
522
+ readonly bytes32: 32;
523
+ readonly bool: 1;
524
+ readonly address: 20;
525
+ };
526
+ declare function isStaticAbiType(abiType: string): abiType is StaticAbiType;
527
+
528
+ type SchemaAbiTypeToPrimitiveType<T extends SchemaAbiType> = LiteralToBroad<(typeof schemaAbiTypeToDefaultValue)[T]>;
529
+
530
+ export { ArrayAbiTypeToStaticAbiType, DynamicAbiType, DynamicAbiTypeToPrimitiveType, DynamicPrimitiveType, SchemaAbiType, SchemaAbiTypeToPrimitiveType, StaticAbiType, StaticAbiTypeToPrimitiveType, StaticPrimitiveType, arrayAbiTypeToStaticAbiType, dynamicAbiTypeToDefaultValue, dynamicAbiTypes, isArrayAbiType, isDynamicAbiType, isSchemaAbiType, isStaticAbiType, schemaAbiTypeToDefaultValue, schemaAbiTypes, staticAbiTypeToByteLength, staticAbiTypeToDefaultValue, staticAbiTypes };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@latticexyz/schema-type",
3
- "version": "2.0.0-next.14",
3
+ "version": "2.0.0-next.16",
4
4
  "description": "SchemaType enum for various languages",
5
5
  "repository": {
6
6
  "type": "git",
@@ -32,7 +32,7 @@
32
32
  "forge-std": "https://github.com/foundry-rs/forge-std.git#74cfb77e308dd188d2f58864aaf44963ae6b88b1",
33
33
  "tsup": "^6.7.0",
34
34
  "vitest": "0.31.4",
35
- "@latticexyz/gas-report": "2.0.0-next.14"
35
+ "@latticexyz/gas-report": "2.0.0-next.16"
36
36
  },
37
37
  "gitHead": "914a1e0ae4a573d685841ca2ea921435057deb8f",
38
38
  "scripts": {