@xyo-network/react-chain-blockchain 1.1.5 → 1.1.7
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 +5 -4
- package/dist/browser/index.mjs.map +1 -1
- package/dist/types/components/block/ProducerChip.d.ts +1 -1
- package/dist/types/components/block/ProducerChip.d.ts.map +1 -1
- package/dist/types/components/block/helpers/blockProducer.d.ts +1 -1
- package/dist/types/components/block/helpers/blockProducer.d.ts.map +1 -1
- package/dist/types/components/block/helpers/tsxFromBlock.d.ts +2 -2
- package/dist/types/components/block/helpers/tsxFromBlock.d.ts.map +1 -1
- package/dist/types/components/block/hooks/useBlockProducer.d.ts +1 -1
- package/dist/types/components/block/hooks/useBlockProducer.d.ts.map +1 -1
- package/dist/types/components/block/hooks/useDynamicBlockComponents.d.ts +1 -1
- package/dist/types/components/block/hooks/useDynamicBlockComponents.d.ts.map +1 -1
- package/dist/types/components/block/hooks/useStaticBlockComponents.d.ts +1 -1
- package/dist/types/components/block/hooks/useStaticBlockComponents.d.ts.map +1 -1
- package/dist/types/components/block/hooks/useTxsFromBlock.d.ts +2 -2
- package/dist/types/components/block/hooks/useTxsFromBlock.d.ts.map +1 -1
- package/dist/types/components/block/menu/Expanded.d.ts +1 -1
- package/dist/types/components/block/menu/Expanded.d.ts.map +1 -1
- package/dist/types/components/block/table/cell/lib/BlockTableCellProps.d.ts +1 -1
- package/dist/types/components/block/table/cell/lib/BlockTableCellProps.d.ts.map +1 -1
- package/dist/types/components/chain/hooks/useOnBlock.d.ts +1 -1
- package/dist/types/components/chain/hooks/useOnBlock.d.ts.map +1 -1
- package/dist/types/components/chain/render/dynamic/hooks/useDynamicBlockRenderComponents.d.ts +1 -1
- package/dist/types/components/payload/builder/transfer/Form.d.ts.map +1 -1
- package/dist/types/components/transactions/TransactionsQuickTipButton.d.ts +1 -1
- package/dist/types/components/transactions/TransactionsQuickTipButton.d.ts.map +1 -1
- package/dist/types/components/transactions/submit/Builder.d.ts +1 -1
- package/dist/types/components/transactions/submit/Builder.d.ts.map +1 -1
- package/dist/types/context/analyzer/state.d.ts +1 -1
- package/dist/types/context/analyzer/state.d.ts.map +1 -1
- package/dist/types/context/chain/State.d.ts +1 -1
- package/dist/types/context/chain/State.d.ts.map +1 -1
- package/dist/types/hooks/chain-iterator/ChainIteratorStore.d.ts +1 -1
- package/dist/types/hooks/chain-iterator/ChainIteratorStore.d.ts.map +1 -1
- package/dist/types/hooks/chain-iterator/useChainIteratorParams.d.ts +3 -3
- package/dist/types/hooks/chain-iterator/useChainIteratorParams.d.ts.map +1 -1
- package/dist/types/hooks/chain-iterator/useChainIteratorStore.d.ts +1 -1
- package/dist/types/hooks/chain-iterator/useChainIteratorStore.d.ts.map +1 -1
- package/dist/types/hooks/chain-iterator/useChainIteratorUpdatingHead.d.ts +1 -1
- package/dist/types/hooks/chain-iterator/useChainIteratorUpdatingHead.d.ts.map +1 -1
- package/dist/types/hooks/useIterateChain.d.ts +1 -1
- package/dist/types/hooks/useIterateChain.d.ts.map +1 -1
- package/dist/types/lib/getChainInformation.d.ts +1 -1
- package/dist/types/lib/getChainInformation.d.ts.map +1 -1
- package/dist/types/stories/buildRandomBlockchain.d.ts +1 -1
- package/dist/types/stories/buildRandomBlockchain.d.ts.map +1 -1
- package/dist/types/types/BlockComponentProps.d.ts +1 -1
- package/dist/types/types/BlockComponentProps.d.ts.map +1 -1
- package/dist/types/types/BlockComponents.d.ts +1 -1
- package/dist/types/types/BlockComponents.d.ts.map +1 -1
- package/dist/types/types/render/BlockChainRenderProps.d.ts +1 -1
- package/dist/types/types/render/BlockChainRenderProps.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/components/block/ProducerChip.tsx +1 -1
- package/src/components/block/helpers/blockProducer.ts +1 -1
- package/src/components/block/helpers/tsxFromBlock.ts +1 -1
- package/src/components/block/hooks/useBlockProducer.ts +1 -1
- package/src/components/block/hooks/useDynamicBlockComponents.ts +1 -1
- package/src/components/block/hooks/useStaticBlockComponents.ts +1 -1
- package/src/components/block/hooks/useTxsFromBlock.ts +1 -1
- package/src/components/block/menu/Expanded.tsx +1 -1
- package/src/components/block/table/cell/lib/BlockTableCellProps.ts +1 -1
- package/src/components/chain/hooks/useOnBlock.ts +1 -1
- package/src/components/payload/builder/producer-intent/Form.tsx +1 -1
- package/src/components/payload/builder/transfer/Form.tsx +3 -5
- package/src/components/transactions/TransactionsQuickTipButton.tsx +1 -1
- package/src/components/transactions/submit/Builder.tsx +1 -1
- package/src/components/transactions/submit/SubmitChain.tsx +1 -1
- package/src/context/analyzer/Provider.tsx +1 -1
- package/src/context/analyzer/state.ts +1 -1
- package/src/context/chain/State.ts +1 -1
- package/src/hooks/chain-iterator/ChainIteratorStore.ts +4 -4
- package/src/hooks/chain-iterator/useChainIteratorParams.ts +2 -2
- package/src/hooks/chain-iterator/useChainIteratorStore.ts +1 -1
- package/src/hooks/chain-iterator/useChainIteratorUpdatingHead.ts +1 -1
- package/src/hooks/useIterateChain.ts +4 -4
- package/src/lib/getChainInformation.ts +1 -1
- package/src/stories/ChainArchivistDelayedInsertDecorator.tsx +1 -1
- package/src/stories/ChainInfoContextDecorator.tsx +1 -1
- package/src/stories/buildRandomBlockchain.ts +1 -1
- package/src/types/BlockComponentProps.ts +1 -1
- package/src/types/BlockComponents.ts +1 -1
- package/src/types/render/BlockChainRenderProps.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ArchivistInstance } from '@xyo-network/archivist-model'
|
|
2
|
-
import type { ChainBlockNumberIterator, ChainInformation } from '@xyo-network/chain-model'
|
|
3
2
|
import type { ContextExState } from '@xyo-network/react-shared'
|
|
3
|
+
import type { ChainBlockNumberIterator, ChainInformation } from '@xyo-network/xl1-model'
|
|
4
4
|
|
|
5
5
|
export interface ChainInfoState extends ContextExState {
|
|
6
6
|
chainArchivist?: ArchivistInstance
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { assertEx } from '@xylabs/assert'
|
|
2
|
+
import { hydrateBlock } from '@xyo-network/chain-protocol'
|
|
3
|
+
import { XyoChainBlockNumberIterator } from '@xyo-network/chain-services'
|
|
4
|
+
import { PayloadBuilder } from '@xyo-network/payload-builder'
|
|
2
5
|
import type {
|
|
3
6
|
EventingChainBlockNumberIterator, HeadEventArgs,
|
|
4
7
|
HydratedBlock,
|
|
5
8
|
XyoChainIteratorParams,
|
|
6
|
-
} from '@xyo-network/
|
|
7
|
-
import { hydrateBlock } from '@xyo-network/chain-protocol'
|
|
8
|
-
import { XyoChainBlockNumberIterator } from '@xyo-network/chain-services'
|
|
9
|
-
import { PayloadBuilder } from '@xyo-network/payload-builder'
|
|
9
|
+
} from '@xyo-network/xl1-model'
|
|
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/
|
|
7
|
-
import { isBlockBoundWitness } from '@xyo-network/
|
|
6
|
+
import type { BlockBoundWitness } from '@xyo-network/xl1-model'
|
|
7
|
+
import { isBlockBoundWitness } from '@xyo-network/xl1-model'
|
|
8
8
|
|
|
9
9
|
import type { BlockChainIterator } from '../../types/index.ts'
|
|
10
10
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { toHex } from '@xylabs/hex'
|
|
2
2
|
import type { ArchivistInstance } from '@xyo-network/archivist-model'
|
|
3
|
-
import type { ChainBlockNumberIterator } from '@xyo-network/chain-model'
|
|
4
3
|
import { findMostRecentBlock } from '@xyo-network/chain-protocol'
|
|
4
|
+
import type { ChainBlockNumberIterator } from '@xyo-network/xl1-model'
|
|
5
5
|
import { useEffect, useState } from 'react'
|
|
6
6
|
|
|
7
7
|
export interface ChainIteratorUpdatingHeadParams {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { assertEx } from '@xylabs/assert'
|
|
2
2
|
import { usePromise } from '@xylabs/react-promise'
|
|
3
3
|
import type { ReadArchivist } from '@xyo-network/archivist-model'
|
|
4
|
-
import type {
|
|
5
|
-
BlockBoundWitness, HydratedBlock, XyoChainIteratorParams,
|
|
6
|
-
} from '@xyo-network/chain-model'
|
|
7
|
-
import { isBlockBoundWitness } from '@xyo-network/chain-model'
|
|
8
4
|
import { hydrateBlock } from '@xyo-network/chain-protocol'
|
|
9
5
|
import { XyoChainBlockNumberIterator } from '@xyo-network/chain-services'
|
|
10
6
|
import { PayloadBuilder } from '@xyo-network/payload-builder'
|
|
7
|
+
import type {
|
|
8
|
+
BlockBoundWitness, HydratedBlock, XyoChainIteratorParams,
|
|
9
|
+
} from '@xyo-network/xl1-model'
|
|
10
|
+
import { isBlockBoundWitness } from '@xyo-network/xl1-model'
|
|
11
11
|
|
|
12
12
|
const getHydratedBlock = async (chainArchivist: ReadArchivist, head: BlockBoundWitness) => {
|
|
13
13
|
const headHash = await PayloadBuilder.hash(head)
|
|
@@ -4,8 +4,8 @@ import { delay } from '@xylabs/delay'
|
|
|
4
4
|
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
|
-
import type { BlockBoundWitness } from '@xyo-network/chain-model'
|
|
8
7
|
import { flattenHydratedBlock } from '@xyo-network/chain-protocol'
|
|
8
|
+
import type { BlockBoundWitness } from '@xyo-network/xl1-model'
|
|
9
9
|
import React, { useEffect, useState } from 'react'
|
|
10
10
|
|
|
11
11
|
import { getChainInformation } from '../lib/index.ts'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Decorator } from '@storybook/react'
|
|
2
2
|
import { assertEx } from '@xylabs/assert'
|
|
3
3
|
import { usePromise } from '@xylabs/react-promise'
|
|
4
|
-
import { isBlockBoundWitness } from '@xyo-network/chain-model'
|
|
5
4
|
import { XyoChainBlockNumberIterator } from '@xyo-network/chain-services'
|
|
6
5
|
import { findFirstMatching } from '@xyo-network/chain-utils'
|
|
6
|
+
import { isBlockBoundWitness } from '@xyo-network/xl1-model'
|
|
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/
|
|
3
|
+
import type { HydratedBlock } from '@xyo-network/xl1-model'
|
|
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/
|
|
2
|
+
import type { HydratedBlock } from '@xyo-network/xl1-model'
|
|
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/
|
|
2
|
+
import type { HydratedBlock } from '@xyo-network/xl1-model'
|
|
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/
|
|
3
|
+
import type { ChainInformation } from '@xyo-network/xl1-model'
|
|
4
4
|
|
|
5
5
|
/** Props that control the rendering (not blockchain specific) */
|
|
6
6
|
export interface RenderProps {
|