@xyo-network/react-chain-blockchain 1.0.9 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/index.mjs +255 -235
- package/dist/browser/index.mjs.map +1 -1
- package/dist/types/components/block/ProducerChip.d.ts +2 -2
- package/dist/types/components/block/ProducerChip.d.ts.map +1 -1
- package/dist/types/components/block/helpers/buildBlockChainRenderComponent.d.ts +2 -3
- package/dist/types/components/block/helpers/buildBlockChainRenderComponent.d.ts.map +1 -1
- package/dist/types/components/block/helpers/tsxFromBlock.d.ts +3 -4
- package/dist/types/components/block/helpers/tsxFromBlock.d.ts.map +1 -1
- package/dist/types/components/block/hooks/useBlockProducer.d.ts +2 -2
- package/dist/types/components/block/hooks/useBlockProducer.d.ts.map +1 -1
- package/dist/types/components/block/hooks/useDynamicBlockComponents.d.ts +2 -2
- package/dist/types/components/block/hooks/useDynamicBlockComponents.d.ts.map +1 -1
- package/dist/types/components/block/hooks/useStaticBlockComponents.d.ts +2 -2
- package/dist/types/components/block/hooks/useStaticBlockComponents.d.ts.map +1 -1
- package/dist/types/components/block/hooks/useTxsFromBlock.d.ts +3 -4
- package/dist/types/components/block/hooks/useTxsFromBlock.d.ts.map +1 -1
- package/dist/types/components/block/menu/Expanded.d.ts +2 -2
- package/dist/types/components/block/menu/Expanded.d.ts.map +1 -1
- package/dist/types/components/block/table/Ex.d.ts +1 -4
- package/dist/types/components/block/table/Ex.d.ts.map +1 -1
- package/dist/types/components/block/table/cell/TransactionCount.d.ts +0 -2
- package/dist/types/components/block/table/cell/TransactionCount.d.ts.map +1 -1
- package/dist/types/components/block/table/cell/lib/BlockTableCellProps.d.ts +2 -2
- package/dist/types/components/block/table/cell/lib/BlockTableCellProps.d.ts.map +1 -1
- package/dist/types/components/block/table/head/TableHead.d.ts +3 -0
- package/dist/types/components/block/table/head/TableHead.d.ts.map +1 -0
- package/dist/types/components/block/table/head/index.d.ts +2 -0
- package/dist/types/components/block/table/head/index.d.ts.map +1 -0
- package/dist/types/components/block/table/index.d.ts +1 -0
- package/dist/types/components/block/table/index.d.ts.map +1 -1
- package/dist/types/components/chain/hooks/useOnBlock.d.ts +2 -2
- package/dist/types/components/chain/hooks/useOnBlock.d.ts.map +1 -1
- package/dist/types/components/chain/render/dynamic/flexbox/Flexbox.d.ts +3 -5
- package/dist/types/components/chain/render/dynamic/flexbox/Flexbox.d.ts.map +1 -1
- package/dist/types/components/chain/render/dynamic/flexbox/variants/Base.d.ts +4 -0
- package/dist/types/components/chain/render/dynamic/flexbox/variants/Base.d.ts.map +1 -0
- package/dist/types/components/chain/render/dynamic/flexbox/variants/WithAnalysis.d.ts +4 -0
- package/dist/types/components/chain/render/dynamic/flexbox/variants/WithAnalysis.d.ts.map +1 -0
- package/dist/types/components/chain/render/dynamic/flexbox/variants/WithRemote.d.ts +4 -0
- package/dist/types/components/chain/render/dynamic/flexbox/variants/WithRemote.d.ts.map +1 -0
- package/dist/types/components/chain/render/dynamic/flexbox/variants/index.d.ts +4 -0
- package/dist/types/components/chain/render/dynamic/flexbox/variants/index.d.ts.map +1 -0
- package/dist/types/components/chain/render/dynamic/hooks/useDynamicBlockRenderComponents.d.ts +1 -1
- package/dist/types/components/chain/render/static/flexbox/Flexbox.d.ts +2 -4
- package/dist/types/components/chain/render/static/flexbox/Flexbox.d.ts.map +1 -1
- package/dist/types/components/chain/render/static/flexbox/variants/Base.d.ts +4 -0
- package/dist/types/components/chain/render/static/flexbox/variants/Base.d.ts.map +1 -0
- package/dist/types/components/chain/render/static/flexbox/variants/WithAnalysis.d.ts +4 -0
- package/dist/types/components/chain/render/static/flexbox/variants/WithAnalysis.d.ts.map +1 -0
- package/dist/types/components/chain/render/static/flexbox/variants/index.d.ts +3 -0
- package/dist/types/components/chain/render/static/flexbox/variants/index.d.ts.map +1 -0
- package/dist/types/components/chain/render/static/table/Ex.d.ts +2 -6
- package/dist/types/components/chain/render/static/table/Ex.d.ts.map +1 -1
- package/dist/types/components/chain/render/static/table/variants/Base.d.ts +4 -0
- package/dist/types/components/chain/render/static/table/variants/Base.d.ts.map +1 -0
- package/dist/types/components/chain/render/static/table/variants/WithAnalysis.d.ts +4 -0
- package/dist/types/components/chain/render/static/table/variants/WithAnalysis.d.ts.map +1 -0
- package/dist/types/components/chain/render/static/table/variants/index.d.ts +3 -0
- package/dist/types/components/chain/render/static/table/variants/index.d.ts.map +1 -0
- package/dist/types/components/payload/fields/XyoAddressTextField.d.ts.map +1 -1
- package/dist/types/components/transactions/TransactionsQuickTipButton.d.ts +2 -4
- package/dist/types/components/transactions/TransactionsQuickTipButton.d.ts.map +1 -1
- package/dist/types/context/analyzer/Provider.d.ts.map +1 -1
- package/dist/types/context/analyzer/state.d.ts +2 -3
- package/dist/types/context/analyzer/state.d.ts.map +1 -1
- package/dist/types/context/chain/Provider.d.ts.map +1 -1
- package/dist/types/hooks/chain-iterator/ChainIteratorStore.d.ts +2 -2
- package/dist/types/hooks/chain-iterator/ChainIteratorStore.d.ts.map +1 -1
- package/dist/types/hooks/chain-iterator/useChainIteratorStore.d.ts.map +1 -1
- package/dist/types/hooks/chain-iterator/useChainIteratorUpdatingHead.d.ts.map +1 -1
- package/dist/types/hooks/useIterateChain.d.ts +2 -2
- package/dist/types/hooks/useIterateChain.d.ts.map +1 -1
- package/dist/types/stories/ChainArchivistDecorator.d.ts.map +1 -1
- package/dist/types/stories/ChainArchivistDelayedInsertDecorator.d.ts.map +1 -1
- package/dist/types/stories/buildRandomBlockchain.d.ts +3 -2
- package/dist/types/stories/buildRandomBlockchain.d.ts.map +1 -1
- package/dist/types/types/BlockComponentProps.d.ts +2 -2
- package/dist/types/types/BlockComponentProps.d.ts.map +1 -1
- package/dist/types/types/BlockComponents.d.ts +2 -2
- package/dist/types/types/BlockComponents.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/components/block/BlockHeadingFlexbox.stories.tsx +2 -2
- package/src/components/block/BlockHeadingFlexbox.tsx +3 -3
- package/src/components/block/ProducerChip.tsx +3 -9
- package/src/components/block/helpers/buildBlockChainRenderComponent.tsx +3 -6
- package/src/components/block/helpers/tsxFromBlock.ts +4 -6
- package/src/components/block/hooks/useBlockProducer.ts +3 -3
- package/src/components/block/hooks/useDynamicBlockComponents.ts +6 -7
- package/src/components/block/hooks/useStaticBlockComponents.ts +4 -4
- package/src/components/block/hooks/useTxsFromBlock.ts +5 -6
- package/src/components/block/menu/Expanded.tsx +4 -4
- package/src/components/block/table/Ex.stories.tsx +4 -8
- package/src/components/block/table/Ex.tsx +5 -14
- package/src/components/block/table/cell/BlockNumber.tsx +3 -3
- package/src/components/block/table/cell/Hash.tsx +1 -1
- package/src/components/block/table/cell/JsonView.tsx +1 -1
- package/src/components/block/table/cell/TransactionCount.tsx +3 -6
- package/src/components/block/table/cell/Verification.tsx +2 -2
- package/src/components/block/table/cell/lib/BlockTableCellProps.ts +2 -2
- package/src/components/block/table/head/TableHead.tsx +19 -0
- package/src/components/block/table/head/index.ts +1 -0
- package/src/components/block/table/index.ts +1 -0
- package/src/components/chain/hooks/useOnBlock.ts +11 -7
- package/src/components/chain/render/dynamic/flexbox/Flexbox.tsx +4 -62
- package/src/components/chain/render/dynamic/flexbox/variants/Base.tsx +27 -0
- package/src/components/chain/render/dynamic/flexbox/variants/WithAnalysis.tsx +25 -0
- package/src/components/chain/render/dynamic/flexbox/variants/WithRemote.tsx +19 -0
- package/src/components/chain/render/dynamic/flexbox/variants/index.ts +3 -0
- package/src/components/chain/render/dynamic/hooks/useDynamicBlockRenderComponents.ts +1 -1
- package/src/components/chain/render/static/flexbox/Flexbox.tsx +2 -54
- package/src/components/chain/render/static/flexbox/variants/Base.tsx +31 -0
- package/src/components/chain/render/static/flexbox/variants/WithAnalysis.tsx +23 -0
- package/src/components/chain/render/static/flexbox/variants/index.ts +2 -0
- package/src/components/chain/render/static/table/Ex.tsx +2 -36
- package/src/components/chain/render/static/table/variants/Base.tsx +29 -0
- package/src/components/chain/render/static/table/variants/WithAnalysis.tsx +11 -0
- package/src/components/chain/render/static/table/variants/index.ts +2 -0
- package/src/components/payload/fields/XyoAddressTextField.tsx +2 -2
- package/src/components/transactions/TransactionsQuickTipButton.tsx +4 -8
- package/src/context/analyzer/Provider.tsx +3 -8
- package/src/context/analyzer/state.ts +2 -3
- package/src/context/chain/Provider.tsx +4 -6
- package/src/hooks/chain-iterator/ChainIteratorStore.ts +12 -5
- package/src/hooks/chain-iterator/useChainIteratorStore.ts +2 -1
- package/src/hooks/chain-iterator/useChainIteratorUpdatingHead.ts +1 -0
- package/src/hooks/useIterateChain.ts +20 -7
- package/src/stories/ChainArchivistDecorator.tsx +4 -3
- package/src/stories/ChainArchivistDelayedInsertDecorator.tsx +10 -26
- package/src/stories/buildRandomBlockchain.ts +2 -4
- package/src/types/BlockComponentProps.ts +2 -2
- package/src/types/BlockComponents.ts +2 -2
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ChainProducersAnalyzer } from '@xyo-network/chain-protocol'
|
|
2
|
+
import React, { useMemo } from 'react'
|
|
3
|
+
|
|
4
|
+
import type { ChainAnalyzers } from '../../../../../../context/index.ts'
|
|
5
|
+
import { ChainAnalyzersProvider, ChainPollingProvider } from '../../../../../../context/index.ts'
|
|
6
|
+
import type { BlockChainRenderFlexboxProps } from '../../../../../../types/index.ts'
|
|
7
|
+
import { DynamicListBase } from './Base.tsx'
|
|
8
|
+
|
|
9
|
+
export const WithAnalysis: React.FC<BlockChainRenderFlexboxProps> = ({ blockChainRenderProps, ...props }) => {
|
|
10
|
+
const { chainInformation } = blockChainRenderProps ?? {}
|
|
11
|
+
|
|
12
|
+
const analyzers = useMemo(() => {
|
|
13
|
+
if (chainInformation) {
|
|
14
|
+
return { producers: new ChainProducersAnalyzer() } as ChainAnalyzers
|
|
15
|
+
}
|
|
16
|
+
}, [chainInformation])
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<ChainAnalyzersProvider analyzers={analyzers}>
|
|
20
|
+
<ChainPollingProvider>
|
|
21
|
+
<DynamicListBase blockChainRenderProps={blockChainRenderProps} {...props} />
|
|
22
|
+
</ChainPollingProvider>
|
|
23
|
+
</ChainAnalyzersProvider>
|
|
24
|
+
)
|
|
25
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ErrorRender } from '@xylabs/react-error'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import type { RemoteBlockChainRenderFlexboxProps } from '../../../../../../types/index.ts'
|
|
5
|
+
import { useRemoteBlockChainRenderProps } from '../../hooks/useRemoteBlockChainRenderProps.ts'
|
|
6
|
+
import { WithAnalysis } from './WithAnalysis.tsx'
|
|
7
|
+
|
|
8
|
+
export const WithRemote: React.FC<RemoteBlockChainRenderFlexboxProps> = ({
|
|
9
|
+
url, chainArchivistModuleId, blockChainRenderProps: blockChainRenderPropsArg, ...props
|
|
10
|
+
}) => {
|
|
11
|
+
const { error, blockChainRenderProps } = useRemoteBlockChainRenderProps(chainArchivistModuleId, url, blockChainRenderPropsArg)
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<>
|
|
15
|
+
<ErrorRender error={error} scope="RemoteChainProviderFlexbox" />
|
|
16
|
+
<WithAnalysis blockChainRenderProps={blockChainRenderProps} {...props} />
|
|
17
|
+
</>
|
|
18
|
+
)
|
|
19
|
+
}
|
|
@@ -24,7 +24,7 @@ export const useDynamicBlockRenderComponents = (
|
|
|
24
24
|
|
|
25
25
|
const { pollingState, updatePollingState } = useChainPollingContext()
|
|
26
26
|
|
|
27
|
-
const blocksWhilePaused = useOnBlock(blockChainRenderComponents[0]?.block.block, onAddBlock, liveHead, pollingState)
|
|
27
|
+
const blocksWhilePaused = useOnBlock(blockChainRenderComponents[0]?.block?.[0].block, onAddBlock, liveHead, pollingState)
|
|
28
28
|
|
|
29
29
|
return {
|
|
30
30
|
errors: [paramsError],
|
|
@@ -1,55 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FlexCol, FlexGrowRow } from '@xylabs/react-flexbox'
|
|
3
|
-
import { ChainProducersAnalyzer } from '@xyo-network/chain-protocol'
|
|
4
|
-
import React, { useMemo } from 'react'
|
|
1
|
+
import { StaticListBase, WithAnalysis } from './variants/index.ts'
|
|
5
2
|
|
|
6
|
-
|
|
7
|
-
import { ChainAnalyzersProvider } from '../../../../../context/index.ts'
|
|
8
|
-
import type { BlockChainRenderFlexboxProps } from '../../../../../types/index.ts'
|
|
9
|
-
import { BlockHeadingFlexbox } from '../../../../block/index.ts'
|
|
10
|
-
import { BlockListAnimated } from '../../../list/index.ts'
|
|
11
|
-
import { BlockChainPagination } from '../../../pagination/index.ts'
|
|
12
|
-
import { ChainAnalyzerStatsDialogFromContext } from '../../../stats/index.ts'
|
|
13
|
-
import { useStaticBlockRenderComponents } from '../hooks/index.ts'
|
|
14
|
-
|
|
15
|
-
const Base: React.FC<BlockChainRenderFlexboxProps> = ({ blockChainRenderProps, ...props }) => {
|
|
16
|
-
const {
|
|
17
|
-
blockComponents, errors, paginatedBlockComponents, onPageChange, page, pageSize,
|
|
18
|
-
} = useStaticBlockRenderComponents(BlockHeadingFlexbox, blockChainRenderProps)
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<FlexCol alignItems="start" gap={2} width="100%" {...props}>
|
|
22
|
-
{errors?.map((error, index) => <ErrorRender error={error} key={index} scope="StaticBlockchainFlexboxInner" />)}
|
|
23
|
-
{paginatedBlockComponents?.length
|
|
24
|
-
? (
|
|
25
|
-
<FlexGrowRow justifyContent="space-between" width="100%">
|
|
26
|
-
<ChainAnalyzerStatsDialogFromContext />
|
|
27
|
-
<BlockChainPagination count={blockComponents?.length ?? 0} onPageChange={onPageChange} page={page} rowsPerPage={pageSize} />
|
|
28
|
-
</FlexGrowRow>
|
|
29
|
-
)
|
|
30
|
-
: null}
|
|
31
|
-
<BlockListAnimated blockChainRenderComponents={paginatedBlockComponents} />
|
|
32
|
-
</FlexCol>
|
|
33
|
-
)
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const WithAnalysis: React.FC<BlockChainRenderFlexboxProps> = ({ blockChainRenderProps, ...props }) => {
|
|
37
|
-
const { chainInformation } = blockChainRenderProps ?? {}
|
|
38
|
-
|
|
39
|
-
const analyzers = useMemo(() => {
|
|
40
|
-
if (chainInformation) {
|
|
41
|
-
return { producers: new ChainProducersAnalyzer() } as ChainAnalyzers
|
|
42
|
-
}
|
|
43
|
-
}, [chainInformation])
|
|
44
|
-
|
|
45
|
-
return (
|
|
46
|
-
<ChainAnalyzersProvider analyzers={analyzers}>
|
|
47
|
-
<StaticBlockchainRenderFlexBox.Base blockChainRenderProps={blockChainRenderProps} {...props} />
|
|
48
|
-
</ChainAnalyzersProvider>
|
|
49
|
-
)
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export const StaticBlockchainRenderFlexBox = {
|
|
53
|
-
Base,
|
|
54
|
-
WithAnalysis,
|
|
55
|
-
}
|
|
3
|
+
export const StaticBlockchainRenderFlexBox = { Base: StaticListBase, WithAnalysis }
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ErrorRender } from '@xylabs/react-error'
|
|
2
|
+
import { FlexCol, FlexGrowRow } from '@xylabs/react-flexbox'
|
|
3
|
+
import React from 'react'
|
|
4
|
+
|
|
5
|
+
import type { BlockChainRenderFlexboxProps } from '../../../../../../types/index.ts'
|
|
6
|
+
import { BlockHeadingFlexbox } from '../../../../../block/index.ts'
|
|
7
|
+
import { BlockListAnimated } from '../../../../list/index.ts'
|
|
8
|
+
import { BlockChainPagination } from '../../../../pagination/index.ts'
|
|
9
|
+
import { ChainAnalyzerStatsDialogFromContext } from '../../../../stats/index.ts'
|
|
10
|
+
import { useStaticBlockRenderComponents } from '../../hooks/index.ts'
|
|
11
|
+
|
|
12
|
+
export const StaticListBase: React.FC<BlockChainRenderFlexboxProps> = ({ blockChainRenderProps, ...props }) => {
|
|
13
|
+
const {
|
|
14
|
+
blockComponents, errors, paginatedBlockComponents, onPageChange, page, pageSize,
|
|
15
|
+
} = useStaticBlockRenderComponents(BlockHeadingFlexbox, blockChainRenderProps)
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<FlexCol alignItems="start" gap={2} width="100%" {...props}>
|
|
19
|
+
{errors?.map(error => <ErrorRender error={error} key={error.name} scope="StaticBlockchainFlexboxInner" />)}
|
|
20
|
+
{paginatedBlockComponents?.length
|
|
21
|
+
? (
|
|
22
|
+
<FlexGrowRow justifyContent="space-between" width="100%">
|
|
23
|
+
<ChainAnalyzerStatsDialogFromContext />
|
|
24
|
+
<BlockChainPagination count={blockComponents?.length ?? 0} onPageChange={onPageChange} page={page} rowsPerPage={pageSize} />
|
|
25
|
+
</FlexGrowRow>
|
|
26
|
+
)
|
|
27
|
+
: null}
|
|
28
|
+
<BlockListAnimated blockChainRenderComponents={paginatedBlockComponents} />
|
|
29
|
+
</FlexCol>
|
|
30
|
+
)
|
|
31
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ChainProducersAnalyzer } from '@xyo-network/chain-protocol'
|
|
2
|
+
import React, { useMemo } from 'react'
|
|
3
|
+
|
|
4
|
+
import type { ChainAnalyzers } from '../../../../../../context/index.ts'
|
|
5
|
+
import { ChainAnalyzersProvider } from '../../../../../../context/index.ts'
|
|
6
|
+
import type { BlockChainRenderFlexboxProps } from '../../../../../../types/index.ts'
|
|
7
|
+
import { StaticListBase } from './Base.tsx'
|
|
8
|
+
|
|
9
|
+
export const WithAnalysis: React.FC<BlockChainRenderFlexboxProps> = ({ blockChainRenderProps, ...props }) => {
|
|
10
|
+
const { chainInformation } = blockChainRenderProps ?? {}
|
|
11
|
+
|
|
12
|
+
const analyzers = useMemo(() => {
|
|
13
|
+
if (chainInformation) {
|
|
14
|
+
return { producers: new ChainProducersAnalyzer() } as ChainAnalyzers
|
|
15
|
+
}
|
|
16
|
+
}, [chainInformation])
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<ChainAnalyzersProvider analyzers={analyzers}>
|
|
20
|
+
<StaticListBase blockChainRenderProps={blockChainRenderProps} {...props} />
|
|
21
|
+
</ChainAnalyzersProvider>
|
|
22
|
+
)
|
|
23
|
+
}
|
|
@@ -1,38 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import React from 'react'
|
|
4
|
-
|
|
5
|
-
import type { BlockChainRenderTableExProps } from '../../../../../types/index.ts'
|
|
6
|
-
import { BlockChainTableRow } from '../../../../block/index.ts'
|
|
7
|
-
import { BlockListTableEx } from '../../../list/index.ts'
|
|
8
|
-
import { BlockChainPagination } from '../../../pagination/index.ts'
|
|
9
|
-
import { useStaticBlockRenderComponents } from '../hooks/index.ts'
|
|
10
|
-
|
|
11
|
-
export const Base: React.FC<BlockChainRenderTableExProps> = ({ blockChainRenderProps, ...props }) => {
|
|
12
|
-
const {
|
|
13
|
-
blockComponents, errors, paginatedBlockComponents, onPageChange, page, pageSize,
|
|
14
|
-
} = useStaticBlockRenderComponents(BlockChainTableRow, blockChainRenderProps)
|
|
15
|
-
|
|
16
|
-
return (
|
|
17
|
-
<FlexCol alignItems="start" gap={2} width="100%" {...props}>
|
|
18
|
-
{errors?.map((error, index) => <ErrorRender error={error} key={index} scope="StaticBlockchainFlexboxInner" />)}
|
|
19
|
-
{paginatedBlockComponents?.length
|
|
20
|
-
? (
|
|
21
|
-
<FlexGrowRow justifyContent="space-between" width="100%">
|
|
22
|
-
<BlockChainPagination count={blockComponents?.length ?? 0} onPageChange={onPageChange} page={page} rowsPerPage={pageSize} />
|
|
23
|
-
</FlexGrowRow>
|
|
24
|
-
)
|
|
25
|
-
: null}
|
|
26
|
-
<BlockListTableEx blockChainRenderComponents={paginatedBlockComponents} />
|
|
27
|
-
</FlexCol>
|
|
28
|
-
)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export const WithAnalysis: React.FC<BlockChainRenderTableExProps> = ({ blockChainRenderProps, ...props }) => {
|
|
32
|
-
// NOTE: More code here if we want to analyze the static data via ChainAnalyzers
|
|
33
|
-
return (
|
|
34
|
-
<StaticBlockchainRenderTableEx.Base blockChainRenderProps={blockChainRenderProps} {...props} />
|
|
35
|
-
)
|
|
36
|
-
}
|
|
1
|
+
import { Base } from './variants/index.ts'
|
|
2
|
+
import { WithAnalysis } from './variants/WithAnalysis.tsx'
|
|
37
3
|
|
|
38
4
|
export const StaticBlockchainRenderTableEx = { Base, WithAnalysis }
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ErrorRender } from '@xylabs/react-error'
|
|
2
|
+
import { FlexCol, FlexGrowRow } from '@xylabs/react-flexbox'
|
|
3
|
+
import React from 'react'
|
|
4
|
+
|
|
5
|
+
import type { BlockChainRenderTableExProps } from '../../../../../../types/index.ts'
|
|
6
|
+
import { BlockChainTableRow } from '../../../../../block/index.ts'
|
|
7
|
+
import { BlockListTableEx } from '../../../../list/index.ts'
|
|
8
|
+
import { BlockChainPagination } from '../../../../pagination/index.ts'
|
|
9
|
+
import { useStaticBlockRenderComponents } from '../../hooks/index.ts'
|
|
10
|
+
|
|
11
|
+
export const Base: React.FC<BlockChainRenderTableExProps> = ({ blockChainRenderProps, ...props }) => {
|
|
12
|
+
const {
|
|
13
|
+
blockComponents, errors, paginatedBlockComponents, onPageChange, page, pageSize,
|
|
14
|
+
} = useStaticBlockRenderComponents(BlockChainTableRow, blockChainRenderProps)
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<FlexCol alignItems="start" gap={2} width="100%" {...props}>
|
|
18
|
+
{errors?.map(error => <ErrorRender error={error} key={error.name} scope="StaticBlockchainFlexboxInner" />)}
|
|
19
|
+
{paginatedBlockComponents?.length
|
|
20
|
+
? (
|
|
21
|
+
<FlexGrowRow justifyContent="space-between" width="100%">
|
|
22
|
+
<BlockChainPagination count={blockComponents?.length ?? 0} onPageChange={onPageChange} page={page} rowsPerPage={pageSize} />
|
|
23
|
+
</FlexGrowRow>
|
|
24
|
+
)
|
|
25
|
+
: null}
|
|
26
|
+
<BlockListTableEx blockChainRenderComponents={paginatedBlockComponents} />
|
|
27
|
+
</FlexCol>
|
|
28
|
+
)
|
|
29
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
|
|
3
|
+
import type { BlockChainRenderTableExProps } from '../../../../../../types/index.ts'
|
|
4
|
+
import { Base } from './Base.tsx'
|
|
5
|
+
|
|
6
|
+
export const WithAnalysis: React.FC<BlockChainRenderTableExProps> = ({ blockChainRenderProps, ...props }) => {
|
|
7
|
+
// NOTE: More code here if we want to analyze the static data via ChainAnalyzers
|
|
8
|
+
return (
|
|
9
|
+
<Base blockChainRenderProps={blockChainRenderProps} {...props} />
|
|
10
|
+
)
|
|
11
|
+
}
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from '@mui/material'
|
|
5
5
|
import type { Address } from '@xylabs/hex'
|
|
6
6
|
import { asAddress } from '@xylabs/hex'
|
|
7
|
-
import React, {
|
|
7
|
+
import React, { useMemo, useState } from 'react'
|
|
8
8
|
|
|
9
9
|
interface XyoAddressTextFieldProps extends Omit<StandardTextFieldProps, 'value'> {
|
|
10
10
|
onAddressChanged?: (address?: Address) => void
|
|
@@ -18,7 +18,7 @@ export const XyoAddressTextField: React.FC<XyoAddressTextFieldProps> = ({
|
|
|
18
18
|
const [address, setAddress] = useState<string>('')
|
|
19
19
|
const [addressError, setAddressError] = useState<Error>()
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
useMemo(() => setAddress(''), [resetValue])
|
|
22
22
|
|
|
23
23
|
const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
|
|
24
24
|
const { value } = event.target
|
|
@@ -9,8 +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 {
|
|
13
|
-
import type { BlockBoundWitness } from '@xyo-network/chain-model'
|
|
12
|
+
import type { HydratedBlock } from '@xyo-network/chain-model'
|
|
14
13
|
import React, {
|
|
15
14
|
Fragment, useMemo, useState,
|
|
16
15
|
} from 'react'
|
|
@@ -18,14 +17,11 @@ import React, {
|
|
|
18
17
|
import { useTxsFromBlock } from '../block/index.ts'
|
|
19
18
|
|
|
20
19
|
export interface TransactionsQuickTipButtonQuickTipButtonProps extends QuickTipButtonProps {
|
|
21
|
-
block?:
|
|
22
|
-
chainArchivist?: ArchivistInstance
|
|
20
|
+
block?: HydratedBlock
|
|
23
21
|
}
|
|
24
22
|
|
|
25
|
-
export const TransactionsQuickTipButton: React.FC<TransactionsQuickTipButtonQuickTipButtonProps> = ({
|
|
26
|
-
|
|
27
|
-
}) => {
|
|
28
|
-
const [transactions, transactionsError] = useTxsFromBlock(chainArchivist, block)
|
|
23
|
+
export const TransactionsQuickTipButton: React.FC<TransactionsQuickTipButtonQuickTipButtonProps> = ({ block, ...props }) => {
|
|
24
|
+
const [transactions, transactionsError] = useTxsFromBlock(block)
|
|
29
25
|
|
|
30
26
|
const [copied, setCopied] = useState(false)
|
|
31
27
|
const [showError, setShowError] = useState(false)
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { BlockBoundWitness } from '@xyo-network/chain-model'
|
|
3
|
-
import { hydrateBlock } from '@xyo-network/chain-protocol'
|
|
4
|
-
import { PayloadBuilder } from '@xyo-network/payload-builder'
|
|
1
|
+
import type { HydratedBlock } from '@xyo-network/chain-model'
|
|
5
2
|
import type { PropsWithChildren } from 'react'
|
|
6
3
|
import React, {
|
|
7
4
|
useCallback, useMemo, useState,
|
|
@@ -25,10 +22,8 @@ export const ChainAnalyzersProvider: React.FC<ChainAnalyzersProviderProps> = ({
|
|
|
25
22
|
setAnalyzersState(prev => ({ ...prev, ...analyzers }))
|
|
26
23
|
}, [])
|
|
27
24
|
|
|
28
|
-
const onBlock = useCallback(async (
|
|
29
|
-
|
|
30
|
-
const hydratedBlock = await hydrateBlock(chainArchivist, hash)
|
|
31
|
-
|
|
25
|
+
const onBlock = useCallback(async (hydratedBlock: HydratedBlock) => {
|
|
26
|
+
await Promise.resolve()
|
|
32
27
|
for (const analyzer of Object.values(analyzers)) {
|
|
33
28
|
void analyzer.onBlock(hydratedBlock)
|
|
34
29
|
setStatsUpdated(Date.now())
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { BlockBoundWitness, ChainAnalyzer } from '@xyo-network/chain-model'
|
|
1
|
+
import type { ChainAnalyzer, HydratedBlock } from '@xyo-network/chain-model'
|
|
3
2
|
import type { ContextExState } from '@xyo-network/react-shared'
|
|
4
3
|
|
|
5
4
|
export type ChainAnalyzerIds = 'producers'
|
|
@@ -9,6 +8,6 @@ export type ChainAnalyzers = Record<ChainAnalyzerIds, ChainAnalyzer>
|
|
|
9
8
|
export interface ChainAnalyzersState extends ContextExState {
|
|
10
9
|
addAnalyzers: (analyzers: ChainAnalyzers) => void
|
|
11
10
|
analyzers: ChainAnalyzers
|
|
12
|
-
onBlock: (
|
|
11
|
+
onBlock: (block: HydratedBlock) => Promise<void>
|
|
13
12
|
statsUpdated: number
|
|
14
13
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { PropsWithChildren } from 'react'
|
|
2
|
-
import React, {
|
|
3
|
-
useEffect, useMemo, useState,
|
|
4
|
-
} from 'react'
|
|
2
|
+
import React, { useMemo, useState } from 'react'
|
|
5
3
|
|
|
6
4
|
import { ChainInfoContext } from './Context.ts'
|
|
7
5
|
import type { ChainInfoState } from './State.ts'
|
|
@@ -26,15 +24,15 @@ export const ChainInfoProvider: React.FC<ChainInfoProviderProps> = ({
|
|
|
26
24
|
setChainIterator(chainIterator)
|
|
27
25
|
}
|
|
28
26
|
|
|
29
|
-
|
|
27
|
+
useMemo(() => {
|
|
30
28
|
updateChainArchivist(chainArchivistProp)
|
|
31
29
|
}, [chainArchivistProp])
|
|
32
30
|
|
|
33
|
-
|
|
31
|
+
useMemo(() => {
|
|
34
32
|
updateChainInformation(chainInformationProp)
|
|
35
33
|
}, [chainInformationProp])
|
|
36
34
|
|
|
37
|
-
|
|
35
|
+
useMemo(() => {
|
|
38
36
|
updateChainIterator(chainIteratorProp)
|
|
39
37
|
}, [chainIteratorProp])
|
|
40
38
|
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { assertEx } from '@xylabs/assert'
|
|
2
2
|
import type {
|
|
3
|
-
|
|
3
|
+
EventingChainBlockNumberIterator, HeadEventArgs,
|
|
4
|
+
HydratedBlock,
|
|
4
5
|
XyoChainIteratorParams,
|
|
5
6
|
} from '@xyo-network/chain-model'
|
|
7
|
+
import { hydrateBlock } from '@xyo-network/chain-protocol'
|
|
6
8
|
import { XyoChainBlockNumberIterator } from '@xyo-network/chain-services'
|
|
9
|
+
import { PayloadBuilder } from '@xyo-network/payload-builder'
|
|
7
10
|
|
|
8
11
|
export type Listener = (...args: Array<unknown>) => void
|
|
9
12
|
|
|
10
|
-
export type ChainIteratorStoreValues = { chainIterator: XyoChainBlockNumberIterator; error?: Error; head:
|
|
13
|
+
export type ChainIteratorStoreValues = { chainIterator: XyoChainBlockNumberIterator; error?: Error; head: HydratedBlock }
|
|
11
14
|
|
|
12
15
|
export class ChainIteratorStore {
|
|
13
16
|
private _chainIterator: EventingChainBlockNumberIterator | undefined
|
|
@@ -31,17 +34,21 @@ export class ChainIteratorStore {
|
|
|
31
34
|
// set the chainIterator
|
|
32
35
|
instance._chainIterator = chainIterator
|
|
33
36
|
|
|
37
|
+
const head = await chainIterator.head()
|
|
38
|
+
const hydratedHead = await hydrateBlock(params.chainArchivist, await PayloadBuilder.hash(head))
|
|
39
|
+
|
|
34
40
|
// set the initial values
|
|
35
41
|
instance._values = {
|
|
36
42
|
chainIterator,
|
|
37
|
-
head:
|
|
43
|
+
head: hydratedHead,
|
|
38
44
|
}
|
|
39
45
|
|
|
40
46
|
// set the internal listeners
|
|
41
|
-
const headUpdatedListener = ({ blocks }: HeadEventArgs) => {
|
|
47
|
+
const headUpdatedListener = async ({ blocks }: HeadEventArgs) => {
|
|
48
|
+
const hydratedBlock = await hydrateBlock(params.chainArchivist, await PayloadBuilder.hash(blocks?.[0]))
|
|
42
49
|
instance._values = {
|
|
43
50
|
chainIterator,
|
|
44
|
-
head:
|
|
51
|
+
head: hydratedBlock,
|
|
45
52
|
}
|
|
46
53
|
instance.emitChange()
|
|
47
54
|
}
|
|
@@ -44,7 +44,8 @@ export const useChainIteratorStore = (chainIteratorParams?: XyoChainIteratorPara
|
|
|
44
44
|
}
|
|
45
45
|
// Only update the cached snapshot if there is no cached iterator or the head has changed
|
|
46
46
|
const noCachedValue = cachedSnapshot.current.chainIterator === undefined
|
|
47
|
-
const
|
|
47
|
+
const cachedBlock = cachedSnapshot.current?.head?.[0]?.block
|
|
48
|
+
const newBlock = cachedBlock !== newValues.head?.[0]?.block
|
|
48
49
|
if (noCachedValue || newBlock) {
|
|
49
50
|
cachedSnapshot.current = newValues
|
|
50
51
|
return newValues
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
import { assertEx } from '@xylabs/assert'
|
|
2
2
|
import { usePromise } from '@xylabs/react-promise'
|
|
3
|
-
import type {
|
|
3
|
+
import type { ReadArchivist } from '@xyo-network/archivist-model'
|
|
4
|
+
import type {
|
|
5
|
+
BlockBoundWitness, HydratedBlock, XyoChainIteratorParams,
|
|
6
|
+
} from '@xyo-network/chain-model'
|
|
4
7
|
import { isBlockBoundWitness } from '@xyo-network/chain-model'
|
|
8
|
+
import { hydrateBlock } from '@xyo-network/chain-protocol'
|
|
5
9
|
import { XyoChainBlockNumberIterator } from '@xyo-network/chain-services'
|
|
10
|
+
import { PayloadBuilder } from '@xyo-network/payload-builder'
|
|
11
|
+
|
|
12
|
+
const getHydratedBlock = async (chainArchivist: ReadArchivist, head: BlockBoundWitness) => {
|
|
13
|
+
const headHash = await PayloadBuilder.hash(head)
|
|
14
|
+
return await hydrateBlock(chainArchivist, headHash)
|
|
15
|
+
}
|
|
6
16
|
|
|
7
17
|
const iterateChain = async (chainIteratorParams?: XyoChainIteratorParams, maxDepth?: number) => {
|
|
8
18
|
const { chainArchivist, head } = chainIteratorParams ?? {} as XyoChainIteratorParams
|
|
@@ -14,26 +24,29 @@ const iterateChain = async (chainIteratorParams?: XyoChainIteratorParams, maxDep
|
|
|
14
24
|
const chainIterator = await XyoChainBlockNumberIterator.create({ head: headBlockBoundWitness, chainArchivist })
|
|
15
25
|
|
|
16
26
|
// get head of the chain
|
|
17
|
-
|
|
27
|
+
const chainHead = await chainIterator.head()
|
|
28
|
+
let block = await getHydratedBlock(chainArchivist, chainHead)
|
|
29
|
+
|
|
18
30
|
// create the blocks array
|
|
19
|
-
const blocks:
|
|
31
|
+
const blocks: HydratedBlock[] = [block]
|
|
20
32
|
|
|
21
33
|
// track the depth
|
|
22
34
|
let depth = 1
|
|
23
35
|
// iterate the chain
|
|
24
36
|
while (block) {
|
|
25
37
|
// get the next block
|
|
26
|
-
const [, next] = await chainIterator.previous(block.block, 2)
|
|
38
|
+
const [, next] = await chainIterator.previous(block[0].block, 2)
|
|
27
39
|
// if there is no next block, break
|
|
28
40
|
if (!next) break
|
|
41
|
+
const nextHydratedBlock = await getHydratedBlock(chainArchivist, next)
|
|
29
42
|
// push the next block
|
|
30
|
-
blocks.push(
|
|
43
|
+
blocks.push(nextHydratedBlock)
|
|
31
44
|
// set the next block as the current block
|
|
32
|
-
block =
|
|
45
|
+
block = nextHydratedBlock
|
|
33
46
|
// increment the depth
|
|
34
47
|
depth++
|
|
35
48
|
// if max depth is set and we have reached it, break
|
|
36
|
-
if ((maxDepth && depth >= maxDepth) || block?.block === 0) break
|
|
49
|
+
if ((maxDepth && depth >= maxDepth) || block?.[0].block === 0) break
|
|
37
50
|
}
|
|
38
51
|
return blocks
|
|
39
52
|
}
|
|
@@ -3,7 +3,7 @@ import type { Decorator } from '@storybook/react'
|
|
|
3
3
|
import { usePromise } from '@xylabs/react-promise'
|
|
4
4
|
import { MemoryArchivist } from '@xyo-network/archivist-memory'
|
|
5
5
|
import { ArchivistConfigSchema } from '@xyo-network/archivist-model'
|
|
6
|
-
import {
|
|
6
|
+
import { flattenHydratedBlocks } from '@xyo-network/chain-protocol'
|
|
7
7
|
import React, { useEffect } from 'react'
|
|
8
8
|
|
|
9
9
|
import { getChainInformation } from '../lib/index.ts'
|
|
@@ -15,7 +15,8 @@ export const ChainArchivistDecorator: Decorator = (Story, context) => {
|
|
|
15
15
|
const [blockChainRenderProps, blockChainRenderPropsError] = usePromise(async () => {
|
|
16
16
|
if (randomBlockChain) {
|
|
17
17
|
const chainArchivist = await MemoryArchivist.create({ config: { schema: ArchivistConfigSchema, name: 'ChainArchivist' } })
|
|
18
|
-
|
|
18
|
+
const flattened = flattenHydratedBlocks(randomBlockChain)
|
|
19
|
+
await chainArchivist.insert(flattened)
|
|
19
20
|
const chainInformation = await getChainInformation()
|
|
20
21
|
return { chainArchivist, chainInformation }
|
|
21
22
|
}
|
|
@@ -34,7 +35,7 @@ export const ChainArchivistDecorator: Decorator = (Story, context) => {
|
|
|
34
35
|
blockChainRenderProps: {
|
|
35
36
|
...(context.args.blockChainRenderProps as BlockChainRenderBaseProps),
|
|
36
37
|
...blockChainRenderProps,
|
|
37
|
-
head: randomBlockChain?.toReversed().
|
|
38
|
+
head: randomBlockChain?.toReversed()[0][0]._hash,
|
|
38
39
|
},
|
|
39
40
|
},
|
|
40
41
|
}
|
|
@@ -5,8 +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 type { BlockBoundWitness } from '@xyo-network/chain-model'
|
|
8
|
-
import {
|
|
9
|
-
import type { Payload } from '@xyo-network/payload-model'
|
|
8
|
+
import { flattenHydratedBlock } from '@xyo-network/chain-protocol'
|
|
10
9
|
import React, { useEffect, useState } from 'react'
|
|
11
10
|
|
|
12
11
|
import { getChainInformation } from '../lib/index.ts'
|
|
@@ -30,32 +29,17 @@ export const ChainArchivistDelayedInsertDecorator: Decorator = (Story, context)
|
|
|
30
29
|
|
|
31
30
|
const [, delayedInsertError] = usePromise(async () => {
|
|
32
31
|
if (chainArchivist && randomBlockChain) {
|
|
33
|
-
// track the next set of payloads for the next block
|
|
34
|
-
const nextBlockPayloads: Payload[] = []
|
|
35
|
-
|
|
36
32
|
// TODO - use buildRandomChain helper
|
|
37
|
-
for (const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
// debug was we are inserting
|
|
43
|
-
// console.log('pre-insert block', nextBlockPayloads.map(payload => isBlockBoundWitness(payload) ? payload.block : null).filter(Boolean))
|
|
44
|
-
|
|
45
|
-
// insert the block and subsequent payloads
|
|
46
|
-
await chainArchivist.insert(nextBlockPayloads)
|
|
47
|
-
|
|
48
|
-
// confirm the first block was inserted and set state so the story can load
|
|
49
|
-
setFirstBlock(prev => prev || payload)
|
|
33
|
+
for (const hydratedBlock of randomBlockChain) {
|
|
34
|
+
const flattened = flattenHydratedBlock(hydratedBlock)
|
|
35
|
+
// insert the block and subsequent payloads
|
|
36
|
+
await chainArchivist.insert(flattened)
|
|
50
37
|
|
|
51
|
-
|
|
52
|
-
|
|
38
|
+
// confirm the first block was inserted and set state so the story can load
|
|
39
|
+
setFirstBlock(prev => prev || hydratedBlock[0])
|
|
53
40
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
} else {
|
|
57
|
-
nextBlockPayloads.push(payload)
|
|
58
|
-
}
|
|
41
|
+
// we know we are gonna get a new block, so simulate the delay
|
|
42
|
+
await delay(1000)
|
|
59
43
|
}
|
|
60
44
|
}
|
|
61
45
|
}, [chainArchivist, randomBlockChain])
|
|
@@ -78,7 +62,7 @@ export const ChainArchivistDelayedInsertDecorator: Decorator = (Story, context)
|
|
|
78
62
|
blockChainRenderProps: {
|
|
79
63
|
...(context.args.blockChainRenderProps as BlockChainRenderBaseProps),
|
|
80
64
|
...blockChainRenderProps,
|
|
81
|
-
head: randomBlockChain?.
|
|
65
|
+
head: randomBlockChain?.[0][0]?._hash,
|
|
82
66
|
},
|
|
83
67
|
},
|
|
84
68
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Account } from '@xyo-network/account'
|
|
2
2
|
import { buildRandomChain } from '@xyo-network/chain-ethereum'
|
|
3
3
|
import type { HydratedBlock } from '@xyo-network/chain-model'
|
|
4
|
-
import { flattenHydratedBlocks } from '@xyo-network/chain-protocol'
|
|
5
4
|
|
|
6
5
|
export const buildRandomBlockChain = async (blockCount = 10) => {
|
|
7
6
|
// Create a producer
|
|
@@ -9,11 +8,10 @@ export const buildRandomBlockChain = async (blockCount = 10) => {
|
|
|
9
8
|
|
|
10
9
|
// Create multiple blocks
|
|
11
10
|
const blocks: HydratedBlock[] = await buildRandomChain(initialBlockProducer, blockCount)
|
|
12
|
-
return
|
|
11
|
+
return blocks
|
|
13
12
|
}
|
|
14
13
|
|
|
15
14
|
export const buildRandomBlockChainBlocksOnly = async (blockCount = 10) => {
|
|
16
15
|
const chain = await buildRandomChain(await Account.random(), blockCount)
|
|
17
|
-
|
|
18
|
-
return blocks
|
|
16
|
+
return chain
|
|
19
17
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Hash } from '@xylabs/hex'
|
|
2
|
-
import type {
|
|
2
|
+
import type { HydratedBlock } from '@xyo-network/chain-model'
|
|
3
3
|
|
|
4
4
|
/** Interface for all components that render a single block */
|
|
5
5
|
export interface BlockComponentProps {
|
|
6
|
-
block:
|
|
6
|
+
block: HydratedBlock
|
|
7
7
|
defaultExpanded?: boolean
|
|
8
8
|
}
|
|
9
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { NodesWithKeys } from '@xylabs/react-animation'
|
|
2
|
-
import type {
|
|
2
|
+
import type { HydratedBlock } from '@xyo-network/chain-model'
|
|
3
3
|
|
|
4
4
|
/** Interface for all block components meant to be rendered in a chain */
|
|
5
5
|
export interface BlockChainRenderComponent extends NodesWithKeys {
|
|
6
|
-
block:
|
|
6
|
+
block: HydratedBlock
|
|
7
7
|
}
|