@xyo-network/react-chain-blockchain 1.3.8 → 1.3.9

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.
Files changed (104) hide show
  1. package/dist/browser/index.mjs +219 -270
  2. package/dist/browser/index.mjs.map +1 -1
  3. package/dist/types/components/block/ProducerChip.d.ts +1 -1
  4. package/dist/types/components/block/ProducerChip.d.ts.map +1 -1
  5. package/dist/types/components/block/helpers/blockProducer.d.ts +1 -1
  6. package/dist/types/components/block/helpers/blockProducer.d.ts.map +1 -1
  7. package/dist/types/components/block/helpers/payloadCountsFromBlock.d.ts +1 -1
  8. package/dist/types/components/block/helpers/payloadCountsFromBlock.d.ts.map +1 -1
  9. package/dist/types/components/block/hooks/useBlockProducer.d.ts +1 -1
  10. package/dist/types/components/block/hooks/useBlockProducer.d.ts.map +1 -1
  11. package/dist/types/components/block/hooks/useDynamicBlockComponents.d.ts +1 -1
  12. package/dist/types/components/block/hooks/useDynamicBlockComponents.d.ts.map +1 -1
  13. package/dist/types/components/block/hooks/usePayloadCountsFromBlock.d.ts +1 -1
  14. package/dist/types/components/block/hooks/usePayloadCountsFromBlock.d.ts.map +1 -1
  15. package/dist/types/components/block/hooks/useStaticBlockComponents.d.ts +1 -1
  16. package/dist/types/components/block/hooks/useStaticBlockComponents.d.ts.map +1 -1
  17. package/dist/types/components/block/menu/Expanded.d.ts +1 -1
  18. package/dist/types/components/block/menu/Expanded.d.ts.map +1 -1
  19. package/dist/types/components/block/table/cell/BlockNumber.d.ts.map +1 -1
  20. package/dist/types/components/block/table/cell/PayloadCounts.d.ts.map +1 -1
  21. package/dist/types/components/block/table/cell/TransactionCount.d.ts.map +1 -1
  22. package/dist/types/components/block/table/cell/Verification.d.ts +1 -0
  23. package/dist/types/components/block/table/cell/Verification.d.ts.map +1 -1
  24. package/dist/types/components/block/table/cell/hooks/useLinkedBlockItem.d.ts.map +1 -1
  25. package/dist/types/components/block/table/cell/lib/BlockTableCellProps.d.ts +1 -1
  26. package/dist/types/components/block/table/cell/lib/BlockTableCellProps.d.ts.map +1 -1
  27. package/dist/types/components/block/table/row/TableRow.d.ts +1 -0
  28. package/dist/types/components/block/table/row/TableRow.d.ts.map +1 -1
  29. package/dist/types/components/chain/hooks/useOnBlock.d.ts +1 -1
  30. package/dist/types/components/chain/hooks/useOnBlock.d.ts.map +1 -1
  31. package/dist/types/components/chain/render/dynamic/hooks/useDynamicBlockRenderComponents.d.ts +1 -1
  32. package/dist/types/components/transactions/TransactionsQuickTipButton.d.ts +1 -1
  33. package/dist/types/components/transactions/TransactionsQuickTipButton.d.ts.map +1 -1
  34. package/dist/types/components/transactions/submit/Builder.d.ts +1 -1
  35. package/dist/types/components/transactions/submit/Builder.d.ts.map +1 -1
  36. package/dist/types/context/analyzer/state.d.ts +1 -1
  37. package/dist/types/context/analyzer/state.d.ts.map +1 -1
  38. package/dist/types/context/chain/State.d.ts +1 -1
  39. package/dist/types/context/chain/State.d.ts.map +1 -1
  40. package/dist/types/helpers/txsFromBlock.d.ts +2 -2
  41. package/dist/types/helpers/txsFromBlock.d.ts.map +1 -1
  42. package/dist/types/hooks/chain-iterator/ChainIteratorStore.d.ts +1 -1
  43. package/dist/types/hooks/chain-iterator/ChainIteratorStore.d.ts.map +1 -1
  44. package/dist/types/hooks/chain-iterator/useChainIteratorParams.d.ts +3 -3
  45. package/dist/types/hooks/chain-iterator/useChainIteratorParams.d.ts.map +1 -1
  46. package/dist/types/hooks/chain-iterator/useChainIteratorStore.d.ts +1 -1
  47. package/dist/types/hooks/chain-iterator/useChainIteratorStore.d.ts.map +1 -1
  48. package/dist/types/hooks/chain-iterator/useChainIteratorUpdatingHead.d.ts +1 -1
  49. package/dist/types/hooks/chain-iterator/useChainIteratorUpdatingHead.d.ts.map +1 -1
  50. package/dist/types/hooks/useIterateChain.d.ts +1 -1
  51. package/dist/types/hooks/useIterateChain.d.ts.map +1 -1
  52. package/dist/types/hooks/useTxsFromBlock.d.ts +2 -2
  53. package/dist/types/hooks/useTxsFromBlock.d.ts.map +1 -1
  54. package/dist/types/lib/getChainInformation.d.ts +1 -1
  55. package/dist/types/lib/getChainInformation.d.ts.map +1 -1
  56. package/dist/types/stories/buildRandomBlockchain.d.ts +1 -1
  57. package/dist/types/stories/buildRandomBlockchain.d.ts.map +1 -1
  58. package/dist/types/types/BlockComponentProps.d.ts +1 -1
  59. package/dist/types/types/BlockComponentProps.d.ts.map +1 -1
  60. package/dist/types/types/BlockComponents.d.ts +1 -1
  61. package/dist/types/types/BlockComponents.d.ts.map +1 -1
  62. package/dist/types/types/render/BlockChainRenderProps.d.ts +1 -1
  63. package/dist/types/types/render/BlockChainRenderProps.d.ts.map +1 -1
  64. package/package.json +37 -37
  65. package/src/components/block/ProducerChip.tsx +1 -1
  66. package/src/components/block/helpers/blockProducer.ts +1 -1
  67. package/src/components/block/helpers/payloadCountsFromBlock.ts +1 -1
  68. package/src/components/block/hooks/useBlockProducer.ts +1 -1
  69. package/src/components/block/hooks/useDynamicBlockComponents.ts +1 -1
  70. package/src/components/block/hooks/usePayloadCountsFromBlock.ts +1 -1
  71. package/src/components/block/hooks/useStaticBlockComponents.ts +1 -1
  72. package/src/components/block/menu/Expanded.tsx +1 -1
  73. package/src/components/block/table/cell/BlockNumber.tsx +6 -15
  74. package/src/components/block/table/cell/JsonView.tsx +13 -13
  75. package/src/components/block/table/cell/PayloadCounts.tsx +7 -14
  76. package/src/components/block/table/cell/TransactionCount.tsx +2 -7
  77. package/src/components/block/table/cell/Verification.tsx +10 -8
  78. package/src/components/block/table/cell/hooks/useLinkedBlockItem.tsx +1 -0
  79. package/src/components/block/table/cell/lib/BlockTableCellProps.ts +1 -1
  80. package/src/components/block/table/head/TableHead.tsx +1 -1
  81. package/src/components/block/table/row/TableRow.tsx +17 -5
  82. package/src/components/chain/hooks/useOnBlock.ts +1 -1
  83. package/src/components/payload/builder/producer-intent/Form.tsx +1 -1
  84. package/src/components/payload/builder/transfer/Form.tsx +2 -2
  85. package/src/components/transactions/TransactionsQuickTipButton.tsx +1 -1
  86. package/src/components/transactions/submit/Builder.tsx +2 -2
  87. package/src/components/transactions/submit/SubmitChain.tsx +2 -2
  88. package/src/context/analyzer/Provider.tsx +1 -1
  89. package/src/context/analyzer/state.ts +1 -1
  90. package/src/context/chain/State.ts +1 -1
  91. package/src/helpers/txsFromBlock.ts +2 -2
  92. package/src/hooks/chain-iterator/ChainIteratorStore.ts +1 -1
  93. package/src/hooks/chain-iterator/useChainIteratorParams.ts +2 -2
  94. package/src/hooks/chain-iterator/useChainIteratorStore.ts +1 -1
  95. package/src/hooks/chain-iterator/useChainIteratorUpdatingHead.ts +1 -1
  96. package/src/hooks/useIterateChain.ts +2 -2
  97. package/src/hooks/useTxsFromBlock.ts +1 -1
  98. package/src/lib/getChainInformation.ts +1 -1
  99. package/src/stories/ChainArchivistDelayedInsertDecorator.tsx +1 -1
  100. package/src/stories/ChainInfoContextDecorator.tsx +1 -1
  101. package/src/stories/buildRandomBlockchain.ts +1 -1
  102. package/src/types/BlockComponentProps.ts +1 -1
  103. package/src/types/BlockComponents.ts +1 -1
  104. package/src/types/render/BlockChainRenderProps.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  import { BoundWitnessSchema } from '@xyo-network/boundwitness-model'
