@xyo-network/react-chain 1.3.6 → 1.3.8

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.
@@ -1,2849 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
- // src/components/block/BlockHeadingFlexbox.tsx
5
- import { BWVerification, HashHeadingPaper } from "@xylabs/react-boundwitness-plugin-private";
6
- import { FlexCol as FlexCol2, FlexRow as FlexRow2 } from "@xylabs/react-flexbox";
7
- import { usePayloadHash } from "@xyo-network/react-shared";
8
- import React8 from "react";
9
-
10
- // src/context/analyzer/context.ts
11
- import { createContextEx } from "@xyo-network/react-shared";
12
- var ChainAnalyzersContext = createContextEx();
13
-
14
- // src/context/analyzer/Provider.tsx
15
- import { hydrateBlock } from "@xylabs/sdk-xyo-chain-js";
16
- import { PayloadBuilder } from "@xyo-network/payload-builder";
17
- import { useCallback, useMemo, useState } from "react";
18
- var ChainAnalyzersProvider = /* @__PURE__ */ __name(({ analyzers: analyzersProp, children }) => {
19
- const [analyzersState, setAnalyzersState] = useState(analyzersProp ?? {});
20
- const [statsUpdated, setStatsUpdated] = useState(Date.now());
21
- const analyzers = useMemo(() => ({
22
- ...analyzersProp,
23
- ...analyzersState
24
- }), [
25
- analyzersProp
26
- ]);
27
- const addAnalyzers = useCallback((analyzers2) => {
28
- if (!analyzers2) return;
29
- setAnalyzersState((prev) => ({
30
- ...prev,
31
- ...analyzers2
32
- }));
33
- }, []);
34
- const onBlock = useCallback(async (chainArchivist, block) => {
35
- const hash = await PayloadBuilder.hash(block);
36
- const hydratedBlock = await hydrateBlock(chainArchivist, hash);
37
- for (const analyzer of Object.values(analyzers)) {
38
- void analyzer.onBlock(hydratedBlock);
39
- setStatsUpdated(Date.now());
40
- }
41
- }, [
42
- analyzers
43
- ]);
44
- const value = useMemo(() => ({
45
- analyzers,
46
- addAnalyzers,
47
- onBlock,
48
- statsUpdated,
49
- provided: true
50
- }), [
51
- analyzers,
52
- addAnalyzers,
53
- onBlock,
54
- statsUpdated
55
- ]);
56
- return /* @__PURE__ */ React.createElement(ChainAnalyzersContext.Provider, {
57
- value
58
- }, children);
59
- }, "ChainAnalyzersProvider");
60
-
61
- // src/context/analyzer/use.ts
62
- import { useContextEx } from "@xyo-network/react-shared";
63
- var useChainAnalyzersContext = /* @__PURE__ */ __name((required = false) => useContextEx(ChainAnalyzersContext, "ChainAnalyzers", required), "useChainAnalyzersContext");
64
-
65
- // src/context/chain/Context.ts
66
- import { createContextEx as createContextEx2 } from "@xyo-network/react-shared";
67
- var ChainInfoContext = createContextEx2();
68
-
69
- // src/context/chain/Provider.tsx
70
- import React2, { useEffect, useMemo as useMemo2, useState as useState2 } from "react";
71
- var ChainInfoProvider = /* @__PURE__ */ __name(({ children, chainArchivist: chainArchivistProp, chainInformation: chainInformationProp, chainIterator: chainIteratorProp }) => {
72
- const [chainArchivist, setChainArchivist] = useState2(chainArchivistProp);
73
- const [chainInformation, setChainInformation] = useState2(chainInformationProp);
74
- const [chainIterator, setChainIterator] = useState2(chainIteratorProp);
75
- const updateChainArchivist = /* @__PURE__ */ __name((chainArchivist2) => {
76
- setChainArchivist(chainArchivist2);
77
- }, "updateChainArchivist");
78
- const updateChainInformation = /* @__PURE__ */ __name((chainInformation2) => {
79
- setChainInformation(chainInformation2);
80
- }, "updateChainInformation");
81
- const updateChainIterator = /* @__PURE__ */ __name((chainIterator2) => {
82
- setChainIterator(chainIterator2);
83
- }, "updateChainIterator");
84
- useEffect(() => {
85
- updateChainArchivist(chainArchivistProp);
86
- }, [
87
- chainArchivistProp
88
- ]);
89
- useEffect(() => {
90
- updateChainInformation(chainInformationProp);
91
- }, [
92
- chainInformationProp
93
- ]);
94
- useEffect(() => {
95
- updateChainIterator(chainIteratorProp);
96
- }, [
97
- chainIteratorProp
98
- ]);
99
- const chainState = useMemo2(() => ({
100
- chainArchivist,
101
- chainInformation,
102
- chainIterator,
103
- updateChainArchivist,
104
- updateChainInformation,
105
- updateChainIterator,
106
- provided: true
107
- }), [
108
- chainArchivist,
109
- chainInformation,
110
- chainIterator,
111
- updateChainArchivist,
112
- updateChainInformation,
113
- updateChainIterator
114
- ]);
115
- return /* @__PURE__ */ React2.createElement(ChainInfoContext.Provider, {
116
- value: chainState
117
- }, children);
118
- }, "ChainInfoProvider");
119
-
120
- // src/context/polling/context.ts
121
- import { createContextEx as createContextEx3 } from "@xyo-network/react-shared";
122
- var ChainPollingContext = createContextEx3();
123
-
124
- // src/context/polling/Provider.tsx
125
- import { useCallback as useCallback2, useMemo as useMemo3, useState as useState3 } from "react";
126
- var ChainPollingProvider = /* @__PURE__ */ __name(({ children, pollingState: pollingStateProp = "running" }) => {
127
- const [pollingState, setPollingState] = useState3(pollingStateProp);
128
- const updatePollingState = useCallback2((newPollingState) => {
129
- setPollingState(newPollingState);
130
- }, []);
131
- const value = useMemo3(() => ({
132
- pollingState,
133
- provided: true,
134
- updatePollingState
135
- }), [
136
- pollingState,
137
- updatePollingState
138
- ]);
139
- return /* @__PURE__ */ React.createElement(ChainPollingContext.Provider, {
140
- value
141
- }, children);
142
- }, "ChainPollingProvider");
143
-
144
- // src/context/polling/use.ts
145
- import { useContextEx as useContextEx2 } from "@xyo-network/react-shared";
146
- var useChainPollingContext = /* @__PURE__ */ __name((required = false) => useContextEx2(ChainPollingContext, "ChainPolling", required), "useChainPollingContext");
147
-
148
- // src/lib/getChainArchivist.ts
149
- import { assertEx } from "@xylabs/assert";
150
- import { asArchivistInstance } from "@xyo-network/archivist-model";
151
- import { HttpBridge, HttpBridgeConfigSchema } from "@xyo-network/bridge-http";
152
- var getChainArchivistFromBridge = /* @__PURE__ */ __name(async (params) => {
153
- const { url, chainArchivistModuleId } = params;
154
- const config = {
155
- schema: HttpBridgeConfigSchema,
156
- client: {
157
- url
158
- }
159
- };
160
- const bridge = await HttpBridge.create({
161
- config
162
- });
163
- const resolved = await bridge.resolve(chainArchivistModuleId);
164
- const mod = assertEx(resolved, () => `Module ${chainArchivistModuleId} not found`);
165
- return assertEx(asArchivistInstance(mod), () => `Module ${chainArchivistModuleId} is not an archivist`);
166
- }, "getChainArchivistFromBridge");
167
-
168
- // src/lib/getChainInformation.ts
169
- import { HDWallet } from "@xyo-network/account";
170
- var id = "ce080bf3043a40c6c8838c7e813c00ab53df1684";
171
- var sharedAccountPhrase = "crane ribbon cook cousin tobacco vital moral protect merit knock veteran hint knee ocean nurse";
172
- var sharedAccountPath = "m/44'/60'/0'/0";
173
- var getChainInformation = /* @__PURE__ */ __name(async () => {
174
- const sharedSignerAccount = await HDWallet.fromPhrase(sharedAccountPhrase, sharedAccountPath);
175
- const chainInformation = {
176
- id,
177
- sharedSigner: sharedSignerAccount.address,
178
- sharedSignerAccount
179
- };
180
- return {
181
- chainInformation
182
- };
183
- }, "getChainInformation");
184
-
185
- // src/lib/hexToBigInt.ts
186
- import { hexFromHexString } from "@xylabs/hex";
187
- function hexToBigInt(hex) {
188
- return BigInt(hexFromHexString(hex, {
189
- prefix: true
190
- }));
191
- }
192
- __name(hexToBigInt, "hexToBigInt");
193
-
194
- // src/components/transactions/submit/Builder.tsx
195
- import { Button, FormControl, TextField } from "@mui/material";
196
- import { FlexCol } from "@xylabs/react-flexbox";
197
- import React3 from "react";
198
- var ChainTransactionBuilder = /* @__PURE__ */ __name(({ onSubmitTx }) => {
199
- const handleSubmit = /* @__PURE__ */ __name(async (event) => {
200
- event.preventDefault();
201
- const formData = new FormData(event.currentTarget);
202
- const chainTx = {
203
- chain: formData.get("chain"),
204
- gas: formData.get("gas"),
205
- nbf: formData.get("nbf"),
206
- exp: formData.get("exp")
207
- };
208
- await onSubmitTx?.(chainTx);
209
- }, "handleSubmit");
210
- return /* @__PURE__ */ React3.createElement("form", {
211
- onSubmit: /* @__PURE__ */ __name((event) => void handleSubmit(event), "onSubmit"),
212
- style: {
213
- width: "100%"
214
- }
215
- }, /* @__PURE__ */ React3.createElement(FlexCol, {
216
- gap: 2
217
- }, /* @__PURE__ */ React3.createElement(FormControl, {
218
- fullWidth: true
219
- }, /* @__PURE__ */ React3.createElement(TextField, {
220
- label: "Chain Address",
221
- name: "chain",
222
- required: true
223
- })), /* @__PURE__ */ React3.createElement(FormControl, {
224
- fullWidth: true
225
- }, /* @__PURE__ */ React3.createElement(TextField, {
226
- label: "Gas",
227
- name: "gas",
228
- required: true
229
- })), /* @__PURE__ */ React3.createElement(FormControl, {
230
- fullWidth: true
231
- }, /* @__PURE__ */ React3.createElement(TextField, {
232
- label: "Not Before Block",
233
- name: "nbf",
234
- required: true
235
- })), /* @__PURE__ */ React3.createElement(FormControl, {
236
- fullWidth: true
237
- }, /* @__PURE__ */ React3.createElement(TextField, {
238
- label: "Not After Block",
239
- name: "exp",
240
- required: true
241
- })), /* @__PURE__ */ React3.createElement(Button, {
242
- type: "submit",
243
- variant: "contained"
244
- }, "Submit")));
245
- }, "ChainTransactionBuilder");
246
-
247
- // src/components/transactions/submit/Network.tsx
248
- import { FormControl as FormControl2, FormHelperText, TextField as TextField2 } from "@mui/material";
249
- import React4, { useState as useState4 } from "react";
250
- var ChainTransactionNetwork = /* @__PURE__ */ __name(({ network, onNetworkChange, ...props }) => {
251
- const [error, setError] = useState4();
252
- const handleChange = /* @__PURE__ */ __name((event) => {
253
- try {
254
- const url = new URL(event.target.value);
255
- setError(void 0);
256
- onNetworkChange?.(url);
257
- } catch (error2) {
258
- console.error(error2);
259
- setError(error2);
260
- }
261
- }, "handleChange");
262
- return /* @__PURE__ */ React4.createElement(FormControl2, {
263
- fullWidth: true
264
- }, /* @__PURE__ */ React4.createElement(TextField2, {
265
- label: "Network",
266
- name: "network",
267
- onChange: handleChange,
268
- required: true,
269
- value: network,
270
- ...props
271
- }), /* @__PURE__ */ React4.createElement(FormHelperText, {
272
- sx: {
273
- color: error ? "red" : void 0
274
- }
275
- }, error ? "Not a valid url" : "Enter full url of archivist"));
276
- }, "ChainTransactionNetwork");
277
-
278
- // src/components/transactions/submit/SubmitChain.tsx
279
- import { Alert, Grid2, Typography } from "@mui/material";
280
- import { axios } from "@xylabs/axios";
281
- import { ErrorRender } from "@xylabs/react-error";
282
- import { FlexGrowCol } from "@xylabs/react-flexbox";
283
- import { buildTransaction, hexToBigInt as hexToBigInt2 } from "@xylabs/sdk-xyo-chain-js";
284
- import { Account } from "@xyo-network/account";
285
- import { ArchivistInsertQuerySchema } from "@xyo-network/archivist-model";
286
- import { QueryBoundWitnessBuilder } from "@xyo-network/boundwitness-builder";
287
- import { PayloadBuilder as PayloadBuilder2 } from "@xyo-network/payload-builder";
288
- import React5, { useState as useState5 } from "react";
289
- var BETA_PENDING_TRANSACTIONS_ARCHIVIST = "https://beta.api.chain.xyo.network/8050fee682a2762f504d5449d8269a6f17f0b693";
290
- var SubmitChainTransaction = /* @__PURE__ */ __name(() => {
291
- const [network, setNetwork] = useState5(new URL(BETA_PENDING_TRANSACTIONS_ARCHIVIST));
292
- const [result, setResult] = useState5();
293
- const [error, setError] = useState5();
294
- const onSubmitTx = /* @__PURE__ */ __name(async (chainTx) => {
295
- if (!network) throw new Error("Network not set");
296
- const randomAccount = await Account.random();
297
- const [transactionBoundWitness] = await buildTransaction(chainTx.chain, [], BigInt(`0x${chainTx.gas}`), randomAccount, hexToBigInt2(chainTx.nbf), hexToBigInt2(chainTx.exp));
298
- const insertQuery = new PayloadBuilder2({
299
- schema: ArchivistInsertQuerySchema
300
- }).build();
301
- const [queryBoundWitness] = await new QueryBoundWitnessBuilder().payloads([
302
- transactionBoundWitness
303
- ]).query(insertQuery).signer(randomAccount).build();
304
- const response = await axios.post(network.href, [
305
- queryBoundWitness,
306
- [
307
- insertQuery,
308
- transactionBoundWitness,
309
- chainTx
310
- ]
311
- ]);
312
- if (response.data.errors) {
313
- setError(new Error(response.data.errors.map((e) => e.message).join("\n")));
314
- } else {
315
- setResult(response.data.data);
316
- }
317
- }, "onSubmitTx");
318
- const onNetworkChange = /* @__PURE__ */ __name((url) => {
319
- setNetwork(url);
320
- }, "onNetworkChange");
321
- return /* @__PURE__ */ React5.createElement(Grid2, {
322
- container: true
323
- }, /* @__PURE__ */ React5.createElement(Grid2, {
324
- size: {
325
- xs: 12,
326
- sm: 6,
327
- md: 4
328
- }
329
- }, /* @__PURE__ */ React5.createElement(FlexGrowCol, {
330
- alignItems: "start",
331
- gap: 2
332
- }, /* @__PURE__ */ React5.createElement(ChainTransactionNetwork, {
333
- network,
334
- onNetworkChange
335
- }), network ? /* @__PURE__ */ React5.createElement(ChainTransactionBuilder, {
336
- onSubmitTx
337
- }) : null, result?.[2].length === 0 ? /* @__PURE__ */ React5.createElement(Alert, {
338
- severity: "success"
339
- }, "Success") : null, error ? /* @__PURE__ */ React5.createElement(ErrorRender, {
340
- error
341
- }) : null, result?.[2] && result?.[2].length > 0 ? /* @__PURE__ */ React5.createElement(ErrorRender, {
342
- error: new Error("Failed insert...see result below")
343
- }) : null, result ? /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(Typography, {
344
- variant: "h6"
345
- }, "Result:"), /* @__PURE__ */ React5.createElement("pre", null, JSON.stringify(result, null, 2))) : null)));
346
- }, "SubmitChainTransaction");
347
-
348
- // src/components/transactions/TransactionCountChip.tsx
349
- import { Difference } from "@mui/icons-material";
350
- import { Chip, Icon } from "@mui/material";
351
- import { useMemo as useMemo4 } from "react";
352
- var TransactionCountChip = /* @__PURE__ */ __name(({ transactions, sx, ...props }) => {
353
- const label = useMemo4(() => {
354
- if (!transactions) return "0";
355
- return transactions?.length > 10 ? "+10" : transactions.length;
356
- }, [
357
- transactions
358
- ]);
359
- return /* @__PURE__ */ React.createElement(Chip, {
360
- avatar: /* @__PURE__ */ React.createElement(Icon, null, /* @__PURE__ */ React.createElement(Difference, null)),
361
- label: `tx: ${label}`,
362
- title: transactions ? `Block contains ${transactions.length} transactions` : void 0,
363
- sx: {
364
- display: "inline-flex",
365
- alignItems: "center",
366
- justifyContent: "center",
367
- ...sx
368
- },
369
- ...props
370
- });
371
- }, "TransactionCountChip");
372
-
373
- // src/components/transactions/TransactionsQuickTipButton.tsx
374
- import { ContentCopy as ContentCopyIcon, Paid } from "@mui/icons-material";
375
- import { Alert as Alert2, AlertTitle, Collapse, Snackbar, Typography as Typography2 } from "@mui/material";
376
- import { ErrorRender as ErrorRender2 } from "@xylabs/react-error";
377
- import { FlexGrowCol as FlexGrowCol2, FlexGrowRow, FlexRow } from "@xylabs/react-flexbox";
378
- import { QuickTipButton } from "@xylabs/react-quick-tip-button";
379
- import React6, { Fragment, useMemo as useMemo5, useState as useState6 } from "react";
380
- var TransactionsQuickTipButton = /* @__PURE__ */ __name(({ block, chainArchivist, ...props }) => {
381
- const [transactions, transactionsError] = useTxsFromBlock(chainArchivist, block);
382
- const [copied, setCopied] = useState6(false);
383
- const [showError, setShowError] = useState6(false);
384
- useMemo5(() => transactionsError ? setShowError(true) : setShowError(false), [
385
- transactionsError
386
- ]);
387
- const onCopy = /* @__PURE__ */ __name(async (transactionHash) => {
388
- await navigator.clipboard.writeText(transactionHash);
389
- setCopied(true);
390
- setTimeout(() => {
391
- setCopied(false);
392
- }, 5e3);
393
- }, "onCopy");
394
- return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(QuickTipButton, {
395
- Icon: Paid,
396
- disabled: transactions?.length === 0,
397
- hoverText: `Transaction Count: ${transactions?.length ?? 0}`,
398
- disableDialog: transactions?.length === 0,
399
- dialogProps: {
400
- fullWidth: true,
401
- maxWidth: "md"
402
- },
403
- ...props
404
- }, transactions?.length === 0 ? null : /* @__PURE__ */ React6.createElement(FlexGrowCol2, {
405
- gap: 1,
406
- alignItems: "stretch"
407
- }, transactions?.map(([transaction, hash]) => /* @__PURE__ */ React6.createElement(Fragment, {
408
- key: hash
409
- }, /* @__PURE__ */ React6.createElement(FlexGrowRow, {
410
- gap: 2,
411
- justifyContent: "start"
412
- }, /* @__PURE__ */ React6.createElement(ContentCopyIcon, {
413
- sx: {
414
- cursor: "pointer"
415
- },
416
- onClick: /* @__PURE__ */ __name(() => void onCopy(hash), "onClick")
417
- }), /* @__PURE__ */ React6.createElement(Typography2, {
418
- sx: {
419
- overflow: "hidden",
420
- textOverflow: "ellipsis",
421
- whiteSpace: "nowrap"
422
- }
423
- }, transaction._hash)), /* @__PURE__ */ React6.createElement(FlexRow, null, /* @__PURE__ */ React6.createElement(Collapse, {
424
- in: copied,
425
- unmountOnExit: true
426
- }, /* @__PURE__ */ React6.createElement(Alert2, null, /* @__PURE__ */ React6.createElement(AlertTitle, null, "Previous hash copied to clipboard")))))))), /* @__PURE__ */ React6.createElement(Snackbar, {
427
- open: showError,
428
- onClose: /* @__PURE__ */ __name(() => setShowError(false), "onClose")
429
- }, /* @__PURE__ */ React6.createElement(ErrorRender2, {
430
- error: transactionsError,
431
- scope: "TransactionsQuickTipButton"
432
- })));
433
- }, "TransactionsQuickTipButton");
434
-
435
- // src/components/block/hooks/useAnchorElement.ts
436
- import { useRef, useState as useState7 } from "react";
437
- var useAnchorElement = /* @__PURE__ */ __name(() => {
438
- const [anchorEl, setAnchorEl] = useState7(null);
439
- const anchorRef = useRef(null);
440
- const open = Boolean(anchorEl);
441
- const handleClick = /* @__PURE__ */ __name((event) => {
442
- setAnchorEl(event.currentTarget);
443
- }, "handleClick");
444
- const handleClose = /* @__PURE__ */ __name(() => {
445
- setAnchorEl(null);
446
- }, "handleClose");
447
- return {
448
- anchorEl,
449
- anchorRef,
450
- open,
451
- handleClick,
452
- handleClose
453
- };
454
- }, "useAnchorElement");
455
-
456
- // src/components/block/hooks/useBlockHeadingEvents.ts
457
- import { useEvent } from "@xyo-network/react-event";
458
- var useBlockHeadingEvents = /* @__PURE__ */ __name((...args) => {
459
- return useEvent(...args);
460
- }, "useBlockHeadingEvents");
461
-
462
- // src/components/block/hooks/useBlockProducer.ts
463
- import { useMemo as useMemo6 } from "react";
464
- var useBlockProducer = /* @__PURE__ */ __name((block, chainInformation) => {
465
- return useMemo6(() => {
466
- if (block && chainInformation) {
467
- const producer = block.addresses.find((address) => address !== chainInformation.sharedSigner);
468
- return producer;
469
- }
470
- }, [
471
- block,
472
- chainInformation
473
- ]);
474
- }, "useBlockProducer");
475
-
476
- // src/components/block/hooks/useDynamicBlockComponents.ts
477
- import { isBlockBoundWitness } from "@xylabs/sdk-xyo-chain-js";
478
- import { useState as useState8 } from "react";
479
-
480
- // src/components/block/helpers/blockProducer.ts
481
- var blockProducer = /* @__PURE__ */ __name((block, chainInformation) => {
482
- return block.addresses.find((address) => address !== chainInformation.sharedSigner);
483
- }, "blockProducer");
484
-
485
- // src/components/block/helpers/tsxFromBlock.ts
486
- import { isTransactionBoundWitness } from "@xylabs/sdk-xyo-chain-js";
487
- import { PayloadBuilder as PayloadBuilder3 } from "@xyo-network/payload-builder";
488
- var txsFromBlock = /* @__PURE__ */ __name(async (chainArchivist, block) => {
489
- const payloads = await chainArchivist.get(block.payload_hashes);
490
- const transactionPayloads = payloads.filter((payload) => isTransactionBoundWitness(payload));
491
- return await PayloadBuilder3.hashPairs(transactionPayloads);
492
- }, "txsFromBlock");
493
-
494
- // src/components/block/helpers/buildBlockChainRenderComponent.tsx
495
- var buildBlockChainRenderComponent = /* @__PURE__ */ __name(async (BlockComponent, blockComponentProps, chainArchivist) => {
496
- const { block, ...remainingProps } = blockComponentProps;
497
- const blockTxs = await txsFromBlock(chainArchivist, block);
498
- const txHashes = blockTxs.map(([_, hash]) => hash);
499
- const item = {
500
- child: /* @__PURE__ */ React.createElement(BlockComponent, {
501
- block,
502
- transactions: txHashes,
503
- ...remainingProps
504
- }),
505
- key: block.block,
506
- block
507
- };
508
- return item;
509
- }, "buildBlockChainRenderComponent");
510
- var buildBlockHeadingComponent = /* @__PURE__ */ __name(async (blockComponentProps, chainArchivist) => {
511
- return await buildBlockChainRenderComponent(BlockHeadingFlexbox, blockComponentProps, chainArchivist);
512
- }, "buildBlockHeadingComponent");
513
-
514
- // src/components/block/hooks/useDynamicBlockComponents.ts
515
- var useDynamicBlockComponents = /* @__PURE__ */ __name((BlockComponent, params, maxBlocks) => {
516
- const { chainArchivist, chainInformation } = params ?? {};
517
- const [blockChainRenderComponents, setBlockChainRenderComponents] = useState8([]);
518
- const { onBlock } = useChainAnalyzersContext();
519
- const onAddBlock = /* @__PURE__ */ __name(async (block) => {
520
- if (!isBlockBoundWitness(block) || !chainArchivist || !chainInformation) return;
521
- const blockComponentProps = {
522
- block,
523
- chainInformation
524
- };
525
- const newBlockComponent = await buildBlockChainRenderComponent(BlockComponent, blockComponentProps, chainArchivist);
526
- if (block.block !== blockChainRenderComponents[0]?.block.block) {
527
- void onBlock?.(chainArchivist, block);
528
- setBlockChainRenderComponents((blockComponents) => {
529
- const newBlockComponents = [
530
- newBlockComponent,
531
- ...blockComponents
532
- ];
533
- if (maxBlocks && newBlockComponents.length > maxBlocks) {
534
- newBlockComponents.pop();
535
- }
536
- return newBlockComponents;
537
- });
538
- }
539
- }, "onAddBlock");
540
- return {
541
- blockChainRenderComponents,
542
- onAddBlock
543
- };
544
- }, "useDynamicBlockComponents");
545
-
546
- // src/components/block/hooks/useStaticBlockComponents.ts
547
- import { usePromise } from "@xylabs/react-promise";
548
- var useStaticBlockComponents = /* @__PURE__ */ __name((BlockComponent, params, blocks) => {
549
- const { onBlock } = useChainAnalyzersContext();
550
- const [blockComponents, blockComponentsError] = usePromise(async () => {
551
- const resolvedBlockWithStorage = blocks ?? [];
552
- if (!params?.chainArchivist) return [];
553
- const { chainArchivist, chainInformation } = params;
554
- return await Promise.all(resolvedBlockWithStorage?.map(async (block) => {
555
- if (onBlock && chainArchivist) {
556
- await onBlock(chainArchivist, block);
557
- }
558
- const blockComponentProps = {
559
- block,
560
- chainInformation,
561
- defaultExpanded: true
562
- };
563
- return await buildBlockChainRenderComponent(BlockComponent, blockComponentProps, chainArchivist);
564
- }));
565
- }, [
566
- blocks,
567
- params,
568
- BlockComponent
569
- ]);
570
- return {
571
- blockComponents,
572
- errors: blockComponentsError
573
- };
574
- }, "useStaticBlockComponents");
575
-
576
- // src/components/block/hooks/useTxsFromBlock.ts
577
- import { usePromise as usePromise2 } from "@xylabs/react-promise";
578
- var useTxsFromBlock = /* @__PURE__ */ __name((chainArchivist, block) => {
579
- return usePromise2(async () => {
580
- if (block && chainArchivist) {
581
- return await txsFromBlock(chainArchivist, block);
582
- }
583
- }, [
584
- block,
585
- chainArchivist
586
- ]);
587
- }, "useTxsFromBlock");
588
-
589
- // src/components/block/LinkedDivider.tsx
590
- import { Divider, Stack } from "@mui/material";
591
- import React7 from "react";
592
- var LinkedDivider = /* @__PURE__ */ __name(() => {
593
- return /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement(Stack, {
594
- className: "divider-spacer",
595
- justifyContent: "end",
596
- sx: {
597
- width: "50%",
598
- height: 24,
599
- justifyContent: "end"
600
- }
601
- }, /* @__PURE__ */ React7.createElement(Divider, {
602
- className: "divider",
603
- orientation: "vertical",
604
- flexItem: true,
605
- sx: {
606
- borderRightWidth: 2,
607
- height: 24,
608
- transition: "height 1s"
609
- }
610
- })));
611
- }, "LinkedDivider");
612
-
613
- // src/components/block/menu/Expanded.tsx
614
- import { MoreVert } from "@mui/icons-material";
615
- import { IconButton, Menu } from "@mui/material";
616
- import { BWJsonMenuItem, BWPreviousHashMenuItem } from "@xylabs/react-boundwitness-plugin-private";
617
- var BlockMenuExpanded = /* @__PURE__ */ __name(({ block }) => {
618
- const { anchorEl, anchorRef, open, handleClick, handleClose } = useAnchorElement();
619
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(IconButton, {
620
- ref: anchorRef,
621
- size: "small",
622
- onClick: handleClick
623
- }, /* @__PURE__ */ React.createElement(MoreVert, {
624
- fontSize: "inherit"
625
- })), /* @__PURE__ */ React.createElement(Menu, {
626
- open,
627
- anchorEl,
628
- anchorOrigin: {
629
- horizontal: "left",
630
- vertical: "bottom"
631
- },
632
- onClose: handleClose
633
- }, /* @__PURE__ */ React.createElement(BWPreviousHashMenuItem, {
634
- boundwitness: block,
635
- dense: true,
636
- onDialogClose: handleClose
637
- }), /* @__PURE__ */ React.createElement(BWJsonMenuItem, {
638
- boundwitness: block,
639
- dense: true,
640
- onDialogClose: handleClose
641
- })));
642
- }, "BlockMenuExpanded");
643
-
644
- // src/components/block/ProducerChip.tsx
645
- import { Chip as Chip2 } from "@mui/material";
646
- import { EthAddress } from "@xylabs/eth-address";
647
- import { BlockiesAvatar } from "@xylabs/xyo-chain-react-blockies";
648
- import { useMemo as useMemo7 } from "react";
649
- var BlockProducerChip = /* @__PURE__ */ __name(({ block, chainInformation, ...props }) => {
650
- const blockProducer2 = useMemo7(() => {
651
- if (block && chainInformation) {
652
- const producer = block.addresses.find((address) => address !== chainInformation.sharedSigner);
653
- return producer;
654
- }
655
- }, [
656
- block,
657
- chainInformation
658
- ]);
659
- const shortedBlockProducer = blockProducer2 ? EthAddress.parse(blockProducer2)?.toShortString(3) : null;
660
- const avatar = useMemo7(() => blockProducer2 === "" ? void 0 : /* @__PURE__ */ React.createElement(BlockiesAvatar, {
661
- blockiesOptions: {
662
- seed: blockProducer2
663
- }
664
- }), [
665
- blockProducer2
666
- ]);
667
- return /* @__PURE__ */ React.createElement(Chip2, {
668
- avatar,
669
- label: shortedBlockProducer ? `${shortedBlockProducer}` : null,
670
- title: `Block producer: ${blockProducer2}`,
671
- ...props
672
- });
673
- }, "BlockProducerChip");
674
-
675
- // src/components/block/BlockHeadingFlexbox.tsx
676
- var BlockHeadingFlexbox = /* @__PURE__ */ __name(({ block, defaultExpanded, chainInformation, transactions }) => {
677
- const hash = usePayloadHash(block);
678
- const [blockHeadingRef, blockHeadingListener] = useBlockHeadingEvents();
679
- const { pollingState } = useChainPollingContext();
680
- const expanded = pollingState === "paused" || defaultExpanded;
681
- const handleTransactionCountClick = /* @__PURE__ */ __name((event, transactions2) => {
682
- event.stopPropagation();
683
- blockHeadingListener("transaction-count", "click", JSON.stringify(transactions2));
684
- }, "handleTransactionCountClick");
685
- return /* @__PURE__ */ React8.createElement(FlexCol2, {
686
- className: "block-heading-flexbox",
687
- alignItems: "stretch",
688
- ref: blockHeadingRef,
689
- onClick: /* @__PURE__ */ __name(() => blockHeadingListener("block-hash", "click", hash), "onClick")
690
- }, /* @__PURE__ */ React8.createElement(LinkedDivider, null), /* @__PURE__ */ React8.createElement(HashHeadingPaper, {
691
- hash,
692
- heading: block?.block ? hexToBigInt(block.block).toString() : "",
693
- paperProps: {
694
- sx: {
695
- p: 1,
696
- width: "100%"
697
- }
698
- },
699
- AdornmentEnd: /* @__PURE__ */ React8.createElement(FlexRow2, {
700
- gap: 1
701
- }, /* @__PURE__ */ React8.createElement(BlockProducerChip, {
702
- block,
703
- chainInformation
704
- }), /* @__PURE__ */ React8.createElement(TransactionCountChip, {
705
- onClick: /* @__PURE__ */ __name((e) => handleTransactionCountClick(e, transactions ?? []), "onClick"),
706
- transactions
707
- }), /* @__PURE__ */ React8.createElement(BWVerification, {
708
- iconColors: true,
709
- boundwitness: block
710
- }), /* @__PURE__ */ React8.createElement("span", {
711
- style: {
712
- // maxWidth is required for css animation to work and 28px is the width of the icon button
713
- display: "flex",
714
- transition: "max-width .5s",
715
- maxWidth: expanded ? "28px" : 0
716
- }
717
- }, /* @__PURE__ */ React8.createElement(BlockMenuExpanded, {
718
- block
719
- }))),
720
- identiconProps: {
721
- p: 0.75,
722
- size: 18
723
- }
724
- }));
725
- }, "BlockHeadingFlexbox");
726
-
727
- // src/components/block/table/cell/BlockNumber.tsx
728
- import { Link, TableCell, Tooltip } from "@mui/material";
729
- import React9 from "react";
730
-
731
- // src/components/block/table/cell/hooks/useLinkedBlockItem.tsx
732
- import { useEvent as useEvent2 } from "@xyo-network/react-event";
733
- var useLinkedBlockItem = /* @__PURE__ */ __name((noun, data) => {
734
- const [ref, dispatch] = useEvent2();
735
- const handleClick = /* @__PURE__ */ __name((event) => {
736
- event.preventDefault();
737
- if (!noun) {
738
- console.warn("useLinkedBlockItem: noun is required");
739
- return;
740
- }
741
- dispatch(noun, "click", data);
742
- }, "handleClick");
743
- return [
744
- ref,
745
- handleClick
746
- ];
747
- }, "useLinkedBlockItem");
748
-
749
- // src/components/block/table/cell/BlockNumber.tsx
750
- var BlockNumberTableCell = /* @__PURE__ */ __name(({ block, linked, ...props }) => {
751
- const [ref, handleClick] = useLinkedBlockItem("block-number", block?.block);
752
- const blockNumberBigInt = block ? hexToBigInt(block.block).toString() : "";
753
- return /* @__PURE__ */ React9.createElement(TableCell, {
754
- ref,
755
- ...props
756
- }, /* @__PURE__ */ React9.createElement(Tooltip, {
757
- title: `Block Number: ${blockNumberBigInt}`
758
- }, /* @__PURE__ */ React9.createElement("span", null, linked && block ? /* @__PURE__ */ React9.createElement(Link, {
759
- title: block.block,
760
- onClick: handleClick,
761
- sx: {
762
- cursor: "pointer"
763
- }
764
- }, hexToBigInt(block.block).toString()) : null, !linked && blockNumberBigInt)));
765
- }, "BlockNumberTableCell");
766
-
767
- // src/components/block/table/cell/Hash.tsx
768
- import { Avatar, Chip as Chip3, TableCell as TableCell2, Tooltip as Tooltip2 } from "@mui/material";
769
- import { Identicon } from "@xylabs/react-identicon";
770
- import { usePayloadHash as usePayloadHash2 } from "@xyo-network/react-shared";
771
- import React10 from "react";
772
- var BlockHashTableCell = /* @__PURE__ */ __name(({ block, identiconProps, linked, ...props }) => {
773
- const hash = usePayloadHash2(block);
774
- const [ref, handleClick] = useLinkedBlockItem("block-hash", hash);
775
- const shortenedHash = hash ? `${hash.slice(0, 4)}...${hash.slice(-5, -1)}` : "";
776
- return /* @__PURE__ */ React10.createElement(TableCell2, {
777
- ref,
778
- ...props
779
- }, hash ? /* @__PURE__ */ React10.createElement(Tooltip2, {
780
- title: `Block Hash: ${hash}`
781
- }, /* @__PURE__ */ React10.createElement(Chip3, {
782
- avatar: /* @__PURE__ */ React10.createElement(Avatar, {
783
- sx: {
784
- background: "white"
785
- }
786
- }, /* @__PURE__ */ React10.createElement(Identicon, {
787
- size: 16,
788
- value: hash,
789
- ...identiconProps
790
- })),
791
- label: shortenedHash,
792
- onClick: linked ? handleClick : void 0
793
- })) : null);
794
- }, "BlockHashTableCell");
795
-
796
- // src/components/block/table/cell/JsonView.tsx
797
- import { Code } from "@mui/icons-material";
798
- import { Button as Button2, Dialog, DialogActions, DialogContent, DialogTitle, IconButton as IconButton2, TableCell as TableCell3 } from "@mui/material";
799
- import { ellipsize } from "@xylabs/eth-address";
800
- import { FlexRow as FlexRow3 } from "@xylabs/react-flexbox";
801
- import { JsonViewerEx } from "@xyo-network/react-payload-raw-info";
802
- import { usePayloadHash as usePayloadHash3 } from "@xyo-network/react-shared";
803
- import React11, { useState as useState9 } from "react";
804
- var BlockJsonViewTableCell = /* @__PURE__ */ __name(({ block, ...props }) => {
805
- const [open, setOpen] = useState9(false);
806
- const onClose = /* @__PURE__ */ __name(() => setOpen(false), "onClose");
807
- const hash = usePayloadHash3(block);
808
- const title = hash ? `JSON for ${ellipsize(hash, 5)}` : "JSON";
809
- return /* @__PURE__ */ React11.createElement(TableCell3, props, /* @__PURE__ */ React11.createElement(FlexRow3, {
810
- sx: {
811
- width: "100%"
812
- }
813
- }, /* @__PURE__ */ React11.createElement(IconButton2, {
814
- onClick: /* @__PURE__ */ __name(() => setOpen(true), "onClick")
815
- }, /* @__PURE__ */ React11.createElement(Code, null))), /* @__PURE__ */ React11.createElement(Dialog, {
816
- open,
817
- onClose
818
- }, /* @__PURE__ */ React11.createElement(DialogTitle, null, title), /* @__PURE__ */ React11.createElement(DialogContent, null, /* @__PURE__ */ React11.createElement(JsonViewerEx, {
819
- value: block
820
- })), /* @__PURE__ */ React11.createElement(DialogActions, {
821
- sx: {
822
- display: "flex",
823
- flexDirection: "row",
824
- justifyContent: "end"
825
- }
826
- }, /* @__PURE__ */ React11.createElement(Button2, {
827
- variant: "contained",
828
- onClick: onClose
829
- }, "Close"))));
830
- }, "BlockJsonViewTableCell");
831
-
832
- // src/components/block/table/cell/Producer.tsx
833
- import { TableCell as TableCell4, Tooltip as Tooltip3 } from "@mui/material";
834
- import { FlexRow as FlexRow4 } from "@xylabs/react-flexbox";
835
- import React12 from "react";
836
- var BlockProducerTableCell = /* @__PURE__ */ __name(({ block, chainInformation, linked, producerChipProps, ...props }) => {
837
- const [ref, handleClick] = useLinkedBlockItem("block-producer", JSON.stringify(block));
838
- const producer = useBlockProducer(block, chainInformation);
839
- return /* @__PURE__ */ React12.createElement(TableCell4, {
840
- ref,
841
- ...props
842
- }, /* @__PURE__ */ React12.createElement(Tooltip3, {
843
- title: `Block Producer: ${producer}`
844
- }, /* @__PURE__ */ React12.createElement(FlexRow4, {
845
- sx: {
846
- width: "100%"
847
- }
848
- }, /* @__PURE__ */ React12.createElement(BlockProducerChip, {
849
- onClick: linked ? handleClick : void 0,
850
- block,
851
- chainInformation,
852
- ...producerChipProps
853
- }))));
854
- }, "BlockProducerTableCell");
855
-
856
- // src/components/block/table/cell/TransactionCount.tsx
857
- import { Error as Error2 } from "@mui/icons-material";
858
- import { Link as Link2, TableCell as TableCell5, Tooltip as Tooltip4 } from "@mui/material";
859
- import React13 from "react";
860
- var BlockTransactionCountTableCell = /* @__PURE__ */ __name(({ block, chainArchivist, linked, ...props }) => {
861
- const [txs, error] = useTxsFromBlock(chainArchivist, block);
862
- const [ref, handleClick] = useLinkedBlockItem("transaction-count", JSON.stringify(txs ?? null));
863
- return /* @__PURE__ */ React13.createElement(TableCell5, {
864
- ref,
865
- ...props
866
- }, /* @__PURE__ */ React13.createElement("span", null, error ? /* @__PURE__ */ React13.createElement(Tooltip4, {
867
- title: error.message
868
- }, /* @__PURE__ */ React13.createElement(Error2, {
869
- color: "error"
870
- })) : null, linked ? /* @__PURE__ */ React13.createElement(Link2, {
871
- onClick: handleClick,
872
- sx: {
873
- cursor: "pointer"
874
- }
875
- }, txs?.length ?? 0) : txs?.length ?? 0));
876
- }, "BlockTransactionCountTableCell");
877
-
878
- // src/components/block/table/cell/Verification.tsx
879
- import { TableCell as TableCell6 } from "@mui/material";
880
- import { BWVerification as BWVerification2 } from "@xylabs/react-boundwitness-plugin-private";
881
- import { FlexRow as FlexRow5 } from "@xylabs/react-flexbox";
882
- import React14 from "react";
883
- var BlockVerificationTableCell = /* @__PURE__ */ __name(({ block, linked, ...props }) => {
884
- const [ref, handleClick] = useLinkedBlockItem("block-verification", block?.block);
885
- return /* @__PURE__ */ React14.createElement(TableCell6, {
886
- ref,
887
- ...props
888
- }, /* @__PURE__ */ React14.createElement(FlexRow5, {
889
- sx: {
890
- width: "100%"
891
- }
892
- }, /* @__PURE__ */ React14.createElement(BWVerification2, {
893
- onClick: linked ? handleClick : void 0,
894
- iconColors: true,
895
- boundwitness: block
896
- })));
897
- }, "BlockVerificationTableCell");
898
-
899
- // src/components/block/table/Ex.tsx
900
- import { TableBody, TableCell as TableCell7, TableHead, TableRow } from "@mui/material";
901
- import { TableEx } from "@xyo-network/react-table";
902
- import { forwardRef } from "react";
903
- var BlockchainTableEx = /* @__PURE__ */ forwardRef(({ children, ...props }, ref) => {
904
- return /* @__PURE__ */ React.createElement(TableEx, {
905
- ref,
906
- ...props
907
- }, /* @__PURE__ */ React.createElement(TableHead, null, /* @__PURE__ */ React.createElement(TableRow, null, /* @__PURE__ */ React.createElement(TableCell7, null, "Block Hash"), /* @__PURE__ */ React.createElement(TableCell7, null, "Block Number"), /* @__PURE__ */ React.createElement(TableCell7, null, "Transaction Count"), /* @__PURE__ */ React.createElement(TableCell7, {
908
- align: "center"
909
- }, "Block Producer"), /* @__PURE__ */ React.createElement(TableCell7, {
910
- align: "center"
911
- }, "Valid"), /* @__PURE__ */ React.createElement(TableCell7, {
912
- align: "center"
913
- }, "JSON"))), /* @__PURE__ */ React.createElement(TableBody, null, children));
914
- });
915
- BlockchainTableEx.displayName = "BlockchainTableEx";
916
-
917
- // src/components/block/table/row/TableRow.tsx
918
- import { TableRow as TableRow2 } from "@mui/material";
919
- import { useMemo as useMemo8 } from "react";
920
- var BlockChainTableRow = /* @__PURE__ */ __name(({ block, chainInformation, linked, ...props }) => {
921
- const defaultTableCellProps = useMemo8(() => ({
922
- block,
923
- linked
924
- }), [
925
- block,
926
- linked
927
- ]);
928
- return /* @__PURE__ */ React.createElement(TableRow2, props, /* @__PURE__ */ React.createElement(BlockHashTableCell, defaultTableCellProps), /* @__PURE__ */ React.createElement(BlockNumberTableCell, defaultTableCellProps), /* @__PURE__ */ React.createElement(BlockTransactionCountTableCell, defaultTableCellProps), /* @__PURE__ */ React.createElement(BlockProducerTableCell, {
929
- chainInformation,
930
- ...defaultTableCellProps
931
- }), /* @__PURE__ */ React.createElement(BlockVerificationTableCell, defaultTableCellProps), /* @__PURE__ */ React.createElement(BlockJsonViewTableCell, defaultTableCellProps));
932
- }, "BlockChainTableRow");
933
-
934
- // src/components/chain/controls/PollingControlsFlexbox.tsx
935
- import { Autorenew, Pause } from "@mui/icons-material";
936
- import { Alert as Alert3, AlertTitle as AlertTitle2, Grow, Icon as Icon2, IconButton as IconButton4, Tooltip as Tooltip5 } from "@mui/material";
937
- import { FlexRow as FlexRow6 } from "@xylabs/react-flexbox";
938
- import React16, { memo } from "react";
939
-
940
- // src/components/chain/stats/Dialog.tsx
941
- import { QueryStats } from "@mui/icons-material";
942
- import { Dialog as Dialog2, DialogContent as DialogContent2, DialogTitle as DialogTitle2, IconButton as IconButton3 } from "@mui/material";
943
- import { useState as useState10 } from "react";
944
-
945
- // src/components/chain/stats/producer/ProducerFlexbox.tsx
946
- import { ListItem, styled, Typography as Typography3 } from "@mui/material";
947
- import { ErrorRender as ErrorRender3 } from "@xylabs/react-error";
948
- import { FlexCol as FlexCol3 } from "@xylabs/react-flexbox";
949
- import { isChainSummaryProducers } from "@xylabs/sdk-xyo-chain-js";
950
- import { useMemo as useMemo9 } from "react";
951
-
952
- // src/components/chain/stats/producer/Table.tsx
953
- import { Table, TableBody as TableBody2, TableCell as TableCell8, TableHead as TableHead2, TableRow as TableRow3, useTheme } from "@mui/material";
954
- import { BlockiesAvatar as BlockiesAvatar2 } from "@xylabs/xyo-chain-react-blockies";
955
- import React15 from "react";
956
- var ChainProducerStatsTable = /* @__PURE__ */ __name(({ producers, ...props }) => {
957
- const theme = useTheme();
958
- return /* @__PURE__ */ React15.createElement(Table, props, /* @__PURE__ */ React15.createElement(TableHead2, null, /* @__PURE__ */ React15.createElement(TableRow3, null, /* @__PURE__ */ React15.createElement(TableCell8, null, "Address"), /* @__PURE__ */ React15.createElement(TableCell8, null, "Blocks Produced"), /* @__PURE__ */ React15.createElement(TableCell8, null, "Rewards Earned Produced"))), /* @__PURE__ */ React15.createElement(TableBody2, null, producers?.map((producer) => /* @__PURE__ */ React15.createElement(TableRow3, {
959
- key: producer.address
960
- }, /* @__PURE__ */ React15.createElement(TableCell8, null, /* @__PURE__ */ React15.createElement(BlockiesAvatar2, {
961
- blockiesOptions: {
962
- seed: producer.address
963
- },
964
- sx: {
965
- height: theme.spacing(2.75),
966
- width: theme.spacing(2.75)
967
- }
968
- })), /* @__PURE__ */ React15.createElement(TableCell8, null, producer.blocksProduced.toString()), /* @__PURE__ */ React15.createElement(TableCell8, null, producer.rewardsEarned.toString())))));
969
- }, "ChainProducerStatsTable");
970
-
971
- // src/components/chain/stats/producer/ProducerFlexbox.tsx
972
- var BlockProducerStatsFlexbox = /* @__PURE__ */ __name(({ payload, ...props }) => {
973
- const [producer, producerError] = useMemo9(() => {
974
- if (payload) {
975
- return isChainSummaryProducers(payload) ? [
976
- payload
977
- ] : [
978
- void 0,
979
- new Error("Payload is not a Chain Producer")
980
- ];
981
- } else {
982
- return [];
983
- }
984
- }, [
985
- payload
986
- ]);
987
- const producersArray = useMemo9(() => Object.values(producer?.producers ?? {}), [
988
- producer
989
- ]);
990
- return /* @__PURE__ */ React.createElement(FlexCol3, {
991
- alignItems: "start",
992
- gap: 1,
993
- ...props
994
- }, /* @__PURE__ */ React.createElement(ErrorRender3, {
995
- error: producerError,
996
- scope: "BlockProducerStatsFlexbox"
997
- }), /* @__PURE__ */ React.createElement(Typography3, {
998
- fontSize: "1rem"
999
- }, "Block Producers"), /* @__PURE__ */ React.createElement(ChainProducerStatsTable, {
1000
- producers: producersArray
1001
- }));
1002
- }, "BlockProducerStatsFlexbox");
1003
- var StyledListItem = styled(ListItem)(() => ({
1004
- paddingTop: 0,
1005
- paddingBottom: 0
1006
- }));
1007
-
1008
- // src/components/chain/stats/Dialog.tsx
1009
- var ChainAnalyzerStatsDialog = /* @__PURE__ */ __name((props) => {
1010
- const { analyzers, statsUpdated } = useChainAnalyzersContext();
1011
- return /* @__PURE__ */ React.createElement(Dialog2, props, /* @__PURE__ */ React.createElement(DialogTitle2, null, "Chain Analysis"), /* @__PURE__ */ React.createElement(DialogContent2, null, !!statsUpdated && Object.entries(analyzers).map(([id2, analyzer]) => /* @__PURE__ */ React.createElement("div", {
1012
- key: id2
1013
- }, id2 === "producers" && /* @__PURE__ */ React.createElement(BlockProducerStatsFlexbox, {
1014
- payload: analyzer.result()
1015
- })))));
1016
- }, "ChainAnalyzerStatsDialog");
1017
- var ChainAnalyzerStatsDialogFromContext = /* @__PURE__ */ __name((props) => {
1018
- const [open, setOpen] = useState10(false);
1019
- const handleClose = /* @__PURE__ */ __name(() => setOpen(false), "handleClose");
1020
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(IconButton3, {
1021
- onClick: /* @__PURE__ */ __name(() => setOpen(true), "onClick")
1022
- }, /* @__PURE__ */ React.createElement(QueryStats, null)), /* @__PURE__ */ React.createElement(ChainAnalyzerStatsDialog, {
1023
- onClose: handleClose,
1024
- open,
1025
- ...props
1026
- }));
1027
- }, "ChainAnalyzerStatsDialogFromContext");
1028
-
1029
- // src/components/chain/controls/PulseSvgIcon.tsx
1030
- import { alpha, createSvgIcon, keyframes, styled as styled2 } from "@mui/material";
1031
- var PulseSvgIcon = createSvgIcon(/* @__PURE__ */ React.createElement("svg", {
1032
- viewBox: "0 0 80 80",
1033
- version: "1.1",
1034
- xmlns: "http://www.w3.org/2000/svg"
1035
- }, /* @__PURE__ */ React.createElement("g", {
1036
- transform: "translate(34,34)"
1037
- }, /* @__PURE__ */ React.createElement("circle", {
1038
- className: "core",
1039
- cx: "0",
1040
- cy: "0",
1041
- r: "6"
1042
- }), /* @__PURE__ */ React.createElement("circle", {
1043
- className: "radar",
1044
- cx: "0",
1045
- cy: "0",
1046
- r: "6"
1047
- }))), "PulseSvgIcon");
1048
- var pulse1 = keyframes`
1049
- 0% {
1050
- opacity: 0;
1051
- transform: scale(0);
1052
- }
1053
- 30% {
1054
- opacity: 1;
1055
- transform: scale(1.5);
1056
- }
1057
- 60% {
1058
- opacity: 1;
1059
- transform: scale(2);
1060
- }
1061
- 100% {
1062
- opacity: 0;
1063
- transform: scale(2);
1064
- }
1065
- `;
1066
- var pulse2 = keyframes`
1067
- 0% {
1068
- transform: scale(1, 1);
1069
- opacity: 0;
1070
- }
1071
- 50% {
1072
- opacity: 1;
1073
- }
1074
- 100% {
1075
- transform: scale(6, 6);
1076
- opacity: 0;
1077
- }
1078
- `;
1079
- var StyledPulseSvgIcon = styled2(PulseSvgIcon)(({ theme }) => {
1080
- return {
1081
- "& .core": {
1082
- animation: `${pulse1} 1.25s ease-in-out infinite`,
1083
- fill: theme.palette.success.main
1084
- },
1085
- "&.paused .core": {
1086
- animation: "none",
1087
- fill: theme.palette.divider,
1088
- transform: "scale(2)"
1089
- },
1090
- "& .radar": {
1091
- animation: `${pulse2} 1.25s ease-in-out infinite`,
1092
- fill: alpha(theme.palette.success.main, 0.5)
1093
- },
1094
- "&.paused .radar": {
1095
- animation: "none",
1096
- fill: theme.palette.divider,
1097
- transform: "scale(6)"
1098
- }
1099
- };
1100
- });
1101
-
1102
- // src/components/chain/controls/PollingControlsFlexbox.tsx
1103
- var PollingControlsFlexbox = /* @__PURE__ */ __name(({ blocksBehind, pollingState, setPollingState, sharedAddress }) => {
1104
- const paused = pollingState === "paused";
1105
- const running = pollingState === "running";
1106
- return /* @__PURE__ */ React16.createElement(FlexRow6, {
1107
- justifyContent: "space-between",
1108
- width: "100%"
1109
- }, /* @__PURE__ */ React16.createElement(FlexRow6, {
1110
- gap: 2
1111
- }, running && /* @__PURE__ */ React16.createElement(IconButton4, {
1112
- onClick: /* @__PURE__ */ __name(() => setPollingState?.("paused"), "onClick"),
1113
- title: "Pause Block Stream"
1114
- }, /* @__PURE__ */ React16.createElement(Pause, null)), paused && /* @__PURE__ */ React16.createElement(IconButton4, {
1115
- onClick: /* @__PURE__ */ __name(() => setPollingState?.("running"), "onClick"),
1116
- title: "Re-Sync Block Stream"
1117
- }, /* @__PURE__ */ React16.createElement(Autorenew, null)), /* @__PURE__ */ React16.createElement(ChainAnalyzerStatsDialogFromContext, null)), /* @__PURE__ */ React16.createElement(FlexRow6, {
1118
- gap: 2
1119
- }, /* @__PURE__ */ React16.createElement(Grow, {
1120
- in: (blocksBehind ?? 0) > 0
1121
- }, /* @__PURE__ */ React16.createElement(Tooltip5, {
1122
- title: "Click to Re-Sync"
1123
- }, /* @__PURE__ */ React16.createElement(Alert3, {
1124
- sx: {
1125
- py: 0,
1126
- px: 1,
1127
- cursor: "pointer"
1128
- },
1129
- severity: "warning",
1130
- onClick: /* @__PURE__ */ __name(() => setPollingState?.("running"), "onClick")
1131
- }, /* @__PURE__ */ React16.createElement(AlertTitle2, {
1132
- sx: {
1133
- mb: 0
1134
- }
1135
- }, "Behind:", " ", blocksBehind)))), /* @__PURE__ */ React16.createElement(Tooltip5, {
1136
- title: sharedAddress ? `Chain: ${sharedAddress}` : ""
1137
- }, /* @__PURE__ */ React16.createElement(Icon2, null, /* @__PURE__ */ React16.createElement(StyledPulseSvgIcon, {
1138
- className: running ? "" : "paused"
1139
- })))));
1140
- }, "PollingControlsFlexbox");
1141
- var MemoizedPollingControlsFlexbox = /* @__PURE__ */ memo(PollingControlsFlexbox);
1142
-
1143
- // src/components/chain/dialog/Dialog.tsx
1144
- import { Button as Button3, Dialog as Dialog3, DialogActions as DialogActions2, DialogContent as DialogContent3 } from "@mui/material";
1145
- import React17 from "react";
1146
- var TransactionsDialog = /* @__PURE__ */ __name((props) => {
1147
- return /* @__PURE__ */ React17.createElement(Dialog3, props, /* @__PURE__ */ React17.createElement(DialogContent3, null, "Transactions Dialog"), /* @__PURE__ */ React17.createElement(DialogActions2, null, /* @__PURE__ */ React17.createElement(Button3, {
1148
- variant: "outlined",
1149
- onClick: /* @__PURE__ */ __name((e) => props?.onClose?.(e, "escapeKeyDown"), "onClick")
1150
- }, "Close")));
1151
- }, "TransactionsDialog");
1152
-
1153
- // src/components/chain/hooks/useOnBlock.ts
1154
- import { useEffect as useEffect2, useRef as useRef2 } from "react";
1155
- var useOnBlock = /* @__PURE__ */ __name((initialHead, onAddBlock, liveHead, pollingState) => {
1156
- const blocksWhilePaused = useRef2([]);
1157
- const lastLiveHead = useRef2(liveHead);
1158
- useEffect2(() => {
1159
- if (lastLiveHead.current?.block === liveHead?.block) return;
1160
- if (liveHead && onAddBlock) {
1161
- lastLiveHead.current = liveHead;
1162
- const isNewBlock = initialHead !== liveHead.block && liveHead.block !== blocksWhilePaused.current[0]?.block;
1163
- if (pollingState === "paused" && isNewBlock) {
1164
- blocksWhilePaused.current.push(liveHead);
1165
- } else if (pollingState === "running") {
1166
- if (blocksWhilePaused.current.length > 0) {
1167
- for (const block of blocksWhilePaused.current) {
1168
- void onAddBlock(block);
1169
- }
1170
- blocksWhilePaused.current = [];
1171
- }
1172
- void onAddBlock(liveHead);
1173
- }
1174
- }
1175
- }, [
1176
- liveHead,
1177
- pollingState
1178
- ]);
1179
- return blocksWhilePaused.current;
1180
- }, "useOnBlock");
1181
-
1182
- // src/components/chain/pagination/BlockChainPagination.tsx
1183
- import { TablePaginationActions } from "@xyo-network/react-payload-table";
1184
- import React18 from "react";
1185
- var BlockChainPagination = /* @__PURE__ */ __name(({ count = 0, onPageChange, page, rowsPerPage = 10 }) => {
1186
- return /* @__PURE__ */ React18.createElement(TablePaginationActions, {
1187
- count,
1188
- onPageChange,
1189
- page,
1190
- rowsPerPage
1191
- });
1192
- }, "BlockChainPagination");
1193
-
1194
- // src/components/chain/pagination/hooks/usePagination.tsx
1195
- import { useMemo as useMemo10, useState as useState11 } from "react";
1196
- var useChainPagination = /* @__PURE__ */ __name((pageSize, blockComponents) => {
1197
- const [page, setPage] = useState11(0);
1198
- const paginatedBlockComponents = useMemo10(() => {
1199
- const startIndex = page * pageSize;
1200
- const endIndex = startIndex + pageSize;
1201
- return blockComponents?.slice(startIndex, endIndex);
1202
- }, [
1203
- blockComponents,
1204
- page,
1205
- pageSize
1206
- ]);
1207
- const onPageChange = /* @__PURE__ */ __name((_event, newPage) => {
1208
- setPage(newPage);
1209
- }, "onPageChange");
1210
- return {
1211
- onPageChange,
1212
- page,
1213
- paginatedBlockComponents
1214
- };
1215
- }, "useChainPagination");
1216
-
1217
- // src/components/chain/render/dynamic/flexbox/Flexbox.tsx
1218
- import { ErrorRender as ErrorRender4 } from "@xylabs/react-error";
1219
- import { FlexCol as FlexCol5 } from "@xylabs/react-flexbox";
1220
- import { ChainProducersAnalyzer } from "@xylabs/sdk-xyo-chain-js";
1221
- import React19, { useMemo as useMemo14 } from "react";
1222
-
1223
- // src/components/chain/list/Animated.tsx
1224
- import { AnimatedList } from "@xylabs/react-animation";
1225
-
1226
- // src/components/chain/styled/BlockListWrapperFlexbox.tsx
1227
- import { styled as styled3 } from "@mui/material";
1228
- import { FlexCol as FlexCol4 } from "@xylabs/react-flexbox";
1229
- var BlockListWrapperFlexBox = styled3(FlexCol4, {
1230
- name: "BlockListWrapperFlexbox"
1231
- })(() => ({
1232
- "& > div:nth-of-type(2) .block-heading-flexbox .divider-spacer": {
1233
- // hide the spacer for the first element
1234
- visibility: "hidden"
1235
- },
1236
- "& > div:nth-of-type(2) .block-heading-flexbox .divider": {
1237
- // keep the first element divider at 0 height so we can animate it to the correct height
1238
- // when the next block comes in
1239
- height: 0
1240
- }
1241
- }));
1242
-
1243
- // src/components/chain/list/Animated.tsx
1244
- var BlockListAnimated = /* @__PURE__ */ __name(({ blockChainRenderComponents }) => {
1245
- return /* @__PURE__ */ React.createElement(BlockListWrapperFlexBox, {
1246
- alignItems: "stretch",
1247
- width: "100%"
1248
- }, /* @__PURE__ */ React.createElement(AnimatedList, {
1249
- fullWidth: true,
1250
- items: blockChainRenderComponents
1251
- }));
1252
- }, "BlockListAnimated");
1253
-
1254
- // src/components/chain/render/dynamic/hooks/useDynamicBlockRenderComponents.ts
1255
- import { useMemo as useMemo12 } from "react";
1256
-
1257
- // src/hooks/chain-iterator/ChainIteratorStore.ts
1258
- import { assertEx as assertEx2 } from "@xylabs/assert";
1259
- import { XyoChainBlockNumberIterator } from "@xylabs/sdk-xyo-chain-js";
1260
- var ChainIteratorStore = class _ChainIteratorStore {
1261
- static {
1262
- __name(this, "ChainIteratorStore");
1263
- }
1264
- _chainIterator;
1265
- _externalListeners = [];
1266
- _internalUnsubscribes = [];
1267
- _values;
1268
- get chainIterator() {
1269
- return assertEx2(this._chainIterator, () => "ChainIteratorStore has not been initialized");
1270
- }
1271
- get values() {
1272
- return assertEx2(this._values, () => "ChainIteratorStore values have not been initialized");
1273
- }
1274
- static async create(params) {
1275
- const instance = new _ChainIteratorStore();
1276
- const chainIterator = await XyoChainBlockNumberIterator.create(params);
1277
- instance._chainIterator = chainIterator;
1278
- instance._values = {
1279
- chainIterator,
1280
- head: await chainIterator.head()
1281
- };
1282
- const headUpdatedListener = /* @__PURE__ */ __name(({ blocks }) => {
1283
- instance._values = {
1284
- chainIterator,
1285
- head: blocks?.[0]
1286
- };
1287
- instance.emitChange();
1288
- }, "headUpdatedListener");
1289
- const unsubscribe = chainIterator.on("headUpdated", headUpdatedListener);
1290
- const weakRefListener = new WeakRef(unsubscribe);
1291
- instance._internalUnsubscribes.push(weakRefListener);
1292
- return instance;
1293
- }
1294
- cleanup() {
1295
- for (const unsubscribeRef of this._internalUnsubscribes) {
1296
- const unsubscribe = unsubscribeRef.deref();
1297
- unsubscribe?.();
1298
- }
1299
- }
1300
- getSnapshot() {
1301
- return this.values;
1302
- }
1303
- subscribe(onStoreChange) {
1304
- this._externalListeners.push(onStoreChange);
1305
- return () => {
1306
- this._externalListeners = this._externalListeners.filter((l) => l !== onStoreChange);
1307
- };
1308
- }
1309
- emitChange() {
1310
- for (const listener of this._externalListeners) {
1311
- listener();
1312
- }
1313
- }
1314
- };
1315
-
1316
- // src/hooks/chain-iterator/useChainIteratorParams.ts
1317
- import { assertEx as assertEx3 } from "@xylabs/assert";
1318
- import { usePromise as usePromise3 } from "@xylabs/react-promise";
1319
- import { findFirstMatching, isBlockBoundWitness as isBlockBoundWitness2 } from "@xylabs/sdk-xyo-chain-js";
1320
- import { BoundWitnessBuilder } from "@xyo-network/boundwitness-builder";
1321
- var resolveUndefinedHead = /* @__PURE__ */ __name(async (chainArchivist) => {
1322
- const firstMatching = assertEx3(await findFirstMatching(chainArchivist, isBlockBoundWitness2), () => "No head found in archivist");
1323
- return assertEx3(isBlockBoundWitness2(firstMatching) ? firstMatching : void 0, () => `Expected a block bound witness: ${JSON.stringify(firstMatching)}`);
1324
- }, "resolveUndefinedHead");
1325
- var resolveDefinedHead = /* @__PURE__ */ __name(async (head, chainArchivist) => {
1326
- const [headPayload] = await chainArchivist.get([
1327
- head
1328
- ]);
1329
- if (headPayload === void 0) {
1330
- const [currentHead] = await new BoundWitnessBuilder().build();
1331
- return currentHead;
1332
- } else {
1333
- return assertEx3(isBlockBoundWitness2(headPayload) ? headPayload : void 0, () => `Expected a block bound witness: ${JSON.stringify(headPayload)}`);
1334
- }
1335
- }, "resolveDefinedHead");
1336
- var useChainIteratorParams = /* @__PURE__ */ __name(({ chainArchivist, chainInformation, head }) => {
1337
- return usePromise3(async () => {
1338
- if (chainArchivist && chainInformation) {
1339
- let currentHead;
1340
- currentHead = await (head === void 0 ? resolveUndefinedHead(chainArchivist) : resolveDefinedHead(head, chainArchivist));
1341
- return {
1342
- chainArchivist,
1343
- chainInformation,
1344
- head: currentHead
1345
- };
1346
- }
1347
- }, [
1348
- chainArchivist,
1349
- chainInformation,
1350
- head
1351
- ]);
1352
- }, "useChainIteratorParams");
1353
-
1354
- // src/hooks/chain-iterator/useChainIteratorStore.ts
1355
- import { usePromise as usePromise4 } from "@xylabs/react-promise";
1356
- import { useEffect as useEffect4, useMemo as useMemo11, useRef as useRef3, useSyncExternalStore } from "react";
1357
-
1358
- // src/hooks/chain-iterator/useChainIteratorUpdatingHead.ts
1359
- import { toHex } from "@xylabs/hex";
1360
- import { findMostRecentBlock } from "@xylabs/sdk-xyo-chain-js";
1361
- import { useEffect as useEffect3, useState as useState12 } from "react";
1362
- var useChainIteratorUpdatingHead = /* @__PURE__ */ __name(({ chainIterator, interval = 500, maxBlocks, chainArchivist }) => {
1363
- const [error, setError] = useState12();
1364
- useEffect3(() => {
1365
- let pollArchivistTimeout;
1366
- const pollingFunction = /* @__PURE__ */ __name(async () => {
1367
- if (chainIterator && chainArchivist) {
1368
- try {
1369
- const currentHead = await chainIterator.head();
1370
- const mostRecentBlock = await findMostRecentBlock(chainArchivist);
1371
- if (currentHead && mostRecentBlock) {
1372
- const currentBlockNumber = currentHead?.block ? hexToBigInt(currentHead.block) : BigInt(-1);
1373
- const nextBlockNumber = hexToBigInt(mostRecentBlock.block);
1374
- if (nextBlockNumber > currentBlockNumber) {
1375
- console.debug("Found more recent head:", toHex(nextBlockNumber));
1376
- console.debug("Updating head:", `${toHex(nextBlockNumber)}`);
1377
- await chainIterator.updateHead(mostRecentBlock);
1378
- console.debug("Updated head:", `${toHex(nextBlockNumber)}`);
1379
- }
1380
- }
1381
- } catch (e) {
1382
- setError(e);
1383
- console.error(e);
1384
- }
1385
- }
1386
- pollArchivistTimeout = setTimeout(() => void pollingFunction(), interval);
1387
- }, "pollingFunction");
1388
- void pollingFunction();
1389
- return () => clearInterval(pollArchivistTimeout);
1390
- }, [
1391
- interval,
1392
- chainIterator,
1393
- chainArchivist,
1394
- maxBlocks
1395
- ]);
1396
- return error;
1397
- }, "useChainIteratorUpdatingHead");
1398
-
1399
- // src/hooks/chain-iterator/useChainIteratorStore.ts
1400
- var stub = {};
1401
- var useChainIteratorStore = /* @__PURE__ */ __name((chainIteratorParams) => {
1402
- const [chainIteratorStore] = usePromise4(async () => {
1403
- return chainIteratorParams ? await ChainIteratorStore.create(chainIteratorParams) : void 0;
1404
- }, [
1405
- chainIteratorParams
1406
- ]);
1407
- const { chainIterator } = chainIteratorStore || {};
1408
- const chainArchivist = chainIteratorParams?.chainArchivist;
1409
- const error = useChainIteratorUpdatingHead({
1410
- chainIterator,
1411
- chainArchivist
1412
- });
1413
- useEffect4(() => {
1414
- return () => {
1415
- if (chainIteratorStore) {
1416
- chainIteratorStore.cleanup();
1417
- }
1418
- };
1419
- }, [
1420
- chainIteratorStore
1421
- ]);
1422
- const cachedSnapshot = useRef3({});
1423
- const { getSnapShot, subscribe } = useMemo11(() => {
1424
- if (chainIteratorStore) {
1425
- return {
1426
- getSnapShot: /* @__PURE__ */ __name(() => {
1427
- const snapshot = chainIteratorStore.getSnapshot();
1428
- const newValues = {
1429
- ...snapshot,
1430
- error
1431
- };
1432
- const noCachedValue = cachedSnapshot.current.chainIterator === void 0;
1433
- const newBlock = cachedSnapshot.current?.head?.block !== newValues.head?.block;
1434
- if (noCachedValue || newBlock) {
1435
- cachedSnapshot.current = newValues;
1436
- return newValues;
1437
- }
1438
- return cachedSnapshot.current;
1439
- }, "getSnapShot"),
1440
- subscribe: chainIteratorStore.subscribe.bind(chainIteratorStore)
1441
- };
1442
- }
1443
- return {
1444
- getSnapShot: /* @__PURE__ */ __name(() => stub, "getSnapShot"),
1445
- subscribe: /* @__PURE__ */ __name(() => () => {
1446
- }, "subscribe")
1447
- };
1448
- }, [
1449
- chainIteratorStore
1450
- ]);
1451
- return useSyncExternalStore(subscribe, getSnapShot);
1452
- }, "useChainIteratorStore");
1453
-
1454
- // src/hooks/useIterateChain.ts
1455
- import { assertEx as assertEx4 } from "@xylabs/assert";
1456
- import { usePromise as usePromise5 } from "@xylabs/react-promise";
1457
- import { isBlockBoundWitness as isBlockBoundWitness3, XyoChainBlockNumberIterator as XyoChainBlockNumberIterator2 } from "@xylabs/sdk-xyo-chain-js";
1458
- var iterateChain = /* @__PURE__ */ __name(async (chainIteratorParams, maxDepth) => {
1459
- const { chainArchivist, chainInformation, head } = chainIteratorParams ?? {};
1460
- if (chainArchivist && chainInformation && head) {
1461
- const headPayload = assertEx4(isBlockBoundWitness3(head) ? head : null, () => "Head is not a Block Bound Witness");
1462
- const headBlockBoundWitness = assertEx4(isBlockBoundWitness3(headPayload) ? headPayload : null, () => "Invalid head block");
1463
- const chainIterator = await XyoChainBlockNumberIterator2.create({
1464
- head: headBlockBoundWitness,
1465
- chainInformation,
1466
- chainArchivist
1467
- });
1468
- let block = await chainIterator.head();
1469
- const blocks = [
1470
- block
1471
- ];
1472
- let depth = 1;
1473
- while (block) {
1474
- const [, next] = await chainIterator.previous(block.block, 2);
1475
- if (!next) break;
1476
- blocks.push(next);
1477
- block = next;
1478
- depth++;
1479
- if (maxDepth && depth >= maxDepth) break;
1480
- }
1481
- return blocks;
1482
- }
1483
- }, "iterateChain");
1484
- var useIterateChain = /* @__PURE__ */ __name((chainIteratorParams, maxDepth) => {
1485
- return usePromise5(async () => {
1486
- return await iterateChain(chainIteratorParams, maxDepth);
1487
- }, [
1488
- chainIteratorParams,
1489
- maxDepth
1490
- ]);
1491
- }, "useIterateChain");
1492
-
1493
- // src/components/chain/render/dynamic/hooks/useDynamicBlockRenderComponents.ts
1494
- var useDynamicBlockRenderComponents = /* @__PURE__ */ __name((BlockComponent, blockChainRenderProps) => {
1495
- const { maxBlocks } = blockChainRenderProps ?? {};
1496
- const chainIteratorParams = useMemo12(() => blockChainRenderProps ?? {}, [
1497
- blockChainRenderProps
1498
- ]);
1499
- const [params, paramsError] = useChainIteratorParams(chainIteratorParams);
1500
- const { blockChainRenderComponents, onAddBlock } = useDynamicBlockComponents(BlockComponent, params, maxBlocks);
1501
- const { head: liveHead } = useChainIteratorStore(params);
1502
- const { pollingState, updatePollingState } = useChainPollingContext();
1503
- const blocksWhilePaused = useOnBlock(blockChainRenderComponents[0]?.block.block, onAddBlock, liveHead, pollingState);
1504
- return {
1505
- errors: [
1506
- paramsError
1507
- ],
1508
- blockChainRenderComponents,
1509
- blocksWhilePaused,
1510
- updatePollingState,
1511
- pollingState
1512
- };
1513
- }, "useDynamicBlockRenderComponents");
1514
-
1515
- // src/components/chain/render/dynamic/hooks/useRemoteBlockChainRenderProps.ts
1516
- import { usePromise as usePromise6 } from "@xylabs/react-promise";
1517
- import { useMemo as useMemo13 } from "react";
1518
- var useRemoteBlockChainRenderProps = /* @__PURE__ */ __name((chainArchivistModuleId, url, blockChainRenderPropsArg) => {
1519
- const [chainArchivist, chainArchivistError] = usePromise6(async () => {
1520
- if (url && chainArchivistModuleId) {
1521
- return await getChainArchivistFromBridge({
1522
- url,
1523
- chainArchivistModuleId
1524
- });
1525
- }
1526
- }, [
1527
- url,
1528
- chainArchivistModuleId
1529
- ]);
1530
- const blockChainRenderProps = useMemo13(() => ({
1531
- ...blockChainRenderPropsArg,
1532
- chainArchivist
1533
- }), [
1534
- blockChainRenderPropsArg,
1535
- chainArchivist
1536
- ]);
1537
- return {
1538
- blockChainRenderProps,
1539
- error: chainArchivistError
1540
- };
1541
- }, "useRemoteBlockChainRenderProps");
1542
-
1543
- // src/components/chain/render/dynamic/flexbox/Flexbox.tsx
1544
- var Base = /* @__PURE__ */ __name(({ blockChainRenderProps, ...props }) => {
1545
- const { errors, blockChainRenderComponents, blocksWhilePaused, pollingState, updatePollingState } = useDynamicBlockRenderComponents(BlockHeadingFlexbox, blockChainRenderProps);
1546
- return /* @__PURE__ */ React19.createElement(FlexCol5, {
1547
- alignItems: "start",
1548
- ...props
1549
- }, errors?.map((error, index) => /* @__PURE__ */ React19.createElement(ErrorRender4, {
1550
- error,
1551
- key: index,
1552
- scope: "DynamicBlockchainRenderFlexboxInner"
1553
- })), /* @__PURE__ */ React19.createElement(MemoizedPollingControlsFlexbox, {
1554
- blocksBehind: blocksWhilePaused?.length,
1555
- pollingState,
1556
- setPollingState: updatePollingState,
1557
- sharedAddress: blockChainRenderProps?.chainInformation?.sharedSignerAccount.address
1558
- }), /* @__PURE__ */ React19.createElement(BlockListAnimated, {
1559
- blockChainRenderComponents
1560
- }));
1561
- }, "Base");
1562
- var WithAnalysis = /* @__PURE__ */ __name(({ blockChainRenderProps, ...props }) => {
1563
- const { chainInformation } = blockChainRenderProps ?? {};
1564
- const analyzers = useMemo14(() => {
1565
- if (chainInformation) {
1566
- return {
1567
- producers: new ChainProducersAnalyzer(chainInformation.sharedSigner)
1568
- };
1569
- }
1570
- }, [
1571
- chainInformation
1572
- ]);
1573
- return /* @__PURE__ */ React19.createElement(ChainAnalyzersProvider, {
1574
- analyzers
1575
- }, /* @__PURE__ */ React19.createElement(ChainPollingProvider, null, /* @__PURE__ */ React19.createElement(DynamicBlockchainRenderFlexbox.Base, {
1576
- blockChainRenderProps,
1577
- ...props
1578
- })));
1579
- }, "WithAnalysis");
1580
- var WithRemote = /* @__PURE__ */ __name(({ url, chainArchivistModuleId, blockChainRenderProps: blockChainRenderPropsArg, ...props }) => {
1581
- const { error, blockChainRenderProps } = useRemoteBlockChainRenderProps(chainArchivistModuleId, url, blockChainRenderPropsArg);
1582
- return /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement(ErrorRender4, {
1583
- error,
1584
- scope: "RemoteChainProviderFlexbox"
1585
- }), /* @__PURE__ */ React19.createElement(DynamicBlockchainRenderFlexbox.WithAnalysis, {
1586
- blockChainRenderProps,
1587
- ...props
1588
- }));
1589
- }, "WithRemote");
1590
- var DynamicBlockchainRenderFlexbox = {
1591
- Base,
1592
- WithAnalysis,
1593
- WithRemote
1594
- };
1595
-
1596
- // src/components/chain/render/static/flexbox/Flexbox.tsx
1597
- import { ErrorRender as ErrorRender5 } from "@xylabs/react-error";
1598
- import { FlexCol as FlexCol6, FlexGrowRow as FlexGrowRow2 } from "@xylabs/react-flexbox";
1599
- import { ChainProducersAnalyzer as ChainProducersAnalyzer2 } from "@xylabs/sdk-xyo-chain-js";
1600
- import React20, { useMemo as useMemo16 } from "react";
1601
-
1602
- // src/components/chain/render/static/hooks/useStaticBlockRenderComponents.ts
1603
- import { useMemo as useMemo15 } from "react";
1604
- var DEFAULT_PAGE_SIZE = 25;
1605
- var useStaticBlockRenderComponents = /* @__PURE__ */ __name((BlockComponent, blockChainRenderProps) => {
1606
- const { maxBlocks } = blockChainRenderProps ?? {};
1607
- const pageSize = blockChainRenderProps?.pageSize ?? DEFAULT_PAGE_SIZE;
1608
- const chainIteratorParams = useMemo15(() => blockChainRenderProps ?? {}, [
1609
- blockChainRenderProps
1610
- ]);
1611
- const [params, paramsError] = useChainIteratorParams(chainIteratorParams);
1612
- const [blocks, blocksError] = useIterateChain(params, maxBlocks);
1613
- const { blockComponents, errors: blockComponentsError } = useStaticBlockComponents(BlockComponent, params, blocks);
1614
- const { onPageChange, page, paginatedBlockComponents } = useChainPagination(pageSize, blockComponents);
1615
- return {
1616
- paginatedBlockComponents,
1617
- blockComponents,
1618
- errors: [
1619
- paramsError,
1620
- blocksError,
1621
- blockComponentsError
1622
- ],
1623
- onPageChange,
1624
- page,
1625
- pageSize
1626
- };
1627
- }, "useStaticBlockRenderComponents");
1628
-
1629
- // src/components/chain/render/static/flexbox/Flexbox.tsx
1630
- var Base2 = /* @__PURE__ */ __name(({ blockChainRenderProps, ...props }) => {
1631
- const { blockComponents, errors, paginatedBlockComponents, onPageChange, page, pageSize } = useStaticBlockRenderComponents(BlockHeadingFlexbox, blockChainRenderProps);
1632
- return /* @__PURE__ */ React20.createElement(FlexCol6, {
1633
- alignItems: "start",
1634
- gap: 2,
1635
- width: "100%",
1636
- ...props
1637
- }, errors?.map((error, index) => /* @__PURE__ */ React20.createElement(ErrorRender5, {
1638
- error,
1639
- key: index,
1640
- scope: "StaticBlockchainFlexboxInner"
1641
- })), paginatedBlockComponents?.length ? /* @__PURE__ */ React20.createElement(FlexGrowRow2, {
1642
- justifyContent: "space-between",
1643
- width: "100%"
1644
- }, /* @__PURE__ */ React20.createElement(ChainAnalyzerStatsDialogFromContext, null), /* @__PURE__ */ React20.createElement(BlockChainPagination, {
1645
- count: blockComponents?.length ?? 0,
1646
- onPageChange,
1647
- page,
1648
- rowsPerPage: pageSize
1649
- })) : null, /* @__PURE__ */ React20.createElement(BlockListAnimated, {
1650
- blockChainRenderComponents: paginatedBlockComponents
1651
- }));
1652
- }, "Base");
1653
- var WithAnalysis2 = /* @__PURE__ */ __name(({ blockChainRenderProps, ...props }) => {
1654
- const { chainInformation } = blockChainRenderProps ?? {};
1655
- const analyzers = useMemo16(() => {
1656
- if (chainInformation) {
1657
- return {
1658
- producers: new ChainProducersAnalyzer2(chainInformation.sharedSigner)
1659
- };
1660
- }
1661
- }, [
1662
- chainInformation
1663
- ]);
1664
- return /* @__PURE__ */ React20.createElement(ChainAnalyzersProvider, {
1665
- analyzers
1666
- }, /* @__PURE__ */ React20.createElement(StaticBlockchainRenderFlexBox.Base, {
1667
- blockChainRenderProps,
1668
- ...props
1669
- }));
1670
- }, "WithAnalysis");
1671
- var StaticBlockchainRenderFlexBox = {
1672
- Base: Base2,
1673
- WithAnalysis: WithAnalysis2
1674
- };
1675
-
1676
- // src/stories/ChainArchivistDecorator.tsx
1677
- import { usePromise as usePromise7 } from "@xylabs/react-promise";
1678
- import { MemoryArchivist } from "@xyo-network/archivist-memory";
1679
- import { useEffect as useEffect5 } from "react";
1680
-
1681
- // src/stories/ExampleBlockchainWithPayloads.json
1682
- var ExampleBlockchainWithPayloads_default = [
1683
- {
1684
- gas: "00",
1685
- block: "00",
1686
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
1687
- previous: null,
1688
- reward: "00",
1689
- addresses: [
1690
- "d01885faa18c18ee20982bdf499b6152981a84c0"
1691
- ],
1692
- payload_hashes: [
1693
- "e0b8fbd763448f280bbb6fafecb9f86dbb3234e17ca149a7c480f0239e40a369"
1694
- ],
1695
- payload_schemas: [
1696
- "network.xyo.boundwitness"
1697
- ],
1698
- previous_hashes: [
1699
- null
1700
- ],
1701
- step_hashes: [],
1702
- schema: "network.xyo.boundwitness",
1703
- $signatures: [
1704
- "90706ca5484423a71b9f183c7d627b0cc024f36fafacd45865924625a3b44c15464be2501a6391d60c316722da5a55161cce57cce4659dbe815be2e949ddb9ee"
1705
- ],
1706
- $epoch: 0,
1707
- _dataHash: "06a0ff45eef22b7695c3064e74f056252edc4a3759c364f52cdbc3277ff05304",
1708
- _hash: "8941fb72cf598b420b874628e1df385aa1f1e1c31b2198bbba67c2bb2b01c3c3",
1709
- _sequence: "00000194ce6c23b3000000002b01c3c3"
1710
- },
1711
- {
1712
- tx: "6e2e5eada47ce2ca2561a064894cdf1e0191715fe9d7d9130720f385bdd80e6a",
1713
- addresses: [
1714
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
1715
- ],
1716
- payload_hashes: [
1717
- "6e2e5eada47ce2ca2561a064894cdf1e0191715fe9d7d9130720f385bdd80e6a",
1718
- "436e6c81f7f7f0947dae488ef131082f0422bf5524c86ef1ca301cd8a61cbdbd"
1719
- ],
1720
- payload_schemas: [
1721
- "network.xyo.chain.transaction",
1722
- "network.xyo.chain.stake.intent"
1723
- ],
1724
- previous_hashes: [
1725
- null
1726
- ],
1727
- schema: "network.xyo.boundwitness",
1728
- $signatures: [
1729
- "06ce0db2b252efb31a1e2420e0e3f79bb11f52552efa98c5f605a8f46c8d72fb156b5c6e586a2fe8e21c45ec1a9edbb7f72d0ed5aee808222ef9d6a6ddce72f5"
1730
- ],
1731
- _dataHash: "e0b8fbd763448f280bbb6fafecb9f86dbb3234e17ca149a7c480f0239e40a369",
1732
- _hash: "7d426200f048374c5e97d46ecd407ac2a800b5a477c64d8b90e8d3002ff1a37c",
1733
- _sequence: "00000194ce6c23b3000000022ff1a37c"
1734
- },
1735
- {
1736
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
1737
- exp: "03e8",
1738
- gas: "00",
1739
- nbf: "00",
1740
- schema: "network.xyo.chain.transaction",
1741
- _dataHash: "6e2e5eada47ce2ca2561a064894cdf1e0191715fe9d7d9130720f385bdd80e6a",
1742
- _hash: "6e2e5eada47ce2ca2561a064894cdf1e0191715fe9d7d9130720f385bdd80e6a",
1743
- _sequence: "00000194ce6c23b300000003bdd80e6a"
1744
- },
1745
- {
1746
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
1747
- delegate: "4019a3fd9e96337e00d598a6a13fb5a37d5f9018",
1748
- exp: "03e8",
1749
- gas: "00",
1750
- intent: "producer",
1751
- nbf: "00",
1752
- schema: "network.xyo.chain.stake.intent",
1753
- _dataHash: "436e6c81f7f7f0947dae488ef131082f0422bf5524c86ef1ca301cd8a61cbdbd",
1754
- _hash: "436e6c81f7f7f0947dae488ef131082f0422bf5524c86ef1ca301cd8a61cbdbd",
1755
- _sequence: "00000194ce6c23b300000004a61cbdbd"
1756
- },
1757
- {
1758
- gas: "00",
1759
- block: "01",
1760
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
1761
- previous: "8941fb72cf598b420b874628e1df385aa1f1e1c31b2198bbba67c2bb2b01c3c3",
1762
- reward: "7530",
1763
- addresses: [
1764
- "d01885faa18c18ee20982bdf499b6152981a84c0",
1765
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
1766
- ],
1767
- step_hashes: [],
1768
- payload_hashes: [],
1769
- payload_schemas: [],
1770
- previous_hashes: [
1771
- "8941fb72cf598b420b874628e1df385aa1f1e1c31b2198bbba67c2bb2b01c3c3",
1772
- "e0b8fbd763448f280bbb6fafecb9f86dbb3234e17ca149a7c480f0239e40a369"
1773
- ],
1774
- schema: "network.xyo.boundwitness",
1775
- $signatures: [
1776
- "68c8cc64d04a056009e77933280931c6963f8261dc0ea7f356ce19774f701cad3c319dd095cd3e68155cf487ad7b78e880cbcd3f5c085da43c5ce58ae82ea55e",
1777
- "a62ff1c6563422ff9f69cb3388e5e6469ad023ceba01a841d5f412d694b1d1a7598d5f21c095631bc6a7359e84a15d8e41f1fac881c21bb72f80f22de5796bb3"
1778
- ],
1779
- $epoch: 0,
1780
- _dataHash: "6aa70ab35f9bea104ac9a908089183865af5db396da4824934965765418138cb",
1781
- _hash: "bb982348d34ca539b0cfc0265908ae9a8f78e0f0e509412d0387e70d2b78fdd5",
1782
- _sequence: "00000194ce6c5573000000002b78fdd5"
1783
- },
1784
- {
1785
- gas: "00",
1786
- block: "02",
1787
- step_hashes: [],
1788
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
1789
- previous: "bb982348d34ca539b0cfc0265908ae9a8f78e0f0e509412d0387e70d2b78fdd5",
1790
- reward: "7530",
1791
- addresses: [
1792
- "d01885faa18c18ee20982bdf499b6152981a84c0",
1793
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
1794
- ],
1795
- payload_hashes: [],
1796
- payload_schemas: [],
1797
- previous_hashes: [
1798
- "bb982348d34ca539b0cfc0265908ae9a8f78e0f0e509412d0387e70d2b78fdd5",
1799
- "6aa70ab35f9bea104ac9a908089183865af5db396da4824934965765418138cb"
1800
- ],
1801
- schema: "network.xyo.boundwitness",
1802
- $signatures: [
1803
- "b4f1dab15a5fb796307f09389c0c1d290bcbb302b1cf862c912564d253a70d465d4679d9d4ca49b26f9f1b98a10eb9cad63af456031f27a4184dee90dbd33f33",
1804
- "3217d94f10ee8b80b9e58d25c02aeceac0e1a7849a573431b29c0a382298c23939df03ea17af1d50dda054d3c082b643a99135b6e6a63b047e41ffdd4a1bdc92"
1805
- ],
1806
- $epoch: 0,
1807
- _dataHash: "bd573bad63de66ba565b9c13f1860b3ca9279e7ca131d1b6f0ff4ac5a9734c89",
1808
- _hash: "49a609d18b08c7690f88fc7cf61c61c8ce67a3fe12f2034b64d8b8d0d07b76fd",
1809
- _sequence: "00000194ce6c558700000000d07b76fd"
1810
- },
1811
- {
1812
- gas: "00",
1813
- block: "03",
1814
- step_hashes: [],
1815
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
1816
- previous: "49a609d18b08c7690f88fc7cf61c61c8ce67a3fe12f2034b64d8b8d0d07b76fd",
1817
- reward: "7530",
1818
- addresses: [
1819
- "d01885faa18c18ee20982bdf499b6152981a84c0",
1820
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
1821
- ],
1822
- payload_hashes: [],
1823
- payload_schemas: [],
1824
- previous_hashes: [
1825
- "49a609d18b08c7690f88fc7cf61c61c8ce67a3fe12f2034b64d8b8d0d07b76fd",
1826
- "bd573bad63de66ba565b9c13f1860b3ca9279e7ca131d1b6f0ff4ac5a9734c89"
1827
- ],
1828
- schema: "network.xyo.boundwitness",
1829
- $signatures: [
1830
- "a2433c8196a651edb0234a39c3a72bb7ec1bc9d15e57863c2f19b86ecf6b443c02073cfbaf01abb8add371353924d2192b479baea07d3a1d9ffcaff05747f44c",
1831
- "3ab4e3428ab9525e98bd2ffc5db13ff34a924afd8d70d37ec952eacd815b34643701b37d4babdacb04c6e01148e7e98a7240ff35d50e287062be676ffa583600"
1832
- ],
1833
- $epoch: 0,
1834
- _dataHash: "e39d6ae5561b9247ff265f7aeaa8a5266ba4283c93234a9f95b57eca936f059e",
1835
- _hash: "7621185cb5ba58f43b4c18524a64235896b43daa59fc8ac5850fb0b226a3c5fa",
1836
- _sequence: "00000194ce6c559d0000000026a3c5fa"
1837
- },
1838
- {
1839
- gas: "00",
1840
- block: "04",
1841
- step_hashes: [],
1842
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
1843
- previous: "7621185cb5ba58f43b4c18524a64235896b43daa59fc8ac5850fb0b226a3c5fa",
1844
- reward: "7530",
1845
- addresses: [
1846
- "d01885faa18c18ee20982bdf499b6152981a84c0",
1847
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
1848
- ],
1849
- payload_hashes: [],
1850
- payload_schemas: [],
1851
- previous_hashes: [
1852
- "7621185cb5ba58f43b4c18524a64235896b43daa59fc8ac5850fb0b226a3c5fa",
1853
- "e39d6ae5561b9247ff265f7aeaa8a5266ba4283c93234a9f95b57eca936f059e"
1854
- ],
1855
- schema: "network.xyo.boundwitness",
1856
- $signatures: [
1857
- "3bf15344e9d989096bee983e127979ed79630ea00421803159b20919decbd8a41c9e20b1beae9799df82e8df4d7fffa9d5146423519e9fcb40f614e07229a96e",
1858
- "8727474bc81fa6084b0f12b646340e5fdd2b6fb1b20272e296507d6c188d4d3744175a49032203dee6634c414c5d22f536ff8b4b27cc7a757f80d0adf14506eb"
1859
- ],
1860
- $epoch: 0,
1861
- _dataHash: "c3d879697660bdbd7ac74d6de94e09c1be421ff8e3113d143f6ae9d42439948d",
1862
- _hash: "43ab28e90ab9eafb64ac78aadb678f3bea0a42ac59effb0b9316b4508ae144ae",
1863
- _sequence: "00000194ce6c55cc000000008ae144ae"
1864
- },
1865
- {
1866
- gas: "00",
1867
- block: "05",
1868
- step_hashes: [],
1869
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
1870
- previous: "43ab28e90ab9eafb64ac78aadb678f3bea0a42ac59effb0b9316b4508ae144ae",
1871
- reward: "7530",
1872
- addresses: [
1873
- "d01885faa18c18ee20982bdf499b6152981a84c0",
1874
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
1875
- ],
1876
- payload_hashes: [],
1877
- payload_schemas: [],
1878
- previous_hashes: [
1879
- "43ab28e90ab9eafb64ac78aadb678f3bea0a42ac59effb0b9316b4508ae144ae",
1880
- "c3d879697660bdbd7ac74d6de94e09c1be421ff8e3113d143f6ae9d42439948d"
1881
- ],
1882
- schema: "network.xyo.boundwitness",
1883
- $signatures: [
1884
- "6137b69ff485a6b32974158f413e518d9aafe807fd24b39f86a392be5a6d48947d99b6d4593ddbf4bf99c89b63c1e27d456c45c0073f3956301aeed0c1b0f573",
1885
- "fcb1f572106838d4c08f0fa284088e3feb4e4097a41238563c07a9a761eeb44f49cf29f2be0bddb0308f764b3be2f4476752ef8d71bb0abe26b52ae53826ed80"
1886
- ],
1887
- $epoch: 0,
1888
- _dataHash: "e676447559314b93414d63de81587bb4fb9961146d062b45acc5f4cdfb053c0d",
1889
- _hash: "bbe26f0ef713f66ff93e6af71bc8ea76dde256b9d52576e9235ea64393eacfa4",
1890
- _sequence: "00000194ce6c55de0000000093eacfa4"
1891
- },
1892
- {
1893
- gas: "00",
1894
- block: "06",
1895
- step_hashes: [],
1896
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
1897
- previous: "bbe26f0ef713f66ff93e6af71bc8ea76dde256b9d52576e9235ea64393eacfa4",
1898
- reward: "7530",
1899
- addresses: [
1900
- "d01885faa18c18ee20982bdf499b6152981a84c0",
1901
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
1902
- ],
1903
- payload_hashes: [],
1904
- payload_schemas: [],
1905
- previous_hashes: [
1906
- "bbe26f0ef713f66ff93e6af71bc8ea76dde256b9d52576e9235ea64393eacfa4",
1907
- "e676447559314b93414d63de81587bb4fb9961146d062b45acc5f4cdfb053c0d"
1908
- ],
1909
- schema: "network.xyo.boundwitness",
1910
- $signatures: [
1911
- "d2a2dc7c8175493b601078dd404786b0bc7cf89984db055b694f55680ba191c353da34cd510c1b112d25e130c3a5907e0815d9c8b768028a3373bdbbc12c4bcb",
1912
- "2a17a3e76c02d809c6a63577bf74df59350c9aa4ebe113e82e947717a35c4f2d5d43a9be55c5e435d8c935a4488f8cd46005ad9c64be95137381bca83101ff46"
1913
- ],
1914
- $epoch: 0,
1915
- _dataHash: "f5d163f7d5f83acca2852854b7e16b3eac3e902a5911d06b8efe49f4b89c96f6",
1916
- _hash: "571744030dd7f3eee79410a06d9476052e2462fc05d6789e2436beee9d5e6cd7",
1917
- _sequence: "00000194ce6c55ef000000009d5e6cd7"
1918
- },
1919
- {
1920
- gas: "00",
1921
- block: "07",
1922
- step_hashes: [],
1923
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
1924
- previous: "571744030dd7f3eee79410a06d9476052e2462fc05d6789e2436beee9d5e6cd7",
1925
- reward: "7530",
1926
- addresses: [
1927
- "d01885faa18c18ee20982bdf499b6152981a84c0",
1928
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
1929
- ],
1930
- payload_hashes: [],
1931
- payload_schemas: [],
1932
- previous_hashes: [
1933
- "571744030dd7f3eee79410a06d9476052e2462fc05d6789e2436beee9d5e6cd7",
1934
- "f5d163f7d5f83acca2852854b7e16b3eac3e902a5911d06b8efe49f4b89c96f6"
1935
- ],
1936
- schema: "network.xyo.boundwitness",
1937
- $signatures: [
1938
- "d6da88e37fbfc91c8d3abdcae01e87831ded21363840502f4062e0eca1f638dd22a544a981823b2772b6e8992f2c4595255693e97c7d4487ea3d4639389471d8",
1939
- "292f780624cf8ec2c297e696ac781b1c8b744801bff14d36f9ccc14172e91b711875aeceadc3325373e32166e60addfd9bfa2f3e9cb4ee021938acfa7c0e9853"
1940
- ],
1941
- $epoch: 0,
1942
- _dataHash: "56b814364f08d5a4833781bf732be22c521669d304aa1e3dc9f230481b077076",
1943
- _hash: "ca2390800a8105fe9ec2a1be4da3a54048cde60685072ebc3d06a5974f112ddc",
1944
- _sequence: "00000194ce6c5603000000004f112ddc"
1945
- },
1946
- {
1947
- gas: "00",
1948
- block: "08",
1949
- step_hashes: [],
1950
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
1951
- previous: "ca2390800a8105fe9ec2a1be4da3a54048cde60685072ebc3d06a5974f112ddc",
1952
- reward: "7530",
1953
- addresses: [
1954
- "d01885faa18c18ee20982bdf499b6152981a84c0",
1955
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
1956
- ],
1957
- payload_hashes: [],
1958
- payload_schemas: [],
1959
- previous_hashes: [
1960
- "ca2390800a8105fe9ec2a1be4da3a54048cde60685072ebc3d06a5974f112ddc",
1961
- "56b814364f08d5a4833781bf732be22c521669d304aa1e3dc9f230481b077076"
1962
- ],
1963
- schema: "network.xyo.boundwitness",
1964
- $signatures: [
1965
- "ce20d68fcbab920b571fa50b130197a9e4ade4e61a588a1991fdca22074a0d8611f73eea4766e994c0c8f41d6627eff1b31fec396b9d19a070041f712ef6c905",
1966
- "a1fe002589b83919bfddf169317424ec0e92d320626e58cd85171fc5feb5eaf310da79518b6465987d0b667f14799649d98a4534d5fd45ea1a14f5522729e3cb"
1967
- ],
1968
- $epoch: 0,
1969
- _dataHash: "3b9f4070e941952b3c8e6c8d3e88595bfccbf79532f5e972caee2f1f2cf49d60",
1970
- _hash: "3e1b4c1bf426b79d5960034ca0486af693d7c07131a015618c4189d45092938d",
1971
- _sequence: "00000194ce6c5616000000005092938d"
1972
- },
1973
- {
1974
- gas: "00",
1975
- block: "09",
1976
- step_hashes: [],
1977
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
1978
- previous: "3e1b4c1bf426b79d5960034ca0486af693d7c07131a015618c4189d45092938d",
1979
- reward: "7530",
1980
- addresses: [
1981
- "d01885faa18c18ee20982bdf499b6152981a84c0",
1982
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
1983
- ],
1984
- payload_hashes: [],
1985
- payload_schemas: [],
1986
- previous_hashes: [
1987
- "3e1b4c1bf426b79d5960034ca0486af693d7c07131a015618c4189d45092938d",
1988
- "3b9f4070e941952b3c8e6c8d3e88595bfccbf79532f5e972caee2f1f2cf49d60"
1989
- ],
1990
- schema: "network.xyo.boundwitness",
1991
- $signatures: [
1992
- "e5ef937ba2c8e87404a749236f93b3419bd385c55cb3756cafa1a27a87bd3d856128c6556ad7295014fb9d44df613c79aec86786621a4842c43df3770b3fad0f",
1993
- "c7b2845e3044ac525fa350b62d00ad08f5f1b085778c1a412ad06e2ac388fc2e62f3245ba7711bf8fdd35a590cdd08a759e670e660d81a8181a48799e71cd667"
1994
- ],
1995
- $epoch: 0,
1996
- _dataHash: "ab02d31a1924c759ba590279215f46f839261c83a4ee21428c98e1ed0662ad1e",
1997
- _hash: "0e559002f163827f17e2dc1ea731e3b49a510f69e21e84ae9a9b38097c2c6d8b",
1998
- _sequence: "00000194ce6c562b000000007c2c6d8b"
1999
- },
2000
- {
2001
- gas: "00",
2002
- block: "0a",
2003
- step_hashes: [],
2004
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
2005
- previous: "0e559002f163827f17e2dc1ea731e3b49a510f69e21e84ae9a9b38097c2c6d8b",
2006
- reward: "7530",
2007
- addresses: [
2008
- "d01885faa18c18ee20982bdf499b6152981a84c0",
2009
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
2010
- ],
2011
- payload_hashes: [],
2012
- payload_schemas: [],
2013
- previous_hashes: [
2014
- "0e559002f163827f17e2dc1ea731e3b49a510f69e21e84ae9a9b38097c2c6d8b",
2015
- "ab02d31a1924c759ba590279215f46f839261c83a4ee21428c98e1ed0662ad1e"
2016
- ],
2017
- schema: "network.xyo.boundwitness",
2018
- $signatures: [
2019
- "411447d4f1a63f9128f6e79d8ba5f762000080b93f22036c0d59d015046edc343e6d07db08f3163517affea04b9c436d1310cbc2d66834d1669f14a3e92f9e99",
2020
- "20c383dda3257b37789d69fd60831ebc8dd4f4831b6ecf64d4020fc1d1352bea41524f26cdb5acf6c8fd9fddac96e063f27ad2aa6b6bb428e42fdc058a0c590e"
2021
- ],
2022
- $epoch: 0,
2023
- _dataHash: "20877cacb9a372e87ad2dd6fdde231a460204c4ca20b70656d9b17c4c064a2b4",
2024
- _hash: "18d2ac1e45a5dba95452ece2a5500a66f7d8a81f447dcfd4e8c3e0f0244956a5",
2025
- _sequence: "00000194ce6c563f00000000244956a5"
2026
- },
2027
- {
2028
- gas: "00",
2029
- block: "0b",
2030
- step_hashes: [],
2031
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
2032
- previous: "18d2ac1e45a5dba95452ece2a5500a66f7d8a81f447dcfd4e8c3e0f0244956a5",
2033
- reward: "7530",
2034
- addresses: [
2035
- "d01885faa18c18ee20982bdf499b6152981a84c0",
2036
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
2037
- ],
2038
- payload_hashes: [],
2039
- payload_schemas: [],
2040
- previous_hashes: [
2041
- "18d2ac1e45a5dba95452ece2a5500a66f7d8a81f447dcfd4e8c3e0f0244956a5",
2042
- "20877cacb9a372e87ad2dd6fdde231a460204c4ca20b70656d9b17c4c064a2b4"
2043
- ],
2044
- schema: "network.xyo.boundwitness",
2045
- $signatures: [
2046
- "8f8bae654d13c6e44503d9feff0822ceccc26097588b38ea830b0eb873b0a7055de96c16ed8402e0d0e11c99c85c9101c3de40f9d59a4cba526edb93088af0e8",
2047
- "939255f0774487857187582f5540fb54a8615df7bc12c7394664f62ca1292bb12404a32be0274d5486c3bff85f11a954a87870dff13c5dca4cf017092b749c61"
2048
- ],
2049
- $epoch: 0,
2050
- _dataHash: "e7ef06e06d8c389122a86352622d6cb6ad857ad236bf7baf5003505cb3044191",
2051
- _hash: "1ef6c1973ea8d32c46120cb8b7f5887971e2388f6f9f33d8c414dd4762dc2064",
2052
- _sequence: "00000194ce6c56520000000062dc2064"
2053
- },
2054
- {
2055
- gas: "00",
2056
- block: "0c",
2057
- step_hashes: [],
2058
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
2059
- previous: "1ef6c1973ea8d32c46120cb8b7f5887971e2388f6f9f33d8c414dd4762dc2064",
2060
- reward: "7530",
2061
- addresses: [
2062
- "d01885faa18c18ee20982bdf499b6152981a84c0",
2063
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
2064
- ],
2065
- payload_hashes: [],
2066
- payload_schemas: [],
2067
- previous_hashes: [
2068
- "1ef6c1973ea8d32c46120cb8b7f5887971e2388f6f9f33d8c414dd4762dc2064",
2069
- "e7ef06e06d8c389122a86352622d6cb6ad857ad236bf7baf5003505cb3044191"
2070
- ],
2071
- schema: "network.xyo.boundwitness",
2072
- $signatures: [
2073
- "bcc61e1b3e1596cb1376e280c9079da38a627a1f842c8259566d5e5c5375bfbd79de1df0d9fab34dc8f6ae4b19bd37cc871c013b96c7fa9b2a7931a0b1d935b5",
2074
- "b4cee23a4c7ee5ef639c54bb5ac4eba46b5220209a4811bc0cfa3a2e6948b8fc62ee126f17e2d2fe593d7702a0a068fb693e8830cdf0b3d9c49af8e13f9192e1"
2075
- ],
2076
- $epoch: 0,
2077
- _dataHash: "a2a21c5c6202d9c48ca9fc2171e6ef14326cb0d962cb70658ebaf7d624051114",
2078
- _hash: "9205e229014c3af604f85908c7125021bebe23afca191f06e3f4235d4efc629a",
2079
- _sequence: "00000194ce6c5666000000004efc629a"
2080
- },
2081
- {
2082
- gas: "00",
2083
- block: "0d",
2084
- step_hashes: [],
2085
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
2086
- previous: "9205e229014c3af604f85908c7125021bebe23afca191f06e3f4235d4efc629a",
2087
- reward: "7530",
2088
- addresses: [
2089
- "d01885faa18c18ee20982bdf499b6152981a84c0",
2090
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
2091
- ],
2092
- payload_hashes: [],
2093
- payload_schemas: [],
2094
- previous_hashes: [
2095
- "9205e229014c3af604f85908c7125021bebe23afca191f06e3f4235d4efc629a",
2096
- "a2a21c5c6202d9c48ca9fc2171e6ef14326cb0d962cb70658ebaf7d624051114"
2097
- ],
2098
- schema: "network.xyo.boundwitness",
2099
- $signatures: [
2100
- "a4eeec82fcf9cd4ce3afc3f9f22e8ff1234e24d80672231be6320896a1b43de662a6d3d50cfe7636c5e677b64439dd0a7db3a342ecb517593a32d7ece3f0be43",
2101
- "83142d0d1638ad21604c7cfac2c6889c0226785b0e0b499be67a7585086507982a2505e078be251f2b0c4c7a585ac804ebc8a5219019eeb4dfebb3a891d592ec"
2102
- ],
2103
- $epoch: 0,
2104
- _dataHash: "f7167dffc7b9b38a194c0bd63910a895ceb563a8c6be03f415d518607c390db0",
2105
- _hash: "a10ba8a25407dd27f14eb217f67df1105d5515b3bdb696ce6ef891813f6986c4",
2106
- _sequence: "00000194ce6c5679000000003f6986c4"
2107
- },
2108
- {
2109
- gas: "00",
2110
- block: "0e",
2111
- step_hashes: [],
2112
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
2113
- previous: "a10ba8a25407dd27f14eb217f67df1105d5515b3bdb696ce6ef891813f6986c4",
2114
- reward: "7530",
2115
- addresses: [
2116
- "d01885faa18c18ee20982bdf499b6152981a84c0",
2117
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
2118
- ],
2119
- payload_hashes: [],
2120
- payload_schemas: [],
2121
- previous_hashes: [
2122
- "a10ba8a25407dd27f14eb217f67df1105d5515b3bdb696ce6ef891813f6986c4",
2123
- "f7167dffc7b9b38a194c0bd63910a895ceb563a8c6be03f415d518607c390db0"
2124
- ],
2125
- schema: "network.xyo.boundwitness",
2126
- $signatures: [
2127
- "14512f03ddb432cce9d532f9dae6322bea007eae19a63f0621672a64f33c3160148f75810b12e135564c31e69429a468d4ce61f43f87c4edec9e5a0f18da0489",
2128
- "f85cd4f1f046f67ef9e7793335c71841ae4a110b0b2d9c43fa6919cf1750f11566255b55d963ac7d5015c60456330f4c3f5be93fb601412118db63f15047df8e"
2129
- ],
2130
- $epoch: 0,
2131
- _dataHash: "dad7ed407788a57470e8699b065efb64d060d61c84803318c877148dd3710930",
2132
- _hash: "37b47da175bec1fa38724f154502f7581f35b11a4550fcbd153cbc231c9beb15",
2133
- _sequence: "00000194ce6c568b000000001c9beb15"
2134
- },
2135
- {
2136
- gas: "00",
2137
- block: "0f",
2138
- step_hashes: [],
2139
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
2140
- previous: "37b47da175bec1fa38724f154502f7581f35b11a4550fcbd153cbc231c9beb15",
2141
- reward: "7530",
2142
- addresses: [
2143
- "d01885faa18c18ee20982bdf499b6152981a84c0",
2144
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
2145
- ],
2146
- payload_hashes: [],
2147
- payload_schemas: [],
2148
- previous_hashes: [
2149
- "37b47da175bec1fa38724f154502f7581f35b11a4550fcbd153cbc231c9beb15",
2150
- "dad7ed407788a57470e8699b065efb64d060d61c84803318c877148dd3710930"
2151
- ],
2152
- schema: "network.xyo.boundwitness",
2153
- $signatures: [
2154
- "204a38fbba3325bd295c9d600de7f565394e199d4d3daf5ec52a911e0d55d40704d30c38ec470ba77b19f62fd5f8b1888dd00591a23575d8b92ac8fb14f11d5a",
2155
- "7ab019d614974930a17bebfa9236e34742e932ab1b20007a86fa033674d2590303c7835b38694e2fb46f97d66e3e1b6b369cadc415f8a969c2cbc65e034b3f68"
2156
- ],
2157
- $epoch: 0,
2158
- _dataHash: "3b8244d7dfa8b111bda9ed05e072640cc2c917687116a9c6ba298ca9a46f9b9b",
2159
- _hash: "895b5bcbc9b5bcede1b0a0cb1eb6e9c0904be16d1a83ed99f2b03d74159f9761",
2160
- _sequence: "00000194ce6c569e00000000159f9761"
2161
- },
2162
- {
2163
- gas: "00",
2164
- block: "10",
2165
- step_hashes: [],
2166
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
2167
- previous: "895b5bcbc9b5bcede1b0a0cb1eb6e9c0904be16d1a83ed99f2b03d74159f9761",
2168
- reward: "7530",
2169
- addresses: [
2170
- "d01885faa18c18ee20982bdf499b6152981a84c0",
2171
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
2172
- ],
2173
- payload_hashes: [],
2174
- payload_schemas: [],
2175
- previous_hashes: [
2176
- "895b5bcbc9b5bcede1b0a0cb1eb6e9c0904be16d1a83ed99f2b03d74159f9761",
2177
- "3b8244d7dfa8b111bda9ed05e072640cc2c917687116a9c6ba298ca9a46f9b9b"
2178
- ],
2179
- schema: "network.xyo.boundwitness",
2180
- $signatures: [
2181
- "0698eb7fa459e13d5bfa42dec92d6251d52d281f7051e083ef73260373e126722a310bd15e2f2bc3e6f6e5aee3cc28b1bc1eb509733bd74fe5394d7bb7d75769",
2182
- "60ccc8f298ebf66328654552a6243bd5a07f2c76207648c5378d6285c70be36a64de53bf90ae8657c6433f85c3cdc316ea0863cb1b9183cd1412cee878eeaec3"
2183
- ],
2184
- $epoch: 0,
2185
- _dataHash: "95285ec0d7b837371d5c8ad8ac75f609a5b83662531ffdd41770f6724f986d3a",
2186
- _hash: "3233cfb02d07056bf5dee59f6a6d1eeafe14543c2d23fd803bbf8ec8b45e6b07",
2187
- _sequence: "00000194ce6c56b000000000b45e6b07"
2188
- },
2189
- {
2190
- gas: "00",
2191
- block: "11",
2192
- step_hashes: [],
2193
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
2194
- previous: "3233cfb02d07056bf5dee59f6a6d1eeafe14543c2d23fd803bbf8ec8b45e6b07",
2195
- reward: "7530",
2196
- addresses: [
2197
- "d01885faa18c18ee20982bdf499b6152981a84c0",
2198
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
2199
- ],
2200
- payload_hashes: [],
2201
- payload_schemas: [],
2202
- previous_hashes: [
2203
- "3233cfb02d07056bf5dee59f6a6d1eeafe14543c2d23fd803bbf8ec8b45e6b07",
2204
- "95285ec0d7b837371d5c8ad8ac75f609a5b83662531ffdd41770f6724f986d3a"
2205
- ],
2206
- schema: "network.xyo.boundwitness",
2207
- $signatures: [
2208
- "c1283d36a6e2d185b693a43bbc1fdaff9e2bfa84e181fbc88af09a4a1be3da932fd2f36425ff7018b274770819e4ef595488d98e2dd749adeb7d96040df0ff7e",
2209
- "d32940d3c605451e905e3b15ac8af91e21949c5225d57cce9460a399166abd3a5b8b9fd8aecdb6a66287159ec5c398ea6fbdc6d050ff873e389735b22689fc6a"
2210
- ],
2211
- $epoch: 0,
2212
- _dataHash: "1f6e0444db7aed7987da40568b9b4b8745a09cb1ef4990f48130ecf348180559",
2213
- _hash: "43f699190a88330c6ba56898c1bf127b22fc8c258649a2d324fe356b3a35c97a",
2214
- _sequence: "00000194ce6c56c3000000003a35c97a"
2215
- },
2216
- {
2217
- gas: "00",
2218
- block: "12",
2219
- step_hashes: [],
2220
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
2221
- previous: "43f699190a88330c6ba56898c1bf127b22fc8c258649a2d324fe356b3a35c97a",
2222
- reward: "7530",
2223
- addresses: [
2224
- "d01885faa18c18ee20982bdf499b6152981a84c0",
2225
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
2226
- ],
2227
- payload_hashes: [],
2228
- payload_schemas: [],
2229
- previous_hashes: [
2230
- "43f699190a88330c6ba56898c1bf127b22fc8c258649a2d324fe356b3a35c97a",
2231
- "1f6e0444db7aed7987da40568b9b4b8745a09cb1ef4990f48130ecf348180559"
2232
- ],
2233
- schema: "network.xyo.boundwitness",
2234
- $signatures: [
2235
- "57ca539d055446d42c10a9a7cc16eb9ad798f0ffc02797b5e5b86dba1c1922615334ebc50f8dfcc8fd8f65687eba174f6c0f59b964cc968ac25a3ec24753e256",
2236
- "7e8c60ab8f4c81b35a8130fb24d2994cb1ee770044fbad78408017f8a3eb99d87975683da39312e3c09332e8ca87698d37b23120b912d6d134dcbcff207ce56e"
2237
- ],
2238
- $epoch: 0,
2239
- _dataHash: "65f08790dae44321153a654a1144cdf95c38b022cef43554c9fa2dd69cf08e6e",
2240
- _hash: "9234b1ce806eaeed40cdb73be7a9ea52da9cf0a14f9aeb8840e76001f7961901",
2241
- _sequence: "00000194ce6c56d500000000f7961901"
2242
- },
2243
- {
2244
- gas: "00",
2245
- block: "13",
2246
- step_hashes: [],
2247
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
2248
- previous: "9234b1ce806eaeed40cdb73be7a9ea52da9cf0a14f9aeb8840e76001f7961901",
2249
- reward: "7530",
2250
- addresses: [
2251
- "d01885faa18c18ee20982bdf499b6152981a84c0",
2252
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
2253
- ],
2254
- payload_hashes: [],
2255
- payload_schemas: [],
2256
- previous_hashes: [
2257
- "9234b1ce806eaeed40cdb73be7a9ea52da9cf0a14f9aeb8840e76001f7961901",
2258
- "65f08790dae44321153a654a1144cdf95c38b022cef43554c9fa2dd69cf08e6e"
2259
- ],
2260
- schema: "network.xyo.boundwitness",
2261
- $signatures: [
2262
- "5fd6239bb7a02125b4520968e9663490cf1715d6228da01f38dcb7b24dcf728033615584097645fc25deb8f43ce6d119a0640b510d94e46090d552a828f7a502",
2263
- "bc206b48140d888e41a88bd876fbb372a38787c689cbd1fd38c1dcb118a41ae42b6dabfcd1b18575b75b9269191c6a5db57ea1c25bae1c19901197c377ce1b4c"
2264
- ],
2265
- $epoch: 0,
2266
- _dataHash: "01f2f68e9b9acd29d4753153b38a2653c18ab4cea1987128450b7e765e732a96",
2267
- _hash: "76c0969f037ac00c3bab93e22d93e8e3435fbedf4aec3d774a44525db3992ff3",
2268
- _sequence: "00000194ce6c56e800000000b3992ff3"
2269
- },
2270
- {
2271
- gas: "00",
2272
- block: "14",
2273
- step_hashes: [],
2274
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
2275
- previous: "76c0969f037ac00c3bab93e22d93e8e3435fbedf4aec3d774a44525db3992ff3",
2276
- reward: "7530",
2277
- addresses: [
2278
- "d01885faa18c18ee20982bdf499b6152981a84c0",
2279
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
2280
- ],
2281
- payload_hashes: [],
2282
- payload_schemas: [],
2283
- previous_hashes: [
2284
- "76c0969f037ac00c3bab93e22d93e8e3435fbedf4aec3d774a44525db3992ff3",
2285
- "01f2f68e9b9acd29d4753153b38a2653c18ab4cea1987128450b7e765e732a96"
2286
- ],
2287
- schema: "network.xyo.boundwitness",
2288
- $signatures: [
2289
- "810c841e88c02136091c1a11bf0576dab10ad7bcc9f5a9b5afb3fb576892ffc943867a648039e75189196f9223970be22a1ece3b3a12cea181b00698298b1f60",
2290
- "a7c643e107c14078e118d3a774eb4bda0026e6f71f1718aef75c0e465fae08d7019b6581ac78af13ce77afc0a3d55f19125244032bca6c8b752d68f013914179"
2291
- ],
2292
- $epoch: 0,
2293
- _dataHash: "cd3c26f44f5ff54629435cbefad5675d35a0a6ac30f90ddcc0a019636badd229",
2294
- _hash: "6ac8eeec3cc617c0f0122f204532738ce3e37a484276077d77e5b33697fd3ed0",
2295
- _sequence: "00000194ce6c56fb0000000097fd3ed0"
2296
- },
2297
- {
2298
- gas: "00",
2299
- block: "15",
2300
- step_hashes: [],
2301
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
2302
- previous: "6ac8eeec3cc617c0f0122f204532738ce3e37a484276077d77e5b33697fd3ed0",
2303
- reward: "7530",
2304
- addresses: [
2305
- "d01885faa18c18ee20982bdf499b6152981a84c0",
2306
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
2307
- ],
2308
- payload_hashes: [],
2309
- payload_schemas: [],
2310
- previous_hashes: [
2311
- "6ac8eeec3cc617c0f0122f204532738ce3e37a484276077d77e5b33697fd3ed0",
2312
- "cd3c26f44f5ff54629435cbefad5675d35a0a6ac30f90ddcc0a019636badd229"
2313
- ],
2314
- schema: "network.xyo.boundwitness",
2315
- $signatures: [
2316
- "756c13167fe50b8d157e91e4b6a2076c08b97b65a2dda532245aac621ca0deb105efa55c04f74b0a3fa3e313395202f89c8c2a877c2ce10d2c6b5594536754e7",
2317
- "7905e47b9eb2246f1ead1bcf39d79d7c8404c0ba7449e9bdd22635bb56464e1e09d1dad5af42aaf7de37b3c243ac4efce7eb179573f6970a56fd2c4d36f9d3a5"
2318
- ],
2319
- $epoch: 0,
2320
- _dataHash: "95005616a375da9043e72a254f21a875ef86880097ae143d27153d3355902933",
2321
- _hash: "3f069f39b6cf2abfc8dbd4bfd87102cb6d1e37fd1b9db725f2e7ad830f536878",
2322
- _sequence: "00000194ce6c570f000000000f536878"
2323
- },
2324
- {
2325
- gas: "00",
2326
- block: "16",
2327
- step_hashes: [],
2328
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
2329
- previous: "3f069f39b6cf2abfc8dbd4bfd87102cb6d1e37fd1b9db725f2e7ad830f536878",
2330
- reward: "7530",
2331
- addresses: [
2332
- "d01885faa18c18ee20982bdf499b6152981a84c0",
2333
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
2334
- ],
2335
- payload_hashes: [],
2336
- payload_schemas: [],
2337
- previous_hashes: [
2338
- "3f069f39b6cf2abfc8dbd4bfd87102cb6d1e37fd1b9db725f2e7ad830f536878",
2339
- "95005616a375da9043e72a254f21a875ef86880097ae143d27153d3355902933"
2340
- ],
2341
- schema: "network.xyo.boundwitness",
2342
- $signatures: [
2343
- "b5ea56c6e18508acd65397a62e74ded64b25c312e7e5b6952aa1be5f06eae26912d9667b3720b32bd560434ae155bfb9207896ff87a42818895add9fa058ae7d",
2344
- "cf49aac7a482f840360d16d563b97d0a99939657688c034aaa63e6fea889b144539a5780e06a144f7990ad40d26a50a4159895bbb1a301c7703d01474978aa89"
2345
- ],
2346
- $epoch: 0,
2347
- _dataHash: "3226916718274d0125b19592652af1a6ddf3515fb44172f996858659e51a5821",
2348
- _hash: "c179c3f577d8083f21bc7ab85c20a142ac5670ee5fd68fb44185bfa7bdf639c0",
2349
- _sequence: "00000194ce6c572300000000bdf639c0"
2350
- },
2351
- {
2352
- gas: "00",
2353
- block: "17",
2354
- step_hashes: [],
2355
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
2356
- previous: "c179c3f577d8083f21bc7ab85c20a142ac5670ee5fd68fb44185bfa7bdf639c0",
2357
- reward: "7530",
2358
- addresses: [
2359
- "d01885faa18c18ee20982bdf499b6152981a84c0",
2360
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
2361
- ],
2362
- payload_hashes: [],
2363
- payload_schemas: [],
2364
- previous_hashes: [
2365
- "c179c3f577d8083f21bc7ab85c20a142ac5670ee5fd68fb44185bfa7bdf639c0",
2366
- "3226916718274d0125b19592652af1a6ddf3515fb44172f996858659e51a5821"
2367
- ],
2368
- schema: "network.xyo.boundwitness",
2369
- $signatures: [
2370
- "b98cdbe19c35088571ede1874d2bc3bf607ddb9da47d02b655102c54e8db87e21322c64cffd4c188f2779b2f4716003b1bafabc19e38a3efe0a0557926fef71e",
2371
- "066af736a17fd844887c82a76e36a9e0b0da65ba5c3dd5b88428231525e1b68b1c716406b5b0490e399988adb5e110d539aab0fc77bd7f378e82f4964b98401a"
2372
- ],
2373
- $epoch: 0,
2374
- _dataHash: "162d6b50b65f3d8287d3b4b8fd037eec347950c9a80586c1daab1cab74d2186a",
2375
- _hash: "99caea80ee8899f71e987dbd7e5ad38bfbb928a0e70402744c42a1c1b812a07e",
2376
- _sequence: "00000194ce6c573600000000b812a07e"
2377
- },
2378
- {
2379
- gas: "00",
2380
- block: "18",
2381
- step_hashes: [],
2382
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
2383
- previous: "99caea80ee8899f71e987dbd7e5ad38bfbb928a0e70402744c42a1c1b812a07e",
2384
- reward: "7530",
2385
- addresses: [
2386
- "d01885faa18c18ee20982bdf499b6152981a84c0",
2387
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
2388
- ],
2389
- payload_hashes: [],
2390
- payload_schemas: [],
2391
- previous_hashes: [
2392
- "99caea80ee8899f71e987dbd7e5ad38bfbb928a0e70402744c42a1c1b812a07e",
2393
- "162d6b50b65f3d8287d3b4b8fd037eec347950c9a80586c1daab1cab74d2186a"
2394
- ],
2395
- schema: "network.xyo.boundwitness",
2396
- $signatures: [
2397
- "8d471a97f3b296ba9ba4e0f0ec1699ee753c6dd9af5e21f44669d53b5a022afa5a78e980856f57c59fed7cb911ece898570320a143c6a3b2560a519e6992acc6",
2398
- "ddd872e4080ffbbcdd08b0c42c92c5c79f07b2c7b6eafeb9d88d679fdda992826494cec84699ab6fca8d59b59ca8b9cf5811239290fa077507278402019206de"
2399
- ],
2400
- $epoch: 0,
2401
- _dataHash: "e1163f1594b798250bfe5b2a7fb4fa63c0de0fdfd1707f61102cbf2820c1315d",
2402
- _hash: "6d7feb729bc8f4eef8e33a5c6c20a8fe0d318eb159577e8cb6e197520063c29b",
2403
- _sequence: "00000194ce6c5749000000000063c29b"
2404
- },
2405
- {
2406
- gas: "00",
2407
- block: "19",
2408
- step_hashes: [],
2409
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
2410
- previous: "6d7feb729bc8f4eef8e33a5c6c20a8fe0d318eb159577e8cb6e197520063c29b",
2411
- reward: "7530",
2412
- addresses: [
2413
- "d01885faa18c18ee20982bdf499b6152981a84c0",
2414
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
2415
- ],
2416
- payload_hashes: [],
2417
- payload_schemas: [],
2418
- previous_hashes: [
2419
- "6d7feb729bc8f4eef8e33a5c6c20a8fe0d318eb159577e8cb6e197520063c29b",
2420
- "e1163f1594b798250bfe5b2a7fb4fa63c0de0fdfd1707f61102cbf2820c1315d"
2421
- ],
2422
- schema: "network.xyo.boundwitness",
2423
- $signatures: [
2424
- "80f5da1904d45fc67ab08191f9fb6d2eac05f861a3f471ff4b0022a8aa8b8c3d5495f02ef3069e859d12a4cb9f1c62ce854fea48460aae223a83f998b34d0209",
2425
- "aed4dd76381760258732c9d73aeec46f57f390fbc707b20a7db91e2738bf8f212ae2e94b786023460fff9e9e69aa83ca6a064fb0317151a1b87880a01859db75"
2426
- ],
2427
- $epoch: 0,
2428
- _dataHash: "38ac65443d058d5ee3d11c18bf0e3f207180e2684d53ebcbe39ffa38c6c9f80b",
2429
- _hash: "59b0935a6860769178480c8f04e60b4e2936be978b8ed553da5def0c2e115203",
2430
- _sequence: "00000194ce6c575c000000002e115203"
2431
- },
2432
- {
2433
- gas: "00",
2434
- block: "1a",
2435
- step_hashes: [],
2436
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
2437
- previous: "59b0935a6860769178480c8f04e60b4e2936be978b8ed553da5def0c2e115203",
2438
- reward: "7530",
2439
- addresses: [
2440
- "d01885faa18c18ee20982bdf499b6152981a84c0",
2441
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
2442
- ],
2443
- payload_hashes: [],
2444
- payload_schemas: [],
2445
- previous_hashes: [
2446
- "59b0935a6860769178480c8f04e60b4e2936be978b8ed553da5def0c2e115203",
2447
- "38ac65443d058d5ee3d11c18bf0e3f207180e2684d53ebcbe39ffa38c6c9f80b"
2448
- ],
2449
- schema: "network.xyo.boundwitness",
2450
- $signatures: [
2451
- "73eb2fba37e98bf55ebc734b4b0abde762a537ded767d3b2d8b5287c530cde0700e0ce091f73d04880fbbb41fc2e3d1a04218363a6a5179ad8344ad70f3afad8",
2452
- "a7d1d94503453c5ce20a5980d260939e842c235380d52cdfdb8c80466b7b21873d4ef54393c9721e0ee2e2d68da12516ecc00fd3e486a6857704e4e74f6fb843"
2453
- ],
2454
- $epoch: 0,
2455
- _dataHash: "e4c6920199d1dc441a140c17da5be12b52c537d7d358cabc8928aea109007ab8",
2456
- _hash: "06d8f99316f9aa7bbebe4174ae7b8d2d2dc45c2c1dbdb1baaa512f262de68058",
2457
- _sequence: "00000194ce6c576e000000002de68058"
2458
- },
2459
- {
2460
- gas: "00",
2461
- block: "1b",
2462
- step_hashes: [],
2463
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
2464
- previous: "06d8f99316f9aa7bbebe4174ae7b8d2d2dc45c2c1dbdb1baaa512f262de68058",
2465
- reward: "7530",
2466
- addresses: [
2467
- "d01885faa18c18ee20982bdf499b6152981a84c0",
2468
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
2469
- ],
2470
- payload_hashes: [],
2471
- payload_schemas: [],
2472
- previous_hashes: [
2473
- "06d8f99316f9aa7bbebe4174ae7b8d2d2dc45c2c1dbdb1baaa512f262de68058",
2474
- "e4c6920199d1dc441a140c17da5be12b52c537d7d358cabc8928aea109007ab8"
2475
- ],
2476
- schema: "network.xyo.boundwitness",
2477
- $signatures: [
2478
- "01098c656b063efdab0867cd2aadc06a8c773cbb62319f50d29d3f2b9319a4457f729e6b3a2a064078e223e98384ccde74eb87b721a65b12ae0666364d1922d1",
2479
- "72e237cfb04add3023feb36c726e40437d16575e646a6ec71534b06d12dd5adf7cdb9a8d9514aebceead5b9bee08b94bcfa1429bc8de26428658502165afb095"
2480
- ],
2481
- $epoch: 0,
2482
- _dataHash: "78dc39caaa697488517d8c663085ff0dd450140bcd93701fe49a267ea980d08d",
2483
- _hash: "eb49cac37db77d58293e71dd23d5500a817c36ac4c4f3e8607d3e71c495c41e3",
2484
- _sequence: "00000194ce6c578100000000495c41e3"
2485
- },
2486
- {
2487
- gas: "00",
2488
- block: "1c",
2489
- step_hashes: [],
2490
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
2491
- previous: "eb49cac37db77d58293e71dd23d5500a817c36ac4c4f3e8607d3e71c495c41e3",
2492
- reward: "7530",
2493
- addresses: [
2494
- "d01885faa18c18ee20982bdf499b6152981a84c0",
2495
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
2496
- ],
2497
- payload_hashes: [],
2498
- payload_schemas: [],
2499
- previous_hashes: [
2500
- "eb49cac37db77d58293e71dd23d5500a817c36ac4c4f3e8607d3e71c495c41e3",
2501
- "78dc39caaa697488517d8c663085ff0dd450140bcd93701fe49a267ea980d08d"
2502
- ],
2503
- schema: "network.xyo.boundwitness",
2504
- $signatures: [
2505
- "81dc16747f5c00fb64ac251e470c3822c4a351cd0d657d965348e105d160ef4a2b9d812d37df94acc7c542a8d5c2e4a79022bc83489b495acad9e2993c5f3004",
2506
- "bf8908cfbd64a62b8a5a87772e3e44ac0317304266be1fdf85421a194ee4a2535bff02bd7bd9fcbdcac995517db905156643179598752c18a9ffbf36c3b45be0"
2507
- ],
2508
- $epoch: 0,
2509
- _dataHash: "e9bf3f0c6f7842961e99f32226cb04c54d90c9cdd8ddd6003f32dce341b59c84",
2510
- _hash: "463ff71001b80845d58c7baafae221a9213091321c22c3e4778e185aa0236a3a",
2511
- _sequence: "00000194ce6c579500000000a0236a3a"
2512
- },
2513
- {
2514
- gas: "00",
2515
- block: "1d",
2516
- step_hashes: [],
2517
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
2518
- previous: "463ff71001b80845d58c7baafae221a9213091321c22c3e4778e185aa0236a3a",
2519
- reward: "7530",
2520
- addresses: [
2521
- "d01885faa18c18ee20982bdf499b6152981a84c0",
2522
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
2523
- ],
2524
- payload_hashes: [],
2525
- payload_schemas: [],
2526
- previous_hashes: [
2527
- "463ff71001b80845d58c7baafae221a9213091321c22c3e4778e185aa0236a3a",
2528
- "e9bf3f0c6f7842961e99f32226cb04c54d90c9cdd8ddd6003f32dce341b59c84"
2529
- ],
2530
- schema: "network.xyo.boundwitness",
2531
- $signatures: [
2532
- "b7d3aca05357a73f7434d37a067e0a060f1bb4d069375c707d7f5474f1b040f205fea48cd681169d4f8c202e24053895c072f1f8a360fb6785f32f2a1da4cff1",
2533
- "a06e996ccc16e37b707390194e2736e49e842172063f2d89a7cd5b604e266ea261be2b30a94516c97c0f39317b6b7ba240a03b412dc4e6ccde54a88353c8a23f"
2534
- ],
2535
- $epoch: 0,
2536
- _dataHash: "00e9f351a2c668e452e46272a857a6dfdd2c6a7bd025aea86fbb2c3c7eb5dfcd",
2537
- _hash: "1091e127bb0eb4a1df41fb53957cd12f2557fb9b512852a9c21365297893bdf2",
2538
- _sequence: "00000194ce6c57a8000000007893bdf2"
2539
- },
2540
- {
2541
- gas: "00",
2542
- block: "1e",
2543
- step_hashes: [],
2544
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
2545
- previous: "1091e127bb0eb4a1df41fb53957cd12f2557fb9b512852a9c21365297893bdf2",
2546
- reward: "7530",
2547
- addresses: [
2548
- "d01885faa18c18ee20982bdf499b6152981a84c0",
2549
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
2550
- ],
2551
- payload_hashes: [],
2552
- payload_schemas: [],
2553
- previous_hashes: [
2554
- "1091e127bb0eb4a1df41fb53957cd12f2557fb9b512852a9c21365297893bdf2",
2555
- "00e9f351a2c668e452e46272a857a6dfdd2c6a7bd025aea86fbb2c3c7eb5dfcd"
2556
- ],
2557
- schema: "network.xyo.boundwitness",
2558
- $signatures: [
2559
- "7bcc7f4a6605fb7c99817b59f10b3d77e33230f294c4877b010225d7c12e2da3052ab15a03427baaa55e4565972a309ea422e9dc624739616f7515a7b4c8d7b9",
2560
- "b2085f1423a4f847a70c8dccaf2a1574d00d1102b5ec493b64b81d3bc94a98c863ec71a8f5c5cb358ebdc8295623185c11b6688982ba6cd96db5b02ab4b6c7e0"
2561
- ],
2562
- $epoch: 0,
2563
- _dataHash: "c95575f19e9ea08ef90d6ccaf010f7ed64cf194fd9fc713f9d4c7267160b50b2",
2564
- _hash: "c3b27870f2c5e5c0ea86e16d7681994033d9c6db81d3c1d2e5817bd53b7eff62",
2565
- _sequence: "00000194ce6c57bc000000003b7eff62"
2566
- },
2567
- {
2568
- gas: "00",
2569
- block: "1f",
2570
- step_hashes: [],
2571
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
2572
- previous: "c3b27870f2c5e5c0ea86e16d7681994033d9c6db81d3c1d2e5817bd53b7eff62",
2573
- reward: "7530",
2574
- addresses: [
2575
- "d01885faa18c18ee20982bdf499b6152981a84c0",
2576
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
2577
- ],
2578
- payload_hashes: [],
2579
- payload_schemas: [],
2580
- previous_hashes: [
2581
- "c3b27870f2c5e5c0ea86e16d7681994033d9c6db81d3c1d2e5817bd53b7eff62",
2582
- "c95575f19e9ea08ef90d6ccaf010f7ed64cf194fd9fc713f9d4c7267160b50b2"
2583
- ],
2584
- schema: "network.xyo.boundwitness",
2585
- $signatures: [
2586
- "8023f6d0e6c34389a07323492f700af79c642f0f807f3bd917c5cb3c486b33002c39fc5b29dd161516ce67ce0b00cea02aff9cabe76d608bc9a6a2b9beb231ff",
2587
- "d008f23ac16998053d44a9bce6d10a6dd46935e33fb999ed8e3779c61742ae0d0967228ed8745b2fff81470ff4a4badd99d12c8b7725698d963b1d55048cb4cf"
2588
- ],
2589
- $epoch: 0,
2590
- _dataHash: "9a00482ab8d76f796d4aa465b1a10669b5ef0f0d72d9dce7043003ed0dd737fb",
2591
- _hash: "0b124a776804a1a165b1ba90182fe91c07c30436452dd8271b799dd8fb29a0f7",
2592
- _sequence: "00000194ce6c57ce00000000fb29a0f7"
2593
- },
2594
- {
2595
- gas: "00",
2596
- block: "20",
2597
- step_hashes: [],
2598
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
2599
- previous: "0b124a776804a1a165b1ba90182fe91c07c30436452dd8271b799dd8fb29a0f7",
2600
- reward: "7530",
2601
- addresses: [
2602
- "d01885faa18c18ee20982bdf499b6152981a84c0",
2603
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
2604
- ],
2605
- payload_hashes: [],
2606
- payload_schemas: [],
2607
- previous_hashes: [
2608
- "0b124a776804a1a165b1ba90182fe91c07c30436452dd8271b799dd8fb29a0f7",
2609
- "9a00482ab8d76f796d4aa465b1a10669b5ef0f0d72d9dce7043003ed0dd737fb"
2610
- ],
2611
- schema: "network.xyo.boundwitness",
2612
- $signatures: [
2613
- "b3c642ead1de7a0a5ecb755cefd3c188faf5c29afccfd5f5331f469fed94f86477b4fc82318fab45d083628630f3913487ad1bdba47cc355a70365fb4ca4cfe0",
2614
- "72d0373fbef34d837186495476fe0cc75d58ace97232588dfe2535cd81e683dc2439e02d38720fb3f7695d295c8eed04824d9fb9cb97a3324111d1631daaf9d6"
2615
- ],
2616
- $epoch: 0,
2617
- _dataHash: "ab24cc87c3adadfdd1d8a366d3c9b573eeed9df24d0c953c0432a50e46ea3d57",
2618
- _hash: "e9db7723032a299503705e0af4866e0143182b4a66b38e7a29fa2bb2b23082d3",
2619
- _sequence: "00000194ce6c57e100000000b23082d3"
2620
- },
2621
- {
2622
- gas: "00",
2623
- block: "21",
2624
- step_hashes: [],
2625
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
2626
- previous: "e9db7723032a299503705e0af4866e0143182b4a66b38e7a29fa2bb2b23082d3",
2627
- reward: "7530",
2628
- addresses: [
2629
- "d01885faa18c18ee20982bdf499b6152981a84c0",
2630
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
2631
- ],
2632
- payload_hashes: [],
2633
- payload_schemas: [],
2634
- previous_hashes: [
2635
- "e9db7723032a299503705e0af4866e0143182b4a66b38e7a29fa2bb2b23082d3",
2636
- "ab24cc87c3adadfdd1d8a366d3c9b573eeed9df24d0c953c0432a50e46ea3d57"
2637
- ],
2638
- schema: "network.xyo.boundwitness",
2639
- $signatures: [
2640
- "01dfc5df1ee478d8bf79a3f7513d03eb030a3330d60fc99db9faf80143e1efaa1ef07a11985702eb15709d9d30d28faa4dce7aa2079da5beb097bd7392b2d941",
2641
- "e5895279d7081f2857619e2d1ba3efd0416888745e9d7b08033e610708b4d97378cb6788d523cfd1e9dc463f53de64b98cad326d9332e22b4bc561ecfd5b8ab3"
2642
- ],
2643
- $epoch: 0,
2644
- _dataHash: "0b29b106ac95dbc161735998a4a97ea806d5a5ca424cde0a8fa198d02dab91f7",
2645
- _hash: "ed39e4d4440402c1e974cdb95da8b34052440ccc48d80627161dbf6955cd6da5",
2646
- _sequence: "00000194ce6c57f40000000055cd6da5"
2647
- },
2648
- {
2649
- gas: "00",
2650
- block: "22",
2651
- step_hashes: [],
2652
- chain: "2aae728afd1777b79c34d79c4523797f9d9965b0",
2653
- previous: "ed39e4d4440402c1e974cdb95da8b34052440ccc48d80627161dbf6955cd6da5",
2654
- reward: "7530",
2655
- addresses: [
2656
- "d01885faa18c18ee20982bdf499b6152981a84c0",
2657
- "4019a3fd9e96337e00d598a6a13fb5a37d5f9018"
2658
- ],
2659
- payload_hashes: [],
2660
- payload_schemas: [],
2661
- previous_hashes: [
2662
- "ed39e4d4440402c1e974cdb95da8b34052440ccc48d80627161dbf6955cd6da5",
2663
- "0b29b106ac95dbc161735998a4a97ea806d5a5ca424cde0a8fa198d02dab91f7"
2664
- ],
2665
- schema: "network.xyo.boundwitness",
2666
- $signatures: [
2667
- "0b38f2eaade2eb2cb54050708d34543a308b5db9758bc7fc397c9f8b660e89d41e4ebb24318a58b2286b395571a901d747c5257eff9c8b73ea66a464e6c8583c",
2668
- "b69429bd5845bf2e9ae74fd5d2ee0909977fcdd1f82efaaae182feb7db7b1e4703a8da7e16712d6a492a898fab28024a5d5f715ef596c90a377f9faee40ae752"
2669
- ],
2670
- $epoch: 0,
2671
- _dataHash: "e1e28cc241f509ab3e40e8db3720169aafca9c6977113f1991e84df9cdaaf43a",
2672
- _hash: "664ac8088c1036206af47f9317ce7d1eaaed800a4179f4f2b075cc6c3925587f",
2673
- _sequence: "00000194ce6c5805000000003925587f"
2674
- }
2675
- ];
2676
-
2677
- // src/stories/ChainArchivistDecorator.tsx
2678
- var ChainArchivistDecorator = /* @__PURE__ */ __name((Story, context) => {
2679
- const [blockChainRenderProps, blockChainRenderPropsError] = usePromise7(async () => {
2680
- const chainArchivist = await MemoryArchivist.create({});
2681
- await chainArchivist.insert(ExampleBlockchainWithPayloads_default);
2682
- const { chainInformation } = await getChainInformation();
2683
- return {
2684
- chainArchivist,
2685
- chainInformation
2686
- };
2687
- }, []);
2688
- useEffect5(() => {
2689
- if (blockChainRenderPropsError) {
2690
- console.error(blockChainRenderPropsError);
2691
- }
2692
- }, [
2693
- blockChainRenderPropsError
2694
- ]);
2695
- const props = {
2696
- ...context,
2697
- args: {
2698
- ...context.args,
2699
- blockChainRenderProps: {
2700
- ...context.args.blockChainRenderProps,
2701
- ...blockChainRenderProps
2702
- }
2703
- }
2704
- };
2705
- return /* @__PURE__ */ React.createElement(Story, props);
2706
- }, "ChainArchivistDecorator");
2707
-
2708
- // src/stories/ChainArchivistDelayedInsertDecorator.tsx
2709
- import { delay } from "@xylabs/delay";
2710
- import { usePromise as usePromise8 } from "@xylabs/react-promise";
2711
- import { isBlockBoundWitness as isBlockBoundWitness4 } from "@xylabs/sdk-xyo-chain-js";
2712
- import { MemoryArchivist as MemoryArchivist2 } from "@xyo-network/archivist-memory";
2713
- var chainArchivistRef;
2714
- var ChainArchivistDelayedInsertDecorator = /* @__PURE__ */ __name((Story, context) => {
2715
- const [chainArchivist] = usePromise8(async () => {
2716
- if (chainArchivistRef) {
2717
- return chainArchivistRef;
2718
- } else {
2719
- chainArchivistRef = await MemoryArchivist2.create({});
2720
- return chainArchivistRef;
2721
- }
2722
- }, []);
2723
- usePromise8(async () => {
2724
- if (chainArchivist) {
2725
- const nextBlockPayloads = [];
2726
- for (const payload of ExampleBlockchainWithPayloads_default) {
2727
- if (isBlockBoundWitness4(payload)) {
2728
- nextBlockPayloads.push(payload);
2729
- await chainArchivist.insert(nextBlockPayloads);
2730
- console.log("inserted block");
2731
- nextBlockPayloads.length = 0;
2732
- await delay(1e3);
2733
- } else {
2734
- nextBlockPayloads.push(payload);
2735
- }
2736
- }
2737
- }
2738
- }, [
2739
- chainArchivist
2740
- ]);
2741
- const [blockChainRenderProps] = usePromise8(async () => {
2742
- const { chainInformation } = await getChainInformation();
2743
- return {
2744
- chainArchivist,
2745
- chainInformation
2746
- };
2747
- }, [
2748
- chainArchivist
2749
- ]);
2750
- const props = {
2751
- ...context,
2752
- args: {
2753
- ...context.args,
2754
- blockChainRenderProps: {
2755
- ...context.args.blockChainRenderProps,
2756
- ...blockChainRenderProps
2757
- }
2758
- }
2759
- };
2760
- return /* @__PURE__ */ React.createElement(Story, props);
2761
- }, "ChainArchivistDelayedInsertDecorator");
2762
-
2763
- // src/stories/ChainInfoContextDecorator.tsx
2764
- import { assertEx as assertEx5 } from "@xylabs/assert";
2765
- import { usePromise as usePromise9 } from "@xylabs/react-promise";
2766
- import { findFirstMatching as findFirstMatching2, isBlockBoundWitness as isBlockBoundWitness5, XyoChainBlockNumberIterator as XyoChainBlockNumberIterator3 } from "@xylabs/sdk-xyo-chain-js";
2767
- var archivistConfig = {
2768
- url: "http://localhost:8080",
2769
- chainArchivistModuleId: "XYOPublic:XYOChain:Chain"
2770
- };
2771
- var ChainInfoContextDecorator = /* @__PURE__ */ __name((Story, context) => {
2772
- const [chainInformationResponse] = usePromise9(async () => {
2773
- return await getChainInformation();
2774
- }, []);
2775
- const { chainInformation } = chainInformationResponse ?? {};
2776
- const [chainArchivist] = usePromise9(async () => {
2777
- return await getChainArchivistFromBridge(archivistConfig);
2778
- }, []);
2779
- const [chainIterator] = usePromise9(async () => {
2780
- if (chainArchivist && chainInformation) {
2781
- const firstMatch = assertEx5(await findFirstMatching2(chainArchivist), () => `No head found in archivist: ${chainArchivist.id} `);
2782
- const head = assertEx5(isBlockBoundWitness5(firstMatch) ? firstMatch : void 0, () => `Expected a block bound witness: ${JSON.stringify(firstMatch)}`);
2783
- return await XyoChainBlockNumberIterator3.create({
2784
- chainArchivist,
2785
- chainInformation,
2786
- head
2787
- });
2788
- }
2789
- }, [
2790
- chainArchivist,
2791
- chainInformation
2792
- ]);
2793
- return /* @__PURE__ */ React.createElement(ChainInfoProvider, {
2794
- chainArchivist,
2795
- chainInformation,
2796
- chainIterator
2797
- }, /* @__PURE__ */ React.createElement(Story, context));
2798
- }, "ChainInfoContextDecorator");
2799
- export {
2800
- BlockChainPagination,
2801
- BlockChainTableRow,
2802
- BlockHashTableCell,
2803
- BlockHeadingFlexbox,
2804
- BlockJsonViewTableCell,
2805
- BlockListWrapperFlexBox,
2806
- BlockNumberTableCell,
2807
- BlockProducerChip,
2808
- BlockProducerTableCell,
2809
- BlockTransactionCountTableCell,
2810
- BlockVerificationTableCell,
2811
- BlockchainTableEx,
2812
- ChainAnalyzerStatsDialog,
2813
- ChainAnalyzerStatsDialogFromContext,
2814
- ChainArchivistDecorator,
2815
- ChainArchivistDelayedInsertDecorator,
2816
- ChainInfoContextDecorator,
2817
- ChainIteratorStore,
2818
- ChainTransactionBuilder,
2819
- ChainTransactionNetwork,
2820
- DynamicBlockchainRenderFlexbox,
2821
- ExampleBlockchainWithPayloads_default as ExampleBlockchainWithPayloads,
2822
- MemoizedPollingControlsFlexbox,
2823
- PollingControlsFlexbox,
2824
- PulseSvgIcon,
2825
- StaticBlockchainRenderFlexBox,
2826
- StyledPulseSvgIcon,
2827
- SubmitChainTransaction,
2828
- TransactionCountChip,
2829
- TransactionsDialog,
2830
- TransactionsQuickTipButton,
2831
- blockProducer,
2832
- buildBlockChainRenderComponent,
2833
- buildBlockHeadingComponent,
2834
- resolveDefinedHead,
2835
- txsFromBlock,
2836
- useAnchorElement,
2837
- useBlockHeadingEvents,
2838
- useBlockProducer,
2839
- useChainIteratorParams,
2840
- useChainIteratorStore,
2841
- useChainIteratorUpdatingHead,
2842
- useChainPagination,
2843
- useDynamicBlockComponents,
2844
- useIterateChain,
2845
- useOnBlock,
2846
- useStaticBlockComponents,
2847
- useTxsFromBlock
2848
- };
2849
- //# sourceMappingURL=index.mjs.map