@xyo-network/react-chain-blockchain 1.3.7 → 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 (109) hide show
  1. package/dist/browser/index.mjs +99 -98
  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/BlockNumberChip.d.ts +7 -0
  21. package/dist/types/components/block/table/cell/BlockNumberChip.d.ts.map +1 -0
  22. package/dist/types/components/block/table/cell/PayloadCounts.d.ts.map +1 -1
  23. package/dist/types/components/block/table/cell/Producer.d.ts.map +1 -1
  24. package/dist/types/components/block/table/cell/TransactionCount.d.ts.map +1 -1
  25. package/dist/types/components/block/table/cell/Verification.d.ts +1 -0
  26. package/dist/types/components/block/table/cell/Verification.d.ts.map +1 -1
  27. package/dist/types/components/block/table/cell/hooks/useLinkedBlockItem.d.ts.map +1 -1
  28. package/dist/types/components/block/table/cell/lib/BlockTableCellProps.d.ts +1 -1
  29. package/dist/types/components/block/table/cell/lib/BlockTableCellProps.d.ts.map +1 -1
  30. package/dist/types/components/block/table/row/TableRow.d.ts +1 -0
  31. package/dist/types/components/block/table/row/TableRow.d.ts.map +1 -1
  32. package/dist/types/components/chain/hooks/useOnBlock.d.ts +1 -1
  33. package/dist/types/components/chain/hooks/useOnBlock.d.ts.map +1 -1
  34. package/dist/types/components/chain/render/dynamic/hooks/useDynamicBlockRenderComponents.d.ts +1 -1
  35. package/dist/types/components/transactions/TransactionsQuickTipButton.d.ts +1 -1
  36. package/dist/types/components/transactions/TransactionsQuickTipButton.d.ts.map +1 -1
  37. package/dist/types/components/transactions/submit/Builder.d.ts +1 -1
  38. package/dist/types/components/transactions/submit/Builder.d.ts.map +1 -1
  39. package/dist/types/context/analyzer/state.d.ts +1 -1
  40. package/dist/types/context/analyzer/state.d.ts.map +1 -1
  41. package/dist/types/context/chain/State.d.ts +1 -1
  42. package/dist/types/context/chain/State.d.ts.map +1 -1
  43. package/dist/types/helpers/txsFromBlock.d.ts +2 -2
  44. package/dist/types/helpers/txsFromBlock.d.ts.map +1 -1
  45. package/dist/types/hooks/chain-iterator/ChainIteratorStore.d.ts +1 -1
  46. package/dist/types/hooks/chain-iterator/ChainIteratorStore.d.ts.map +1 -1
  47. package/dist/types/hooks/chain-iterator/useChainIteratorParams.d.ts +3 -3
  48. package/dist/types/hooks/chain-iterator/useChainIteratorParams.d.ts.map +1 -1
  49. package/dist/types/hooks/chain-iterator/useChainIteratorStore.d.ts +1 -1
  50. package/dist/types/hooks/chain-iterator/useChainIteratorStore.d.ts.map +1 -1
  51. package/dist/types/hooks/chain-iterator/useChainIteratorUpdatingHead.d.ts +1 -1
  52. package/dist/types/hooks/chain-iterator/useChainIteratorUpdatingHead.d.ts.map +1 -1
  53. package/dist/types/hooks/useIterateChain.d.ts +1 -1
  54. package/dist/types/hooks/useIterateChain.d.ts.map +1 -1
  55. package/dist/types/hooks/useTxsFromBlock.d.ts +2 -2
  56. package/dist/types/hooks/useTxsFromBlock.d.ts.map +1 -1
  57. package/dist/types/lib/getChainInformation.d.ts +1 -1
  58. package/dist/types/lib/getChainInformation.d.ts.map +1 -1
  59. package/dist/types/stories/buildRandomBlockchain.d.ts +1 -1
  60. package/dist/types/stories/buildRandomBlockchain.d.ts.map +1 -1
  61. package/dist/types/types/BlockComponentProps.d.ts +1 -1
  62. package/dist/types/types/BlockComponentProps.d.ts.map +1 -1
  63. package/dist/types/types/BlockComponents.d.ts +1 -1
  64. package/dist/types/types/BlockComponents.d.ts.map +1 -1
  65. package/dist/types/types/render/BlockChainRenderProps.d.ts +1 -1
  66. package/dist/types/types/render/BlockChainRenderProps.d.ts.map +1 -1
  67. package/package.json +37 -36
  68. package/src/components/block/ProducerChip.tsx +1 -1
  69. package/src/components/block/helpers/blockProducer.ts +1 -1
  70. package/src/components/block/helpers/payloadCountsFromBlock.ts +1 -1
  71. package/src/components/block/hooks/useBlockProducer.ts +1 -1
  72. package/src/components/block/hooks/useDynamicBlockComponents.ts +1 -1
  73. package/src/components/block/hooks/usePayloadCountsFromBlock.ts +1 -1
  74. package/src/components/block/hooks/useStaticBlockComponents.ts +1 -1
  75. package/src/components/block/menu/Expanded.tsx +1 -1
  76. package/src/components/block/table/cell/BlockNumber.tsx +8 -15
  77. package/src/components/block/table/cell/BlockNumberChip.tsx +11 -0
  78. package/src/components/block/table/cell/JsonView.tsx +13 -13
  79. package/src/components/block/table/cell/PayloadCounts.tsx +19 -3
  80. package/src/components/block/table/cell/Producer.tsx +1 -4
  81. package/src/components/block/table/cell/TransactionCount.tsx +2 -8
  82. package/src/components/block/table/cell/Verification.tsx +10 -8
  83. package/src/components/block/table/cell/hooks/useLinkedBlockItem.tsx +1 -0
  84. package/src/components/block/table/cell/lib/BlockTableCellProps.ts +1 -1
  85. package/src/components/block/table/head/TableHead.tsx +4 -4
  86. package/src/components/block/table/row/TableRow.tsx +30 -10
  87. package/src/components/chain/hooks/useOnBlock.ts +1 -1
  88. package/src/components/payload/builder/producer-intent/Form.tsx +1 -1
  89. package/src/components/payload/builder/transfer/Form.tsx +2 -2
  90. package/src/components/transactions/TransactionsQuickTipButton.tsx +1 -1
  91. package/src/components/transactions/submit/Builder.tsx +2 -2
  92. package/src/components/transactions/submit/SubmitChain.tsx +2 -2
  93. package/src/context/analyzer/Provider.tsx +1 -1
  94. package/src/context/analyzer/state.ts +1 -1
  95. package/src/context/chain/State.ts +1 -1
  96. package/src/helpers/txsFromBlock.ts +2 -2
  97. package/src/hooks/chain-iterator/ChainIteratorStore.ts +1 -1
  98. package/src/hooks/chain-iterator/useChainIteratorParams.ts +2 -2
  99. package/src/hooks/chain-iterator/useChainIteratorStore.ts +1 -1
  100. package/src/hooks/chain-iterator/useChainIteratorUpdatingHead.ts +1 -1
  101. package/src/hooks/useIterateChain.ts +2 -2
  102. package/src/hooks/useTxsFromBlock.ts +1 -1
  103. package/src/lib/getChainInformation.ts +1 -1
  104. package/src/stories/ChainArchivistDelayedInsertDecorator.tsx +1 -1
  105. package/src/stories/ChainInfoContextDecorator.tsx +1 -1
  106. package/src/stories/buildRandomBlockchain.ts +1 -1
  107. package/src/types/BlockComponentProps.ts +1 -1
  108. package/src/types/BlockComponents.ts +1 -1
  109. package/src/types/render/BlockChainRenderProps.ts +1 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "http://json.schemastore.org/package.json",
