@xyo-network/xl1-rpc 1.18.0-rc.1 → 1.18.0
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 +112 -164
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/neutral/provider/viewer/JsonRpcAccountBalanceViewer/JsonRpcAccountBalanceViewer.d.ts +7 -7
- package/dist/neutral/provider/viewer/JsonRpcAccountBalanceViewer/JsonRpcAccountBalanceViewer.d.ts.map +1 -1
- package/dist/neutral/provider/viewer/JsonRpcAccountBalanceViewer/JsonRpcAccountBalanceViewerMethods.d.ts +97 -69
- package/dist/neutral/provider/viewer/JsonRpcAccountBalanceViewer/JsonRpcAccountBalanceViewerMethods.d.ts.map +1 -1
- package/dist/neutral/provider/viewer/JsonRpcNetworkStakeViewer/JsonRpcNetworkStakeViewer.d.ts.map +1 -1
- package/dist/neutral/provider/viewer/JsonRpcXyoViewer.d.ts +16 -20
- package/dist/neutral/provider/viewer/JsonRpcXyoViewer.d.ts.map +1 -1
- package/dist/neutral/types/schema/AccountBalanceViewerRpcSchemas.d.ts +36 -8
- package/dist/neutral/types/schema/AccountBalanceViewerRpcSchemas.d.ts.map +1 -1
- package/dist/neutral/types/schema/AllRpcSchemas.d.ts +38 -10
- package/dist/neutral/types/schema/AllRpcSchemas.d.ts.map +1 -1
- package/dist/node/index-node.mjs +112 -164
- package/dist/node/index-node.mjs.map +1 -1
- package/dist/node/provider/viewer/JsonRpcAccountBalanceViewer/JsonRpcAccountBalanceViewer.d.ts +7 -7
- package/dist/node/provider/viewer/JsonRpcAccountBalanceViewer/JsonRpcAccountBalanceViewer.d.ts.map +1 -1
- package/dist/node/provider/viewer/JsonRpcAccountBalanceViewer/JsonRpcAccountBalanceViewerMethods.d.ts +97 -69
- package/dist/node/provider/viewer/JsonRpcAccountBalanceViewer/JsonRpcAccountBalanceViewerMethods.d.ts.map +1 -1
- package/dist/node/provider/viewer/JsonRpcNetworkStakeViewer/JsonRpcNetworkStakeViewer.d.ts.map +1 -1
- package/dist/node/provider/viewer/JsonRpcXyoViewer.d.ts +16 -20
- package/dist/node/provider/viewer/JsonRpcXyoViewer.d.ts.map +1 -1
- package/dist/node/types/schema/AccountBalanceViewerRpcSchemas.d.ts +36 -8
- package/dist/node/types/schema/AccountBalanceViewerRpcSchemas.d.ts.map +1 -1
- package/dist/node/types/schema/AllRpcSchemas.d.ts +38 -10
- package/dist/node/types/schema/AllRpcSchemas.d.ts.map +1 -1
- package/package.json +3 -4
- package/src/provider/viewer/JsonRpcAccountBalanceViewer/JsonRpcAccountBalanceViewer.ts +13 -11
- package/src/provider/viewer/JsonRpcAccountBalanceViewer/JsonRpcAccountBalanceViewerMethods.ts +10 -13
- package/src/provider/viewer/JsonRpcNetworkStakeViewer/JsonRpcNetworkStakeViewer.ts +3 -3
- package/src/provider/viewer/JsonRpcXyoViewer.ts +7 -26
- package/src/types/schema/AccountBalanceViewerRpcSchemas.ts +12 -11
package/dist/neutral/index.mjs
CHANGED
|
@@ -245,79 +245,46 @@ var NetworkStakingStepRewardsTotalViewerRpcNamespace = "networkStakingStepReward
|
|
|
245
245
|
var NetworkStakingStepRewardsViewerRpcNamespace = "networkStakingStepRewardsViewer";
|
|
246
246
|
|
|
247
247
|
// src/types/schema/AccountBalanceViewerRpcSchemas.ts
|
|
248
|
-
import { AddressZod, BigIntToJsonZod,
|
|
249
|
-
import {
|
|
250
|
-
import { AccountBalanceHistoryItemZod, QualifiedZod } from "@xyo-network/xl1-protocol-sdk";
|
|
248
|
+
import { AddressZod, BigIntToJsonZod, JsonToBigIntZod } from "@xylabs/sdk-js";
|
|
249
|
+
import { AccountBalanceHistoryItemZod, ChainQualifiedConfigZod, ChainQualifiedZod } from "@xyo-network/xl1-protocol-sdk";
|
|
251
250
|
import * as z from "zod";
|
|
252
251
|
var AccountBalanceViewerRpcSchemas = {
|
|
253
252
|
accountBalanceViewer_qualifiedAccountBalances: {
|
|
254
253
|
params: {
|
|
255
|
-
to: z.
|
|
256
|
-
z.
|
|
257
|
-
|
|
258
|
-
]),
|
|
259
|
-
z.tuple([
|
|
260
|
-
z.array(AddressZod),
|
|
261
|
-
z.union([
|
|
262
|
-
XL1BlockRangeZod,
|
|
263
|
-
HashZod
|
|
264
|
-
])
|
|
265
|
-
])
|
|
254
|
+
to: z.tuple([
|
|
255
|
+
z.array(AddressZod),
|
|
256
|
+
ChainQualifiedConfigZod
|
|
266
257
|
]),
|
|
267
|
-
from: z.
|
|
268
|
-
z.
|
|
269
|
-
|
|
270
|
-
]),
|
|
271
|
-
z.tuple([
|
|
272
|
-
z.array(AddressZod),
|
|
273
|
-
z.union([
|
|
274
|
-
XL1BlockRangeZod,
|
|
275
|
-
HashZod
|
|
276
|
-
])
|
|
277
|
-
])
|
|
258
|
+
from: z.tuple([
|
|
259
|
+
z.array(AddressZod),
|
|
260
|
+
ChainQualifiedConfigZod
|
|
278
261
|
])
|
|
279
262
|
},
|
|
280
263
|
result: {
|
|
281
|
-
to:
|
|
282
|
-
from:
|
|
264
|
+
to: ChainQualifiedZod(z.record(AddressZod, BigIntToJsonZod)),
|
|
265
|
+
from: ChainQualifiedZod(z.record(AddressZod, JsonToBigIntZod))
|
|
283
266
|
}
|
|
284
267
|
},
|
|
285
268
|
accountBalanceViewer_qualifiedAccountBalanceHistories: {
|
|
286
269
|
params: {
|
|
287
|
-
to: z.
|
|
288
|
-
z.
|
|
289
|
-
|
|
290
|
-
]),
|
|
291
|
-
z.tuple([
|
|
292
|
-
z.array(AddressZod),
|
|
293
|
-
z.union([
|
|
294
|
-
XL1BlockRangeZod,
|
|
295
|
-
HashZod
|
|
296
|
-
])
|
|
297
|
-
])
|
|
270
|
+
to: z.tuple([
|
|
271
|
+
z.array(AddressZod),
|
|
272
|
+
ChainQualifiedConfigZod
|
|
298
273
|
]),
|
|
299
|
-
from: z.
|
|
300
|
-
z.
|
|
301
|
-
|
|
302
|
-
]),
|
|
303
|
-
z.tuple([
|
|
304
|
-
z.array(AddressZod),
|
|
305
|
-
z.union([
|
|
306
|
-
XL1BlockRangeZod,
|
|
307
|
-
HashZod
|
|
308
|
-
])
|
|
309
|
-
])
|
|
274
|
+
from: z.tuple([
|
|
275
|
+
z.array(AddressZod),
|
|
276
|
+
ChainQualifiedConfigZod
|
|
310
277
|
])
|
|
311
278
|
},
|
|
312
279
|
result: {
|
|
313
|
-
to:
|
|
314
|
-
from:
|
|
280
|
+
to: ChainQualifiedZod(z.record(AddressZod, z.array(AccountBalanceHistoryItemZod))),
|
|
281
|
+
from: ChainQualifiedZod(z.record(AddressZod, z.array(AccountBalanceHistoryItemZod)))
|
|
315
282
|
}
|
|
316
283
|
}
|
|
317
284
|
};
|
|
318
285
|
|
|
319
286
|
// src/types/schema/BlockViewerRpcSchemas.ts
|
|
320
|
-
import { HashZod
|
|
287
|
+
import { HashZod } from "@xylabs/sdk-js";
|
|
321
288
|
import { PayloadZodLoose } from "@xyo-network/payload-model";
|
|
322
289
|
import { SignedHydratedBlockWithHashMetaZod, XL1BlockNumberZod } from "@xyo-network/xl1-protocol";
|
|
323
290
|
import * as z2 from "zod";
|
|
@@ -341,11 +308,11 @@ var BlockViewerRpcSchemas = {
|
|
|
341
308
|
blockViewer_blocksByHash: {
|
|
342
309
|
params: {
|
|
343
310
|
to: z2.tuple([
|
|
344
|
-
|
|
311
|
+
HashZod,
|
|
345
312
|
z2.number().optional()
|
|
346
313
|
]),
|
|
347
314
|
from: z2.tuple([
|
|
348
|
-
|
|
315
|
+
HashZod,
|
|
349
316
|
z2.number().optional()
|
|
350
317
|
])
|
|
351
318
|
},
|
|
@@ -367,10 +334,10 @@ var BlockViewerRpcSchemas = {
|
|
|
367
334
|
blockViewer_payloadsByHash: {
|
|
368
335
|
params: {
|
|
369
336
|
to: z2.tuple([
|
|
370
|
-
z2.array(
|
|
337
|
+
z2.array(HashZod)
|
|
371
338
|
]),
|
|
372
339
|
from: z2.tuple([
|
|
373
|
-
z2.array(
|
|
340
|
+
z2.array(HashZod)
|
|
374
341
|
])
|
|
375
342
|
},
|
|
376
343
|
result: {
|
|
@@ -381,7 +348,7 @@ var BlockViewerRpcSchemas = {
|
|
|
381
348
|
};
|
|
382
349
|
|
|
383
350
|
// src/types/schema/DataLakeViewerRpcSchema.ts
|
|
384
|
-
import { HashZod as
|
|
351
|
+
import { HashZod as HashZod2 } from "@xylabs/sdk-js";
|
|
385
352
|
import { PayloadZod } from "@xyo-network/payload-model";
|
|
386
353
|
import { ArrayBufferToJsonZod, JsonToArrayBufferZod } from "@xyo-network/xl1-protocol";
|
|
387
354
|
import * as z3 from "zod";
|
|
@@ -389,10 +356,10 @@ var DataLakeViewerRpcSchemas = {
|
|
|
389
356
|
dataLakeViewer_get: {
|
|
390
357
|
params: {
|
|
391
358
|
to: z3.tuple([
|
|
392
|
-
|
|
359
|
+
HashZod2
|
|
393
360
|
]),
|
|
394
361
|
from: z3.tuple([
|
|
395
|
-
|
|
362
|
+
HashZod2
|
|
396
363
|
])
|
|
397
364
|
},
|
|
398
365
|
result: {
|
|
@@ -409,10 +376,10 @@ var DataLakeViewerRpcSchemas = {
|
|
|
409
376
|
dataLakeViewer_getMany: {
|
|
410
377
|
params: {
|
|
411
378
|
to: z3.tuple([
|
|
412
|
-
z3.array(
|
|
379
|
+
z3.array(HashZod2)
|
|
413
380
|
]),
|
|
414
381
|
from: z3.tuple([
|
|
415
|
-
z3.array(
|
|
382
|
+
z3.array(HashZod2)
|
|
416
383
|
])
|
|
417
384
|
},
|
|
418
385
|
result: {
|
|
@@ -429,10 +396,10 @@ var DataLakeViewerRpcSchemas = {
|
|
|
429
396
|
dataLakeViewer_has: {
|
|
430
397
|
params: {
|
|
431
398
|
to: z3.tuple([
|
|
432
|
-
|
|
399
|
+
HashZod2
|
|
433
400
|
]),
|
|
434
401
|
from: z3.tuple([
|
|
435
|
-
|
|
402
|
+
HashZod2
|
|
436
403
|
])
|
|
437
404
|
},
|
|
438
405
|
result: {
|
|
@@ -443,7 +410,7 @@ var DataLakeViewerRpcSchemas = {
|
|
|
443
410
|
};
|
|
444
411
|
|
|
445
412
|
// src/types/schema/MempoolRunnerRpcSchemas.ts
|
|
446
|
-
import { HashZod as
|
|
413
|
+
import { HashZod as HashZod3 } from "@xylabs/sdk-js";
|
|
447
414
|
import { SignedHydratedBlockZod, SignedHydratedTransactionZod } from "@xyo-network/xl1-protocol";
|
|
448
415
|
import * as z4 from "zod";
|
|
449
416
|
var MempoolRunnerRpcSchemas = {
|
|
@@ -457,8 +424,8 @@ var MempoolRunnerRpcSchemas = {
|
|
|
457
424
|
])
|
|
458
425
|
},
|
|
459
426
|
result: {
|
|
460
|
-
to: z4.array(
|
|
461
|
-
from: z4.array(
|
|
427
|
+
to: z4.array(HashZod3),
|
|
428
|
+
from: z4.array(HashZod3)
|
|
462
429
|
}
|
|
463
430
|
},
|
|
464
431
|
mempoolRunner_submitTransactions: {
|
|
@@ -471,8 +438,8 @@ var MempoolRunnerRpcSchemas = {
|
|
|
471
438
|
])
|
|
472
439
|
},
|
|
473
440
|
result: {
|
|
474
|
-
to: z4.array(
|
|
475
|
-
from: z4.array(
|
|
441
|
+
to: z4.array(HashZod3),
|
|
442
|
+
from: z4.array(HashZod3)
|
|
476
443
|
}
|
|
477
444
|
}
|
|
478
445
|
};
|
|
@@ -1218,9 +1185,9 @@ var XyoSignerRpcSchemas = {
|
|
|
1218
1185
|
};
|
|
1219
1186
|
|
|
1220
1187
|
// src/types/schema/XyoViewerRpcSchemas.ts
|
|
1221
|
-
import { AddressZod as AddressZod7, BigIntToJsonZod as BigIntToJsonZod9, HashZod as
|
|
1188
|
+
import { AddressZod as AddressZod7, BigIntToJsonZod as BigIntToJsonZod9, HashZod as HashZod4, HexZod, JsonToBigIntZod as JsonToBigIntZod9 } from "@xylabs/sdk-js";
|
|
1222
1189
|
import { PayloadZodLoose as PayloadZodLoose2 } from "@xyo-network/payload-model";
|
|
1223
|
-
import { JsonToStakeZod as JsonToStakeZod2, SignedHydratedBlockWithHashMetaZod as SignedHydratedBlockWithHashMetaZod3, SignedHydratedTransactionZod as SignedHydratedTransactionZod3, StakeToJsonZod as StakeToJsonZod2, StepIdentityZod as StepIdentityZod2, XL1BlockNumberZod as XL1BlockNumberZod2, XL1BlockRangeZod
|
|
1190
|
+
import { JsonToStakeZod as JsonToStakeZod2, SignedHydratedBlockWithHashMetaZod as SignedHydratedBlockWithHashMetaZod3, SignedHydratedTransactionZod as SignedHydratedTransactionZod3, StakeToJsonZod as StakeToJsonZod2, StepIdentityZod as StepIdentityZod2, XL1BlockNumberZod as XL1BlockNumberZod2, XL1BlockRangeZod } from "@xyo-network/xl1-protocol";
|
|
1224
1191
|
import { AccountBalanceHistoryItemZod as AccountBalanceHistoryItemZod2 } from "@xyo-network/xl1-protocol-sdk";
|
|
1225
1192
|
import * as z17 from "zod";
|
|
1226
1193
|
var XyoViewerRpcSchemas = {
|
|
@@ -1551,8 +1518,8 @@ var XyoViewerRpcSchemas = {
|
|
|
1551
1518
|
z17.tuple([
|
|
1552
1519
|
AddressZod7,
|
|
1553
1520
|
z17.union([
|
|
1554
|
-
|
|
1555
|
-
|
|
1521
|
+
XL1BlockRangeZod,
|
|
1522
|
+
HashZod4
|
|
1556
1523
|
])
|
|
1557
1524
|
])
|
|
1558
1525
|
]),
|
|
@@ -1563,8 +1530,8 @@ var XyoViewerRpcSchemas = {
|
|
|
1563
1530
|
z17.tuple([
|
|
1564
1531
|
AddressZod7,
|
|
1565
1532
|
z17.union([
|
|
1566
|
-
|
|
1567
|
-
|
|
1533
|
+
XL1BlockRangeZod,
|
|
1534
|
+
HashZod4
|
|
1568
1535
|
])
|
|
1569
1536
|
])
|
|
1570
1537
|
])
|
|
@@ -1583,8 +1550,8 @@ var XyoViewerRpcSchemas = {
|
|
|
1583
1550
|
z17.tuple([
|
|
1584
1551
|
AddressZod7,
|
|
1585
1552
|
z17.union([
|
|
1586
|
-
|
|
1587
|
-
|
|
1553
|
+
XL1BlockRangeZod,
|
|
1554
|
+
HashZod4
|
|
1588
1555
|
])
|
|
1589
1556
|
])
|
|
1590
1557
|
]),
|
|
@@ -1595,8 +1562,8 @@ var XyoViewerRpcSchemas = {
|
|
|
1595
1562
|
z17.tuple([
|
|
1596
1563
|
AddressZod7,
|
|
1597
1564
|
z17.union([
|
|
1598
|
-
|
|
1599
|
-
|
|
1565
|
+
XL1BlockRangeZod,
|
|
1566
|
+
HashZod4
|
|
1600
1567
|
])
|
|
1601
1568
|
])
|
|
1602
1569
|
])
|
|
@@ -1625,11 +1592,11 @@ var XyoViewerRpcSchemas = {
|
|
|
1625
1592
|
xyoViewer_blocksByHash: {
|
|
1626
1593
|
params: {
|
|
1627
1594
|
to: z17.tuple([
|
|
1628
|
-
|
|
1595
|
+
HashZod4,
|
|
1629
1596
|
z17.number().optional()
|
|
1630
1597
|
]),
|
|
1631
1598
|
from: z17.tuple([
|
|
1632
|
-
|
|
1599
|
+
HashZod4,
|
|
1633
1600
|
z17.number().optional()
|
|
1634
1601
|
])
|
|
1635
1602
|
},
|
|
@@ -1719,11 +1686,11 @@ var XyoViewerRpcSchemas = {
|
|
|
1719
1686
|
xyoViewer_transactionByBlockHashAndIndex: {
|
|
1720
1687
|
params: {
|
|
1721
1688
|
to: z17.tuple([
|
|
1722
|
-
|
|
1689
|
+
HashZod4,
|
|
1723
1690
|
z17.number()
|
|
1724
1691
|
]),
|
|
1725
1692
|
from: z17.tuple([
|
|
1726
|
-
|
|
1693
|
+
HashZod4,
|
|
1727
1694
|
z17.number()
|
|
1728
1695
|
])
|
|
1729
1696
|
},
|
|
@@ -1751,10 +1718,10 @@ var XyoViewerRpcSchemas = {
|
|
|
1751
1718
|
xyoViewer_transactionByHash: {
|
|
1752
1719
|
params: {
|
|
1753
1720
|
to: z17.tuple([
|
|
1754
|
-
|
|
1721
|
+
HashZod4
|
|
1755
1722
|
]),
|
|
1756
1723
|
from: z17.tuple([
|
|
1757
|
-
|
|
1724
|
+
HashZod4
|
|
1758
1725
|
])
|
|
1759
1726
|
},
|
|
1760
1727
|
result: {
|
|
@@ -1765,10 +1732,10 @@ var XyoViewerRpcSchemas = {
|
|
|
1765
1732
|
xyoViewer_payloadsByHash: {
|
|
1766
1733
|
params: {
|
|
1767
1734
|
to: z17.tuple([
|
|
1768
|
-
z17.array(
|
|
1735
|
+
z17.array(HashZod4)
|
|
1769
1736
|
]),
|
|
1770
1737
|
from: z17.tuple([
|
|
1771
|
-
z17.array(
|
|
1738
|
+
z17.array(HashZod4)
|
|
1772
1739
|
])
|
|
1773
1740
|
},
|
|
1774
1741
|
result: {
|
|
@@ -1950,20 +1917,16 @@ var JsonRpcAccountBalanceViewerMethods = class extends AbstractJsonRpcViewer {
|
|
|
1950
1917
|
static {
|
|
1951
1918
|
__name(this, "JsonRpcAccountBalanceViewerMethods");
|
|
1952
1919
|
}
|
|
1953
|
-
async qualifiedAccountBalanceHistories(addresses,
|
|
1954
|
-
return await this.transport.sendRequest("accountBalanceViewer_qualifiedAccountBalanceHistories",
|
|
1920
|
+
async qualifiedAccountBalanceHistories(addresses, config) {
|
|
1921
|
+
return await this.transport.sendRequest("accountBalanceViewer_qualifiedAccountBalanceHistories", [
|
|
1955
1922
|
addresses,
|
|
1956
|
-
|
|
1957
|
-
] : [
|
|
1958
|
-
addresses
|
|
1923
|
+
config
|
|
1959
1924
|
]);
|
|
1960
1925
|
}
|
|
1961
|
-
async qualifiedAccountBalances(addresses,
|
|
1962
|
-
return await this.transport.sendRequest("accountBalanceViewer_qualifiedAccountBalances",
|
|
1926
|
+
async qualifiedAccountBalances(addresses, config) {
|
|
1927
|
+
return await this.transport.sendRequest("accountBalanceViewer_qualifiedAccountBalances", [
|
|
1963
1928
|
addresses,
|
|
1964
|
-
|
|
1965
|
-
] : [
|
|
1966
|
-
addresses
|
|
1929
|
+
config
|
|
1967
1930
|
]);
|
|
1968
1931
|
}
|
|
1969
1932
|
schemas() {
|
|
@@ -1981,24 +1944,24 @@ var JsonRpcAccountBalanceViewer = class _JsonRpcAccountBalanceViewer extends Jso
|
|
|
1981
1944
|
AccountBalanceViewerMoniker
|
|
1982
1945
|
];
|
|
1983
1946
|
moniker = _JsonRpcAccountBalanceViewer.defaultMoniker;
|
|
1984
|
-
async accountBalance(address,
|
|
1947
|
+
async accountBalance(address, config = {}) {
|
|
1985
1948
|
const result = await this.accountBalances([
|
|
1986
1949
|
address
|
|
1987
|
-
],
|
|
1950
|
+
], config);
|
|
1988
1951
|
return result[address];
|
|
1989
1952
|
}
|
|
1990
|
-
async accountBalanceHistories(address,
|
|
1991
|
-
const [result] = await this.qualifiedAccountBalanceHistories(address,
|
|
1953
|
+
async accountBalanceHistories(address, config = {}) {
|
|
1954
|
+
const [result] = await this.qualifiedAccountBalanceHistories(address, config);
|
|
1992
1955
|
return result;
|
|
1993
1956
|
}
|
|
1994
|
-
async accountBalanceHistory(address,
|
|
1957
|
+
async accountBalanceHistory(address, config = {}) {
|
|
1995
1958
|
const result = await this.accountBalanceHistories([
|
|
1996
1959
|
address
|
|
1997
|
-
],
|
|
1960
|
+
], config);
|
|
1998
1961
|
return result[address];
|
|
1999
1962
|
}
|
|
2000
|
-
async accountBalances(address,
|
|
2001
|
-
const [result] = await this.qualifiedAccountBalances(address,
|
|
1963
|
+
async accountBalances(address, config = {}) {
|
|
1964
|
+
const [result] = await this.qualifiedAccountBalances(address, config);
|
|
2002
1965
|
return result;
|
|
2003
1966
|
}
|
|
2004
1967
|
};
|
|
@@ -2121,44 +2084,7 @@ var JsonRpcMempoolViewer = class _JsonRpcMempoolViewer extends JsonRpcMempoolVie
|
|
|
2121
2084
|
};
|
|
2122
2085
|
|
|
2123
2086
|
// src/provider/viewer/JsonRpcNetworkStakeViewer/JsonRpcNetworkStakeViewer.ts
|
|
2124
|
-
import { NetworkStakeViewerMoniker } from "@xyo-network/xl1-protocol-sdk";
|
|
2125
|
-
|
|
2126
|
-
// src/provider/viewer/JsonRpcNetworkStakingStepRewardsViewer/JsonRpcNetworkStakingStepRewardsViewer.ts
|
|
2127
|
-
import { NetworkStakeStepRewardsViewerMoniker } from "@xyo-network/xl1-protocol-sdk";
|
|
2128
|
-
|
|
2129
|
-
// src/provider/viewer/JsonRpcNetworkStakingStepRewardsViewer/JsonRpcNetworkStakingStepRewardsViewerMethods.ts
|
|
2130
|
-
var JsonRpcNetworkStakingStepRewardsViewerMethods = class extends AbstractJsonRpcViewer {
|
|
2131
|
-
static {
|
|
2132
|
-
__name(this, "JsonRpcNetworkStakingStepRewardsViewerMethods");
|
|
2133
|
-
}
|
|
2134
|
-
schemas() {
|
|
2135
|
-
return NetworkStakingStepRewardsViewerRpcSchemas;
|
|
2136
|
-
}
|
|
2137
|
-
};
|
|
2138
|
-
|
|
2139
|
-
// src/provider/viewer/JsonRpcNetworkStakingStepRewardsViewer/JsonRpcNetworkStakingStepRewardsViewer.ts
|
|
2140
|
-
var JsonRpcNetworkStakingStepRewardsViewer = class _JsonRpcNetworkStakingStepRewardsViewer extends JsonRpcNetworkStakingStepRewardsViewerMethods {
|
|
2141
|
-
static {
|
|
2142
|
-
__name(this, "JsonRpcNetworkStakingStepRewardsViewer");
|
|
2143
|
-
}
|
|
2144
|
-
static defaultMoniker = NetworkStakeStepRewardsViewerMoniker;
|
|
2145
|
-
static monikers = [
|
|
2146
|
-
NetworkStakeStepRewardsViewerMoniker
|
|
2147
|
-
];
|
|
2148
|
-
moniker = _JsonRpcNetworkStakingStepRewardsViewer.defaultMoniker;
|
|
2149
|
-
get position() {
|
|
2150
|
-
return this.params.position;
|
|
2151
|
-
}
|
|
2152
|
-
get staker() {
|
|
2153
|
-
return this.params.staker;
|
|
2154
|
-
}
|
|
2155
|
-
get step() {
|
|
2156
|
-
return this.params.step;
|
|
2157
|
-
}
|
|
2158
|
-
get total() {
|
|
2159
|
-
return this.params.total;
|
|
2160
|
-
}
|
|
2161
|
-
};
|
|
2087
|
+
import { NetworkStakeStepRewardsViewerMoniker, NetworkStakeViewerMoniker } from "@xyo-network/xl1-protocol-sdk";
|
|
2162
2088
|
|
|
2163
2089
|
// src/provider/viewer/JsonRpcNetworkStakeViewer/JsonRpcNetworkStakeViewerMethods.ts
|
|
2164
2090
|
var JsonRpcNetworkStakeViewerMethods = class extends AbstractJsonRpcViewer {
|
|
@@ -2191,9 +2117,44 @@ var JsonRpcNetworkStakeViewer = class _JsonRpcNetworkStakeViewer extends JsonRpc
|
|
|
2191
2117
|
}
|
|
2192
2118
|
async createHandler() {
|
|
2193
2119
|
await super.createHandler();
|
|
2194
|
-
this._stepRewards = await
|
|
2195
|
-
|
|
2196
|
-
|
|
2120
|
+
this._stepRewards = await this.locator.getInstance(NetworkStakeStepRewardsViewerMoniker);
|
|
2121
|
+
}
|
|
2122
|
+
};
|
|
2123
|
+
|
|
2124
|
+
// src/provider/viewer/JsonRpcNetworkStakingStepRewardsViewer/JsonRpcNetworkStakingStepRewardsViewer.ts
|
|
2125
|
+
import { NetworkStakeStepRewardsViewerMoniker as NetworkStakeStepRewardsViewerMoniker2 } from "@xyo-network/xl1-protocol-sdk";
|
|
2126
|
+
|
|
2127
|
+
// src/provider/viewer/JsonRpcNetworkStakingStepRewardsViewer/JsonRpcNetworkStakingStepRewardsViewerMethods.ts
|
|
2128
|
+
var JsonRpcNetworkStakingStepRewardsViewerMethods = class extends AbstractJsonRpcViewer {
|
|
2129
|
+
static {
|
|
2130
|
+
__name(this, "JsonRpcNetworkStakingStepRewardsViewerMethods");
|
|
2131
|
+
}
|
|
2132
|
+
schemas() {
|
|
2133
|
+
return NetworkStakingStepRewardsViewerRpcSchemas;
|
|
2134
|
+
}
|
|
2135
|
+
};
|
|
2136
|
+
|
|
2137
|
+
// src/provider/viewer/JsonRpcNetworkStakingStepRewardsViewer/JsonRpcNetworkStakingStepRewardsViewer.ts
|
|
2138
|
+
var JsonRpcNetworkStakingStepRewardsViewer = class _JsonRpcNetworkStakingStepRewardsViewer extends JsonRpcNetworkStakingStepRewardsViewerMethods {
|
|
2139
|
+
static {
|
|
2140
|
+
__name(this, "JsonRpcNetworkStakingStepRewardsViewer");
|
|
2141
|
+
}
|
|
2142
|
+
static defaultMoniker = NetworkStakeStepRewardsViewerMoniker2;
|
|
2143
|
+
static monikers = [
|
|
2144
|
+
NetworkStakeStepRewardsViewerMoniker2
|
|
2145
|
+
];
|
|
2146
|
+
moniker = _JsonRpcNetworkStakingStepRewardsViewer.defaultMoniker;
|
|
2147
|
+
get position() {
|
|
2148
|
+
return this.params.position;
|
|
2149
|
+
}
|
|
2150
|
+
get staker() {
|
|
2151
|
+
return this.params.staker;
|
|
2152
|
+
}
|
|
2153
|
+
get step() {
|
|
2154
|
+
return this.params.step;
|
|
2155
|
+
}
|
|
2156
|
+
get total() {
|
|
2157
|
+
return this.params.total;
|
|
2197
2158
|
}
|
|
2198
2159
|
};
|
|
2199
2160
|
|
|
@@ -2297,7 +2258,6 @@ var JsonRpcTimeSyncViewer = class _JsonRpcTimeSyncViewer extends JsonRpcTimeSync
|
|
|
2297
2258
|
};
|
|
2298
2259
|
|
|
2299
2260
|
// src/provider/viewer/JsonRpcXyoViewer.ts
|
|
2300
|
-
import { isDefined as isDefined4, isHash } from "@xylabs/sdk-js";
|
|
2301
2261
|
import { isSignedHydratedBlock, isSignedHydratedBlockWithHashMeta, toWithHashMeta } from "@xyo-network/xl1-protocol";
|
|
2302
2262
|
import { AccountBalanceViewerMoniker as AccountBalanceViewerMoniker2, BlockViewerMoniker as BlockViewerMoniker2, creatableProvider, MempoolViewerMoniker as MempoolViewerMoniker2, NetworkStakeViewerMoniker as NetworkStakeViewerMoniker2, StepViewerMoniker, TimeSyncViewerMoniker as TimeSyncViewerMoniker2, XyoViewerMoniker } from "@xyo-network/xl1-protocol-sdk";
|
|
2303
2263
|
function _ts_decorate(decorators, target, key, desc) {
|
|
@@ -2356,23 +2316,11 @@ var JsonRpcXyoViewer = class _JsonRpcXyoViewer extends AbstractJsonRpcViewer {
|
|
|
2356
2316
|
get time() {
|
|
2357
2317
|
return this._timeSyncViewer;
|
|
2358
2318
|
}
|
|
2359
|
-
async accountBalance(address,
|
|
2360
|
-
|
|
2361
|
-
if (isHash(headOrRange)) {
|
|
2362
|
-
return await this.account.balance.accountBalance(address, headOrRange);
|
|
2363
|
-
}
|
|
2364
|
-
return await this.account.balance.accountBalance(address);
|
|
2365
|
-
}
|
|
2366
|
-
return await this.account.balance.accountBalance(address, headOrRange);
|
|
2319
|
+
async accountBalance(address, config = {}) {
|
|
2320
|
+
return await this.account.balance.accountBalance(address, config);
|
|
2367
2321
|
}
|
|
2368
|
-
async accountBalanceHistory(address,
|
|
2369
|
-
|
|
2370
|
-
if (isHash(headOrRange)) {
|
|
2371
|
-
return await this.account.balance.accountBalanceHistory(address, headOrRange);
|
|
2372
|
-
}
|
|
2373
|
-
return await this.account.balance.accountBalanceHistory(address);
|
|
2374
|
-
}
|
|
2375
|
-
return await this.account.balance.accountBalanceHistory(address, headOrRange);
|
|
2322
|
+
async accountBalanceHistory(address, config = {}) {
|
|
2323
|
+
return await this.account.balance.accountBalanceHistory(address, config);
|
|
2376
2324
|
}
|
|
2377
2325
|
async blockByHash(hash) {
|
|
2378
2326
|
return (await this.blocksByHash(hash, 1))[0];
|
|
@@ -2634,7 +2582,7 @@ var RpcXyoPermissions = class {
|
|
|
2634
2582
|
import { creatableProvider as creatableProvider2, MempoolRunnerMoniker } from "@xyo-network/xl1-protocol-sdk";
|
|
2635
2583
|
|
|
2636
2584
|
// src/provider/runner/JsonRpcRunner.ts
|
|
2637
|
-
import { isDefined as
|
|
2585
|
+
import { isDefined as isDefined4 } from "@xylabs/sdk-js";
|
|
2638
2586
|
import { AbstractCreatableProvider as AbstractCreatableProvider2 } from "@xyo-network/xl1-protocol-sdk";
|
|
2639
2587
|
var AbstractJsonRpcRunner = class extends AbstractCreatableProvider2 {
|
|
2640
2588
|
static {
|
|
@@ -2649,7 +2597,7 @@ var AbstractJsonRpcRunner = class extends AbstractCreatableProvider2 {
|
|
|
2649
2597
|
}
|
|
2650
2598
|
createTransport() {
|
|
2651
2599
|
const endpoint = this.config.services.apiEndpoint;
|
|
2652
|
-
if (
|
|
2600
|
+
if (isDefined4(endpoint)) {
|
|
2653
2601
|
return new HttpRpcTransport(endpoint, this.schemas());
|
|
2654
2602
|
}
|
|
2655
2603
|
throw new Error("Unable to create transport");
|