@xyo-network/xl1-rpc 1.16.4 → 1.16.6
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/neutral/index.mjs +411 -401
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/neutral/provider/viewer/JsonRpcXyoViewer.d.ts +4 -2
- package/dist/neutral/provider/viewer/JsonRpcXyoViewer.d.ts.map +1 -1
- package/dist/neutral/types/schema/AllRpcSchemas.d.ts +48 -48
- package/dist/neutral/types/schema/NetworkStakeViewerRpcSchemas.d.ts +2 -2
- package/dist/neutral/types/schema/NetworkStakeViewerRpcSchemas.d.ts.map +1 -1
- package/dist/neutral/types/schema/RewardsByPositionViewerRpcSchemas.d.ts +10 -10
- package/dist/neutral/types/schema/RewardsByStakerViewerRpcSchemas.d.ts +10 -10
- package/dist/neutral/types/schema/RewardsByStepViewerRpcSchemas.d.ts +10 -10
- package/dist/neutral/types/schema/RewardsTotalViewerRpcSchemas.d.ts +10 -10
- package/dist/neutral/types/schema/XyoRunnerRpcSchemas.d.ts +4 -4
- package/dist/neutral/types/schema/XyoSignerRpcSchemas.d.ts +10 -10
- package/dist/neutral/types/schema/XyoViewerRpcSchemas.d.ts +32 -32
- package/dist/neutral/types/schema/XyoViewerRpcSchemas.d.ts.map +1 -1
- package/dist/neutral/types/schema/common/BlockBoundWitness.d.ts +0 -2
- package/dist/neutral/types/schema/common/BlockBoundWitness.d.ts.map +1 -1
- package/dist/neutral/types/schema/common/HydratedTransaction.d.ts +14 -14
- package/dist/neutral/types/schema/common/RewardsRangeOptions.d.ts +1 -1
- package/dist/neutral/types/schema/common/RewardsRangeOptions.d.ts.map +1 -1
- package/dist/neutral/types/schema/common/TransactionBoundWitness.d.ts +8 -8
- package/dist/neutral/types/schema/common/TransactionBoundWitness.d.ts.map +1 -1
- package/dist/neutral/types/schema/common/index.d.ts +0 -1
- package/dist/neutral/types/schema/common/index.d.ts.map +1 -1
- package/dist/node/index-node.mjs +411 -401
- package/dist/node/index-node.mjs.map +1 -1
- package/dist/node/provider/viewer/JsonRpcXyoViewer.d.ts +4 -2
- package/dist/node/provider/viewer/JsonRpcXyoViewer.d.ts.map +1 -1
- package/dist/node/types/schema/AllRpcSchemas.d.ts +48 -48
- package/dist/node/types/schema/NetworkStakeViewerRpcSchemas.d.ts +2 -2
- package/dist/node/types/schema/NetworkStakeViewerRpcSchemas.d.ts.map +1 -1
- package/dist/node/types/schema/RewardsByPositionViewerRpcSchemas.d.ts +10 -10
- package/dist/node/types/schema/RewardsByStakerViewerRpcSchemas.d.ts +10 -10
- package/dist/node/types/schema/RewardsByStepViewerRpcSchemas.d.ts +10 -10
- package/dist/node/types/schema/RewardsTotalViewerRpcSchemas.d.ts +10 -10
- package/dist/node/types/schema/XyoRunnerRpcSchemas.d.ts +4 -4
- package/dist/node/types/schema/XyoSignerRpcSchemas.d.ts +10 -10
- package/dist/node/types/schema/XyoViewerRpcSchemas.d.ts +32 -32
- package/dist/node/types/schema/XyoViewerRpcSchemas.d.ts.map +1 -1
- package/dist/node/types/schema/common/BlockBoundWitness.d.ts +0 -2
- package/dist/node/types/schema/common/BlockBoundWitness.d.ts.map +1 -1
- package/dist/node/types/schema/common/HydratedTransaction.d.ts +14 -14
- package/dist/node/types/schema/common/RewardsRangeOptions.d.ts +1 -1
- package/dist/node/types/schema/common/RewardsRangeOptions.d.ts.map +1 -1
- package/dist/node/types/schema/common/TransactionBoundWitness.d.ts +8 -8
- package/dist/node/types/schema/common/TransactionBoundWitness.d.ts.map +1 -1
- package/dist/node/types/schema/common/index.d.ts +0 -1
- package/dist/node/types/schema/common/index.d.ts.map +1 -1
- package/package.json +11 -11
- package/src/provider/viewer/JsonRpcXyoViewer.ts +21 -5
- package/src/types/schema/NetworkStakeViewerRpcSchemas.ts +1 -1
- package/src/types/schema/XyoViewerRpcSchemas.ts +5 -4
- package/src/types/schema/common/BlockBoundWitness.ts +1 -4
- package/src/types/schema/common/RewardsRangeOptions.ts +1 -1
- package/src/types/schema/common/TransactionBoundWitness.ts +1 -1
- package/src/types/schema/common/index.ts +0 -1
- package/dist/neutral/types/schema/common/BlockRange.d.ts +0 -3
- package/dist/neutral/types/schema/common/BlockRange.d.ts.map +0 -1
- package/dist/node/types/schema/common/BlockRange.d.ts +0 -3
- package/dist/node/types/schema/common/BlockRange.d.ts.map +0 -1
- package/src/types/schema/common/BlockRange.ts +0 -6
package/dist/node/index-node.mjs
CHANGED
|
@@ -163,16 +163,42 @@ var NetworkStakingStepRewardsTotalViewerRpcNamespace = "networkStakingStepReward
|
|
|
163
163
|
var NetworkStakingStepRewardsViewerRpcNamespace = "networkStakingStepRewardsViewer";
|
|
164
164
|
|
|
165
165
|
// src/types/schema/NetworkStakeViewerRpcSchemas.ts
|
|
166
|
-
import { BigIntToJsonZod
|
|
166
|
+
import { BigIntToJsonZod, JsonToBigIntZod } from "@xylabs/hex";
|
|
167
|
+
import { BlockNumberZod } from "@xyo-network/xl1-protocol";
|
|
168
|
+
import * as z from "zod";
|
|
169
|
+
var NetworkStakeViewerRpcSchemas = {
|
|
170
|
+
networkStakeViewer_active: {
|
|
171
|
+
params: {
|
|
172
|
+
from: z.tuple([
|
|
173
|
+
BlockNumberZod.optional()
|
|
174
|
+
]),
|
|
175
|
+
to: z.tuple([
|
|
176
|
+
BlockNumberZod.optional()
|
|
177
|
+
])
|
|
178
|
+
},
|
|
179
|
+
result: {
|
|
180
|
+
from: z.tuple([
|
|
181
|
+
JsonToBigIntZod,
|
|
182
|
+
z.number()
|
|
183
|
+
]),
|
|
184
|
+
to: z.tuple([
|
|
185
|
+
BigIntToJsonZod,
|
|
186
|
+
z.number()
|
|
187
|
+
])
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
// src/types/schema/XyoPermissionsRpcSchemas.ts
|
|
167
193
|
import * as z20 from "zod";
|
|
168
194
|
|
|
169
195
|
// src/types/schema/common/Address.ts
|
|
170
196
|
import { AddressRegEx, toAddress } from "@xylabs/hex";
|
|
171
|
-
import * as
|
|
172
|
-
var AddressZod =
|
|
197
|
+
import * as z2 from "zod";
|
|
198
|
+
var AddressZod = z2.string().toLowerCase().regex(AddressRegEx).transform((v) => toAddress(v));
|
|
173
199
|
|
|
174
200
|
// src/types/schema/common/ArrayBuffer.ts
|
|
175
|
-
import * as
|
|
201
|
+
import * as z3 from "zod";
|
|
176
202
|
function base64Encode(u8) {
|
|
177
203
|
if (typeof Buffer !== "undefined" && typeof Buffer.from === "function") {
|
|
178
204
|
return Buffer.from(u8).toString("base64");
|
|
@@ -195,11 +221,11 @@ function base64Decode(b64) {
|
|
|
195
221
|
return u8;
|
|
196
222
|
}
|
|
197
223
|
__name(base64Decode, "base64Decode");
|
|
198
|
-
var ArrayBufferToJsonZod =
|
|
224
|
+
var ArrayBufferToJsonZod = z3.instanceof(ArrayBuffer).transform((x) => {
|
|
199
225
|
const u8 = new Uint8Array(x);
|
|
200
226
|
return base64Encode(u8);
|
|
201
227
|
});
|
|
202
|
-
var JsonToArrayBufferZod =
|
|
228
|
+
var JsonToArrayBufferZod = z3.string().transform((x) => {
|
|
203
229
|
const u8 = base64Decode(x);
|
|
204
230
|
return u8.buffer;
|
|
205
231
|
});
|
|
@@ -207,24 +233,24 @@ var JsonToArrayBufferZod = z2.string().transform((x) => {
|
|
|
207
233
|
// src/types/schema/common/BlockBoundWitness.ts
|
|
208
234
|
import { HashZod as HashZod2 } from "@xylabs/hex";
|
|
209
235
|
import { StorageMetaZod as StorageMetaZod3 } from "@xyo-network/payload-model";
|
|
210
|
-
import {
|
|
211
|
-
import * as
|
|
236
|
+
import { XL1BlockNumberZod } from "@xyo-network/xl1-protocol";
|
|
237
|
+
import * as z7 from "zod";
|
|
212
238
|
|
|
213
239
|
// src/types/schema/common/BoundWitness.ts
|
|
214
240
|
import { HashZod, HexZod } from "@xylabs/hex";
|
|
215
241
|
import { BoundWitnessSchema } from "@xyo-network/boundwitness-model";
|
|
216
242
|
import { StorageMetaZod as StorageMetaZod2 } from "@xyo-network/payload-model";
|
|
217
|
-
import * as
|
|
243
|
+
import * as z5 from "zod";
|
|
218
244
|
|
|
219
245
|
// src/types/schema/common/Payload.ts
|
|
220
246
|
import { StorageMetaZod } from "@xyo-network/payload-model";
|
|
221
|
-
import * as
|
|
222
|
-
var SchemaZod =
|
|
223
|
-
var PayloadZod =
|
|
247
|
+
import * as z4 from "zod";
|
|
248
|
+
var SchemaZod = z4.string();
|
|
249
|
+
var PayloadZod = z4.object({
|
|
224
250
|
schema: SchemaZod
|
|
225
|
-
}).catchall(
|
|
251
|
+
}).catchall(z4.any());
|
|
226
252
|
var PayloadWithStorageMetaZod = PayloadZod.extend(StorageMetaZod.shape);
|
|
227
|
-
var AnyPayloadZod = PayloadZod.catchall(
|
|
253
|
+
var AnyPayloadZod = PayloadZod.catchall(z4.json());
|
|
228
254
|
var AnyPayloadWithStorageMetaZod = AnyPayloadZod.extend(StorageMetaZod.shape);
|
|
229
255
|
function WithStorageMetaZod(valueZod) {
|
|
230
256
|
return StorageMetaZod.extend(valueZod.shape);
|
|
@@ -232,68 +258,59 @@ function WithStorageMetaZod(valueZod) {
|
|
|
232
258
|
__name(WithStorageMetaZod, "WithStorageMetaZod");
|
|
233
259
|
|
|
234
260
|
// src/types/schema/common/BoundWitness.ts
|
|
235
|
-
var BoundWitnessRequiredFieldsZod =
|
|
236
|
-
addresses:
|
|
237
|
-
payload_hashes:
|
|
238
|
-
payload_schemas:
|
|
239
|
-
previous_hashes:
|
|
261
|
+
var BoundWitnessRequiredFieldsZod = z5.object({
|
|
262
|
+
addresses: z5.array(AddressZod),
|
|
263
|
+
payload_hashes: z5.array(HashZod),
|
|
264
|
+
payload_schemas: z5.array(SchemaZod),
|
|
265
|
+
previous_hashes: z5.array(HashZod.nullable())
|
|
240
266
|
});
|
|
241
|
-
var BoundWitnessMetaZod =
|
|
267
|
+
var BoundWitnessMetaZod = z5.object({
|
|
242
268
|
$destination: AddressZod.optional(),
|
|
243
269
|
$sourceQuery: HashZod.optional(),
|
|
244
|
-
$signatures:
|
|
270
|
+
$signatures: z5.array(z5.union([
|
|
245
271
|
HexZod,
|
|
246
|
-
|
|
272
|
+
z5.null()
|
|
247
273
|
]))
|
|
248
274
|
});
|
|
249
275
|
var BoundWitnessZod = PayloadZod.extend({
|
|
250
|
-
schema:
|
|
276
|
+
schema: z5.literal(BoundWitnessSchema)
|
|
251
277
|
}).extend(BoundWitnessRequiredFieldsZod.shape).extend(BoundWitnessMetaZod.shape).refine((data) => data.$signatures.length === data.addresses.length, {
|
|
252
278
|
message: "$signatures length must equal addresses length"
|
|
253
279
|
});
|
|
254
|
-
var AnyBoundWitnessZod = BoundWitnessZod.catchall(
|
|
280
|
+
var AnyBoundWitnessZod = BoundWitnessZod.catchall(z5.any());
|
|
255
281
|
var UnsignedBoundWitnessZod = BoundWitnessZod.refine((data) => data.$signatures.includes(null), {
|
|
256
282
|
message: "all $signatures must be null"
|
|
257
283
|
});
|
|
258
|
-
var AnyUnsignedBoundWitnessZod = UnsignedBoundWitnessZod.catchall(
|
|
284
|
+
var AnyUnsignedBoundWitnessZod = UnsignedBoundWitnessZod.catchall(z5.any());
|
|
259
285
|
var UnsignedBoundWitnessWithStorageMetaZod = UnsignedBoundWitnessZod.safeExtend(BoundWitnessRequiredFieldsZod.shape).safeExtend(BoundWitnessMetaZod.shape).safeExtend(StorageMetaZod2.shape);
|
|
260
286
|
var SignedBoundWitnessZod = BoundWitnessZod.refine((data) => !data.$signatures.includes(null), {
|
|
261
287
|
message: "all $signatures must not be null"
|
|
262
288
|
});
|
|
263
289
|
var SignedBoundWitnessWithStorageMetaZod = UnsignedBoundWitnessWithStorageMetaZod;
|
|
264
|
-
var AnySignedBoundWitnessZod = UnsignedBoundWitnessZod.catchall(
|
|
265
|
-
var AnySignedBoundWitnessWithStorageMetaZod = UnsignedBoundWitnessWithStorageMetaZod.catchall(
|
|
290
|
+
var AnySignedBoundWitnessZod = UnsignedBoundWitnessZod.catchall(z5.any());
|
|
291
|
+
var AnySignedBoundWitnessWithStorageMetaZod = UnsignedBoundWitnessWithStorageMetaZod.catchall(z5.any());
|
|
266
292
|
|
|
267
293
|
// src/types/schema/common/Chain.ts
|
|
268
294
|
import { AddressRegEx as AddressRegEx2, toAddress as toAddress2 } from "@xylabs/hex";
|
|
269
|
-
import * as
|
|
270
|
-
var ChainZod =
|
|
295
|
+
import * as z6 from "zod";
|
|
296
|
+
var ChainZod = z6.string().toLowerCase().regex(AddressRegEx2).transform((v) => toAddress2(v));
|
|
271
297
|
|
|
272
298
|
// src/types/schema/common/BlockBoundWitness.ts
|
|
273
|
-
var
|
|
274
|
-
var XL1BlockNumberZod = BlockNumberZod.transform(asXL1BlockNumber);
|
|
275
|
-
var BlockBoundWitnessFieldsZod = z6.object({
|
|
299
|
+
var BlockBoundWitnessFieldsZod = z7.object({
|
|
276
300
|
block: XL1BlockNumberZod,
|
|
277
301
|
chain: ChainZod,
|
|
278
302
|
previous: HashZod2.nullable(),
|
|
279
|
-
protocol:
|
|
280
|
-
step_hashes:
|
|
303
|
+
protocol: z7.number(),
|
|
304
|
+
step_hashes: z7.array(HashZod2).optional()
|
|
281
305
|
});
|
|
282
|
-
var BlockBoundWitnessMetaZod =
|
|
283
|
-
$epoch:
|
|
306
|
+
var BlockBoundWitnessMetaZod = z7.object({
|
|
307
|
+
$epoch: z7.number()
|
|
284
308
|
});
|
|
285
309
|
var BlockBoundWitnessZod = UnsignedBoundWitnessZod.merge(StorageMetaZod3.partial()).merge(BlockBoundWitnessFieldsZod).merge(BlockBoundWitnessMetaZod);
|
|
286
310
|
var BlockBoundWitnessWithStorageMetaZod = UnsignedBoundWitnessWithStorageMetaZod.merge(BlockBoundWitnessFieldsZod).merge(BlockBoundWitnessMetaZod);
|
|
287
311
|
var SignedBlockBoundWitnessZod = SignedBoundWitnessZod.merge(StorageMetaZod3.partial()).merge(BlockBoundWitnessFieldsZod).merge(BlockBoundWitnessMetaZod);
|
|
288
312
|
var SignedBlockBoundWitnessWithStorageMetaZod = SignedBoundWitnessWithStorageMetaZod.merge(StorageMetaZod3.partial()).merge(BlockBoundWitnessFieldsZod).merge(BlockBoundWitnessMetaZod);
|
|
289
313
|
|
|
290
|
-
// src/types/schema/common/BlockRange.ts
|
|
291
|
-
import { z as z7 } from "zod";
|
|
292
|
-
var BlockRangeZod = z7.tuple([
|
|
293
|
-
z7.number().optional(),
|
|
294
|
-
z7.number().optional()
|
|
295
|
-
]);
|
|
296
|
-
|
|
297
314
|
// src/types/schema/common/HydratedBlock.ts
|
|
298
315
|
import * as z8 from "zod";
|
|
299
316
|
var HydratedBlockZod = z8.tuple([
|
|
@@ -324,15 +341,16 @@ import * as z11 from "zod";
|
|
|
324
341
|
|
|
325
342
|
// src/types/schema/common/TransactionBoundWitness.ts
|
|
326
343
|
import { StorageMetaZod as StorageMetaZod4 } from "@xyo-network/payload-model";
|
|
344
|
+
import { BlockNumberZod as BlockNumberZod2 } from "@xyo-network/xl1-protocol";
|
|
327
345
|
import * as z10 from "zod";
|
|
328
346
|
|
|
329
347
|
// src/types/schema/common/TransactionFees.ts
|
|
330
|
-
import { BigIntToJsonZod, HexZod as HexZod2, JsonToBigIntZod } from "@xylabs/hex";
|
|
348
|
+
import { BigIntToJsonZod as BigIntToJsonZod2, HexZod as HexZod2, JsonToBigIntZod as JsonToBigIntZod2 } from "@xylabs/hex";
|
|
331
349
|
import { asAttoXL1 } from "@xyo-network/xl1-protocol";
|
|
332
350
|
import * as z9 from "zod";
|
|
333
351
|
var AttoZod = z9.bigint();
|
|
334
|
-
var JsonToAttoZod =
|
|
335
|
-
var AttoToJsonZod =
|
|
352
|
+
var JsonToAttoZod = JsonToBigIntZod2.transform((v) => asAttoXL1(v));
|
|
353
|
+
var AttoToJsonZod = BigIntToJsonZod2;
|
|
336
354
|
var TransactionFeesHexZod = z9.object({
|
|
337
355
|
base: HexZod2,
|
|
338
356
|
gasLimit: HexZod2,
|
|
@@ -346,28 +364,28 @@ var TransactionFeesBigIntZod = z9.object({
|
|
|
346
364
|
priority: AttoZod
|
|
347
365
|
});
|
|
348
366
|
var TransactionFeesJsonToBigIntZod = TransactionFeesHexZod.transform((val) => ({
|
|
349
|
-
base:
|
|
350
|
-
gasLimit:
|
|
351
|
-
gasPrice:
|
|
352
|
-
priority:
|
|
367
|
+
base: JsonToBigIntZod2.parse(val.base),
|
|
368
|
+
gasLimit: JsonToBigIntZod2.parse(val.gasLimit),
|
|
369
|
+
gasPrice: JsonToBigIntZod2.parse(val.gasPrice),
|
|
370
|
+
priority: JsonToBigIntZod2.parse(val.priority)
|
|
353
371
|
}));
|
|
354
372
|
var TransactionFeesBigIntToJsonZod = TransactionFeesBigIntZod.transform((val) => ({
|
|
355
|
-
base:
|
|
356
|
-
gasLimit:
|
|
357
|
-
gasPrice:
|
|
358
|
-
priority:
|
|
373
|
+
base: BigIntToJsonZod2.parse(val.base),
|
|
374
|
+
gasLimit: BigIntToJsonZod2.parse(val.gasLimit),
|
|
375
|
+
gasPrice: BigIntToJsonZod2.parse(val.gasPrice),
|
|
376
|
+
priority: BigIntToJsonZod2.parse(val.priority)
|
|
359
377
|
}));
|
|
360
378
|
|
|
361
379
|
// src/types/schema/common/TransactionBoundWitness.ts
|
|
362
380
|
var BlockStartZod = z10.object({
|
|
363
|
-
nbf:
|
|
381
|
+
nbf: BlockNumberZod2
|
|
364
382
|
});
|
|
365
383
|
var BlockEndZod = z10.object({
|
|
366
|
-
exp:
|
|
384
|
+
exp: BlockNumberZod2
|
|
367
385
|
});
|
|
368
386
|
var BlockDurationZod = z10.object({
|
|
369
|
-
nbf:
|
|
370
|
-
exp:
|
|
387
|
+
nbf: BlockNumberZod2,
|
|
388
|
+
exp: BlockNumberZod2
|
|
371
389
|
});
|
|
372
390
|
var BlockScriptsZod = z10.object({
|
|
373
391
|
script: z10.array(z10.string()).optional()
|
|
@@ -444,6 +462,7 @@ var RequestedPermissionZod = z13.object({
|
|
|
444
462
|
});
|
|
445
463
|
|
|
446
464
|
// src/types/schema/common/RewardsRangeOptions.ts
|
|
465
|
+
import { BlockRangeZod } from "@xyo-network/xl1-protocol";
|
|
447
466
|
import { z as z15 } from "zod";
|
|
448
467
|
|
|
449
468
|
// src/types/schema/common/StepIdentity.ts
|
|
@@ -541,83 +560,58 @@ var TransferPairZod = z19.tuple([
|
|
|
541
560
|
AddressZod
|
|
542
561
|
]);
|
|
543
562
|
|
|
544
|
-
// src/types/schema/NetworkStakeViewerRpcSchemas.ts
|
|
545
|
-
var NetworkStakeViewerRpcSchemas = {
|
|
546
|
-
networkStakeViewer_active: {
|
|
547
|
-
params: {
|
|
548
|
-
from: z20.tuple([
|
|
549
|
-
BlockNumberZod.optional()
|
|
550
|
-
]),
|
|
551
|
-
to: z20.tuple([
|
|
552
|
-
BlockNumberZod.optional()
|
|
553
|
-
])
|
|
554
|
-
},
|
|
555
|
-
result: {
|
|
556
|
-
from: z20.tuple([
|
|
557
|
-
JsonToBigIntZod2,
|
|
558
|
-
z20.number()
|
|
559
|
-
]),
|
|
560
|
-
to: z20.tuple([
|
|
561
|
-
BigIntToJsonZod2,
|
|
562
|
-
z20.number()
|
|
563
|
-
])
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
};
|
|
567
|
-
|
|
568
563
|
// src/types/schema/XyoPermissionsRpcSchemas.ts
|
|
569
|
-
import * as z21 from "zod";
|
|
570
564
|
var XyoPermissionsRpcSchemas = {
|
|
571
565
|
xyoPermissions_getPermissions: {
|
|
572
566
|
params: {
|
|
573
|
-
to:
|
|
574
|
-
from:
|
|
567
|
+
to: z20.array(z20.any()).length(0),
|
|
568
|
+
from: z20.array(z20.any()).length(0)
|
|
575
569
|
},
|
|
576
570
|
result: {
|
|
577
|
-
to:
|
|
578
|
-
from:
|
|
571
|
+
to: z20.array(InvokerPermissionZod),
|
|
572
|
+
from: z20.array(InvokerPermissionZod)
|
|
579
573
|
}
|
|
580
574
|
},
|
|
581
575
|
xyoPermissions_requestPermissions: {
|
|
582
576
|
params: {
|
|
583
|
-
to:
|
|
584
|
-
|
|
577
|
+
to: z20.tuple([
|
|
578
|
+
z20.array(PermissionRequestZod)
|
|
585
579
|
]),
|
|
586
|
-
from:
|
|
587
|
-
|
|
580
|
+
from: z20.tuple([
|
|
581
|
+
z20.array(PermissionRequestZod)
|
|
588
582
|
])
|
|
589
583
|
},
|
|
590
584
|
result: {
|
|
591
|
-
to:
|
|
592
|
-
from:
|
|
585
|
+
to: z20.array(RequestedPermissionZod),
|
|
586
|
+
from: z20.array(RequestedPermissionZod)
|
|
593
587
|
}
|
|
594
588
|
},
|
|
595
589
|
xyoPermissions_revokePermissions: {
|
|
596
590
|
params: {
|
|
597
|
-
to:
|
|
598
|
-
|
|
591
|
+
to: z20.tuple([
|
|
592
|
+
z20.array(PermissionRequestZod)
|
|
599
593
|
]),
|
|
600
|
-
from:
|
|
601
|
-
|
|
594
|
+
from: z20.tuple([
|
|
595
|
+
z20.array(PermissionRequestZod)
|
|
602
596
|
])
|
|
603
597
|
},
|
|
604
598
|
result: {
|
|
605
|
-
to:
|
|
606
|
-
from:
|
|
599
|
+
to: z20.array(RequestedPermissionZod),
|
|
600
|
+
from: z20.array(RequestedPermissionZod)
|
|
607
601
|
}
|
|
608
602
|
}
|
|
609
603
|
};
|
|
610
604
|
|
|
611
605
|
// src/types/schema/XyoRunnerRpcSchemas.ts
|
|
612
606
|
import { HashToJsonZod, JsonToHashZod } from "@xylabs/hex";
|
|
613
|
-
import * as
|
|
607
|
+
import * as z21 from "zod";
|
|
614
608
|
var XyoRunnerRpcSchemas = {
|
|
615
609
|
xyoRunner_broadcastTransaction: {
|
|
616
610
|
params: {
|
|
617
|
-
to:
|
|
611
|
+
to: z21.tuple([
|
|
618
612
|
SignedHydratedTransactionZod
|
|
619
613
|
]),
|
|
620
|
-
from:
|
|
614
|
+
from: z21.tuple([
|
|
621
615
|
SignedHydratedTransactionZod
|
|
622
616
|
])
|
|
623
617
|
},
|
|
@@ -630,12 +624,12 @@ var XyoRunnerRpcSchemas = {
|
|
|
630
624
|
|
|
631
625
|
// src/types/schema/XyoSignerRpcSchemas.ts
|
|
632
626
|
import { asHydratedTransactionWithStorageMeta } from "@xyo-network/xl1-protocol";
|
|
633
|
-
import { z as
|
|
627
|
+
import { z as z22 } from "zod";
|
|
634
628
|
var XyoSignerRpcSchemas = {
|
|
635
629
|
xyoSigner_address: {
|
|
636
630
|
params: {
|
|
637
|
-
to:
|
|
638
|
-
from:
|
|
631
|
+
to: z22.array(z22.any()).length(0).optional(),
|
|
632
|
+
from: z22.array(z22.any()).length(0).optional()
|
|
639
633
|
},
|
|
640
634
|
result: {
|
|
641
635
|
to: AddressZod,
|
|
@@ -644,10 +638,10 @@ var XyoSignerRpcSchemas = {
|
|
|
644
638
|
},
|
|
645
639
|
xyoSigner_signTransaction: {
|
|
646
640
|
params: {
|
|
647
|
-
to:
|
|
641
|
+
to: z22.tuple([
|
|
648
642
|
UnsignedHydratedTransactionZod
|
|
649
643
|
]),
|
|
650
|
-
from:
|
|
644
|
+
from: z22.tuple([
|
|
651
645
|
UnsignedHydratedTransactionZod
|
|
652
646
|
])
|
|
653
647
|
},
|
|
@@ -662,14 +656,15 @@ var XyoSignerRpcSchemas = {
|
|
|
662
656
|
|
|
663
657
|
// src/types/schema/XyoViewerRpcSchemas.ts
|
|
664
658
|
import { BigIntToJsonZod as BigIntToJsonZod3, HashToJsonZod as HashToJsonZod2, HashZod as HashZod3, JsonToBigIntZod as JsonToBigIntZod3, JsonToHashZod as JsonToHashZod2 } from "@xylabs/hex";
|
|
665
|
-
import
|
|
659
|
+
import { BlockNumberZod as BlockNumberZod3, BlockRangeZod as BlockRangeZod2, XL1BlockRangeZod } from "@xyo-network/xl1-protocol";
|
|
660
|
+
import * as z23 from "zod";
|
|
666
661
|
var XyoViewerRpcSchemas = {
|
|
667
662
|
xyoViewer_networkStakeStepRewardClaimedByAddress: {
|
|
668
663
|
params: {
|
|
669
|
-
to:
|
|
664
|
+
to: z23.tuple([
|
|
670
665
|
AddressZod
|
|
671
666
|
]),
|
|
672
|
-
from:
|
|
667
|
+
from: z23.tuple([
|
|
673
668
|
AddressZod
|
|
674
669
|
])
|
|
675
670
|
},
|
|
@@ -680,51 +675,51 @@ var XyoViewerRpcSchemas = {
|
|
|
680
675
|
},
|
|
681
676
|
xyoViewer_networkStakeStepRewardAddressReward: {
|
|
682
677
|
params: {
|
|
683
|
-
to:
|
|
678
|
+
to: z23.tuple([
|
|
684
679
|
StepIdentityZod,
|
|
685
680
|
AddressZod
|
|
686
681
|
]),
|
|
687
|
-
from:
|
|
682
|
+
from: z23.tuple([
|
|
688
683
|
StepIdentityZod,
|
|
689
684
|
AddressZod
|
|
690
685
|
])
|
|
691
686
|
},
|
|
692
687
|
result: {
|
|
693
|
-
to:
|
|
694
|
-
from:
|
|
688
|
+
to: z23.record(AddressZod, BigIntToJsonZod3),
|
|
689
|
+
from: z23.record(AddressZod, JsonToBigIntZod3)
|
|
695
690
|
}
|
|
696
691
|
},
|
|
697
692
|
xyoViewer_networkStakeStepRewardAddressHistory: {
|
|
698
693
|
params: {
|
|
699
|
-
to:
|
|
694
|
+
to: z23.tuple([
|
|
700
695
|
AddressZod
|
|
701
696
|
]),
|
|
702
|
-
from:
|
|
697
|
+
from: z23.tuple([
|
|
703
698
|
AddressZod
|
|
704
699
|
])
|
|
705
700
|
},
|
|
706
701
|
result: {
|
|
707
|
-
to:
|
|
708
|
-
from:
|
|
702
|
+
to: z23.record(AddressZod, BigIntToJsonZod3),
|
|
703
|
+
from: z23.record(AddressZod, JsonToBigIntZod3)
|
|
709
704
|
}
|
|
710
705
|
},
|
|
711
706
|
xyoViewer_networkStakeStepRewardAddressShare: {
|
|
712
707
|
params: {
|
|
713
|
-
to:
|
|
708
|
+
to: z23.tuple([
|
|
714
709
|
StepIdentityZod,
|
|
715
710
|
AddressZod
|
|
716
711
|
]),
|
|
717
|
-
from:
|
|
712
|
+
from: z23.tuple([
|
|
718
713
|
StepIdentityZod,
|
|
719
714
|
AddressZod
|
|
720
715
|
])
|
|
721
716
|
},
|
|
722
717
|
result: {
|
|
723
|
-
to:
|
|
718
|
+
to: z23.tuple([
|
|
724
719
|
BigIntToJsonZod3,
|
|
725
720
|
BigIntToJsonZod3
|
|
726
721
|
]),
|
|
727
|
-
from:
|
|
722
|
+
from: z23.tuple([
|
|
728
723
|
JsonToBigIntZod3,
|
|
729
724
|
JsonToBigIntZod3
|
|
730
725
|
])
|
|
@@ -732,11 +727,11 @@ var XyoViewerRpcSchemas = {
|
|
|
732
727
|
},
|
|
733
728
|
xyoViewer_networkStakeStepRewardWeightForAddress: {
|
|
734
729
|
params: {
|
|
735
|
-
to:
|
|
730
|
+
to: z23.tuple([
|
|
736
731
|
StepIdentityZod,
|
|
737
732
|
AddressZod
|
|
738
733
|
]),
|
|
739
|
-
from:
|
|
734
|
+
from: z23.tuple([
|
|
740
735
|
StepIdentityZod,
|
|
741
736
|
AddressZod
|
|
742
737
|
])
|
|
@@ -748,10 +743,10 @@ var XyoViewerRpcSchemas = {
|
|
|
748
743
|
},
|
|
749
744
|
xyoViewer_networkStakeStepRewardUnclaimedByAddress: {
|
|
750
745
|
params: {
|
|
751
|
-
to:
|
|
746
|
+
to: z23.tuple([
|
|
752
747
|
AddressZod
|
|
753
748
|
]),
|
|
754
|
-
from:
|
|
749
|
+
from: z23.tuple([
|
|
755
750
|
AddressZod
|
|
756
751
|
])
|
|
757
752
|
},
|
|
@@ -762,27 +757,27 @@ var XyoViewerRpcSchemas = {
|
|
|
762
757
|
},
|
|
763
758
|
xyoViewer_networkStakeStepRewardPoolRewards: {
|
|
764
759
|
params: {
|
|
765
|
-
to:
|
|
760
|
+
to: z23.tuple([
|
|
766
761
|
StepIdentityZod
|
|
767
762
|
]),
|
|
768
|
-
from:
|
|
763
|
+
from: z23.tuple([
|
|
769
764
|
StepIdentityZod
|
|
770
765
|
])
|
|
771
766
|
},
|
|
772
767
|
result: {
|
|
773
|
-
to:
|
|
774
|
-
from:
|
|
768
|
+
to: z23.record(AddressZod, BigIntToJsonZod3),
|
|
769
|
+
from: z23.record(AddressZod, JsonToBigIntZod3)
|
|
775
770
|
}
|
|
776
771
|
},
|
|
777
772
|
xyoViewer_networkStakeStepRewardPositionWeight: {
|
|
778
773
|
params: {
|
|
779
|
-
to:
|
|
774
|
+
to: z23.tuple([
|
|
780
775
|
StepIdentityZod,
|
|
781
|
-
|
|
776
|
+
z23.number()
|
|
782
777
|
]),
|
|
783
|
-
from:
|
|
778
|
+
from: z23.tuple([
|
|
784
779
|
StepIdentityZod,
|
|
785
|
-
|
|
780
|
+
z23.number()
|
|
786
781
|
])
|
|
787
782
|
},
|
|
788
783
|
result: {
|
|
@@ -792,13 +787,13 @@ var XyoViewerRpcSchemas = {
|
|
|
792
787
|
},
|
|
793
788
|
xyoViewer_networkStakeStepRewardPotentialPositionLoss: {
|
|
794
789
|
params: {
|
|
795
|
-
to:
|
|
790
|
+
to: z23.tuple([
|
|
796
791
|
StepIdentityZod,
|
|
797
|
-
|
|
792
|
+
z23.number()
|
|
798
793
|
]),
|
|
799
|
-
from:
|
|
794
|
+
from: z23.tuple([
|
|
800
795
|
StepIdentityZod,
|
|
801
|
-
|
|
796
|
+
z23.number()
|
|
802
797
|
])
|
|
803
798
|
},
|
|
804
799
|
result: {
|
|
@@ -808,10 +803,10 @@ var XyoViewerRpcSchemas = {
|
|
|
808
803
|
},
|
|
809
804
|
xyoViewer_networkStakeStepRewardForStep: {
|
|
810
805
|
params: {
|
|
811
|
-
to:
|
|
806
|
+
to: z23.tuple([
|
|
812
807
|
StepIdentityZod
|
|
813
808
|
]),
|
|
814
|
-
from:
|
|
809
|
+
from: z23.tuple([
|
|
815
810
|
StepIdentityZod
|
|
816
811
|
])
|
|
817
812
|
},
|
|
@@ -822,10 +817,10 @@ var XyoViewerRpcSchemas = {
|
|
|
822
817
|
},
|
|
823
818
|
xyoViewer_networkStakeStepRewardRandomizer: {
|
|
824
819
|
params: {
|
|
825
|
-
to:
|
|
820
|
+
to: z23.tuple([
|
|
826
821
|
StepIdentityZod
|
|
827
822
|
]),
|
|
828
|
-
from:
|
|
823
|
+
from: z23.tuple([
|
|
829
824
|
StepIdentityZod
|
|
830
825
|
])
|
|
831
826
|
},
|
|
@@ -836,49 +831,49 @@ var XyoViewerRpcSchemas = {
|
|
|
836
831
|
},
|
|
837
832
|
xyoViewer_networkStakeStepRewardStakerCount: {
|
|
838
833
|
params: {
|
|
839
|
-
to:
|
|
834
|
+
to: z23.tuple([
|
|
840
835
|
StepIdentityZod
|
|
841
836
|
]),
|
|
842
|
-
from:
|
|
837
|
+
from: z23.tuple([
|
|
843
838
|
StepIdentityZod
|
|
844
839
|
])
|
|
845
840
|
},
|
|
846
841
|
result: {
|
|
847
|
-
to:
|
|
848
|
-
from:
|
|
842
|
+
to: z23.number(),
|
|
843
|
+
from: z23.number()
|
|
849
844
|
}
|
|
850
845
|
},
|
|
851
846
|
xyoViewer_networkStakeStepRewardPoolShares: {
|
|
852
847
|
params: {
|
|
853
|
-
to:
|
|
848
|
+
to: z23.tuple([
|
|
854
849
|
StepIdentityZod
|
|
855
850
|
]),
|
|
856
|
-
from:
|
|
851
|
+
from: z23.tuple([
|
|
857
852
|
StepIdentityZod
|
|
858
853
|
])
|
|
859
854
|
},
|
|
860
855
|
result: {
|
|
861
|
-
to:
|
|
862
|
-
from:
|
|
856
|
+
to: z23.record(AddressZod, BigIntToJsonZod3),
|
|
857
|
+
from: z23.record(AddressZod, JsonToBigIntZod3)
|
|
863
858
|
}
|
|
864
859
|
},
|
|
865
860
|
xyoViewer_networkStakeStepRewardForStepForPosition: {
|
|
866
861
|
params: {
|
|
867
|
-
to:
|
|
862
|
+
to: z23.tuple([
|
|
868
863
|
StepIdentityZod,
|
|
869
|
-
|
|
864
|
+
z23.number()
|
|
870
865
|
]),
|
|
871
|
-
from:
|
|
866
|
+
from: z23.tuple([
|
|
872
867
|
StepIdentityZod,
|
|
873
|
-
|
|
868
|
+
z23.number()
|
|
874
869
|
])
|
|
875
870
|
},
|
|
876
871
|
result: {
|
|
877
|
-
to:
|
|
872
|
+
to: z23.tuple([
|
|
878
873
|
BigIntToJsonZod3,
|
|
879
874
|
BigIntToJsonZod3
|
|
880
875
|
]),
|
|
881
|
-
from:
|
|
876
|
+
from: z23.tuple([
|
|
882
877
|
JsonToBigIntZod3,
|
|
883
878
|
JsonToBigIntZod3
|
|
884
879
|
])
|
|
@@ -886,27 +881,27 @@ var XyoViewerRpcSchemas = {
|
|
|
886
881
|
},
|
|
887
882
|
xyoViewer_networkStakeStepRewardForPosition: {
|
|
888
883
|
params: {
|
|
889
|
-
to:
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
884
|
+
to: z23.tuple([
|
|
885
|
+
z23.number(),
|
|
886
|
+
z23.tuple([
|
|
887
|
+
z23.number(),
|
|
888
|
+
z23.number()
|
|
894
889
|
])
|
|
895
890
|
]),
|
|
896
|
-
from:
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
891
|
+
from: z23.tuple([
|
|
892
|
+
z23.number(),
|
|
893
|
+
z23.tuple([
|
|
894
|
+
z23.number(),
|
|
895
|
+
z23.number()
|
|
901
896
|
])
|
|
902
897
|
])
|
|
903
898
|
},
|
|
904
899
|
result: {
|
|
905
|
-
to:
|
|
900
|
+
to: z23.tuple([
|
|
906
901
|
BigIntToJsonZod3,
|
|
907
902
|
BigIntToJsonZod3
|
|
908
903
|
]),
|
|
909
|
-
from:
|
|
904
|
+
from: z23.tuple([
|
|
910
905
|
JsonToBigIntZod3,
|
|
911
906
|
JsonToBigIntZod3
|
|
912
907
|
])
|
|
@@ -914,16 +909,16 @@ var XyoViewerRpcSchemas = {
|
|
|
914
909
|
},
|
|
915
910
|
xyoViewer_networkStakeStepRewardsForRange: {
|
|
916
911
|
params: {
|
|
917
|
-
to:
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
912
|
+
to: z23.tuple([
|
|
913
|
+
z23.tuple([
|
|
914
|
+
z23.number(),
|
|
915
|
+
z23.number()
|
|
921
916
|
])
|
|
922
917
|
]),
|
|
923
|
-
from:
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
918
|
+
from: z23.tuple([
|
|
919
|
+
z23.tuple([
|
|
920
|
+
z23.number(),
|
|
921
|
+
z23.number()
|
|
927
922
|
])
|
|
928
923
|
])
|
|
929
924
|
},
|
|
@@ -934,18 +929,18 @@ var XyoViewerRpcSchemas = {
|
|
|
934
929
|
},
|
|
935
930
|
xyoViewer_networkStakeStepRewardsForStepLevel: {
|
|
936
931
|
params: {
|
|
937
|
-
to:
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
932
|
+
to: z23.tuple([
|
|
933
|
+
z23.number(),
|
|
934
|
+
z23.tuple([
|
|
935
|
+
z23.number(),
|
|
936
|
+
z23.number()
|
|
942
937
|
])
|
|
943
938
|
]),
|
|
944
|
-
from:
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
939
|
+
from: z23.tuple([
|
|
940
|
+
z23.number(),
|
|
941
|
+
z23.tuple([
|
|
942
|
+
z23.number(),
|
|
943
|
+
z23.number()
|
|
949
944
|
])
|
|
950
945
|
])
|
|
951
946
|
},
|
|
@@ -956,27 +951,27 @@ var XyoViewerRpcSchemas = {
|
|
|
956
951
|
},
|
|
957
952
|
xyoViewer_networkStakeStepRewardsForPosition: {
|
|
958
953
|
params: {
|
|
959
|
-
to:
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
954
|
+
to: z23.tuple([
|
|
955
|
+
z23.number(),
|
|
956
|
+
z23.tuple([
|
|
957
|
+
z23.number(),
|
|
958
|
+
z23.number()
|
|
964
959
|
])
|
|
965
960
|
]),
|
|
966
|
-
from:
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
961
|
+
from: z23.tuple([
|
|
962
|
+
z23.number(),
|
|
963
|
+
z23.tuple([
|
|
964
|
+
z23.number(),
|
|
965
|
+
z23.number()
|
|
971
966
|
])
|
|
972
967
|
])
|
|
973
968
|
},
|
|
974
969
|
result: {
|
|
975
|
-
to:
|
|
970
|
+
to: z23.record(z23.string(), z23.tuple([
|
|
976
971
|
BigIntToJsonZod3,
|
|
977
972
|
BigIntToJsonZod3
|
|
978
973
|
])),
|
|
979
|
-
from:
|
|
974
|
+
from: z23.record(z23.string(), z23.tuple([
|
|
980
975
|
JsonToBigIntZod3,
|
|
981
976
|
JsonToBigIntZod3
|
|
982
977
|
]))
|
|
@@ -984,10 +979,10 @@ var XyoViewerRpcSchemas = {
|
|
|
984
979
|
},
|
|
985
980
|
xyoViewer_accountBalance: {
|
|
986
981
|
params: {
|
|
987
|
-
to:
|
|
982
|
+
to: z23.tuple([
|
|
988
983
|
AddressZod
|
|
989
984
|
]),
|
|
990
|
-
from:
|
|
985
|
+
from: z23.tuple([
|
|
991
986
|
AddressZod
|
|
992
987
|
])
|
|
993
988
|
},
|
|
@@ -998,22 +993,28 @@ var XyoViewerRpcSchemas = {
|
|
|
998
993
|
},
|
|
999
994
|
xyoViewer_accountBalanceHistory: {
|
|
1000
995
|
params: {
|
|
1001
|
-
to:
|
|
996
|
+
to: z23.tuple([
|
|
1002
997
|
AddressZod,
|
|
1003
|
-
|
|
998
|
+
z23.union([
|
|
999
|
+
XL1BlockRangeZod,
|
|
1000
|
+
HashZod3
|
|
1001
|
+
]).optional()
|
|
1004
1002
|
]),
|
|
1005
|
-
from:
|
|
1003
|
+
from: z23.tuple([
|
|
1006
1004
|
AddressZod,
|
|
1007
|
-
|
|
1005
|
+
z23.union([
|
|
1006
|
+
XL1BlockRangeZod,
|
|
1007
|
+
HashZod3
|
|
1008
|
+
]).optional()
|
|
1008
1009
|
])
|
|
1009
1010
|
},
|
|
1010
1011
|
result: {
|
|
1011
|
-
to:
|
|
1012
|
+
to: z23.array(z23.tuple([
|
|
1012
1013
|
BlockBoundWitnessZod,
|
|
1013
1014
|
TransactionBoundWitnessZod.nullable(),
|
|
1014
1015
|
TransferZodWithStorageMeta
|
|
1015
1016
|
])),
|
|
1016
|
-
from:
|
|
1017
|
+
from: z23.array(z23.tuple([
|
|
1017
1018
|
BlockBoundWitnessZod,
|
|
1018
1019
|
TransactionBoundWitnessZod.nullable(),
|
|
1019
1020
|
TransferZodWithStorageMeta
|
|
@@ -1022,10 +1023,10 @@ var XyoViewerRpcSchemas = {
|
|
|
1022
1023
|
},
|
|
1023
1024
|
xyoViewer_transferPairBalance: {
|
|
1024
1025
|
params: {
|
|
1025
|
-
to:
|
|
1026
|
+
to: z23.tuple([
|
|
1026
1027
|
TransferPairZod
|
|
1027
1028
|
]),
|
|
1028
|
-
from:
|
|
1029
|
+
from: z23.tuple([
|
|
1029
1030
|
TransferPairZod
|
|
1030
1031
|
])
|
|
1031
1032
|
},
|
|
@@ -1036,27 +1037,27 @@ var XyoViewerRpcSchemas = {
|
|
|
1036
1037
|
},
|
|
1037
1038
|
xyoViewer_transferPairBalanceHistory: {
|
|
1038
1039
|
params: {
|
|
1039
|
-
to:
|
|
1040
|
+
to: z23.tuple([
|
|
1040
1041
|
TransferPairZod
|
|
1041
1042
|
]),
|
|
1042
|
-
from:
|
|
1043
|
+
from: z23.tuple([
|
|
1043
1044
|
TransferPairZod
|
|
1044
1045
|
])
|
|
1045
1046
|
},
|
|
1046
1047
|
result: {
|
|
1047
|
-
to:
|
|
1048
|
+
to: z23.array(z23.tuple([
|
|
1048
1049
|
BlockBoundWitnessWithStorageMetaZod,
|
|
1049
|
-
|
|
1050
|
+
z23.union([
|
|
1050
1051
|
TransactionBoundWitnessZod,
|
|
1051
|
-
|
|
1052
|
+
z23.null()
|
|
1052
1053
|
]),
|
|
1053
1054
|
PayloadZod
|
|
1054
1055
|
])),
|
|
1055
|
-
from:
|
|
1056
|
+
from: z23.array(z23.tuple([
|
|
1056
1057
|
BlockBoundWitnessWithStorageMetaZod,
|
|
1057
|
-
|
|
1058
|
+
z23.union([
|
|
1058
1059
|
TransactionBoundWitnessZod,
|
|
1059
|
-
|
|
1060
|
+
z23.null()
|
|
1060
1061
|
]),
|
|
1061
1062
|
PayloadZod
|
|
1062
1063
|
]))
|
|
@@ -1064,10 +1065,10 @@ var XyoViewerRpcSchemas = {
|
|
|
1064
1065
|
},
|
|
1065
1066
|
xyoViewer_transferBalance: {
|
|
1066
1067
|
params: {
|
|
1067
|
-
to:
|
|
1068
|
+
to: z23.tuple([
|
|
1068
1069
|
AddressZod
|
|
1069
1070
|
]),
|
|
1070
|
-
from:
|
|
1071
|
+
from: z23.tuple([
|
|
1071
1072
|
AddressZod
|
|
1072
1073
|
])
|
|
1073
1074
|
},
|
|
@@ -1078,29 +1079,29 @@ var XyoViewerRpcSchemas = {
|
|
|
1078
1079
|
},
|
|
1079
1080
|
xyoViewer_transferBalanceHistory: {
|
|
1080
1081
|
params: {
|
|
1081
|
-
to:
|
|
1082
|
+
to: z23.tuple([
|
|
1082
1083
|
AddressZod,
|
|
1083
|
-
|
|
1084
|
+
BlockRangeZod2.optional()
|
|
1084
1085
|
]),
|
|
1085
|
-
from:
|
|
1086
|
+
from: z23.tuple([
|
|
1086
1087
|
AddressZod,
|
|
1087
|
-
|
|
1088
|
+
BlockRangeZod2.optional()
|
|
1088
1089
|
])
|
|
1089
1090
|
},
|
|
1090
1091
|
result: {
|
|
1091
|
-
to:
|
|
1092
|
+
to: z23.array(z23.tuple([
|
|
1092
1093
|
BlockBoundWitnessWithStorageMetaZod,
|
|
1093
|
-
|
|
1094
|
+
z23.union([
|
|
1094
1095
|
TransactionBoundWitnessZod,
|
|
1095
|
-
|
|
1096
|
+
z23.null()
|
|
1096
1097
|
]),
|
|
1097
1098
|
PayloadZod
|
|
1098
1099
|
])),
|
|
1099
|
-
from:
|
|
1100
|
+
from: z23.array(z23.tuple([
|
|
1100
1101
|
BlockBoundWitnessWithStorageMetaZod,
|
|
1101
|
-
|
|
1102
|
+
z23.union([
|
|
1102
1103
|
TransactionBoundWitnessZod,
|
|
1103
|
-
|
|
1104
|
+
z23.null()
|
|
1104
1105
|
]),
|
|
1105
1106
|
PayloadZod
|
|
1106
1107
|
]))
|
|
@@ -1108,10 +1109,10 @@ var XyoViewerRpcSchemas = {
|
|
|
1108
1109
|
},
|
|
1109
1110
|
xyoViewer_blockByHash: {
|
|
1110
1111
|
params: {
|
|
1111
|
-
to:
|
|
1112
|
+
to: z23.tuple([
|
|
1112
1113
|
HashToJsonZod2
|
|
1113
1114
|
]),
|
|
1114
|
-
from:
|
|
1115
|
+
from: z23.tuple([
|
|
1115
1116
|
JsonToHashZod2
|
|
1116
1117
|
])
|
|
1117
1118
|
},
|
|
@@ -1122,11 +1123,11 @@ var XyoViewerRpcSchemas = {
|
|
|
1122
1123
|
},
|
|
1123
1124
|
xyoViewer_blockByNumber: {
|
|
1124
1125
|
params: {
|
|
1125
|
-
to:
|
|
1126
|
-
|
|
1126
|
+
to: z23.tuple([
|
|
1127
|
+
z23.number()
|
|
1127
1128
|
]),
|
|
1128
|
-
from:
|
|
1129
|
-
|
|
1129
|
+
from: z23.tuple([
|
|
1130
|
+
z23.number()
|
|
1130
1131
|
])
|
|
1131
1132
|
},
|
|
1132
1133
|
result: {
|
|
@@ -1136,24 +1137,24 @@ var XyoViewerRpcSchemas = {
|
|
|
1136
1137
|
},
|
|
1137
1138
|
xyoViewer_blocksByHash: {
|
|
1138
1139
|
params: {
|
|
1139
|
-
to:
|
|
1140
|
+
to: z23.tuple([
|
|
1140
1141
|
HashZod3,
|
|
1141
|
-
|
|
1142
|
+
z23.number().optional()
|
|
1142
1143
|
]),
|
|
1143
|
-
from:
|
|
1144
|
+
from: z23.tuple([
|
|
1144
1145
|
HashZod3,
|
|
1145
|
-
|
|
1146
|
+
z23.number().optional()
|
|
1146
1147
|
])
|
|
1147
1148
|
},
|
|
1148
1149
|
result: {
|
|
1149
|
-
to:
|
|
1150
|
-
from:
|
|
1150
|
+
to: z23.array(SignedHydratedBlockZod),
|
|
1151
|
+
from: z23.array(SignedHydratedBlockZod)
|
|
1151
1152
|
}
|
|
1152
1153
|
},
|
|
1153
1154
|
xyoViewer_chainId: {
|
|
1154
1155
|
params: {
|
|
1155
|
-
to:
|
|
1156
|
-
from:
|
|
1156
|
+
to: z23.array(z23.any()).length(0).optional(),
|
|
1157
|
+
from: z23.array(z23.any()).length(0).optional()
|
|
1157
1158
|
},
|
|
1158
1159
|
result: {
|
|
1159
1160
|
to: AddressZod,
|
|
@@ -1162,11 +1163,11 @@ var XyoViewerRpcSchemas = {
|
|
|
1162
1163
|
},
|
|
1163
1164
|
xyoViewer_chainIdAtBlock: {
|
|
1164
1165
|
params: {
|
|
1165
|
-
to:
|
|
1166
|
-
|
|
1166
|
+
to: z23.tuple([
|
|
1167
|
+
BlockNumberZod3
|
|
1167
1168
|
]),
|
|
1168
|
-
from:
|
|
1169
|
-
|
|
1169
|
+
from: z23.tuple([
|
|
1170
|
+
BlockNumberZod3
|
|
1170
1171
|
])
|
|
1171
1172
|
},
|
|
1172
1173
|
result: {
|
|
@@ -1176,8 +1177,8 @@ var XyoViewerRpcSchemas = {
|
|
|
1176
1177
|
},
|
|
1177
1178
|
xyoViewer_currentBlock: {
|
|
1178
1179
|
params: {
|
|
1179
|
-
to:
|
|
1180
|
-
from:
|
|
1180
|
+
to: z23.array(z23.any()).length(0).optional(),
|
|
1181
|
+
from: z23.array(z23.any()).length(0).optional()
|
|
1181
1182
|
},
|
|
1182
1183
|
result: {
|
|
1183
1184
|
to: SignedHydratedBlockZod,
|
|
@@ -1186,8 +1187,8 @@ var XyoViewerRpcSchemas = {
|
|
|
1186
1187
|
},
|
|
1187
1188
|
xyoViewer_currentBlockHash: {
|
|
1188
1189
|
params: {
|
|
1189
|
-
to:
|
|
1190
|
-
from:
|
|
1190
|
+
to: z23.array(z23.any()).length(0).optional(),
|
|
1191
|
+
from: z23.array(z23.any()).length(0).optional()
|
|
1191
1192
|
},
|
|
1192
1193
|
result: {
|
|
1193
1194
|
to: HashZod3,
|
|
@@ -1196,33 +1197,33 @@ var XyoViewerRpcSchemas = {
|
|
|
1196
1197
|
},
|
|
1197
1198
|
xyoViewer_currentBlockNumber: {
|
|
1198
1199
|
params: {
|
|
1199
|
-
to:
|
|
1200
|
-
from:
|
|
1200
|
+
to: z23.array(z23.any()).length(0).optional(),
|
|
1201
|
+
from: z23.array(z23.any()).length(0).optional()
|
|
1201
1202
|
},
|
|
1202
1203
|
result: {
|
|
1203
|
-
to:
|
|
1204
|
-
from:
|
|
1204
|
+
to: BlockNumberZod3,
|
|
1205
|
+
from: BlockNumberZod3
|
|
1205
1206
|
}
|
|
1206
1207
|
},
|
|
1207
1208
|
xyoViewer_forkHistory: {
|
|
1208
1209
|
params: {
|
|
1209
|
-
to:
|
|
1210
|
-
from:
|
|
1210
|
+
to: z23.array(z23.any()).length(0).optional(),
|
|
1211
|
+
from: z23.array(z23.any()).length(0).optional()
|
|
1211
1212
|
},
|
|
1212
1213
|
result: {
|
|
1213
|
-
to:
|
|
1214
|
-
from:
|
|
1214
|
+
to: z23.record(z23.number(), AddressZod),
|
|
1215
|
+
from: z23.record(z23.number(), AddressZod)
|
|
1215
1216
|
}
|
|
1216
1217
|
},
|
|
1217
1218
|
xyoViewer_stakeByStaker: {
|
|
1218
1219
|
params: {
|
|
1219
|
-
to:
|
|
1220
|
+
to: z23.tuple([
|
|
1220
1221
|
AddressZod,
|
|
1221
|
-
|
|
1222
|
+
z23.number()
|
|
1222
1223
|
]),
|
|
1223
|
-
from:
|
|
1224
|
+
from: z23.tuple([
|
|
1224
1225
|
AddressZod,
|
|
1225
|
-
|
|
1226
|
+
z23.number()
|
|
1226
1227
|
])
|
|
1227
1228
|
},
|
|
1228
1229
|
result: {
|
|
@@ -1232,11 +1233,11 @@ var XyoViewerRpcSchemas = {
|
|
|
1232
1233
|
},
|
|
1233
1234
|
xyoViewer_stakeById: {
|
|
1234
1235
|
params: {
|
|
1235
|
-
to:
|
|
1236
|
-
|
|
1236
|
+
to: z23.tuple([
|
|
1237
|
+
z23.number()
|
|
1237
1238
|
]),
|
|
1238
|
-
from:
|
|
1239
|
-
|
|
1239
|
+
from: z23.tuple([
|
|
1240
|
+
z23.number()
|
|
1240
1241
|
])
|
|
1241
1242
|
},
|
|
1242
1243
|
result: {
|
|
@@ -1246,55 +1247,55 @@ var XyoViewerRpcSchemas = {
|
|
|
1246
1247
|
},
|
|
1247
1248
|
xyoViewer_stakedByStaker: {
|
|
1248
1249
|
params: {
|
|
1249
|
-
to:
|
|
1250
|
+
to: z23.tuple([
|
|
1250
1251
|
AddressZod
|
|
1251
1252
|
]),
|
|
1252
|
-
from:
|
|
1253
|
+
from: z23.tuple([
|
|
1253
1254
|
AddressZod
|
|
1254
1255
|
])
|
|
1255
1256
|
},
|
|
1256
1257
|
result: {
|
|
1257
|
-
to:
|
|
1258
|
-
from:
|
|
1258
|
+
to: z23.array(AddressZod),
|
|
1259
|
+
from: z23.array(AddressZod)
|
|
1259
1260
|
}
|
|
1260
1261
|
},
|
|
1261
1262
|
xyoViewer_stakesByStaker: {
|
|
1262
1263
|
params: {
|
|
1263
|
-
to:
|
|
1264
|
+
to: z23.tuple([
|
|
1264
1265
|
AddressZod
|
|
1265
1266
|
]),
|
|
1266
|
-
from:
|
|
1267
|
+
from: z23.tuple([
|
|
1267
1268
|
AddressZod
|
|
1268
1269
|
])
|
|
1269
1270
|
},
|
|
1270
1271
|
result: {
|
|
1271
|
-
to:
|
|
1272
|
-
from:
|
|
1272
|
+
to: z23.array(StakeToJsonZod),
|
|
1273
|
+
from: z23.array(JsonToStakeZod)
|
|
1273
1274
|
}
|
|
1274
1275
|
},
|
|
1275
1276
|
xyoViewer_stakesByStaked: {
|
|
1276
1277
|
params: {
|
|
1277
|
-
to:
|
|
1278
|
+
to: z23.tuple([
|
|
1278
1279
|
AddressZod
|
|
1279
1280
|
]),
|
|
1280
|
-
from:
|
|
1281
|
+
from: z23.tuple([
|
|
1281
1282
|
AddressZod
|
|
1282
1283
|
])
|
|
1283
1284
|
},
|
|
1284
1285
|
result: {
|
|
1285
|
-
to:
|
|
1286
|
-
from:
|
|
1286
|
+
to: z23.array(StakeToJsonZod),
|
|
1287
|
+
from: z23.array(JsonToStakeZod)
|
|
1287
1288
|
}
|
|
1288
1289
|
},
|
|
1289
1290
|
xyoViewer_transactionByBlockHashAndIndex: {
|
|
1290
1291
|
params: {
|
|
1291
|
-
to:
|
|
1292
|
+
to: z23.tuple([
|
|
1292
1293
|
HashZod3,
|
|
1293
|
-
|
|
1294
|
+
z23.number()
|
|
1294
1295
|
]),
|
|
1295
|
-
from:
|
|
1296
|
+
from: z23.tuple([
|
|
1296
1297
|
HashZod3,
|
|
1297
|
-
|
|
1298
|
+
z23.number()
|
|
1298
1299
|
])
|
|
1299
1300
|
},
|
|
1300
1301
|
result: {
|
|
@@ -1304,13 +1305,13 @@ var XyoViewerRpcSchemas = {
|
|
|
1304
1305
|
},
|
|
1305
1306
|
xyoViewer_transactionByBlockNumberAndIndex: {
|
|
1306
1307
|
params: {
|
|
1307
|
-
to:
|
|
1308
|
-
|
|
1309
|
-
|
|
1308
|
+
to: z23.tuple([
|
|
1309
|
+
z23.number(),
|
|
1310
|
+
z23.number()
|
|
1310
1311
|
]),
|
|
1311
|
-
from:
|
|
1312
|
-
|
|
1313
|
-
|
|
1312
|
+
from: z23.tuple([
|
|
1313
|
+
z23.number(),
|
|
1314
|
+
z23.number()
|
|
1314
1315
|
])
|
|
1315
1316
|
},
|
|
1316
1317
|
result: {
|
|
@@ -1320,10 +1321,10 @@ var XyoViewerRpcSchemas = {
|
|
|
1320
1321
|
},
|
|
1321
1322
|
xyoViewer_transactionByHash: {
|
|
1322
1323
|
params: {
|
|
1323
|
-
to:
|
|
1324
|
+
to: z23.tuple([
|
|
1324
1325
|
HashZod3
|
|
1325
1326
|
]),
|
|
1326
|
-
from:
|
|
1327
|
+
from: z23.tuple([
|
|
1327
1328
|
HashZod3
|
|
1328
1329
|
])
|
|
1329
1330
|
},
|
|
@@ -1344,48 +1345,48 @@ var AllRpcSchemas = {
|
|
|
1344
1345
|
};
|
|
1345
1346
|
|
|
1346
1347
|
// src/types/schema/createRequestSchema.ts
|
|
1347
|
-
import * as
|
|
1348
|
-
var createRequestSchema = /* @__PURE__ */ __name((methodName, paramsSchema =
|
|
1349
|
-
id:
|
|
1350
|
-
|
|
1351
|
-
|
|
1348
|
+
import * as z24 from "zod";
|
|
1349
|
+
var createRequestSchema = /* @__PURE__ */ __name((methodName, paramsSchema = z24.undefined()) => z24.object({
|
|
1350
|
+
id: z24.union([
|
|
1351
|
+
z24.string(),
|
|
1352
|
+
z24.number()
|
|
1352
1353
|
]),
|
|
1353
|
-
jsonrpc:
|
|
1354
|
-
method:
|
|
1354
|
+
jsonrpc: z24.literal(jsonrpc),
|
|
1355
|
+
method: z24.literal(methodName),
|
|
1355
1356
|
params: paramsSchema
|
|
1356
1357
|
}), "createRequestSchema");
|
|
1357
1358
|
|
|
1358
1359
|
// src/types/schema/createResponseSchema.ts
|
|
1359
|
-
import * as
|
|
1360
|
-
var createResponseSchema = /* @__PURE__ */ __name((resultSchema =
|
|
1361
|
-
id:
|
|
1362
|
-
|
|
1363
|
-
|
|
1360
|
+
import * as z25 from "zod";
|
|
1361
|
+
var createResponseSchema = /* @__PURE__ */ __name((resultSchema = z25.undefined()) => z25.object({
|
|
1362
|
+
id: z25.union([
|
|
1363
|
+
z25.string(),
|
|
1364
|
+
z25.number()
|
|
1364
1365
|
]),
|
|
1365
|
-
jsonrpc:
|
|
1366
|
+
jsonrpc: z25.literal(jsonrpc),
|
|
1366
1367
|
result: resultSchema
|
|
1367
1368
|
}), "createResponseSchema");
|
|
1368
1369
|
|
|
1369
1370
|
// src/types/schema/DataLakeViewerRpcSchema.ts
|
|
1370
1371
|
import { HashZod as HashZod4 } from "@xylabs/hex";
|
|
1371
1372
|
import { PayloadZod as PayloadZod2 } from "@xyo-network/payload-model";
|
|
1372
|
-
import * as
|
|
1373
|
+
import * as z26 from "zod";
|
|
1373
1374
|
var DataLakeViewerRpcSchemas = {
|
|
1374
1375
|
dataLakeViewer_get: {
|
|
1375
1376
|
params: {
|
|
1376
|
-
to:
|
|
1377
|
+
to: z26.tuple([
|
|
1377
1378
|
HashZod4
|
|
1378
1379
|
]),
|
|
1379
|
-
from:
|
|
1380
|
+
from: z26.tuple([
|
|
1380
1381
|
HashZod4
|
|
1381
1382
|
])
|
|
1382
1383
|
},
|
|
1383
1384
|
result: {
|
|
1384
|
-
to:
|
|
1385
|
+
to: z26.union([
|
|
1385
1386
|
PayloadZod2,
|
|
1386
1387
|
ArrayBufferToJsonZod
|
|
1387
1388
|
]).optional(),
|
|
1388
|
-
from:
|
|
1389
|
+
from: z26.union([
|
|
1389
1390
|
PayloadZod2,
|
|
1390
1391
|
JsonToArrayBufferZod
|
|
1391
1392
|
]).optional()
|
|
@@ -1393,19 +1394,19 @@ var DataLakeViewerRpcSchemas = {
|
|
|
1393
1394
|
},
|
|
1394
1395
|
dataLakeViewer_getMany: {
|
|
1395
1396
|
params: {
|
|
1396
|
-
to:
|
|
1397
|
-
|
|
1397
|
+
to: z26.tuple([
|
|
1398
|
+
z26.array(HashZod4)
|
|
1398
1399
|
]),
|
|
1399
|
-
from:
|
|
1400
|
-
|
|
1400
|
+
from: z26.tuple([
|
|
1401
|
+
z26.array(HashZod4)
|
|
1401
1402
|
])
|
|
1402
1403
|
},
|
|
1403
1404
|
result: {
|
|
1404
|
-
to:
|
|
1405
|
+
to: z26.array(z26.union([
|
|
1405
1406
|
PayloadZod2,
|
|
1406
1407
|
ArrayBufferToJsonZod
|
|
1407
1408
|
])),
|
|
1408
|
-
from:
|
|
1409
|
+
from: z26.array(z26.union([
|
|
1409
1410
|
PayloadZod2,
|
|
1410
1411
|
JsonToArrayBufferZod
|
|
1411
1412
|
]))
|
|
@@ -1413,16 +1414,16 @@ var DataLakeViewerRpcSchemas = {
|
|
|
1413
1414
|
},
|
|
1414
1415
|
dataLakeViewer_has: {
|
|
1415
1416
|
params: {
|
|
1416
|
-
to:
|
|
1417
|
+
to: z26.tuple([
|
|
1417
1418
|
HashZod4
|
|
1418
1419
|
]),
|
|
1419
|
-
from:
|
|
1420
|
+
from: z26.tuple([
|
|
1420
1421
|
HashZod4
|
|
1421
1422
|
])
|
|
1422
1423
|
},
|
|
1423
1424
|
result: {
|
|
1424
|
-
to:
|
|
1425
|
-
from:
|
|
1425
|
+
to: z26.boolean(),
|
|
1426
|
+
from: z26.boolean()
|
|
1426
1427
|
}
|
|
1427
1428
|
}
|
|
1428
1429
|
};
|
|
@@ -1430,228 +1431,228 @@ var DataLakeViewerRpcSchemas = {
|
|
|
1430
1431
|
// src/types/schema/RewardsByPositionViewerRpcSchemas.ts
|
|
1431
1432
|
import { BigIntToJsonZod as BigIntToJsonZod4, JsonToBigIntZod as JsonToBigIntZod4 } from "@xylabs/hex";
|
|
1432
1433
|
import { asAttoXL1 as asAttoXL12 } from "@xyo-network/xl1-protocol";
|
|
1433
|
-
import
|
|
1434
|
+
import z27 from "zod";
|
|
1434
1435
|
var NetworkStakingStepRewardsByPositionViewerRpcSchemas = {
|
|
1435
1436
|
networkStakingStepRewardsByPositionViewer_bonus: {
|
|
1436
1437
|
params: {
|
|
1437
|
-
from:
|
|
1438
|
+
from: z27.tuple([
|
|
1438
1439
|
RewardsRangeOptionsZod.optional()
|
|
1439
1440
|
]),
|
|
1440
|
-
to:
|
|
1441
|
+
to: z27.tuple([
|
|
1441
1442
|
RewardsRangeOptionsZod.optional()
|
|
1442
1443
|
])
|
|
1443
1444
|
},
|
|
1444
1445
|
result: {
|
|
1445
|
-
from:
|
|
1446
|
-
to:
|
|
1446
|
+
from: z27.record(z27.number(), JsonToBigIntZod4.transform((val) => asAttoXL12(val))),
|
|
1447
|
+
to: z27.record(z27.number(), BigIntToJsonZod4)
|
|
1447
1448
|
}
|
|
1448
1449
|
},
|
|
1449
1450
|
networkStakingStepRewardsByPositionViewer_claimed: {
|
|
1450
1451
|
params: {
|
|
1451
|
-
from:
|
|
1452
|
+
from: z27.tuple([
|
|
1452
1453
|
RewardsRangeOptionsZod.optional()
|
|
1453
1454
|
]),
|
|
1454
|
-
to:
|
|
1455
|
+
to: z27.tuple([
|
|
1455
1456
|
RewardsRangeOptionsZod.optional()
|
|
1456
1457
|
])
|
|
1457
1458
|
},
|
|
1458
1459
|
result: {
|
|
1459
|
-
from:
|
|
1460
|
-
to:
|
|
1460
|
+
from: z27.record(z27.number(), BigIntToJsonZod4.transform((val) => asAttoXL12(val))),
|
|
1461
|
+
to: z27.record(z27.number(), JsonToBigIntZod4)
|
|
1461
1462
|
}
|
|
1462
1463
|
},
|
|
1463
1464
|
networkStakingStepRewardsByPositionViewer_earned: {
|
|
1464
1465
|
params: {
|
|
1465
|
-
from:
|
|
1466
|
+
from: z27.tuple([
|
|
1466
1467
|
RewardsRangeOptionsZod.optional()
|
|
1467
1468
|
]),
|
|
1468
|
-
to:
|
|
1469
|
+
to: z27.tuple([
|
|
1469
1470
|
RewardsRangeOptionsZod.optional()
|
|
1470
1471
|
])
|
|
1471
1472
|
},
|
|
1472
1473
|
result: {
|
|
1473
|
-
from:
|
|
1474
|
-
to:
|
|
1474
|
+
from: z27.record(z27.number(), BigIntToJsonZod4.transform((val) => asAttoXL12(val))),
|
|
1475
|
+
to: z27.record(z27.number(), JsonToBigIntZod4)
|
|
1475
1476
|
}
|
|
1476
1477
|
},
|
|
1477
1478
|
networkStakingStepRewardsByPositionViewer_total: {
|
|
1478
1479
|
params: {
|
|
1479
|
-
from:
|
|
1480
|
+
from: z27.tuple([
|
|
1480
1481
|
RewardsRangeOptionsZod.optional()
|
|
1481
1482
|
]),
|
|
1482
|
-
to:
|
|
1483
|
+
to: z27.tuple([
|
|
1483
1484
|
RewardsRangeOptionsZod.optional()
|
|
1484
1485
|
])
|
|
1485
1486
|
},
|
|
1486
1487
|
result: {
|
|
1487
|
-
from:
|
|
1488
|
-
to:
|
|
1488
|
+
from: z27.record(z27.number(), BigIntToJsonZod4.transform((val) => asAttoXL12(val))),
|
|
1489
|
+
to: z27.record(z27.number(), JsonToBigIntZod4)
|
|
1489
1490
|
}
|
|
1490
1491
|
},
|
|
1491
1492
|
networkStakingStepRewardsByPositionViewer_unclaimed: {
|
|
1492
1493
|
params: {
|
|
1493
|
-
from:
|
|
1494
|
+
from: z27.tuple([
|
|
1494
1495
|
RewardsRangeOptionsZod.optional()
|
|
1495
1496
|
]),
|
|
1496
|
-
to:
|
|
1497
|
+
to: z27.tuple([
|
|
1497
1498
|
RewardsRangeOptionsZod.optional()
|
|
1498
1499
|
])
|
|
1499
1500
|
},
|
|
1500
1501
|
result: {
|
|
1501
|
-
from:
|
|
1502
|
-
to:
|
|
1502
|
+
from: z27.record(z27.number(), BigIntToJsonZod4.transform((val) => asAttoXL12(val))),
|
|
1503
|
+
to: z27.record(z27.number(), JsonToBigIntZod4)
|
|
1503
1504
|
}
|
|
1504
1505
|
}
|
|
1505
1506
|
};
|
|
1506
1507
|
|
|
1507
1508
|
// src/types/schema/RewardsByStakerViewerRpcSchemas.ts
|
|
1508
1509
|
import { BigIntToJsonZod as BigIntToJsonZod5, JsonToBigIntZod as JsonToBigIntZod5 } from "@xylabs/hex";
|
|
1509
|
-
import
|
|
1510
|
+
import z28 from "zod";
|
|
1510
1511
|
var NetworkStakingStepRewardsByStakerViewerRpcSchemas = {
|
|
1511
1512
|
networkStakingStepRewardsByStakerViewer_bonus: {
|
|
1512
1513
|
params: {
|
|
1513
|
-
from:
|
|
1514
|
+
from: z28.tuple([
|
|
1514
1515
|
RewardsRangeOptionsZod.optional()
|
|
1515
1516
|
]),
|
|
1516
|
-
to:
|
|
1517
|
+
to: z28.tuple([
|
|
1517
1518
|
RewardsRangeOptionsZod.optional()
|
|
1518
1519
|
])
|
|
1519
1520
|
},
|
|
1520
1521
|
result: {
|
|
1521
|
-
from:
|
|
1522
|
-
to:
|
|
1522
|
+
from: z28.record(AddressZod, BigIntToJsonZod5),
|
|
1523
|
+
to: z28.record(AddressZod, JsonToBigIntZod5)
|
|
1523
1524
|
}
|
|
1524
1525
|
},
|
|
1525
1526
|
networkStakingStepRewardsByStakerViewer_claimed: {
|
|
1526
1527
|
params: {
|
|
1527
|
-
from:
|
|
1528
|
+
from: z28.tuple([
|
|
1528
1529
|
RewardsRangeOptionsZod.optional()
|
|
1529
1530
|
]),
|
|
1530
|
-
to:
|
|
1531
|
+
to: z28.tuple([
|
|
1531
1532
|
RewardsRangeOptionsZod.optional()
|
|
1532
1533
|
])
|
|
1533
1534
|
},
|
|
1534
1535
|
result: {
|
|
1535
|
-
from:
|
|
1536
|
-
to:
|
|
1536
|
+
from: z28.record(AddressZod, BigIntToJsonZod5),
|
|
1537
|
+
to: z28.record(AddressZod, JsonToBigIntZod5)
|
|
1537
1538
|
}
|
|
1538
1539
|
},
|
|
1539
1540
|
networkStakingStepRewardsByStakerViewer_earned: {
|
|
1540
1541
|
params: {
|
|
1541
|
-
from:
|
|
1542
|
+
from: z28.tuple([
|
|
1542
1543
|
RewardsRangeOptionsZod.optional()
|
|
1543
1544
|
]),
|
|
1544
|
-
to:
|
|
1545
|
+
to: z28.tuple([
|
|
1545
1546
|
RewardsRangeOptionsZod.optional()
|
|
1546
1547
|
])
|
|
1547
1548
|
},
|
|
1548
1549
|
result: {
|
|
1549
|
-
from:
|
|
1550
|
-
to:
|
|
1550
|
+
from: z28.record(AddressZod, BigIntToJsonZod5),
|
|
1551
|
+
to: z28.record(AddressZod, JsonToBigIntZod5)
|
|
1551
1552
|
}
|
|
1552
1553
|
},
|
|
1553
1554
|
networkStakingStepRewardsByStakerViewer_total: {
|
|
1554
1555
|
params: {
|
|
1555
|
-
from:
|
|
1556
|
+
from: z28.tuple([
|
|
1556
1557
|
RewardsRangeOptionsZod.optional()
|
|
1557
1558
|
]),
|
|
1558
|
-
to:
|
|
1559
|
+
to: z28.tuple([
|
|
1559
1560
|
RewardsRangeOptionsZod.optional()
|
|
1560
1561
|
])
|
|
1561
1562
|
},
|
|
1562
1563
|
result: {
|
|
1563
|
-
from:
|
|
1564
|
-
to:
|
|
1564
|
+
from: z28.record(AddressZod, BigIntToJsonZod5),
|
|
1565
|
+
to: z28.record(AddressZod, JsonToBigIntZod5)
|
|
1565
1566
|
}
|
|
1566
1567
|
},
|
|
1567
1568
|
networkStakingStepRewardsByStakerViewer_unclaimed: {
|
|
1568
1569
|
params: {
|
|
1569
|
-
from:
|
|
1570
|
+
from: z28.tuple([
|
|
1570
1571
|
RewardsRangeOptionsZod.optional()
|
|
1571
1572
|
]),
|
|
1572
|
-
to:
|
|
1573
|
+
to: z28.tuple([
|
|
1573
1574
|
RewardsRangeOptionsZod.optional()
|
|
1574
1575
|
])
|
|
1575
1576
|
},
|
|
1576
1577
|
result: {
|
|
1577
|
-
from:
|
|
1578
|
-
to:
|
|
1578
|
+
from: z28.record(AddressZod, BigIntToJsonZod5),
|
|
1579
|
+
to: z28.record(AddressZod, JsonToBigIntZod5)
|
|
1579
1580
|
}
|
|
1580
1581
|
}
|
|
1581
1582
|
};
|
|
1582
1583
|
|
|
1583
1584
|
// src/types/schema/RewardsByStepViewerRpcSchemas.ts
|
|
1584
1585
|
import { BigIntToJsonZod as BigIntToJsonZod6, JsonToBigIntZod as JsonToBigIntZod6 } from "@xylabs/hex";
|
|
1585
|
-
import
|
|
1586
|
+
import z29 from "zod";
|
|
1586
1587
|
var NetworkStakingStepRewardsByStepViewerRpcSchemas = {
|
|
1587
1588
|
networkStakingStepRewardsByStepViewer_bonus: {
|
|
1588
1589
|
params: {
|
|
1589
|
-
from:
|
|
1590
|
+
from: z29.tuple([
|
|
1590
1591
|
RewardsRangeOptionsZod.optional()
|
|
1591
1592
|
]),
|
|
1592
|
-
to:
|
|
1593
|
+
to: z29.tuple([
|
|
1593
1594
|
RewardsRangeOptionsZod.optional()
|
|
1594
1595
|
])
|
|
1595
1596
|
},
|
|
1596
1597
|
result: {
|
|
1597
|
-
from:
|
|
1598
|
-
to:
|
|
1598
|
+
from: z29.record(AddressZod, BigIntToJsonZod6),
|
|
1599
|
+
to: z29.record(AddressZod, JsonToBigIntZod6)
|
|
1599
1600
|
}
|
|
1600
1601
|
},
|
|
1601
1602
|
networkStakingStepRewardsByStepViewer_claimed: {
|
|
1602
1603
|
params: {
|
|
1603
|
-
from:
|
|
1604
|
+
from: z29.tuple([
|
|
1604
1605
|
RewardsRangeOptionsZod.optional()
|
|
1605
1606
|
]),
|
|
1606
|
-
to:
|
|
1607
|
+
to: z29.tuple([
|
|
1607
1608
|
RewardsRangeOptionsZod.optional()
|
|
1608
1609
|
])
|
|
1609
1610
|
},
|
|
1610
1611
|
result: {
|
|
1611
|
-
from:
|
|
1612
|
-
to:
|
|
1612
|
+
from: z29.record(AddressZod, BigIntToJsonZod6),
|
|
1613
|
+
to: z29.record(AddressZod, JsonToBigIntZod6)
|
|
1613
1614
|
}
|
|
1614
1615
|
},
|
|
1615
1616
|
networkStakingStepRewardsByStepViewer_earned: {
|
|
1616
1617
|
params: {
|
|
1617
|
-
from:
|
|
1618
|
+
from: z29.tuple([
|
|
1618
1619
|
RewardsRangeOptionsZod.optional()
|
|
1619
1620
|
]),
|
|
1620
|
-
to:
|
|
1621
|
+
to: z29.tuple([
|
|
1621
1622
|
RewardsRangeOptionsZod.optional()
|
|
1622
1623
|
])
|
|
1623
1624
|
},
|
|
1624
1625
|
result: {
|
|
1625
|
-
from:
|
|
1626
|
-
to:
|
|
1626
|
+
from: z29.record(AddressZod, BigIntToJsonZod6),
|
|
1627
|
+
to: z29.record(AddressZod, JsonToBigIntZod6)
|
|
1627
1628
|
}
|
|
1628
1629
|
},
|
|
1629
1630
|
networkStakingStepRewardsByStepViewer_total: {
|
|
1630
1631
|
params: {
|
|
1631
|
-
from:
|
|
1632
|
+
from: z29.tuple([
|
|
1632
1633
|
RewardsRangeOptionsZod.optional()
|
|
1633
1634
|
]),
|
|
1634
|
-
to:
|
|
1635
|
+
to: z29.tuple([
|
|
1635
1636
|
RewardsRangeOptionsZod.optional()
|
|
1636
1637
|
])
|
|
1637
1638
|
},
|
|
1638
1639
|
result: {
|
|
1639
|
-
from:
|
|
1640
|
-
to:
|
|
1640
|
+
from: z29.record(AddressZod, BigIntToJsonZod6),
|
|
1641
|
+
to: z29.record(AddressZod, JsonToBigIntZod6)
|
|
1641
1642
|
}
|
|
1642
1643
|
},
|
|
1643
1644
|
networkStakingStepRewardsByStepViewer_unclaimed: {
|
|
1644
1645
|
params: {
|
|
1645
|
-
from:
|
|
1646
|
+
from: z29.tuple([
|
|
1646
1647
|
RewardsRangeOptionsZod.optional()
|
|
1647
1648
|
]),
|
|
1648
|
-
to:
|
|
1649
|
+
to: z29.tuple([
|
|
1649
1650
|
RewardsRangeOptionsZod.optional()
|
|
1650
1651
|
])
|
|
1651
1652
|
},
|
|
1652
1653
|
result: {
|
|
1653
|
-
from:
|
|
1654
|
-
to:
|
|
1654
|
+
from: z29.record(AddressZod, BigIntToJsonZod6),
|
|
1655
|
+
to: z29.record(AddressZod, JsonToBigIntZod6)
|
|
1655
1656
|
}
|
|
1656
1657
|
}
|
|
1657
1658
|
};
|
|
@@ -1659,14 +1660,14 @@ var NetworkStakingStepRewardsByStepViewerRpcSchemas = {
|
|
|
1659
1660
|
// src/types/schema/RewardsTotalViewerRpcSchemas.ts
|
|
1660
1661
|
import { BigIntToJsonZod as BigIntToJsonZod7, JsonToBigIntZod as JsonToBigIntZod7 } from "@xylabs/hex";
|
|
1661
1662
|
import { asAttoXL1 as asAttoXL13 } from "@xyo-network/xl1-protocol";
|
|
1662
|
-
import * as
|
|
1663
|
+
import * as z30 from "zod";
|
|
1663
1664
|
var NetworkStakingStepRewardsTotalViewerRpcSchemas = {
|
|
1664
1665
|
networkStakingStepRewardsTotalViewer_bonus: {
|
|
1665
1666
|
params: {
|
|
1666
|
-
from:
|
|
1667
|
+
from: z30.tuple([
|
|
1667
1668
|
RewardsRangeOptionsZod.optional()
|
|
1668
1669
|
]),
|
|
1669
|
-
to:
|
|
1670
|
+
to: z30.tuple([
|
|
1670
1671
|
RewardsRangeOptionsZod.optional()
|
|
1671
1672
|
])
|
|
1672
1673
|
},
|
|
@@ -1677,10 +1678,10 @@ var NetworkStakingStepRewardsTotalViewerRpcSchemas = {
|
|
|
1677
1678
|
},
|
|
1678
1679
|
networkStakingStepRewardsTotalViewer_claimed: {
|
|
1679
1680
|
params: {
|
|
1680
|
-
from:
|
|
1681
|
+
from: z30.tuple([
|
|
1681
1682
|
RewardsRangeOptionsZod.optional()
|
|
1682
1683
|
]),
|
|
1683
|
-
to:
|
|
1684
|
+
to: z30.tuple([
|
|
1684
1685
|
RewardsRangeOptionsZod.optional()
|
|
1685
1686
|
])
|
|
1686
1687
|
},
|
|
@@ -1691,10 +1692,10 @@ var NetworkStakingStepRewardsTotalViewerRpcSchemas = {
|
|
|
1691
1692
|
},
|
|
1692
1693
|
networkStakingStepRewardsTotalViewer_earned: {
|
|
1693
1694
|
params: {
|
|
1694
|
-
from:
|
|
1695
|
+
from: z30.tuple([
|
|
1695
1696
|
RewardsRangeOptionsZod.optional()
|
|
1696
1697
|
]),
|
|
1697
|
-
to:
|
|
1698
|
+
to: z30.tuple([
|
|
1698
1699
|
RewardsRangeOptionsZod.optional()
|
|
1699
1700
|
])
|
|
1700
1701
|
},
|
|
@@ -1705,10 +1706,10 @@ var NetworkStakingStepRewardsTotalViewerRpcSchemas = {
|
|
|
1705
1706
|
},
|
|
1706
1707
|
networkStakingStepRewardsTotalViewer_total: {
|
|
1707
1708
|
params: {
|
|
1708
|
-
from:
|
|
1709
|
+
from: z30.tuple([
|
|
1709
1710
|
RewardsRangeOptionsZod.optional()
|
|
1710
1711
|
]),
|
|
1711
|
-
to:
|
|
1712
|
+
to: z30.tuple([
|
|
1712
1713
|
RewardsRangeOptionsZod.optional()
|
|
1713
1714
|
])
|
|
1714
1715
|
},
|
|
@@ -1719,10 +1720,10 @@ var NetworkStakingStepRewardsTotalViewerRpcSchemas = {
|
|
|
1719
1720
|
},
|
|
1720
1721
|
networkStakingStepRewardsTotalViewer_unclaimed: {
|
|
1721
1722
|
params: {
|
|
1722
|
-
from:
|
|
1723
|
+
from: z30.tuple([
|
|
1723
1724
|
RewardsRangeOptionsZod.optional()
|
|
1724
1725
|
]),
|
|
1725
|
-
to:
|
|
1726
|
+
to: z30.tuple([
|
|
1726
1727
|
RewardsRangeOptionsZod.optional()
|
|
1727
1728
|
])
|
|
1728
1729
|
},
|
|
@@ -1984,8 +1985,8 @@ var JsonRpcNetworkStakeViewer = class extends JsonRpcNetworkStakeViewerMethods {
|
|
|
1984
1985
|
};
|
|
1985
1986
|
|
|
1986
1987
|
// src/provider/viewer/JsonRpcXyoViewer.ts
|
|
1987
|
-
import {
|
|
1988
|
-
import { asAttoXL1 as asAttoXL14, asHydratedBlock } from "@xyo-network/xl1-protocol";
|
|
1988
|
+
import { asHash, isHash } from "@xylabs/hex";
|
|
1989
|
+
import { asAttoXL1 as asAttoXL14, asHydratedBlock, asXL1BlockRange, isRange } from "@xyo-network/xl1-protocol";
|
|
1989
1990
|
var JsonRpcXyoViewer = class {
|
|
1990
1991
|
static {
|
|
1991
1992
|
__name(this, "JsonRpcXyoViewer");
|
|
@@ -2004,12 +2005,24 @@ var JsonRpcXyoViewer = class {
|
|
|
2004
2005
|
address
|
|
2005
2006
|
]));
|
|
2006
2007
|
}
|
|
2007
|
-
async accountBalanceHistory(address,
|
|
2008
|
-
|
|
2008
|
+
async accountBalanceHistory(address, headOrRange) {
|
|
2009
|
+
const head = asHash(headOrRange);
|
|
2010
|
+
const range = asXL1BlockRange(headOrRange);
|
|
2011
|
+
if (isHash(head)) {
|
|
2012
|
+
return await this.transport.sendRequest("xyoViewer_accountBalanceHistory", [
|
|
2013
|
+
address,
|
|
2014
|
+
head
|
|
2015
|
+
]);
|
|
2016
|
+
}
|
|
2017
|
+
if (isRange(range)) {
|
|
2018
|
+
return await this.transport.sendRequest("xyoViewer_accountBalanceHistory", [
|
|
2019
|
+
address,
|
|
2020
|
+
range
|
|
2021
|
+
]);
|
|
2022
|
+
}
|
|
2023
|
+
return await this.transport.sendRequest("xyoViewer_accountBalanceHistory", [
|
|
2009
2024
|
address,
|
|
2010
2025
|
range
|
|
2011
|
-
] : [
|
|
2012
|
-
address
|
|
2013
2026
|
]);
|
|
2014
2027
|
}
|
|
2015
2028
|
async blockByHash(hash) {
|
|
@@ -2351,8 +2364,6 @@ export {
|
|
|
2351
2364
|
BlockBoundWitnessZod,
|
|
2352
2365
|
BlockDurationZod,
|
|
2353
2366
|
BlockEndZod,
|
|
2354
|
-
BlockNumberZod,
|
|
2355
|
-
BlockRangeZod,
|
|
2356
2367
|
BlockScriptsZod,
|
|
2357
2368
|
BlockStartZod,
|
|
2358
2369
|
BoundWitnessZod,
|
|
@@ -2437,7 +2448,6 @@ export {
|
|
|
2437
2448
|
UnsignedHydratedTransactionZod,
|
|
2438
2449
|
WithStorageMetaZod,
|
|
2439
2450
|
WithTransactionFeesZod,
|
|
2440
|
-
XL1BlockNumberZod,
|
|
2441
2451
|
XyoBaseConnection,
|
|
2442
2452
|
XyoPermissionsRpcSchemas,
|
|
2443
2453
|
XyoRunnerRpcSchemas,
|