3
3
  "name": "@xyo-network/react-chain-blockchain",
4
- "version": "1.3.7",
4
+ "version": "1.3.9",
5
5
  "description": "XYO Layer One React SDK Blockchain",
6
6
  "homepage": "https://xylabs.com",
7
7
  "bugs": {
@@ -37,39 +37,40 @@
37
37
  "package-cycle": "echo Nothing to do"
38
38
  },
39
39
  "dependencies": {
40
- "@xylabs/assert": "^4.8.7",
41
- "@xylabs/axios": "^4.8.7",
42
- "@xylabs/eth-address": "^4.8.7",
43
- "@xylabs/exists": "^4.8.7",
44
- "@xylabs/hex": "^4.8.7",
45
- "@xylabs/promise": "^4.8.7",
46
- "@xylabs/react-animation": "^6.2.11",
47
- "@xylabs/react-error": "^6.2.11",
48
- "@xylabs/react-flexbox": "^6.2.11",
49
- "@xylabs/react-identicon": "^6.2.11",
50
- "@xylabs/react-promise": "^6.2.11",
51
- "@xylabs/react-quick-tip-button": "^6.2.11",
52
- "@xyo-network/account": "^3.14.13",
53
- "@xyo-network/api-models": "^3.14.13",
54
- "@xyo-network/archivist-model": "^3.14.13",
55
- "@xyo-network/boundwitness-builder": "^3.14.13",
56
- "@xyo-network/boundwitness-model": "^3.14.13",
57
- "@xyo-network/bridge-http": "^3.14.13",
58
- "@xyo-network/chain-ethereum": "^1.3.7",
59
- "@xyo-network/chain-protocol": "^1.3.7",
60
- "@xyo-network/chain-services": "^1.3.7",
61
- "@xyo-network/module-model": "^3.14.13",
62
- "@xyo-network/payload-builder": "^3.14.13",
63
- "@xyo-network/payload-model": "^3.14.13",
40
+ "@xylabs/assert": "^4.8.9",
41
+ "@xylabs/axios": "^4.8.9",
42
+ "@xylabs/eth-address": "^4.8.9",
43
+ "@xylabs/exists": "^4.8.9",
44
+ "@xylabs/hex": "^4.8.9",
45
+ "@xylabs/promise": "^4.8.9",
46
+ "@xylabs/react-animation": "^6.2.13",
47
+ "@xylabs/react-error": "^6.2.13",
48
+ "@xylabs/react-flexbox": "^6.2.13",
49
+ "@xylabs/react-identicon": "^6.2.13",
50
+ "@xylabs/react-promise": "^6.2.13",
51
+ "@xylabs/react-quick-tip-button": "^6.2.13",
52
+ "@xylabs/react-theme": "^6.2.13",
53
+ "@xyo-network/account": "^3.14.15",
54
+ "@xyo-network/api-models": "^3.14.15",
55
+ "@xyo-network/archivist-model": "^3.14.15",
56
+ "@xyo-network/boundwitness-builder": "^3.14.15",
57
+ "@xyo-network/boundwitness-model": "^3.14.15",
58
+ "@xyo-network/bridge-http": "^3.14.15",
59
+ "@xyo-network/chain-ethereum": "^1.3.9",
60
+ "@xyo-network/chain-protocol": "^1.3.9",
61
+ "@xyo-network/chain-services": "^1.3.9",
62
+ "@xyo-network/module-model": "^3.14.15",
63
+ "@xyo-network/payload-builder": "^3.14.15",
64
+ "@xyo-network/payload-model": "^3.14.15",
64
65
  "@xyo-network/react-boundwitness-plugin": "^5.2.5",
65
- "@xyo-network/react-chain-blockies": "^1.3.7",
66
+ "@xyo-network/react-chain-blockies": "^1.3.9",
66
67
  "@xyo-network/react-event": "^5.2.5",
67
68
  "@xyo-network/react-payload-raw-info": "^5.2.5",
68
69
  "@xyo-network/react-payload-table": "^5.2.5",
69
70
  "@xyo-network/react-shared": "^5.2.5",
70
71
  "@xyo-network/react-table": "^5.2.5",
71
- "@xyo-network/xl1-model": "^1.3.7",
72
- "@xyo-network/xl1-protocol": "^1.3.7"
72
+ "@xyo-network/xl1-protocol": "^1.3.9",
73
+ "@xyo-network/xl1-protocol-sdk": "^1.3.9"
73
74
  },
