@layer-drone/protocol 0.0.14 → 0.0.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.
- package/dist/index.d.mts +155 -107
- package/dist/index.d.ts +155 -107
- package/dist/index.js +36 -52
- package/dist/index.mjs +36 -50
- package/package.json +2 -2
- package/src/client/sdk.gen.ts +11 -67
- package/src/client/types.gen.ts +26 -89
- package/src/event/types.gen.ts +19 -7
package/dist/index.mjs
CHANGED
|
@@ -724,7 +724,7 @@ var keysControllerGetProvenanceCryptoKey = /* @__PURE__ */ __name((options) => {
|
|
|
724
724
|
...options
|
|
725
725
|
});
|
|
726
726
|
}, "keysControllerGetProvenanceCryptoKey");
|
|
727
|
-
var
|
|
727
|
+
var quotesControllerCreateQuote = /* @__PURE__ */ __name((options) => {
|
|
728
728
|
return (options.client ?? client).post({
|
|
729
729
|
security: [
|
|
730
730
|
{
|
|
@@ -732,30 +732,26 @@ var rewardsControllerDepositRewards = /* @__PURE__ */ __name((options) => {
|
|
|
732
732
|
type: "apiKey"
|
|
733
733
|
}
|
|
734
734
|
],
|
|
735
|
-
url: "/
|
|
735
|
+
url: "/quotes",
|
|
736
736
|
...options,
|
|
737
737
|
headers: {
|
|
738
738
|
"Content-Type": "application/json",
|
|
739
739
|
...options.headers
|
|
740
740
|
}
|
|
741
741
|
});
|
|
742
|
-
}, "
|
|
743
|
-
var
|
|
744
|
-
return (options.client ?? client).
|
|
742
|
+
}, "quotesControllerCreateQuote");
|
|
743
|
+
var quotesControllerGetQuote = /* @__PURE__ */ __name((options) => {
|
|
744
|
+
return (options.client ?? client).get({
|
|
745
745
|
security: [
|
|
746
746
|
{
|
|
747
747
|
name: "x-api-token",
|
|
748
748
|
type: "apiKey"
|
|
749
749
|
}
|
|
750
750
|
],
|
|
751
|
-
url: "/
|
|
752
|
-
...options
|
|
753
|
-
headers: {
|
|
754
|
-
"Content-Type": "application/json",
|
|
755
|
-
...options.headers
|
|
756
|
-
}
|
|
751
|
+
url: "/quotes/{id}",
|
|
752
|
+
...options
|
|
757
753
|
});
|
|
758
|
-
}, "
|
|
754
|
+
}, "quotesControllerGetQuote");
|
|
759
755
|
var apiTokenControllerCreateToken = /* @__PURE__ */ __name((options) => {
|
|
760
756
|
return (options.client ?? client).post({
|
|
761
757
|
security: [
|
|
@@ -813,34 +809,6 @@ var apiTokenControllerUpdateToken = /* @__PURE__ */ __name((options) => {
|
|
|
813
809
|
}
|
|
814
810
|
});
|
|
815
811
|
}, "apiTokenControllerUpdateToken");
|
|
816
|
-
var quotesControllerCreateQuote = /* @__PURE__ */ __name((options) => {
|
|
817
|
-
return (options.client ?? client).post({
|
|
818
|
-
security: [
|
|
819
|
-
{
|
|
820
|
-
name: "x-api-token",
|
|
821
|
-
type: "apiKey"
|
|
822
|
-
}
|
|
823
|
-
],
|
|
824
|
-
url: "/quotes",
|
|
825
|
-
...options,
|
|
826
|
-
headers: {
|
|
827
|
-
"Content-Type": "application/json",
|
|
828
|
-
...options.headers
|
|
829
|
-
}
|
|
830
|
-
});
|
|
831
|
-
}, "quotesControllerCreateQuote");
|
|
832
|
-
var quotesControllerGetQuote = /* @__PURE__ */ __name((options) => {
|
|
833
|
-
return (options.client ?? client).get({
|
|
834
|
-
security: [
|
|
835
|
-
{
|
|
836
|
-
name: "x-api-token",
|
|
837
|
-
type: "apiKey"
|
|
838
|
-
}
|
|
839
|
-
],
|
|
840
|
-
url: "/quotes/{id}",
|
|
841
|
-
...options
|
|
842
|
-
});
|
|
843
|
-
}, "quotesControllerGetQuote");
|
|
844
812
|
var missionsControllerCreateMissions = /* @__PURE__ */ __name((options) => {
|
|
845
813
|
return (options.client ?? client).post({
|
|
846
814
|
url: "/missions",
|
|
@@ -1072,14 +1040,28 @@ var Event = z.union([
|
|
|
1072
1040
|
event_type: z.literal("protocol.mission.created"),
|
|
1073
1041
|
timestamp: z.any(),
|
|
1074
1042
|
data: z.object({
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1043
|
+
id: z.object({
|
|
1044
|
+
__type: z.literal("bigint"),
|
|
1045
|
+
value: z.string()
|
|
1046
|
+
}).transform((wire) => BigInt(wire.value)),
|
|
1047
|
+
vaultId: z.object({
|
|
1048
|
+
__type: z.literal("bigint"),
|
|
1049
|
+
value: z.string()
|
|
1050
|
+
}).transform((wire) => BigInt(wire.value)),
|
|
1051
|
+
amount: z.object({
|
|
1052
|
+
__type: z.literal("bigint"),
|
|
1053
|
+
value: z.string()
|
|
1054
|
+
}).transform((wire) => BigInt(wire.value)),
|
|
1078
1055
|
zoneId: z.string(),
|
|
1079
1056
|
flightPlanId: z.number(),
|
|
1080
|
-
captureStartTime: z.string()
|
|
1081
|
-
|
|
1082
|
-
|
|
1057
|
+
captureStartTime: z.string().datetime({
|
|
1058
|
+
offset: true
|
|
1059
|
+
}),
|
|
1060
|
+
captureEndTime: z.string().datetime({
|
|
1061
|
+
offset: true
|
|
1062
|
+
}),
|
|
1063
|
+
detailsHash: z.string(),
|
|
1064
|
+
requestor: z.string().regex(new RegExp("^0x[a-fA-F0-9]{40}$"))
|
|
1083
1065
|
}).strict()
|
|
1084
1066
|
}).strict(),
|
|
1085
1067
|
z.object({
|
|
@@ -1087,8 +1069,14 @@ var Event = z.union([
|
|
|
1087
1069
|
event_type: z.literal("protocol.mission.updated"),
|
|
1088
1070
|
timestamp: z.any(),
|
|
1089
1071
|
data: z.object({
|
|
1090
|
-
id: z.
|
|
1091
|
-
|
|
1072
|
+
id: z.object({
|
|
1073
|
+
__type: z.literal("bigint"),
|
|
1074
|
+
value: z.string()
|
|
1075
|
+
}).transform((wire) => BigInt(wire.value)),
|
|
1076
|
+
amount: z.object({
|
|
1077
|
+
__type: z.literal("bigint"),
|
|
1078
|
+
value: z.string()
|
|
1079
|
+
}).transform((wire) => BigInt(wire.value)).optional(),
|
|
1092
1080
|
isOpen: z.boolean().optional()
|
|
1093
1081
|
}).strict()
|
|
1094
1082
|
}).strict(),
|
|
@@ -1155,8 +1143,6 @@ export {
|
|
|
1155
1143
|
parseWebhookEvent,
|
|
1156
1144
|
quotesControllerCreateQuote,
|
|
1157
1145
|
quotesControllerGetQuote,
|
|
1158
|
-
rewardsControllerDepositRewards,
|
|
1159
|
-
rewardsControllerDistributeRewards,
|
|
1160
1146
|
schemaControllerGetEventSchema,
|
|
1161
1147
|
urlSearchParamsBodySerializer,
|
|
1162
1148
|
webhooksControllerCreate,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@layer-drone/protocol",
|
|
3
3
|
"description": "Layer Drone protocol SDK with typed API client and event parsing",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.16",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@layer-drone/typescript-config": "0.0.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"zod": "^3.
|
|
33
|
+
"zod": "^3.x.x"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "tsup src/index.ts --format cjs,esm --dts",
|
package/src/client/sdk.gen.ts
CHANGED
|
@@ -54,12 +54,6 @@ import type {
|
|
|
54
54
|
QuotesControllerGetQuoteData,
|
|
55
55
|
QuotesControllerGetQuoteErrors,
|
|
56
56
|
QuotesControllerGetQuoteResponses,
|
|
57
|
-
RewardsControllerDepositRewardsData,
|
|
58
|
-
RewardsControllerDepositRewardsErrors,
|
|
59
|
-
RewardsControllerDepositRewardsResponses,
|
|
60
|
-
RewardsControllerDistributeRewardsData,
|
|
61
|
-
RewardsControllerDistributeRewardsErrors,
|
|
62
|
-
RewardsControllerDistributeRewardsResponses,
|
|
63
57
|
SchemaControllerGetEventSchemaData,
|
|
64
58
|
SchemaControllerGetEventSchemaResponses,
|
|
65
59
|
WebhooksControllerCreateData,
|
|
@@ -133,14 +127,14 @@ export const keysControllerGetProvenanceCryptoKey = <
|
|
|
133
127
|
});
|
|
134
128
|
};
|
|
135
129
|
|
|
136
|
-
export const
|
|
130
|
+
export const quotesControllerCreateQuote = <
|
|
137
131
|
ThrowOnError extends boolean = false,
|
|
138
132
|
>(
|
|
139
|
-
options: Options<
|
|
133
|
+
options: Options<QuotesControllerCreateQuoteData, ThrowOnError>,
|
|
140
134
|
) => {
|
|
141
135
|
return (options.client ?? _heyApiClient).post<
|
|
142
|
-
|
|
143
|
-
|
|
136
|
+
QuotesControllerCreateQuoteResponses,
|
|
137
|
+
QuotesControllerCreateQuoteErrors,
|
|
144
138
|
ThrowOnError
|
|
145
139
|
>({
|
|
146
140
|
security: [
|
|
@@ -149,7 +143,7 @@ export const rewardsControllerDepositRewards = <
|
|
|
149
143
|
type: "apiKey",
|
|
150
144
|
},
|
|
151
145
|
],
|
|
152
|
-
url: "/
|
|
146
|
+
url: "/quotes",
|
|
153
147
|
...options,
|
|
154
148
|
headers: {
|
|
155
149
|
"Content-Type": "application/json",
|
|
@@ -158,14 +152,12 @@ export const rewardsControllerDepositRewards = <
|
|
|
158
152
|
});
|
|
159
153
|
};
|
|
160
154
|
|
|
161
|
-
export const
|
|
162
|
-
|
|
163
|
-
>(
|
|
164
|
-
options: Options<RewardsControllerDistributeRewardsData, ThrowOnError>,
|
|
155
|
+
export const quotesControllerGetQuote = <ThrowOnError extends boolean = false>(
|
|
156
|
+
options: Options<QuotesControllerGetQuoteData, ThrowOnError>,
|
|
165
157
|
) => {
|
|
166
|
-
return (options.client ?? _heyApiClient).
|
|
167
|
-
|
|
168
|
-
|
|
158
|
+
return (options.client ?? _heyApiClient).get<
|
|
159
|
+
QuotesControllerGetQuoteResponses,
|
|
160
|
+
QuotesControllerGetQuoteErrors,
|
|
169
161
|
ThrowOnError
|
|
170
162
|
>({
|
|
171
163
|
security: [
|
|
@@ -174,12 +166,8 @@ export const rewardsControllerDistributeRewards = <
|
|
|
174
166
|
type: "apiKey",
|
|
175
167
|
},
|
|
176
168
|
],
|
|
177
|
-
url: "/
|
|
169
|
+
url: "/quotes/{id}",
|
|
178
170
|
...options,
|
|
179
|
-
headers: {
|
|
180
|
-
"Content-Type": "application/json",
|
|
181
|
-
...options.headers,
|
|
182
|
-
},
|
|
183
171
|
});
|
|
184
172
|
};
|
|
185
173
|
|
|
@@ -276,50 +264,6 @@ export const apiTokenControllerUpdateToken = <
|
|
|
276
264
|
});
|
|
277
265
|
};
|
|
278
266
|
|
|
279
|
-
export const quotesControllerCreateQuote = <
|
|
280
|
-
ThrowOnError extends boolean = false,
|
|
281
|
-
>(
|
|
282
|
-
options: Options<QuotesControllerCreateQuoteData, ThrowOnError>,
|
|
283
|
-
) => {
|
|
284
|
-
return (options.client ?? _heyApiClient).post<
|
|
285
|
-
QuotesControllerCreateQuoteResponses,
|
|
286
|
-
QuotesControllerCreateQuoteErrors,
|
|
287
|
-
ThrowOnError
|
|
288
|
-
>({
|
|
289
|
-
security: [
|
|
290
|
-
{
|
|
291
|
-
name: "x-api-token",
|
|
292
|
-
type: "apiKey",
|
|
293
|
-
},
|
|
294
|
-
],
|
|
295
|
-
url: "/quotes",
|
|
296
|
-
...options,
|
|
297
|
-
headers: {
|
|
298
|
-
"Content-Type": "application/json",
|
|
299
|
-
...options.headers,
|
|
300
|
-
},
|
|
301
|
-
});
|
|
302
|
-
};
|
|
303
|
-
|
|
304
|
-
export const quotesControllerGetQuote = <ThrowOnError extends boolean = false>(
|
|
305
|
-
options: Options<QuotesControllerGetQuoteData, ThrowOnError>,
|
|
306
|
-
) => {
|
|
307
|
-
return (options.client ?? _heyApiClient).get<
|
|
308
|
-
QuotesControllerGetQuoteResponses,
|
|
309
|
-
QuotesControllerGetQuoteErrors,
|
|
310
|
-
ThrowOnError
|
|
311
|
-
>({
|
|
312
|
-
security: [
|
|
313
|
-
{
|
|
314
|
-
name: "x-api-token",
|
|
315
|
-
type: "apiKey",
|
|
316
|
-
},
|
|
317
|
-
],
|
|
318
|
-
url: "/quotes/{id}",
|
|
319
|
-
...options,
|
|
320
|
-
});
|
|
321
|
-
};
|
|
322
|
-
|
|
323
267
|
/**
|
|
324
268
|
* Create new missions
|
|
325
269
|
* Create missions for specified zones and mission types.
|
package/src/client/types.gen.ts
CHANGED
|
@@ -27,28 +27,11 @@ export type GetProvenanceCryptoKeyResponse = {
|
|
|
27
27
|
>;
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
export type
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
amount: bigint;
|
|
36
|
-
vaultId: number;
|
|
37
|
-
vaultManagerAddress?: string;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export type DepositRewardsResponseDto = {
|
|
41
|
-
MessageId: string;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export type DistributeRewardsRequestDto = {
|
|
45
|
-
amounts: {
|
|
46
|
-
[key: string]: number;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export type DistributeRewardsResponseDto = {
|
|
51
|
-
MessageId: string;
|
|
30
|
+
export type CreateQuoteRequestDto = {
|
|
31
|
+
missionIds: Array<number>;
|
|
32
|
+
entitlementType: string;
|
|
33
|
+
buyer: string;
|
|
34
|
+
mintOnChain: boolean;
|
|
52
35
|
};
|
|
53
36
|
|
|
54
37
|
export type CreateApiTokenResponseDto = {
|
|
@@ -80,18 +63,11 @@ export type UpdateApiTokenResponseDto = {
|
|
|
80
63
|
scopes: Array<"manageTokens" | "manageFlights" | "manageWebhooks" | "all">;
|
|
81
64
|
};
|
|
82
65
|
|
|
83
|
-
export type CreateQuoteRequestDto = {
|
|
84
|
-
missionIds: Array<number>;
|
|
85
|
-
entitlementType: string;
|
|
86
|
-
buyer: string;
|
|
87
|
-
mintOnChain: boolean;
|
|
88
|
-
};
|
|
89
|
-
|
|
90
66
|
export type CreateMissionRequestDto = {
|
|
91
67
|
missions: Array<{
|
|
92
68
|
zoneId: string;
|
|
93
69
|
flightPlanId: number;
|
|
94
|
-
amount:
|
|
70
|
+
amount: bigint;
|
|
95
71
|
startTime: Date;
|
|
96
72
|
endTime: Date;
|
|
97
73
|
}>;
|
|
@@ -105,16 +81,15 @@ export type CreateMissionResponseDto = {
|
|
|
105
81
|
data:
|
|
106
82
|
| {
|
|
107
83
|
missions: Array<{
|
|
108
|
-
|
|
84
|
+
id: string;
|
|
109
85
|
vaultId: string;
|
|
110
|
-
amount:
|
|
86
|
+
amount: string;
|
|
111
87
|
zoneId: string;
|
|
112
88
|
flightPlanId: number;
|
|
113
89
|
captureStartTime: Date;
|
|
114
90
|
captureEndTime: Date;
|
|
115
91
|
requestor: string;
|
|
116
92
|
}>;
|
|
117
|
-
totalAmount: number;
|
|
118
93
|
}
|
|
119
94
|
| string;
|
|
120
95
|
};
|
|
@@ -122,11 +97,11 @@ export type CreateMissionResponseDto = {
|
|
|
122
97
|
export type UpdateMissionsRequestDto = {
|
|
123
98
|
missions: Array<
|
|
124
99
|
| {
|
|
125
|
-
id:
|
|
126
|
-
amount:
|
|
100
|
+
id: bigint;
|
|
101
|
+
amount: bigint;
|
|
127
102
|
}
|
|
128
103
|
| {
|
|
129
|
-
id:
|
|
104
|
+
id: bigint;
|
|
130
105
|
isOpen: false;
|
|
131
106
|
}
|
|
132
107
|
>;
|
|
@@ -339,44 +314,40 @@ export type KeysControllerGetProvenanceCryptoKeyResponses = {
|
|
|
339
314
|
export type KeysControllerGetProvenanceCryptoKeyResponse =
|
|
340
315
|
KeysControllerGetProvenanceCryptoKeyResponses[keyof KeysControllerGetProvenanceCryptoKeyResponses];
|
|
341
316
|
|
|
342
|
-
export type
|
|
343
|
-
body:
|
|
317
|
+
export type QuotesControllerCreateQuoteData = {
|
|
318
|
+
body: CreateQuoteRequestDto;
|
|
344
319
|
path?: never;
|
|
345
320
|
query?: never;
|
|
346
|
-
url: "/
|
|
321
|
+
url: "/quotes";
|
|
347
322
|
};
|
|
348
323
|
|
|
349
|
-
export type
|
|
324
|
+
export type QuotesControllerCreateQuoteErrors = {
|
|
350
325
|
401: unknown;
|
|
351
326
|
403: unknown;
|
|
352
327
|
};
|
|
353
328
|
|
|
354
|
-
export type
|
|
355
|
-
|
|
329
|
+
export type QuotesControllerCreateQuoteResponses = {
|
|
330
|
+
201: unknown;
|
|
356
331
|
};
|
|
357
332
|
|
|
358
|
-
export type
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
path?: never;
|
|
333
|
+
export type QuotesControllerGetQuoteData = {
|
|
334
|
+
body?: never;
|
|
335
|
+
path: {
|
|
336
|
+
id: string;
|
|
337
|
+
};
|
|
364
338
|
query?: never;
|
|
365
|
-
url: "/
|
|
339
|
+
url: "/quotes/{id}";
|
|
366
340
|
};
|
|
367
341
|
|
|
368
|
-
export type
|
|
342
|
+
export type QuotesControllerGetQuoteErrors = {
|
|
369
343
|
401: unknown;
|
|
370
344
|
403: unknown;
|
|
371
345
|
};
|
|
372
346
|
|
|
373
|
-
export type
|
|
374
|
-
200:
|
|
347
|
+
export type QuotesControllerGetQuoteResponses = {
|
|
348
|
+
200: unknown;
|
|
375
349
|
};
|
|
376
350
|
|
|
377
|
-
export type RewardsControllerDistributeRewardsResponse =
|
|
378
|
-
RewardsControllerDistributeRewardsResponses[keyof RewardsControllerDistributeRewardsResponses];
|
|
379
|
-
|
|
380
351
|
export type ApiTokenControllerCreateTokenData = {
|
|
381
352
|
body: CreateApiTokenRequestDto;
|
|
382
353
|
path?: never;
|
|
@@ -454,40 +425,6 @@ export type ApiTokenControllerUpdateTokenResponses = {
|
|
|
454
425
|
export type ApiTokenControllerUpdateTokenResponse =
|
|
455
426
|
ApiTokenControllerUpdateTokenResponses[keyof ApiTokenControllerUpdateTokenResponses];
|
|
456
427
|
|
|
457
|
-
export type QuotesControllerCreateQuoteData = {
|
|
458
|
-
body: CreateQuoteRequestDto;
|
|
459
|
-
path?: never;
|
|
460
|
-
query?: never;
|
|
461
|
-
url: "/quotes";
|
|
462
|
-
};
|
|
463
|
-
|
|
464
|
-
export type QuotesControllerCreateQuoteErrors = {
|
|
465
|
-
401: unknown;
|
|
466
|
-
403: unknown;
|
|
467
|
-
};
|
|
468
|
-
|
|
469
|
-
export type QuotesControllerCreateQuoteResponses = {
|
|
470
|
-
201: unknown;
|
|
471
|
-
};
|
|
472
|
-
|
|
473
|
-
export type QuotesControllerGetQuoteData = {
|
|
474
|
-
body?: never;
|
|
475
|
-
path: {
|
|
476
|
-
id: string;
|
|
477
|
-
};
|
|
478
|
-
query?: never;
|
|
479
|
-
url: "/quotes/{id}";
|
|
480
|
-
};
|
|
481
|
-
|
|
482
|
-
export type QuotesControllerGetQuoteErrors = {
|
|
483
|
-
401: unknown;
|
|
484
|
-
403: unknown;
|
|
485
|
-
};
|
|
486
|
-
|
|
487
|
-
export type QuotesControllerGetQuoteResponses = {
|
|
488
|
-
200: unknown;
|
|
489
|
-
};
|
|
490
|
-
|
|
491
428
|
export type MissionsControllerCreateMissionsData = {
|
|
492
429
|
body: CreateMissionRequestDto;
|
|
493
430
|
path?: never;
|
package/src/event/types.gen.ts
CHANGED
|
@@ -32,14 +32,21 @@ export const Event = z.union([
|
|
|
32
32
|
timestamp: z.any(),
|
|
33
33
|
data: z
|
|
34
34
|
.object({
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
id: z
|
|
36
|
+
.object({ __type: z.literal("bigint"), value: z.string() })
|
|
37
|
+
.transform((wire) => BigInt(wire.value)),
|
|
38
|
+
vaultId: z
|
|
39
|
+
.object({ __type: z.literal("bigint"), value: z.string() })
|
|
40
|
+
.transform((wire) => BigInt(wire.value)),
|
|
41
|
+
amount: z
|
|
42
|
+
.object({ __type: z.literal("bigint"), value: z.string() })
|
|
43
|
+
.transform((wire) => BigInt(wire.value)),
|
|
38
44
|
zoneId: z.string(),
|
|
39
45
|
flightPlanId: z.number(),
|
|
40
|
-
captureStartTime: z.string(),
|
|
41
|
-
captureEndTime: z.string(),
|
|
46
|
+
captureStartTime: z.string().datetime({ offset: true }),
|
|
47
|
+
captureEndTime: z.string().datetime({ offset: true }),
|
|
42
48
|
detailsHash: z.string(),
|
|
49
|
+
requestor: z.string().regex(new RegExp("^0x[a-fA-F0-9]{40}$")),
|
|
43
50
|
})
|
|
44
51
|
.strict(),
|
|
45
52
|
})
|
|
@@ -51,8 +58,13 @@ export const Event = z.union([
|
|
|
51
58
|
timestamp: z.any(),
|
|
52
59
|
data: z
|
|
53
60
|
.object({
|
|
54
|
-
id: z
|
|
55
|
-
|
|
61
|
+
id: z
|
|
62
|
+
.object({ __type: z.literal("bigint"), value: z.string() })
|
|
63
|
+
.transform((wire) => BigInt(wire.value)),
|
|
64
|
+
amount: z
|
|
65
|
+
.object({ __type: z.literal("bigint"), value: z.string() })
|
|
66
|
+
.transform((wire) => BigInt(wire.value))
|
|
67
|
+
.optional(),
|
|
56
68
|
isOpen: z.boolean().optional(),
|
|
57
69
|
})
|
|
58
70
|
.strict(),
|