@xyo-network/react-chain-blockchain 1.5.34 → 1.5.36
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 +293 -252
- package/dist/browser/index.mjs.map +1 -1
- package/dist/types/components/block/ChipSkeleton.d.ts +4 -0
- package/dist/types/components/block/ChipSkeleton.d.ts.map +1 -0
- package/dist/types/components/block/ProducerChip.d.ts.map +1 -1
- package/dist/types/components/block/hooks/useDynamicBlockComponents.d.ts +2 -1
- package/dist/types/components/block/hooks/useDynamicBlockComponents.d.ts.map +1 -1
- package/dist/types/components/block/hooks/useStaticBlockComponents.d.ts +2 -1
- package/dist/types/components/block/hooks/useStaticBlockComponents.d.ts.map +1 -1
- package/dist/types/components/block/index.d.ts +1 -0
- package/dist/types/components/block/index.d.ts.map +1 -1
- package/dist/types/components/block/table/cell/Epoch.d.ts.map +1 -1
- package/dist/types/components/block/table/cell/Hash.d.ts.map +1 -1
- package/dist/types/components/block/table/cell/hooks/useLinkedBlockItem.d.ts.map +1 -1
- package/dist/types/components/chain/render/dynamic/flexbox/variants/WithAnalysis.d.ts.map +1 -1
- package/dist/types/components/chain/render/dynamic/hooks/useRemoteBlockChainRenderProps.d.ts.map +1 -1
- package/dist/types/components/chain/render/static/flexbox/variants/WithAnalysis.d.ts.map +1 -1
- package/dist/types/context/chain/Context.d.ts +3 -3
- package/dist/types/context/chain/State.d.ts +3 -2
- package/dist/types/context/chain/State.d.ts.map +1 -1
- package/dist/types/context/chain/use.d.ts +1 -1
- package/dist/types/hooks/chain-iterator/ChainIteratorStore.d.ts +2 -1
- package/dist/types/hooks/chain-iterator/ChainIteratorStore.d.ts.map +1 -1
- package/dist/types/hooks/chain-iterator/useChainIteratorParams.d.ts +6 -4
- 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/useIterateChain.d.ts +2 -1
- package/dist/types/hooks/useIterateChain.d.ts.map +1 -1
- package/dist/types/lib/getChainId.d.ts +4 -0
- package/dist/types/lib/getChainId.d.ts.map +1 -0
- package/dist/types/lib/index.d.ts +1 -1
- package/dist/types/lib/index.d.ts.map +1 -1
- package/dist/types/stories/ChainInfoContextDecorator.d.ts.map +1 -1
- package/dist/types/types/render/BlockChainRenderProps.d.ts +3 -3
- package/dist/types/types/render/BlockChainRenderProps.d.ts.map +1 -1
- package/package.json +52 -52
- package/src/components/block/ChipSkeleton.tsx +7 -0
- package/src/components/block/ProducerChip.tsx +18 -3
- package/src/components/block/hooks/useDynamicBlockComponents.ts +2 -1
- package/src/components/block/hooks/useStaticBlockComponents.ts +2 -1
- package/src/components/block/index.ts +1 -0
- package/src/components/block/table/cell/Epoch.tsx +2 -1
- package/src/components/block/table/cell/Hash.tsx +18 -20
- package/src/components/block/table/cell/hooks/useLinkedBlockItem.tsx +6 -1
- package/src/components/chain/render/dynamic/flexbox/Flexbox.stories.tsx +1 -1
- package/src/components/chain/render/dynamic/flexbox/Remote.stories.tsx +4 -3
- package/src/components/chain/render/dynamic/flexbox/variants/WithAnalysis.tsx +4 -3
- package/src/components/chain/render/dynamic/hooks/useDynamicBlockRenderComponents.ts +1 -1
- package/src/components/chain/render/dynamic/hooks/useRemoteBlockChainRenderProps.ts +1 -0
- package/src/components/chain/render/static/flexbox/Flexbox.stories.tsx +2 -2
- package/src/components/chain/render/static/flexbox/variants/WithAnalysis.tsx +4 -3
- package/src/components/chain/render/static/hooks/useStaticBlockRenderComponents.ts +1 -1
- package/src/components/chain/render/static/table/Ex.stories.tsx +2 -2
- package/src/context/chain/Provider.tsx +9 -9
- package/src/context/chain/State.ts +3 -2
- package/src/hooks/chain-iterator/ChainIteratorStore.ts +2 -2
- package/src/hooks/chain-iterator/useChainIteratorParams.ts +5 -4
- package/src/hooks/chain-iterator/useChainIteratorStore.ts +1 -1
- package/src/hooks/useIterateChain.ts +3 -4
- package/src/lib/getChainId.ts +8 -0
- package/src/lib/index.ts +1 -1
- package/src/stories/ChainArchivistDecorator.tsx +4 -4
- package/src/stories/ChainArchivistDelayedInsertDecorator.tsx +4 -4
- package/src/stories/ChainInfoContextDecorator.tsx +8 -7
- package/src/types/render/BlockChainRenderProps.ts +6 -4
- package/dist/types/lib/getChainInformation.d.ts +0 -4
- package/dist/types/lib/getChainInformation.d.ts.map +0 -1
- package/src/lib/getChainInformation.ts +0 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChipSkeleton.d.ts","sourceRoot":"","sources":["../../../../src/components/block/ChipSkeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAElD,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAEhD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProducerChip.d.ts","sourceRoot":"","sources":["../../../../src/components/block/ProducerChip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"ProducerChip.d.ts","sourceRoot":"","sources":["../../../../src/components/block/ProducerChip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAM9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,KAAkB,MAAM,OAAO,CAAA;AAUtC,MAAM,WAAW,sBAAuB,SAAQ,SAAS;IACvD,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB;AACD,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAoB9D,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { XyoChainIteratorParams } from '@xyo-network/chain-services';
|
|
2
|
+
import type { HydratedBlock } from '@xyo-network/xl1-protocol';
|
|
2
3
|
import type { ComponentType } from 'react';
|
|
3
4
|
import type { BlockChainRenderComponent, BlockComponentWithTxsProps } from '../../../types/index.ts';
|
|
4
5
|
export declare const useDynamicBlockComponents: (BlockComponent: ComponentType<BlockComponentWithTxsProps>, params?: XyoChainIteratorParams, maxBlocks?: number) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDynamicBlockComponents.d.ts","sourceRoot":"","sources":["../../../../../src/components/block/hooks/useDynamicBlockComponents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"useDynamicBlockComponents.d.ts","sourceRoot":"","sources":["../../../../../src/components/block/hooks/useDynamicBlockComponents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAI1C,OAAO,KAAK,EACV,yBAAyB,EACJ,0BAA0B,EAChD,MAAM,yBAAyB,CAAA;AAGhC,eAAO,MAAM,yBAAyB,GAAI,gBAAgB,aAAa,CAAC,0BAA0B,CAAC,EAAE,SAAS,sBAAsB,EAAE,YAAY,MAAM;;wBAMrH,aAAa,GAAG,SAAS;CAuB3D,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { XyoChainIteratorParams } from '@xyo-network/chain-services';
|
|
2
|
+
import type { HydratedBlock } from '@xyo-network/xl1-protocol';
|
|
2
3
|
import type { ComponentType } from 'react';
|
|
3
4
|
import type { BlockComponentWithTxsProps } from '../../../types/index.ts';
|
|
4
5
|
export declare const useStaticBlockComponents: (BlockComponent: ComponentType<BlockComponentWithTxsProps>, params?: XyoChainIteratorParams, blocks?: HydratedBlock[]) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStaticBlockComponents.d.ts","sourceRoot":"","sources":["../../../../../src/components/block/hooks/useStaticBlockComponents.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"useStaticBlockComponents.d.ts","sourceRoot":"","sources":["../../../../../src/components/block/hooks/useStaticBlockComponents.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAG1C,OAAO,KAAK,EAAuB,0BAA0B,EAAE,MAAM,yBAAyB,CAAA;AAG9F,eAAO,MAAM,wBAAwB,GACnC,gBAAgB,aAAa,CAAC,0BAA0B,CAAC,EACzD,SAAS,sBAAsB,EAC/B,SAAS,aAAa,EAAE;;;CAoBzB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/block/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAA;AACzC,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/block/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAA;AACzC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Epoch.d.ts","sourceRoot":"","sources":["../../../../../../src/components/block/table/cell/Epoch.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Epoch.d.ts","sourceRoot":"","sources":["../../../../../../src/components/block/table/cell/Epoch.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EACL,KAAK,mBAAmB,EACzB,MAAM,gBAAgB,CAAA;AAEvB,MAAM,WAAW,wBAAyB,SAAQ,mBAAmB;CAAG;AAExE,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAiBlE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Hash.d.ts","sourceRoot":"","sources":["../../../../../../src/components/block/table/cell/Hash.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Hash.d.ts","sourceRoot":"","sources":["../../../../../../src/components/block/table/cell/Hash.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAG7D,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAEzD,MAAM,WAAW,uBAAwB,SAAQ,mBAAmB;IAClE,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAiChE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLinkedBlockItem.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/block/table/cell/hooks/useLinkedBlockItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAEhC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAEpE,eAAO,MAAM,kBAAkB,GAAI,OAAO,qBAAqB,EAAE,OAAO,MAAM,GAAG,MAAM,KAAG,CAAC,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,
|
|
1
|
+
{"version":3,"file":"useLinkedBlockItem.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/block/table/cell/hooks/useLinkedBlockItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAEhC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAEpE,eAAO,MAAM,kBAAkB,GAAI,OAAO,qBAAqB,EAAE,OAAO,MAAM,GAAG,MAAM,KAAG,CAAC,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAmBpJ,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WithAnalysis.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/chain/render/dynamic/flexbox/variants/WithAnalysis.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WithAnalysis.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/chain/render/dynamic/flexbox/variants/WithAnalysis.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkB,MAAM,OAAO,CAAA;AAItC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAA;AAGpF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CAgB/D,CAAA"}
|
package/dist/types/components/chain/render/dynamic/hooks/useRemoteBlockChainRenderProps.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRemoteBlockChainRenderProps.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/chain/render/dynamic/hooks/useRemoteBlockChainRenderProps.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAIjE,OAAO,KAAK,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AAErG,oGAAoG;AACpG,eAAO,MAAM,8BAA8B,GACzC,yBAAyB,gBAAgB,EACzC,MAAM,MAAM,EACZ,2BAA2B,qBAAqB,KAC/C,
|
|
1
|
+
{"version":3,"file":"useRemoteBlockChainRenderProps.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/chain/render/dynamic/hooks/useRemoteBlockChainRenderProps.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAIjE,OAAO,KAAK,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AAErG,oGAAoG;AACpG,eAAO,MAAM,8BAA8B,GACzC,yBAAyB,gBAAgB,EACzC,MAAM,MAAM,EACZ,2BAA2B,qBAAqB,KAC/C,yBAiBF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WithAnalysis.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/chain/render/static/flexbox/variants/WithAnalysis.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WithAnalysis.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/chain/render/static/flexbox/variants/WithAnalysis.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkB,MAAM,OAAO,CAAA;AAItC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAA;AAGpF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CAc/D,CAAA"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
export declare const ChainInfoContext: import("react").Context<({
|
|
2
2
|
chainArchivist?: import("@xyo-network/archivist-model").ArchivistInstance;
|
|
3
|
-
|
|
3
|
+
chainId?: import("@xylabs/hex").Address;
|
|
4
4
|
chainIterator?: import("@xyo-network/xl1-protocol").ChainBlockNumberIterator;
|
|
5
5
|
} & {
|
|
6
6
|
provided: true;
|
|
7
7
|
}) | (import("@xylabs/react-shared").FixedValues<import("@xylabs/react-shared").ProvidedContextExState<{
|
|
8
8
|
chainArchivist?: import("@xyo-network/archivist-model").ArchivistInstance;
|
|
9
|
-
|
|
9
|
+
chainId?: import("@xylabs/hex").Address;
|
|
10
10
|
chainIterator?: import("@xyo-network/xl1-protocol").ChainBlockNumberIterator;
|
|
11
11
|
}>, never> & {
|
|
12
12
|
provided: false;
|
|
13
13
|
}) | (import("@xylabs/react-shared").FixedValues<import("@xylabs/react-shared").NotProvidedContextExState<{
|
|
14
14
|
chainArchivist?: import("@xyo-network/archivist-model").ArchivistInstance;
|
|
15
|
-
|
|
15
|
+
chainId?: import("@xylabs/hex").Address;
|
|
16
16
|
chainIterator?: import("@xyo-network/xl1-protocol").ChainBlockNumberIterator;
|
|
17
17
|
}>, never> & {
|
|
18
18
|
provided: false;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import type { Address } from '@xylabs/hex';
|
|
1
2
|
import type { ContextExState } from '@xylabs/react-shared';
|
|
2
3
|
import type { ArchivistInstance } from '@xyo-network/archivist-model';
|
|
3
|
-
import type { ChainBlockNumberIterator
|
|
4
|
+
import type { ChainBlockNumberIterator } from '@xyo-network/xl1-protocol';
|
|
4
5
|
export type ChainInfoState = ContextExState<{
|
|
5
6
|
chainArchivist?: ArchivistInstance;
|
|
6
|
-
|
|
7
|
+
chainId?: Address;
|
|
7
8
|
chainIterator?: ChainBlockNumberIterator;
|
|
8
9
|
}>;
|
|
9
10
|
//# sourceMappingURL=State.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../../../src/context/chain/State.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AACrE,OAAO,KAAK,EAAE,wBAAwB,EAAE,
|
|
1
|
+
{"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../../../src/context/chain/State.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AACrE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AAEzE,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC;IAC1C,cAAc,CAAC,EAAE,iBAAiB,CAAA;IAClC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,aAAa,CAAC,EAAE,wBAAwB,CAAA;CACzC,CAAC,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ChainInfoState } from './State.ts';
|
|
2
2
|
export declare const useChainInfo: (required?: boolean) => Omit<{
|
|
3
3
|
chainArchivist?: import("@xyo-network/archivist-model").ArchivistInstance;
|
|
4
|
-
|
|
4
|
+
chainId?: import("@xylabs/hex").Address;
|
|
5
5
|
chainIterator?: import("@xyo-network/xl1-protocol").ChainBlockNumberIterator;
|
|
6
6
|
} & {
|
|
7
7
|
provided: true;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { XyoChainIteratorParams } from '@xyo-network/chain-services';
|
|
1
2
|
import { ChainBlockNumberIterationService } from '@xyo-network/chain-services';
|
|
2
|
-
import type { EventingChainBlockNumberIterator, HydratedBlock
|
|
3
|
+
import type { EventingChainBlockNumberIterator, HydratedBlock } from '@xyo-network/xl1-protocol';
|
|
3
4
|
export type Listener = (...args: Array<unknown>) => void;
|
|
4
5
|
export type ChainIteratorStoreValues = {
|
|
5
6
|
chainIterator: ChainBlockNumberIterationService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainIteratorStore.d.ts","sourceRoot":"","sources":["../../../../src/hooks/chain-iterator/ChainIteratorStore.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ChainIteratorStore.d.ts","sourceRoot":"","sources":["../../../../src/hooks/chain-iterator/ChainIteratorStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACzE,OAAO,EAAE,gCAAgC,EAAE,MAAM,6BAA6B,CAAA;AAE9E,OAAO,KAAK,EACV,gCAAgC,EAChC,aAAa,EACd,MAAM,2BAA2B,CAAA;AAGlC,MAAM,MAAM,QAAQ,GAAG,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,IAAI,CAAA;AAExD,MAAM,MAAM,wBAAwB,GAAG;IAAE,aAAa,EAAE,gCAAgC,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,aAAa,CAAA;CAAE,CAAA;AAE9H,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,cAAc,CAA8C;IACpE,OAAO,CAAC,kBAAkB,CAAiB;IAC3C,OAAO,CAAC,qBAAqB,CAA4B;IACzD,OAAO,CAAC,OAAO,CAAsC;IAErD,IAAI,aAAa,IAAI,gCAAgC,CAEpD;IAED,IAAI,MAAM,IAAI,wBAAwB,CAErC;WAEY,MAAM,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAqChF,OAAO;IAOP,WAAW,IAAI,OAAO,CAAC,wBAAwB,CAAC;IAIhD,SAAS,CAAC,aAAa,EAAE,QAAQ;IAOjC,OAAO,CAAC,UAAU;CAKnB"}
|
|
@@ -3,8 +3,8 @@ import type { ReadArchivist } from '@xyo-network/archivist-model';
|
|
|
3
3
|
import type { BlockBoundWitness } from '@xyo-network/xl1-protocol';
|
|
4
4
|
import type { BlockChainIterator } from '../../types/index.ts';
|
|
5
5
|
export declare const resolveDefinedHead: (head: Hash, chainArchivist: ReadArchivist) => Promise<import("@xyo-network/boundwitness-model").Signed<BlockBoundWitness>>;
|
|
6
|
-
export declare const useChainIteratorParams: ({ chainArchivist,
|
|
7
|
-
chainArchivist: import("@xyo-network/archivist-model").ArchivistInstance<
|
|
6
|
+
export declare const useChainIteratorParams: ({ chainArchivist, chainId, head, name, }: BlockChainIterator) => [{
|
|
7
|
+
chainArchivist: import("@xyo-network/archivist-model").ArchivistInstance<{
|
|
8
8
|
account?: import("@xyo-network/account-model").AccountInstance | "random";
|
|
9
9
|
addToResolvers?: boolean;
|
|
10
10
|
additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
|
|
@@ -12,8 +12,9 @@ export declare const useChainIteratorParams: ({ chainArchivist, chainInformation
|
|
|
12
12
|
config: import("@xyo-network/module-model").AnyConfigSchema<import("@xyo-network/archivist-model").ArchivistConfig>;
|
|
13
13
|
ephemeralQueryAccountEnabled?: boolean;
|
|
14
14
|
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
statusReporter?: import("@xyo-network/module-model").ModuleStatusReporter;
|
|
16
|
+
} & import("@xyo-network/module-model").ModuleChildrenParams & import("@xylabs/base").BaseParamsFields & import("@xyo-network/archivist-model").ArchivistParamFields & object, import("@xyo-network/archivist-model").ArchivistModuleEventData, import("@xyo-network/payload-model").Payload>;
|
|
17
|
+
chainId: Lowercase<string>;
|
|
17
18
|
head: import("@xylabs/object").DeepRestrictToStringKeys<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
18
19
|
schema: string;
|
|
19
20
|
}> & Partial<import("@xyo-network/payload-model").PayloadMetaFields> & import("@xyo-network/payload-model").StorageMeta & import("@xylabs/object").DeepRestrictToStringKeys<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & import("@xyo-network/boundwitness-model").BoundWitnessFields & import("@xyo-network/xl1-protocol").BlockBoundWitnessFields & import("@xyo-network/xl1-protocol").BlockBoundWitnessMeta & {
|
|
@@ -21,5 +22,6 @@ export declare const useChainIteratorParams: ({ chainArchivist, chainInformation
|
|
|
21
22
|
}> & import("@xyo-network/boundwitness-model").BoundWitnessMeta & {
|
|
22
23
|
$signatures: import("@xylabs/hex").Hex[];
|
|
23
24
|
};
|
|
25
|
+
name: string;
|
|
24
26
|
} | undefined, Error | undefined, import("@xylabs/react-promise").UsePromiseState | undefined];
|
|
25
27
|
//# sourceMappingURL=useChainIteratorParams.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChainIteratorParams.d.ts","sourceRoot":"","sources":["../../../../src/hooks/chain-iterator/useChainIteratorParams.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,EAAU,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"useChainIteratorParams.d.ts","sourceRoot":"","sources":["../../../../src/hooks/chain-iterator/useChainIteratorParams.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,EAAU,MAAM,aAAa,CAAA;AAG/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAEjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAGlE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAE9D,eAAO,MAAM,kBAAkB,GAAU,MAAM,IAAI,EAAE,gBAAgB,aAAa,iFAajF,CAAA;AAED,eAAO,MAAM,sBAAsB,GAAI,0CAEpC,kBAAkB;;;;;;;;;;;;;;;;;;;;8FAcpB,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { XyoChainIteratorParams } from '@xyo-network/
|
|
1
|
+
import type { XyoChainIteratorParams } from '@xyo-network/chain-services';
|
|
2
2
|
import type { ChainIteratorStoreValues } from './ChainIteratorStore.ts';
|
|
3
3
|
export declare const useChainIteratorStore: (chainIteratorParams?: XyoChainIteratorParams) => Partial<ChainIteratorStoreValues>;
|
|
4
4
|
//# sourceMappingURL=useChainIteratorStore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChainIteratorStore.d.ts","sourceRoot":"","sources":["../../../../src/hooks/chain-iterator/useChainIteratorStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"useChainIteratorStore.d.ts","sourceRoot":"","sources":["../../../../src/hooks/chain-iterator/useChainIteratorStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAMzE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAA;AAOvE,eAAO,MAAM,qBAAqB,GAAI,sBAAsB,sBAAsB,sCAmDjF,CAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { XyoChainIteratorParams } from '@xyo-network/chain-services';
|
|
2
|
+
import type { HydratedBlock } from '@xyo-network/xl1-protocol';
|
|
2
3
|
export declare const useIterateChain: (chainIteratorParams?: XyoChainIteratorParams, maxDepth?: number) => [HydratedBlock[] | undefined, Error | undefined, import("@xylabs/react-promise").UsePromiseState | undefined];
|
|
3
4
|
//# sourceMappingURL=useIterateChain.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIterateChain.d.ts","sourceRoot":"","sources":["../../../src/hooks/useIterateChain.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useIterateChain.d.ts","sourceRoot":"","sources":["../../../src/hooks/useIterateChain.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAGzE,OAAO,KAAK,EAAqB,aAAa,EAAE,MAAM,2BAA2B,CAAA;AA4CjF,eAAO,MAAM,eAAe,GAC1B,sBAAsB,sBAAsB,EAC5C,WAAW,MAAM,kHAKlB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getChainId.d.ts","sourceRoot":"","sources":["../../../src/lib/getChainId.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAIjD,eAAO,MAAM,UAAU,QAAO,UAAU,CAAC,OAAO,CAE/C,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA;AACtC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA;AACtC,cAAc,iBAAiB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainInfoContextDecorator.d.ts","sourceRoot":"","sources":["../../../src/stories/ChainInfoContextDecorator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"ChainInfoContextDecorator.d.ts","sourceRoot":"","sources":["../../../src/stories/ChainInfoContextDecorator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAmBtD,eAAO,MAAM,yBAAyB,EAAE,SA0BvC,CAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { Hash } from '@xylabs/hex';
|
|
1
|
+
import type { Address, Hash } from '@xylabs/hex';
|
|
2
2
|
import type { ArchivistInstance } from '@xyo-network/archivist-model';
|
|
3
|
-
import type { ChainInformation } from '@xyo-network/xl1-protocol';
|
|
4
3
|
/** Props that control the rendering (not blockchain specific) */
|
|
5
4
|
export interface RenderProps {
|
|
6
5
|
maxBlocks?: number;
|
|
@@ -9,8 +8,9 @@ export interface RenderProps {
|
|
|
9
8
|
/** Fields needed to talk to a block chain iterator */
|
|
10
9
|
export interface BlockChainIterator {
|
|
11
10
|
chainArchivist?: ArchivistInstance;
|
|
12
|
-
|
|
11
|
+
chainId?: Address;
|
|
13
12
|
head?: Hash;
|
|
13
|
+
name: string;
|
|
14
14
|
}
|
|
15
15
|
/** Props for rendering a blockchain */
|
|
16
16
|
export interface BlockChainRenderProps extends BlockChainIterator, RenderProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockChainRenderProps.d.ts","sourceRoot":"","sources":["../../../../src/types/render/BlockChainRenderProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"BlockChainRenderProps.d.ts","sourceRoot":"","sources":["../../../../src/types/render/BlockChainRenderProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAErE,iEAAiE;AACjE,MAAM,WAAW,WAAW;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,sDAAsD;AACtD,MAAM,WAAW,kBAAkB;IACjC,cAAc,CAAC,EAAE,iBAAiB,CAAA;IAClC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;CACb;AAED,uCAAuC;AACvC,MAAM,WAAW,qBAAsB,SAAQ,kBAAkB,EAAE,WAAW;CAE7E;AAED,gFAAgF;AAChF,MAAM,WAAW,yBAAyB;IACxC,qBAAqB,CAAC,EAAE,qBAAqB,CAAA;IAC7C,KAAK,CAAC,EAAE,KAAK,CAAA;CACd"}
|
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.5.
|
|
4
|
+
"version": "1.5.36",
|
|
5
5
|
"description": "XYO Layer One React SDK Blockchain",
|
|
6
6
|
"homepage": "https://xylabs.com",
|
|
7
7
|
"bugs": {
|
|
@@ -37,63 +37,63 @@
|
|
|
37
37
|
"package-cycle": "echo Nothing to do"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@storybook/react-vite": "^9.0.
|
|
41
|
-
"@xylabs/assert": "^4.
|
|
42
|
-
"@xylabs/axios": "^4.
|
|
43
|
-
"@xylabs/delay": "^4.
|
|
44
|
-
"@xylabs/eth-address": "^4.
|
|
45
|
-
"@xylabs/exists": "^4.
|
|
46
|
-
"@xylabs/hex": "^4.
|
|
47
|
-
"@xylabs/promise": "^4.
|
|
48
|
-
"@xylabs/react-animation": "^6.3.
|
|
49
|
-
"@xylabs/react-error": "^6.3.
|
|
50
|
-
"@xylabs/react-flexbox": "^6.3.
|
|
51
|
-
"@xylabs/react-identicon": "^6.3.
|
|
52
|
-
"@xylabs/react-promise": "^6.3.
|
|
53
|
-
"@xylabs/react-quick-tip-button": "^6.3.
|
|
54
|
-
"@xylabs/react-shared": "^6.3.
|
|
55
|
-
"@xylabs/react-theme": "^6.3.
|
|
56
|
-
"@xylabs/typeof": "^4.
|
|
57
|
-
"@xyo-network/account": "^3.18.
|
|
58
|
-
"@xyo-network/archivist-memory": "^3.18.
|
|
59
|
-
"@xyo-network/archivist-model": "^3.18.
|
|
60
|
-
"@xyo-network/boundwitness-builder": "^3.18.
|
|
61
|
-
"@xyo-network/boundwitness-model": "^3.18.
|
|
62
|
-
"@xyo-network/bridge-http": "^3.18.
|
|
63
|
-
"@xyo-network/chain-analyze": "^1.5.
|
|
64
|
-
"@xyo-network/chain-protocol": "^1.5.
|
|
65
|
-
"@xyo-network/chain-services": "^1.5.
|
|
66
|
-
"@xyo-network/chain-utils": "^1.5.
|
|
67
|
-
"@xyo-network/chain-wrappers": "^1.5.
|
|
68
|
-
"@xyo-network/module-model": "^3.18.
|
|
69
|
-
"@xyo-network/payload-builder": "^3.18.
|
|
70
|
-
"@xyo-network/payload-model": "^3.18.
|
|
71
|
-
"@xyo-network/react-boundwitness-plugin": "^5.3.
|
|
72
|
-
"@xyo-network/react-chain-blockies": "^1.5.
|
|
73
|
-
"@xyo-network/react-chain-shared": "^1.5.
|
|
74
|
-
"@xyo-network/react-event": "^5.3.
|
|
75
|
-
"@xyo-network/react-payload-raw-info": "^5.3.
|
|
76
|
-
"@xyo-network/react-payload-table": "^5.3.
|
|
77
|
-
"@xyo-network/react-shared": "^5.3.
|
|
78
|
-
"@xyo-network/react-table": "^5.3.
|
|
79
|
-
"@xyo-network/xl1-protocol": "^1.
|
|
80
|
-
"@xyo-network/xl1-protocol-sdk": "^1.5.
|
|
40
|
+
"@storybook/react-vite": "^9.0.15",
|
|
41
|
+
"@xylabs/assert": "^4.12.29",
|
|
42
|
+
"@xylabs/axios": "^4.12.29",
|
|
43
|
+
"@xylabs/delay": "^4.12.29",
|
|
44
|
+
"@xylabs/eth-address": "^4.12.29",
|
|
45
|
+
"@xylabs/exists": "^4.12.29",
|
|
46
|
+
"@xylabs/hex": "^4.12.29",
|
|
47
|
+
"@xylabs/promise": "^4.12.29",
|
|
48
|
+
"@xylabs/react-animation": "^6.3.7",
|
|
49
|
+
"@xylabs/react-error": "^6.3.7",
|
|
50
|
+
"@xylabs/react-flexbox": "^6.3.7",
|
|
51
|
+
"@xylabs/react-identicon": "^6.3.7",
|
|
52
|
+
"@xylabs/react-promise": "^6.3.7",
|
|
53
|
+
"@xylabs/react-quick-tip-button": "^6.3.7",
|
|
54
|
+
"@xylabs/react-shared": "^6.3.7",
|
|
55
|
+
"@xylabs/react-theme": "^6.3.7",
|
|
56
|
+
"@xylabs/typeof": "^4.12.29",
|
|
57
|
+
"@xyo-network/account": "^3.18.10",
|
|
58
|
+
"@xyo-network/archivist-memory": "^3.18.10",
|
|
59
|
+
"@xyo-network/archivist-model": "^3.18.10",
|
|
60
|
+
"@xyo-network/boundwitness-builder": "^3.18.10",
|
|
61
|
+
"@xyo-network/boundwitness-model": "^3.18.10",
|
|
62
|
+
"@xyo-network/bridge-http": "^3.18.10",
|
|
63
|
+
"@xyo-network/chain-analyze": "^1.5.36",
|
|
64
|
+
"@xyo-network/chain-protocol": "^1.5.36",
|
|
65
|
+
"@xyo-network/chain-services": "^1.5.36",
|
|
66
|
+
"@xyo-network/chain-utils": "^1.5.36",
|
|
67
|
+
"@xyo-network/chain-wrappers": "^1.5.36",
|
|
68
|
+
"@xyo-network/module-model": "^3.18.10",
|
|
69
|
+
"@xyo-network/payload-builder": "^3.18.10",
|
|
70
|
+
"@xyo-network/payload-model": "^3.18.10",
|
|
71
|
+
"@xyo-network/react-boundwitness-plugin": "^5.3.15",
|
|
72
|
+
"@xyo-network/react-chain-blockies": "^1.5.36",
|
|
73
|
+
"@xyo-network/react-chain-shared": "^1.5.36",
|
|
74
|
+
"@xyo-network/react-event": "^5.3.15",
|
|
75
|
+
"@xyo-network/react-payload-raw-info": "^5.3.15",
|
|
76
|
+
"@xyo-network/react-payload-table": "^5.3.15",
|
|
77
|
+
"@xyo-network/react-shared": "^5.3.15",
|
|
78
|
+
"@xyo-network/react-table": "^5.3.15",
|
|
79
|
+
"@xyo-network/xl1-protocol": "^1.5.16",
|
|
80
|
+
"@xyo-network/xl1-protocol-sdk": "^1.5.36"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
83
|
"@emotion/react": "^11.14.0",
|
|
84
|
-
"@emotion/styled": "^11.14.
|
|
85
|
-
"@mui/icons-material": "^7.
|
|
86
|
-
"@mui/material": "^7.
|
|
84
|
+
"@emotion/styled": "^11.14.1",
|
|
85
|
+
"@mui/icons-material": "^7.2.0",
|
|
86
|
+
"@mui/material": "^7.2.0",
|
|
87
87
|
"@types/react": "^19.1.8",
|
|
88
|
-
"@xylabs/hex": "^4.
|
|
89
|
-
"@xylabs/ts-scripts-yarn3": "^6.5.
|
|
90
|
-
"@xylabs/tsconfig-react": "^6.5.
|
|
91
|
-
"@xyo-network/api-models": "^3.18.
|
|
92
|
-
"knip": "^5.61.
|
|
88
|
+
"@xylabs/hex": "^4.12.29",
|
|
89
|
+
"@xylabs/ts-scripts-yarn3": "^6.5.12",
|
|
90
|
+
"@xylabs/tsconfig-react": "^6.5.12",
|
|
91
|
+
"@xyo-network/api-models": "^3.18.10",
|
|
92
|
+
"knip": "^5.61.3",
|
|
93
93
|
"react": "^19.1.0",
|
|
94
94
|
"react-dom": "^19.1.0",
|
|
95
|
-
"react-router-dom": "^7.6.
|
|
96
|
-
"storybook": "^9.0.
|
|
95
|
+
"react-router-dom": "^7.6.3",
|
|
96
|
+
"storybook": "^9.0.15",
|
|
97
97
|
"typescript": "^5.8.3"
|
|
98
98
|
},
|
|
99
99
|
"peerDependencies": {
|
|
@@ -1,25 +1,40 @@
|
|
|
1
1
|
import type { ChipProps } from '@mui/material'
|
|
2
2
|
import { Chip } from '@mui/material'
|
|
3
3
|
import { EthAddress } from '@xylabs/eth-address'
|
|
4
|
+
import { toAddress } from '@xylabs/hex'
|
|
5
|
+
import { isString, isUndefined } from '@xylabs/typeof'
|
|
4
6
|
import { BlockiesAvatar } from '@xyo-network/react-chain-blockies'
|
|
5
7
|
import type { HydratedBlock } from '@xyo-network/xl1-protocol'
|
|
6
8
|
import React, { useMemo } from 'react'
|
|
7
9
|
|
|
10
|
+
import { ChipSkeleton } from './ChipSkeleton.tsx'
|
|
11
|
+
|
|
12
|
+
const formatProducerAddress = (address?: string): string | undefined => {
|
|
13
|
+
if (isUndefined(address) || !isString(address)) return undefined
|
|
14
|
+
const formattedAddress = toAddress(address)
|
|
15
|
+
return EthAddress.parse(formattedAddress)?.toShortString(4)
|
|
16
|
+
}
|
|
17
|
+
|
|
8
18
|
export interface BlockProducerChipProps extends ChipProps {
|
|
9
19
|
block?: HydratedBlock
|
|
10
20
|
}
|
|
11
|
-
export const BlockProducerChip: React.FC<BlockProducerChipProps> = ({
|
|
21
|
+
export const BlockProducerChip: React.FC<BlockProducerChipProps> = ({
|
|
22
|
+
block, sx, ...props
|
|
23
|
+
}) => {
|
|
12
24
|
const blockProducer = block?.[0].addresses[0]
|
|
13
25
|
|
|
14
|
-
const shortedBlockProducer = blockProducer === undefined ? null :
|
|
26
|
+
const shortedBlockProducer = blockProducer === undefined ? null : formatProducerAddress(blockProducer)
|
|
15
27
|
|
|
16
28
|
const avatar = useMemo(() => blockProducer === '' ? undefined : <BlockiesAvatar blockiesOptions={{ seed: blockProducer }} />, [blockProducer])
|
|
17
29
|
|
|
18
30
|
return (
|
|
19
31
|
<Chip
|
|
20
32
|
avatar={avatar}
|
|
21
|
-
label={
|
|
33
|
+
label={shortedBlockProducer ?? <ChipSkeleton width={115} />}
|
|
22
34
|
title={`Block producer: ${blockProducer}`}
|
|
35
|
+
sx={{
|
|
36
|
+
fontFamily: 'monospace', cursor: 'pointer', ...sx,
|
|
37
|
+
}}
|
|
23
38
|
{...props}
|
|
24
39
|
/>
|
|
25
40
|
)
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { XyoChainIteratorParams } from '@xyo-network/chain-services'
|
|
2
|
+
import type { HydratedBlock } from '@xyo-network/xl1-protocol'
|
|
2
3
|
import type { ComponentType } from 'react'
|
|
3
4
|
import { useState } from 'react'
|
|
4
5
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { usePromise } from '@xylabs/react-promise'
|
|
2
2
|
import { isDefined } from '@xylabs/typeof'
|
|
3
|
-
import type {
|
|
3
|
+
import type { XyoChainIteratorParams } from '@xyo-network/chain-services'
|
|
4
|
+
import type { HydratedBlock } from '@xyo-network/xl1-protocol'
|
|
4
5
|
import type { ComponentType } from 'react'
|
|
5
6
|
|
|
6
7
|
import { useChainAnalyzersContext } from '../../../context/index.ts'
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
Skeleton,
|
|
2
3
|
TableCell, Tooltip, Typography,
|
|
3
4
|
} from '@mui/material'
|
|
4
5
|
import { isDefined } from '@xylabs/typeof'
|
|
@@ -22,7 +23,7 @@ export const BlockEpochTableCell: React.FC<BlockEpochTableCellProps> = ({
|
|
|
22
23
|
<TableCell {...props}>
|
|
23
24
|
<Tooltip title={`Block Epoch: ${dateTime}`}>
|
|
24
25
|
<Typography component="span" variant="body1">
|
|
25
|
-
{age}
|
|
26
|
+
{age ?? <Skeleton width={115} /> }
|
|
26
27
|
</Typography>
|
|
27
28
|
</Tooltip>
|
|
28
29
|
</TableCell>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Avatar,
|
|
3
3
|
Chip,
|
|
4
|
+
Skeleton,
|
|
4
5
|
TableCell, Tooltip,
|
|
5
6
|
} from '@mui/material'
|
|
6
7
|
import { isHash } from '@xylabs/hex'
|
|
@@ -10,6 +11,7 @@ import { usePayloadRootHash } from '@xyo-network/react-shared'
|
|
|
10
11
|
import React from 'react'
|
|
11
12
|
|
|
12
13
|
import { FeatureNotAvailable } from '../../../FeatureNotAvailable.tsx'
|
|
14
|
+
import { ChipSkeleton } from '../../ChipSkeleton.tsx'
|
|
13
15
|
import { useLinkedBlockItem } from './hooks/index.ts'
|
|
14
16
|
import type { BlockTableCellProps } from './lib/index.ts'
|
|
15
17
|
|
|
@@ -26,30 +28,26 @@ export const BlockHashTableCell: React.FC<BlockHashTableCellProps> = ({
|
|
|
26
28
|
const [ref, handleClick] = useLinkedBlockItem('block-hash', hash)
|
|
27
29
|
const [notAvailable, setNotAvailable] = React.useState(false)
|
|
28
30
|
|
|
29
|
-
const shortenedHash = isHash(hash) ? `${hash.slice(0, 4)}...${hash.slice(-5, -1)}` :
|
|
31
|
+
const shortenedHash = isHash(hash) ? `${hash.slice(0, 4)}...${hash.slice(-5, -1)}` : undefined
|
|
30
32
|
|
|
31
33
|
return (
|
|
32
34
|
<TableCell ref={ref} {...props}>
|
|
33
|
-
{
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
value={hash}
|
|
42
|
-
{...identiconProps}
|
|
43
|
-
/>
|
|
44
|
-
</Avatar>
|
|
45
|
-
)}
|
|
46
|
-
sx={{ cursor: 'pointer' }}
|
|
47
|
-
label={shortenedHash}
|
|
48
|
-
onClick={linked ? handleClick : () => setNotAvailable(true)}
|
|
35
|
+
<Tooltip title={`Block Hash: ${hash}`}>
|
|
36
|
+
<Chip
|
|
37
|
+
avatar={(
|
|
38
|
+
<Avatar sx={{ background: 'white' }}>
|
|
39
|
+
<Identicon
|
|
40
|
+
size={16}
|
|
41
|
+
value={hash}
|
|
42
|
+
{...identiconProps}
|
|
49
43
|
/>
|
|
50
|
-
</
|
|
51
|
-
)
|
|
52
|
-
|
|
44
|
+
</Avatar>
|
|
45
|
+
)}
|
|
46
|
+
sx={{ cursor: 'pointer', fontFamily: 'monospace' }}
|
|
47
|
+
label={shortenedHash ?? <ChipSkeleton />}
|
|
48
|
+
onClick={linked ? handleClick : () => setNotAvailable(true)}
|
|
49
|
+
/>
|
|
50
|
+
</Tooltip>
|
|
53
51
|
{(notAvailableDialog && notAvailable)
|
|
54
52
|
? <FeatureNotAvailable featureName="Block Details" open={notAvailable} onClick={() => setNotAvailable(false)} />
|
|
55
53
|
: null}
|
|
@@ -13,7 +13,12 @@ export const useLinkedBlockItem = (noun?: BlockHeaderEventNouns, data?: string |
|
|
|
13
13
|
console.warn('useLinkedBlockItem: noun is required')
|
|
14
14
|
return
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
const selection = globalThis.getSelection()
|
|
17
|
+
const isTextSelected = selection && selection.toString().length > 0
|
|
18
|
+
|
|
19
|
+
if (!isTextSelected) {
|
|
20
|
+
dispatch(noun, 'click', data)
|
|
21
|
+
}
|
|
17
22
|
}
|
|
18
23
|
|
|
19
24
|
return [ref, handleClick]
|
|
@@ -25,7 +25,7 @@ WithLocalArchivist.args = {}
|
|
|
25
25
|
WithLocalArchivist.decorators = [ChainArchivistDelayedInsertDecorator]
|
|
26
26
|
|
|
27
27
|
const WithLocalArchivistPollMaxBlocks = Template.bind({})
|
|
28
|
-
WithLocalArchivistPollMaxBlocks.args = { blockChainRenderProps: { maxBlocks: 4 } }
|
|
28
|
+
WithLocalArchivistPollMaxBlocks.args = { blockChainRenderProps: { maxBlocks: 4, name: 'unknown' } }
|
|
29
29
|
WithLocalArchivistPollMaxBlocks.decorators = [ChainArchivistDelayedInsertDecorator]
|
|
30
30
|
|
|
31
31
|
export {
|