74
75
  "devDependencies": {
75
76
  "@emotion/react": "^11.14.0",
@@ -78,16 +79,16 @@
78
79
  "@mui/material": "^7.0.2",
79
80
  "@storybook/react": "^8.6.12",
80
81
  "@types/react": "^19.1.2",
81
- "@xylabs/delay": "^4.8.7",
82
- "@xylabs/hex": "^4.8.7",
83
- "@xylabs/ts-scripts-yarn3": "^6.3.5",
84
- "@xylabs/tsconfig-react": "^6.3.5",
85
- "@xyo-network/archivist-memory": "^3.14.13",
86
- "@xyo-network/chain-utils": "^1.3.7",
87
- "knip": "^5.50.5",
82
+ "@xylabs/delay": "^4.8.9",
83
+ "@xylabs/hex": "^4.8.9",
84
+ "@xylabs/ts-scripts-yarn3": "^6.4.6",
85
+ "@xylabs/tsconfig-react": "^6.4.6",
86
+ "@xyo-network/archivist-memory": "^3.14.15",
87
+ "@xyo-network/chain-utils": "^1.3.9",
88
+ "knip": "^5.51.0",
88
89
  "react": "^19.1.0",
89
90
  "react-dom": "^19.1.0",
90
- "react-router-dom": "^7.5.2",
91
+ "react-router-dom": "^7.5.3",
91
92
  "storybook": "^8.6.12",
92
93
  "typescript": "^5.8.3"
93
94
  },