2
- import { type HydratedBlock, isTransactionBoundWitness } from '@xyo-network/xl1-model'
2
+ import { type HydratedBlock, isTransactionBoundWitness } from '@xyo-network/xl1-protocol'
3
3
 
4
4
  export const payloadCountsFromBlock = ([block, payloads]: HydratedBlock): [number, number] => {
5
5
  const publicPayloads = block.payload_schemas.filter(schema => schema !== BoundWitnessSchema)
@@ -1,4 +1,4 @@
1
- import type { HydratedBlock } from '@xyo-network/xl1-model'
1
+ import type { HydratedBlock } from '@xyo-network/xl1-protocol'
2
2
  import { useMemo } from 'react'
3
3
 
4
4
  export const useBlockProducer = (block?: HydratedBlock) => {
@@ -1,4 +1,4 @@
1
- import type { HydratedBlock, XyoChainIteratorParams } from '@xyo-network/xl1-model'
1
+ import type { HydratedBlock, XyoChainIteratorParams } from '@xyo-network/xl1-protocol'
2
2
  import type { ComponentType } from 'react'
3
3
  import { useState } from 'react'
4
4
 
@@ -1,4 +1,4 @@
1
- import type { HydratedBlock } from '@xyo-network/xl1-model'
1
+ import type { HydratedBlock } from '@xyo-network/xl1-protocol'
2
2
  import { useMemo } from 'react'
3
3
 
4
4
  import { payloadCountsFromBlock } from '../helpers/index.ts'
@@ -1,5 +1,5 @@
1
1
  import { usePromise } from '@xylabs/react-promise'
2
- import type { HydratedBlock, XyoChainIteratorParams } from '@xyo-network/xl1-model'
2
+ import type { HydratedBlock, XyoChainIteratorParams } from '@xyo-network/xl1-protocol'
3
3
  import type { ComponentType } from 'react'
4
4
 
5
5
  import { useChainAnalyzersContext } from '../../../context/index.ts'
@@ -1,7 +1,7 @@
1
1
  import { MoreVert } from '@mui/icons-material'
2
2
  import { IconButton, Menu } from '@mui/material'
3
3
  import { BWJsonMenuItem, BWPreviousHashMenuItem } from '@xyo-network/react-boundwitness-plugin'
4
- import type { HydratedBlock } from '@xyo-network/xl1-model'
4
+ import type { HydratedBlock } from '@xyo-network/xl1-protocol'
5
5
  import React from 'react'
6
6
 
7
7
  import { useAnchorElement } from '../hooks/index.ts'
@@ -1,10 +1,9 @@
1
1
  import {
2
- Link, TableCell, Tooltip,
2
+ TableCell, Tooltip,
3
+ Typography,
3
4
  } from '@mui/material'
4
5
  import React from 'react'
5
6
 
6
- import { BlockNumberChip } from './BlockNumberChip.tsx'
7
- import { useLinkedBlockItem } from './hooks/index.ts'
8
7
  import type { BlockTableCellProps } from './lib/index.ts'
9
8
 
10
9
  export interface BlockNumberTableCellProps extends BlockTableCellProps {}
@@ -13,21 +12,13 @@ export const BlockNumberTableCell: React.FC<BlockNumberTableCellProps> = ({
13
12
  block, linked, ...props
14
13
  }) => {
15
14
  const blockNumber = block?.[0].block
16
- const [ref, handleClick] = useLinkedBlockItem('block-number', blockNumber?.toString())
17
15
 
18
16
  return (
19
- <TableCell ref={ref} {...props}>
17
+ <TableCell {...props}>
20
18
  <Tooltip title={`Block Number: ${blockNumber}`}>
21
- <span>
22
- {linked && blockNumber !== undefined
23
- ? (
24
- <Link title={blockNumber?.toString()} onClick={handleClick} sx={{ cursor: 'pointer' }}>
25
- <BlockNumberChip blockNumber={blockNumber} size="small" />
26
- </Link>
27
- )
28
- : null}
29
- {!linked && <BlockNumberChip blockNumber={blockNumber} size="small" />}
30
- </span>
19
+ <Typography component="span" variant="body1">
20
+ {blockNumber}
21
+ </Typography>
31
22
  </Tooltip>
32
23
  </TableCell>
33
24
  )
@@ -22,23 +22,23 @@ export const BlockJsonViewTableCell: React.FC<BlockJsonViewTableCellProps> = ({
22
22
 
23
23
  return (
24
24
  <TableCell {...props}>
25
- <FlexRow sx={{ width: '100%' }}>
25
+ <FlexRow onClick={e => e.stopPropagation()} sx={{ width: '100%' }}>
26
26
  <IconButton onClick={() => setOpen(true)}>
27
27
  <DataObject />
28
28
  </IconButton>
29
+ <Dialog open={open} onClose={onClose}>
30
+ <DialogTitle>{title}</DialogTitle>
31
+ <DialogContent>
32
+ <JsonViewerEx value={block} />
33
+ </DialogContent>
34
+ <DialogActions sx={{
35
+ display: 'flex', flexDirection: 'row', justifyContent: 'end',
36
+ }}
37
+ >
38
+ <Button variant="contained" onClick={onClose}>Close</Button>
39
+ </DialogActions>
40
+ </Dialog>
29
41
  </FlexRow>
30
- <Dialog open={open} onClose={onClose}>
31
- <DialogTitle>{title}</DialogTitle>
32
- <DialogContent>
33
- <JsonViewerEx value={block} />
34
- </DialogContent>
35
- <DialogActions sx={{
36
- display: 'flex', flexDirection: 'row', justifyContent: 'end',
37
- }}
38
- >
39
- <Button variant="contained" onClick={onClose}>Close</Button>
40
- </DialogActions>
41
- </Dialog>
42
42
  </TableCell>
43
43
  )
44
44
  }
@@ -1,12 +1,8 @@
1
+ import { Error } from '@mui/icons-material'
1
2
  import {
2
- Error, Public, PublicOff,
3
- } from '@mui/icons-material'
4
- import {
5
- Chip,
6
3
  Link, TableCell, Tooltip,
7
4
  } from '@mui/material'
8
5
  import type { Hash } from '@xylabs/hex'
9
- import { FlexRow } from '@xylabs/react-flexbox'
10
6
  import React from 'react'
11
7
 
12
8
  import { usePayloadCountsFromBlock } from '../../hooks/index.ts'
@@ -32,6 +28,7 @@ export const BlockPayloadCountsTableCell: React.FC<BlockPayloadCountsTableCellPr
32
28
  block: block[0]._hash,
33
29
  }
34
30
  : undefined
31
+ const payloadCount = (publicPayloads ?? 0) + (privatePayloads ?? 0)
35
32
  const [ref, handleClick] = useLinkedBlockItem('payload-counts', data)
36
33
 
37
34
  return (
@@ -49,21 +46,17 @@ export const BlockPayloadCountsTableCell: React.FC<BlockPayloadCountsTableCellPr
49
46
  <Tooltip title={`Public Payloads: ${publicPayloads ?? '--'} Private Payloads: ${privatePayloads ?? '--'}`}>
50
47
  <Link
51
48
  onClick={handleClick}
52
- sx={{
53
- cursor: 'pointer', display: 'inline-flex', gap: 0.5,
54
- }}
49
+ sx={{ cursor: 'pointer' }}
55
50
  >
56
- <Chip avatar={<Public fontSize="small" />} label={publicPayloads ?? '--'} />
57
- <Chip avatar={<PublicOff fontSize="small" />} label={privatePayloads ?? '--'} />
51
+ {payloadCount}
58
52
  </Link>
59
53
  </Tooltip>
60
54
  )
61
55
  : (
62
56
  <Tooltip title={`Public Payloads: ${publicPayloads ?? '--'} Private Payloads: ${privatePayloads ?? '--'}`}>
63
- <FlexRow gap={0.5} justifyContent="left">
64
- <Chip avatar={<Public fontSize="small" />} label={publicPayloads ?? '--'} />
65
- <Chip avatar={<PublicOff fontSize="small" />} label={privatePayloads ?? '--'} />
66
- </FlexRow>
57
+ <span>
58
+ {payloadCount}
59
+ </span>
67
60
  </Tooltip>
68
61
  )}
69
62
  </span>
@@ -6,7 +6,6 @@ import type { Hash } from '@xylabs/hex'
6
6
  import React, { useMemo } from 'react'
7
7
 
8
8
  import { useTxsFromBlock } from '../../../../hooks/useTxsFromBlock.ts'
9
- import { TransactionCountChip } from '../../../transactions/index.ts'
10
9
  import { useLinkedBlockItem } from './hooks/index.ts'
11
10
  import type { BlockTableCellProps } from './lib/index.ts'
12
11
 
@@ -45,15 +44,11 @@ export const BlockTransactionCountTableCell: React.FC<BlockTransactionCountTable
45
44
  {linked
46
45
  ? (
47
46
  <Link onClick={handleClick} sx={{ cursor: 'pointer' }}>
48
- <TransactionCountChip
49
- transactions={txHashes}
50
- />
47
+ {txHashes?.length}
51
48
  </Link>
52
49
  )
53
50
  : (
54
- <TransactionCountChip
55
- transactions={txHashes}
56
- />
51
+ txHashes?.length
57
52
  )}
58
53
  </span>
59
54
  </TableCell>
@@ -1,22 +1,24 @@
1
+ import { CheckCircleOutlineRounded } from '@mui/icons-material'
1
2
  import { TableCell } from '@mui/material'
2
3
  import { FlexRow } from '@xylabs/react-flexbox'
3
4
  import { BWVerification } from '@xyo-network/react-boundwitness-plugin'
4
5
  import React from 'react'
5
6
 
6
- import { useLinkedBlockItem } from './hooks/index.ts'
7
7
  import type { BlockTableCellProps } from './lib/index.ts'
8
8
 
9
- export interface BlockVerificationTableCellProps extends BlockTableCellProps {}
9
+ export interface BlockVerificationTableCellProps extends BlockTableCellProps {
10
+ deepValidation?: boolean
11
+ }
10
12
 
11
13
  export const BlockVerificationTableCell: React.FC<BlockVerificationTableCellProps> = ({
12
- block, linked, ...props
14
+ block, linked, deepValidation, ...props
13
15
  }) => {
14
- const [ref, handleClick] = useLinkedBlockItem('block-verification', block?.[0].block.toString())
15
-
16
16
  return (
17
- <TableCell ref={ref} {...props}>
18
- <FlexRow sx={{ width: '100%' }}>
19
- <BWVerification onClick={linked ? handleClick : undefined} iconColors boundwitness={block?.[0]} />
17
+ <TableCell {...props}>
18
+ <FlexRow onClick={e => e.stopPropagation()} sx={{ width: '100%' }}>
19
+ {deepValidation
20
+ ? <BWVerification iconColors boundwitness={block?.[0]} />
21
+ : <CheckCircleOutlineRounded color="success" />}
20
22
  </FlexRow>
21
23
  </TableCell>
22
24
  )
@@ -8,6 +8,7 @@ export const useLinkedBlockItem = (noun?: BlockHeaderEventNouns, data?: string |
8
8
 
9
9
  const handleClick = (event: React.MouseEvent) => {
10
10
  event.preventDefault()
11
+ event.stopPropagation()
11
12
  if (!noun) {
12
13
  console.warn('useLinkedBlockItem: noun is required')
13
14
  return
@@ -1,5 +1,5 @@
1
1
  import type { TableCellProps } from '@mui/material'
2
- import type { HydratedBlock } from '@xyo-network/xl1-model'
2
+ import type { HydratedBlock } from '@xyo-network/xl1-protocol'
3
3
 
4
4
  export interface BlockTableCellProps extends TableCellProps {
5
5
  block?: HydratedBlock
@@ -30,7 +30,7 @@ export const BlockchainTableHead: React.FC = () => {
30
30
  <TableRow>
31
31
  <ToolTipTableCell align="left" title="The block number that is included in the block">Block</ToolTipTableCell>
32
32
  <ToolTipTableCell title="The hash of the block">Block Hash</ToolTipTableCell>
33
- <ToolTipTableCell align="left" title="The address of the block producer that produced the block">Block Producer</ToolTipTableCell>
33
+ {/* <ToolTipTableCell align="left" title="The address of the block producer that produced the block">Block Producer</ToolTipTableCell> */}
34
34
  <ToolTipTableCell align="left" title="Count of transactions that are included in the block">Transactions</ToolTipTableCell>
35
35
  <ToolTipTableCell align="left" title="Count of public and private payload counts for the block">Payloads</ToolTipTableCell>
36
36
  <ToolTipTableCell align="center" title="The result of the local validation check for the block">Valid</ToolTipTableCell>
@@ -1,39 +1,51 @@
1
1
  import type { TableRowProps } from '@mui/material'
2
2
  import { TableRow, useTheme } from '@mui/material'
3
3
  import { alphaCss } from '@xylabs/react-theme'
4
+ import { usePayloadRootHash } from '@xyo-network/react-shared'
5
+ import type { Ref } from 'react'
4
6
  import React, { useMemo } from 'react'
5
7
 
6
8
  import type { BlockComponentProps } from '../../../../types/index.ts'
9
+ import { useLinkedBlockItem } from '../cell/hooks/index.ts'
7
10
  import {
8
- BlockHashTableCell, BlockJsonViewTableCell, BlockNumberTableCell, BlockPayloadCountsTableCell, BlockProducerTableCell,
11
+ BlockHashTableCell, BlockJsonViewTableCell, BlockNumberTableCell, BlockPayloadCountsTableCell,
9
12
  BlockTransactionCountTableCell,
10
13
  BlockVerificationTableCell,
11
14
  } from '../cell/index.ts'
12
15
 
13
16
  export interface BlockChainTableRowProps extends BlockComponentProps, TableRowProps {
17
+ deepValidation?: boolean
14
18
  linked?: boolean
15
19
  }
16
20
 
17
21
  export const BlockChainTableRow: React.FC<BlockChainTableRowProps> = ({
18
- block, defaultExpanded, linked, sx, ...props
22
+ block, deepValidation, defaultExpanded, linked, sx, ...props
19
23
  }) => {
20
24
  const linkedTableCellProps = useMemo(() => ({ block, linked }), [block, linked])
21
25
  const defaultTableCellProps = useMemo(() => ({ block }), [block])
26
+ const hash = usePayloadRootHash(block?.[0])
27
+ const [ref, handleClick] = useLinkedBlockItem('block-hash', hash)
22
28
  const theme = useTheme()
23
29
 
24
30
  return (
25
31
  <TableRow
32
+ onClick={linked ? handleClick : undefined}
33
+ ref={ref as Ref<HTMLTableRowElement> | undefined}
26
34
  sx={{
27
- 'overflowY': 'scroll', '&:hover': { backgroundColor: alphaCss(theme.vars.palette.secondary.light, 0.85) }, ...sx,
35
+ 'cursor': linked ? 'pointer' : 'default',
36
+ 'overflowY': 'scroll',
37
+ '&:hover': { backgroundColor: alphaCss(theme.vars.palette.secondary.light, 0.85) },
38
+ ...sx,
28
39
  }}
29
40
  {...props}
30
41
  >
31
42
  <BlockNumberTableCell align="left" {...linkedTableCellProps} />
32
43
  <BlockHashTableCell align="left" {...linkedTableCellProps} />
33
- <BlockProducerTableCell align="left" {...linkedTableCellProps} />
44
+ {/* Bring back once we have more data to show that is producer specific */}
45
+ {/* <BlockProducerTableCell align="left" {...linkedTableCellProps} /> */}
34
46
  <BlockTransactionCountTableCell align="left" {...linkedTableCellProps} />
35
47
  <BlockPayloadCountsTableCell align="left" {...linkedTableCellProps} />
36
- <BlockVerificationTableCell {...defaultTableCellProps} />
48
+ <BlockVerificationTableCell deepValidation={deepValidation} {...defaultTableCellProps} />
37
49
  <BlockJsonViewTableCell {...defaultTableCellProps} />
38
50
  </TableRow>
39
51
  )
@@ -1,4 +1,4 @@
1
- import type { HydratedBlock } from '@xyo-network/xl1-model'
1
+ import type { HydratedBlock } from '@xyo-network/xl1-protocol'
2
2
  import { useEffect, useRef } from 'react'
3
3
 
4
4
  export type PollingState = 'paused' | 'running'
@@ -1,7 +1,7 @@
1
1
  import { Button, FormControl } from '@mui/material'
2
2
  import type { Address } from '@xylabs/hex'
3
3
  import { createProducerChainStakeIntent } from '@xyo-network/chain-ethereum'
4
- import type { ChainStakeIntent } from '@xyo-network/xl1-model'
4
+ import type { ChainStakeIntent } from '@xyo-network/xl1-protocol'
5
5
  import type { MouseEventHandler } from 'react'
6
6
  import React, { useMemo, useState } from 'react'
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { Button, FormControl } from '@mui/material'
2
2
  import type { Address } from '@xylabs/hex'
3
- import type { Transfer } from '@xyo-network/xl1-model'
4
- import { TransferSchema } from '@xyo-network/xl1-model'
3
+ import type { Transfer } from '@xyo-network/xl1-protocol'
4
+ import { TransferSchema } from '@xyo-network/xl1-protocol'
5
5
  import type { MouseEventHandler } from 'react'
6
6
  import React, { useMemo, useState } from 'react'
7
7
 
@@ -9,7 +9,7 @@ import {
9
9
  } from '@xylabs/react-flexbox'
10
10
  import type { QuickTipButtonProps } from '@xylabs/react-quick-tip-button'
11
11
  import { QuickTipButton } from '@xylabs/react-quick-tip-button'
12
- import type { HydratedBlock } from '@xyo-network/xl1-model'
12
+ import type { HydratedBlock } from '@xyo-network/xl1-protocol'
13
13
  import React, {
14
14
  Fragment, useMemo, useState,
15
15
  } from 'react'
@@ -3,8 +3,8 @@ import {
3
3
  } from '@mui/material'
4
4
  import { type Address, toHex } from '@xylabs/hex'
5
5
  import { FlexCol } from '@xylabs/react-flexbox'
6
- import type { TransactionBoundWitnessFields } from '@xyo-network/xl1-model'
7
- import { defaultFees } from '@xyo-network/xl1-protocol'
6
+ import type { TransactionBoundWitnessFields } from '@xyo-network/xl1-protocol'
7
+ import { defaultFees } from '@xyo-network/xl1-protocol-sdk'
8
8
  import React from 'react'
9
9
 
10
10
  export interface ChainTransactionBuilder {
@@ -11,8 +11,8 @@ import { QueryBoundWitnessBuilder } from '@xyo-network/boundwitness-builder'
11
11
  import type { ModuleQueryResult } from '@xyo-network/module-model'
12
12
  import { PayloadBuilder } from '@xyo-network/payload-builder'
13
13
  import type { Payload } from '@xyo-network/payload-model'
14
- import type { TransactionBoundWitnessFields } from '@xyo-network/xl1-model'
15
- import { buildTransaction } from '@xyo-network/xl1-protocol'
14
+ import type { TransactionBoundWitnessFields } from '@xyo-network/xl1-protocol'
15
+ import { buildTransaction } from '@xyo-network/xl1-protocol-sdk'
16
16
  import React, { useState } from 'react'
17
17
 
18
18
  import { ChainTransactionBuilder } from './Builder.tsx'
@@ -1,4 +1,4 @@
1
- import type { HydratedBlock } from '@xyo-network/xl1-model'
1
+ import type { HydratedBlock } from '@xyo-network/xl1-protocol'
2
2
  import type { PropsWithChildren } from 'react'
3
3
  import React, {
4
4
  useCallback, useMemo, useState,
@@ -1,5 +1,5 @@
1
1
  import type { ContextExState } from '@xyo-network/react-shared'
2
- import type { ChainAnalyzer, HydratedBlock } from '@xyo-network/xl1-model'
2
+ import type { ChainAnalyzer, HydratedBlock } from '@xyo-network/xl1-protocol'
3
3
 
4
4
  export type ChainAnalyzerIds = 'producers'
5
5
 
@@ -1,6 +1,6 @@
1
1
  import type { ArchivistInstance } from '@xyo-network/archivist-model'
2
2
  import type { ContextExState } from '@xyo-network/react-shared'
3
- import type { ChainBlockNumberIterator, ChainInformation } from '@xyo-network/xl1-model'
3
+ import type { ChainBlockNumberIterator, ChainInformation } from '@xyo-network/xl1-protocol'
4
4
 
5
5
  export interface ChainInfoState extends ContextExState {
6
6
  chainArchivist?: ArchivistInstance
@@ -1,6 +1,6 @@
1
1
  import { PayloadBuilder } from '@xyo-network/payload-builder'
2
- import type { HydratedBlock } from '@xyo-network/xl1-model'
3
- import { isTransactionBoundWitness } from '@xyo-network/xl1-model'
2
+ import type { HydratedBlock } from '@xyo-network/xl1-protocol'
3
+ import { isTransactionBoundWitness } from '@xyo-network/xl1-protocol'
4
4
 
5
5
  export const txsFromBlock = async (block: HydratedBlock) => {
6
6
  const transactionPayloads = block[1].filter(payload => isTransactionBoundWitness(payload))
@@ -6,7 +6,7 @@ import type {
6
6
  EventingChainBlockNumberIterator, HeadEventArgs,
7
7
  HydratedBlock,
8
8
  XyoChainIteratorParams,
9
- } from '@xyo-network/xl1-model'
9
+ } from '@xyo-network/xl1-protocol'
10
10
 
11
11
  export type Listener = (...args: Array<unknown>) => void
12
12
 
@@ -3,8 +3,8 @@ import type { Hash } from '@xylabs/hex'
3
3
  import { usePromise } from '@xylabs/react-promise'
4
4
  import type { ReadArchivist } from '@xyo-network/archivist-model'
5
5
  import { BoundWitnessBuilder } from '@xyo-network/boundwitness-builder'
6
- import type { BlockBoundWitness } from '@xyo-network/xl1-model'
7
- import { isBlockBoundWitness } from '@xyo-network/xl1-model'
6
+ import type { BlockBoundWitness } from '@xyo-network/xl1-protocol'
7
+ import { isBlockBoundWitness } from '@xyo-network/xl1-protocol'
8
8
 
9
9
  import type { BlockChainIterator } from '../../types/index.ts'
10
10
 
@@ -1,5 +1,5 @@
1
1
  import { usePromise } from '@xylabs/react-promise'
2
- import type { XyoChainIteratorParams } from '@xyo-network/xl1-model'
2
+ import type { XyoChainIteratorParams } from '@xyo-network/xl1-protocol'
3
3
  import {
4
4
  useEffect,
5
5
  useMemo, useRef, useSyncExternalStore,
@@ -1,7 +1,7 @@
1
1
  import { toHex } from '@xylabs/hex'
2
2
  import type { ArchivistInstance } from '@xyo-network/archivist-model'
3
3
  import { findMostRecentBlock } from '@xyo-network/chain-protocol'
4
- import type { ChainBlockNumberIterator } from '@xyo-network/xl1-model'
4
+ import type { ChainBlockNumberIterator } from '@xyo-network/xl1-protocol'
5
5
  import { useEffect, useState } from 'react'
6
6
 
7
7
  export interface ChainIteratorUpdatingHeadParams {
@@ -6,8 +6,8 @@ import { XyoChainBlockNumberIterator } from '@xyo-network/chain-services'
6
6
  import { PayloadBuilder } from '@xyo-network/payload-builder'
7
7
  import type {
8
8
  BlockBoundWitness, HydratedBlock, XyoChainIteratorParams,
9
- } from '@xyo-network/xl1-model'
10
- import { isBlockBoundWitness } from '@xyo-network/xl1-model'
9
+ } from '@xyo-network/xl1-protocol'
10
+ import { isBlockBoundWitness } from '@xyo-network/xl1-protocol'
11
11
 
12
12
  const getHydratedBlock = async (chainArchivist: ReadArchivist, head: BlockBoundWitness) => {
13
13
  const headHash = await PayloadBuilder.hash(head)
@@ -1,5 +1,5 @@
1
1
  import { usePromise } from '@xylabs/react-promise'
2
- import { type HydratedBlock } from '@xyo-network/xl1-model'
2
+ import { type HydratedBlock } from '@xyo-network/xl1-protocol'
3
3
 
4
4
  import { txsFromBlock } from '../helpers/txsFromBlock.ts'
5
5
 
@@ -1,5 +1,5 @@
1
1
  import type { Promisable } from '@xylabs/promise'
2
- import type { ChainInformation } from '@xyo-network/xl1-model'
2
+ import type { ChainInformation } from '@xyo-network/xl1-protocol'
3
3
 
4
4
  const id = 'ce080bf3043a40c6c8838c7e813c00ab53df1684'
5
5
 
@@ -5,7 +5,7 @@ import { usePromise } from '@xylabs/react-promise'
5
5
  import { MemoryArchivist } from '@xyo-network/archivist-memory'
6
6
  import { ArchivistConfigSchema } from '@xyo-network/archivist-model'
7
7
  import { flattenHydratedBlock } from '@xyo-network/chain-protocol'
8
- import type { BlockBoundWitness } from '@xyo-network/xl1-model'
8
+ import type { BlockBoundWitness } from '@xyo-network/xl1-protocol'
9
9
  import React, { useEffect, useState } from 'react'
10
10
 
11
11
  import { getChainInformation } from '../lib/index.ts'
@@ -3,7 +3,7 @@ import { assertEx } from '@xylabs/assert'
3
3
  import { usePromise } from '@xylabs/react-promise'
4
4
  import { XyoChainBlockNumberIterator } from '@xyo-network/chain-services'
5
5
  import { findFirstMatching } from '@xyo-network/chain-utils'
6
- import { isBlockBoundWitness } from '@xyo-network/xl1-model'
6
+ import { isBlockBoundWitness } from '@xyo-network/xl1-protocol'
7
7
  import React from 'react'
8
8
 
9
9
  import { ChainInfoProvider } from '../context/index.ts'
@@ -1,6 +1,6 @@
1
1
  import { Account } from '@xyo-network/account'
2
2
  import { buildRandomChain } from '@xyo-network/chain-ethereum'
3
- import type { HydratedBlock } from '@xyo-network/xl1-model'
3
+ import type { HydratedBlock } from '@xyo-network/xl1-protocol'
4
4
 
5
5
  export const buildRandomBlockChain = async (blockCount = 10) => {
6
6
  // Create a producer
@@ -1,5 +1,5 @@
1
1
  import type { Hash } from '@xylabs/hex'
2
- import type { HydratedBlock } from '@xyo-network/xl1-model'
2
+ import type { HydratedBlock } from '@xyo-network/xl1-protocol'
3
3
 
4
4
  /** Interface for all components that render a single block */
5
5
  export interface BlockComponentProps {
@@ -1,5 +1,5 @@
1
1
  import type { NodesWithKeys } from '@xylabs/react-animation'
2
- import type { HydratedBlock } from '@xyo-network/xl1-model'
2
+ import type { HydratedBlock } from '@xyo-network/xl1-protocol'
3
3
 
4
4
  /** Interface for all block components meant to be rendered in a chain */
5
5
  export interface BlockChainRenderComponent extends NodesWithKeys {
@@ -1,6 +1,6 @@
1
1
  import type { Hash } from '@xylabs/hex'
2
2
  import type { ArchivistInstance } from '@xyo-network/archivist-model'
3
- import type { ChainInformation } from '@xyo-network/xl1-model'
3
+ import type { ChainInformation } from '@xyo-network/xl1-protocol'
4
4
 
5
5
  /** Props that control the rendering (not blockchain specific) */
6
6
  export interface RenderProps {