@@ -2,7 +2,7 @@ import type { ChipProps } from '@mui/material'
2
2
  import { Chip } from '@mui/material'
3
3
  import { EthAddress } from '@xylabs/eth-address'
4
4
  import { BlockiesAvatar } from '@xyo-network/react-chain-blockies'
5
- import type { HydratedBlock } from '@xyo-network/xl1-model'
5
+ import type { HydratedBlock } from '@xyo-network/xl1-protocol'
6
6
  import React, { useMemo } from 'react'
7
7
 
8
8
  export interface BlockProducerChipProps extends ChipProps {
@@ -1,4 +1,4 @@
1
- import type { BlockBoundWitness } from '@xyo-network/xl1-model'
1
+ import type { BlockBoundWitness } from '@xyo-network/xl1-protocol'
2
2
 
3
3
  export const blockProducer = (block: BlockBoundWitness) => {
4
4
  return block.addresses[0]
@@ -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,9 +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 { useLinkedBlockItem } from './hooks/index.ts'
7
7
  import type { BlockTableCellProps } from './lib/index.ts'
8
8
 
9
9
  export interface BlockNumberTableCellProps extends BlockTableCellProps {}
@@ -11,21 +11,14 @@ export interface BlockNumberTableCellProps extends BlockTableCellProps {}
11
11
  export const BlockNumberTableCell: React.FC<BlockNumberTableCellProps> = ({
12
12
  block, linked, ...props
13
13
  }) => {
14
- const [ref, handleClick] = useLinkedBlockItem('block-number', block?.[0].block.toString())
15
-
16
- const blockNumberBigInt = block ? block[0].block.toString() : ''
14
+ const blockNumber = block?.[0].block
17
15
 
18
16
  return (
19
- <TableCell ref={ref} {...props}>
20
- <Tooltip title={`Block Number: ${blockNumberBigInt}`}>
21
- <span>
22
- {linked && block
23
- ? (
24
- <Link title={block[0].block.toString()} onClick={handleClick} sx={{ cursor: 'pointer' }}>{block[0].block.toString()}</Link>
25
- )
26
- : null}
27
- {!linked && blockNumberBigInt}
28
- </span>
17
+ <TableCell {...props}>
18
+ <Tooltip title={`Block Number: ${blockNumber}`}>
19
+ <Typography component="span" variant="body1">
20
+ {blockNumber}
21
+ </Typography>
29
22
  </Tooltip>
30
23
  </TableCell>
31
24
  )
@@ -0,0 +1,11 @@
1
+ import type { ChipProps } from '@mui/material'
2
+ import { Chip } from '@mui/material'
3
+ import React from 'react'
4
+
5
+ export interface BlockNumberChipProps extends ChipProps {
6
+ blockNumber?: number
7
+ }
8
+
9
+ export const BlockNumberChip: React.FC<BlockNumberChipProps> = ({ blockNumber, ...props }) => {
10
+ return <Chip avatar={<></>} label={blockNumber} {...props} />
11
+ }
@@ -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
  }
@@ -28,10 +28,9 @@ export const BlockPayloadCountsTableCell: React.FC<BlockPayloadCountsTableCellPr
28
28
  block: block[0]._hash,
29
29
  }
30
30
  : undefined
31
+ const payloadCount = (publicPayloads ?? 0) + (privatePayloads ?? 0)
31
32
  const [ref, handleClick] = useLinkedBlockItem('payload-counts', data)
32
33
 
33
- const renderText = `${publicPayloads ?? '--'} / ${privatePayloads ?? '--'}`
34
-
35
34
  return (
36
35
  <TableCell ref={ref} {...props}>
37
36
  <span>
@@ -42,7 +41,24 @@ export const BlockPayloadCountsTableCell: React.FC<BlockPayloadCountsTableCellPr
42
41
  </Tooltip>
43
42
  )
44
43
  : null}
45
- {linked ? <Link onClick={handleClick} sx={{ cursor: 'pointer' }}>{renderText}</Link> : renderText}
44
+ {linked
45
+ ? (
46
+ <Tooltip title={`Public Payloads: ${publicPayloads ?? '--'} Private Payloads: ${privatePayloads ?? '--'}`}>
47
+ <Link
48
+ onClick={handleClick}
49
+ sx={{ cursor: 'pointer' }}
50
+ >
51
+ {payloadCount}
52
+ </Link>
53
+ </Tooltip>
54
+ )
55
+ : (
56
+ <Tooltip title={`Public Payloads: ${publicPayloads ?? '--'} Private Payloads: ${privatePayloads ?? '--'}`}>
57
+ <span>
58
+ {payloadCount}
59
+ </span>
60
+ </Tooltip>
61
+ )}
46
62
  </span>
47
63
  </TableCell>
48
64
  )
@@ -1,5 +1,4 @@
1
1
  import { TableCell, Tooltip } from '@mui/material'
2
- import { FlexRow } from '@xylabs/react-flexbox'
3
2
  import React from 'react'
4
3
 
5
4
  import { FeatureNotAvailable } from '../../../FeatureNotAvailable.tsx'
@@ -24,9 +23,7 @@ export const BlockProducerTableCell: React.FC<BlockProducerTableCell> = ({
24
23
  return (
25
24
  <TableCell ref={ref} {...props}>
26
25
  <Tooltip title={`Block Producer: ${producer}`}>
27
- <FlexRow sx={{ width: '100%' }}>
28
- <BlockProducerChip sx={{ cursor: 'pointer' }} onClick={linked ? handleClick : () => setNotAvailable(true)} block={block} {...producerChipProps} />
29
- </FlexRow>
26
+ <BlockProducerChip sx={{ cursor: 'pointer' }} onClick={linked ? handleClick : () => setNotAvailable(true)} block={block} {...producerChipProps} />
30
27
  </Tooltip>
31
28
  {(notAvailableDialog && notAvailable)
32
29
  ? <FeatureNotAvailable featureName="Producer Details" open={notAvailable} onClick={() => setNotAvailable(false)} />
@@ -3,11 +3,9 @@ import {
3
3
  Link, TableCell, Tooltip,
4
4
  } from '@mui/material'
5
5
  import type { Hash } from '@xylabs/hex'
6
- import { isTransactionBoundWitness } from '@xyo-network/xl1-model'
7
6
  import React, { useMemo } from 'react'
8
7
 
9
8
  import { useTxsFromBlock } from '../../../../hooks/useTxsFromBlock.ts'
10
- import { TransactionCountChip } from '../../../transactions/index.ts'
11
9
  import { useLinkedBlockItem } from './hooks/index.ts'
12
10
  import type { BlockTableCellProps } from './lib/index.ts'
13
11
 
@@ -46,15 +44,11 @@ export const BlockTransactionCountTableCell: React.FC<BlockTransactionCountTable
46
44
  {linked
47
45
  ? (
48
46
  <Link onClick={handleClick} sx={{ cursor: 'pointer' }}>
49
- <TransactionCountChip
50
- transactions={txHashes}
51
- />
47
+ {txHashes?.length}
52
48
  </Link>
53
49
  )
54
50
  : (
55
- <TransactionCountChip
56
- transactions={txHashes}
57
- />
51
+ txHashes?.length
58
52
  )}
59
53
  </span>
60
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
@@ -28,11 +28,11 @@ export const BlockchainTableHead: React.FC = () => {
28
28
  return (
29
29
  <TableHead>
30
30
  <TableRow>
31
+ <ToolTipTableCell align="left" title="The block number that is included in the block">Block</ToolTipTableCell>
31
32
  <ToolTipTableCell title="The hash of the block">Block Hash</ToolTipTableCell>
32
- <ToolTipTableCell align="center" title="The block number that is included in the block">Block Number</ToolTipTableCell>
33
- <ToolTipTableCell align="center" title="Count of transactions that are included in the block">Transactions</ToolTipTableCell>
34
- <ToolTipTableCell align="center" title="Count of public and private payload counts for the block">Payloads</ToolTipTableCell>
35
- <ToolTipTableCell align="center" 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
+ <ToolTipTableCell align="left" title="Count of transactions that are included in the block">Transactions</ToolTipTableCell>
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>
37
37
  <ToolTipTableCell align="center" title="Link to display the raw JSON of the block">JSON</ToolTipTableCell>
38
38
  </TableRow>
@@ -1,31 +1,51 @@
1
1
  import type { TableRowProps } from '@mui/material'
2
- import { TableRow } from '@mui/material'
2
+ import { TableRow, useTheme } from '@mui/material'
3
+ import { alphaCss } from '@xylabs/react-theme'
4
+ import { usePayloadRootHash } from '@xyo-network/react-shared'
5
+ import type { Ref } from 'react'
3
6
  import React, { useMemo } from 'react'
4
7
 
5
8
  import type { BlockComponentProps } from '../../../../types/index.ts'
9
+ import { useLinkedBlockItem } from '../cell/hooks/index.ts'
6
10
  import {
7
- BlockHashTableCell, BlockJsonViewTableCell, BlockNumberTableCell, BlockPayloadCountsTableCell, BlockProducerTableCell,
11
+ BlockHashTableCell, BlockJsonViewTableCell, BlockNumberTableCell, BlockPayloadCountsTableCell,
8
12
  BlockTransactionCountTableCell,
9
13
  BlockVerificationTableCell,
10
14
  } from '../cell/index.ts'
11
15
 
12
16
  export interface BlockChainTableRowProps extends BlockComponentProps, TableRowProps {
17
+ deepValidation?: boolean
13
18
  linked?: boolean
14
19
  }
15
20
 
16
21
  export const BlockChainTableRow: React.FC<BlockChainTableRowProps> = ({
17
- block, defaultExpanded, linked, sx, ...props
22
+ block, deepValidation, defaultExpanded, linked, sx, ...props
18
23
  }) => {
19
24
  const linkedTableCellProps = useMemo(() => ({ block, linked }), [block, linked])
20
25
  const defaultTableCellProps = useMemo(() => ({ block }), [block])
26
+ const hash = usePayloadRootHash(block?.[0])
27
+ const [ref, handleClick] = useLinkedBlockItem('block-hash', hash)
28
+ const theme = useTheme()
29
+
21
30
  return (
22
- <TableRow sx={{ overflowY: 'scroll', ...sx }} {...props}>
23
- <BlockHashTableCell {...linkedTableCellProps} />
24
- <BlockNumberTableCell align="center" {...linkedTableCellProps} />
25
- <BlockTransactionCountTableCell align="center" {...linkedTableCellProps} />
26
- <BlockPayloadCountsTableCell align="center" {...linkedTableCellProps} />
27
- <BlockProducerTableCell {...linkedTableCellProps} />
28
- <BlockVerificationTableCell {...defaultTableCellProps} />
31
+ <TableRow
32
+ onClick={linked ? handleClick : undefined}
33
+ ref={ref as Ref<HTMLTableRowElement> | undefined}
34
+ sx={{
35
+ 'cursor': linked ? 'pointer' : 'default',
36
+ 'overflowY': 'scroll',
37
+ '&:hover': { backgroundColor: alphaCss(theme.vars.palette.secondary.light, 0.85) },
38
+ ...sx,
39
+ }}
40
+ {...props}
41
+ >
42
+ <BlockNumberTableCell align="left" {...linkedTableCellProps} />
43
+ <BlockHashTableCell align="left" {...linkedTableCellProps} />
44
+ {/* Bring back once we have more data to show that is producer specific */}
45
+ {/* <BlockProducerTableCell align="left" {...linkedTableCellProps} /> */}
46
+ <BlockTransactionCountTableCell align="left" {...linkedTableCellProps} />
47
+ <BlockPayloadCountsTableCell align="left" {...linkedTableCellProps} />
48
+ <BlockVerificationTableCell deepValidation={deepValidation} {...defaultTableCellProps} />
29
49
  <BlockJsonViewTableCell {...defaultTableCellProps} />
30
50
  </TableRow>
31
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)