@xyo-network/react-chain-blockchain 1.3.13 → 1.3.14
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/README.md +11 -1
- package/dist/browser/index.mjs +3 -16
- package/dist/browser/index.mjs.map +1 -1
- package/dist/types/stories/index.d.ts +0 -1
- package/dist/types/stories/index.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/components/block/BlockHeadingFlexbox.stories.tsx +1 -6
- package/src/components/block/table/Ex.stories.tsx +1 -1
- package/src/components/block/table/cell/TransactionCount.tsx +1 -1
- package/src/components/block/table/row/TableRow.stories.tsx +1 -1
- package/src/stories/ChainArchivistDecorator.tsx +1 -1
- package/src/stories/ChainArchivistDelayedInsertDecorator.tsx +1 -1
- package/src/stories/index.ts +0 -1
- package/dist/types/stories/buildRandomBlockchain.d.ts +0 -4
- package/dist/types/stories/buildRandomBlockchain.d.ts.map +0 -1
- package/src/stories/buildRandomBlockchain.ts +0 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/stories/index.ts"],"names":[],"mappings":"AAAA,cAAc
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/stories/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAA;AAC7C,cAAc,4CAA4C,CAAA;AAC1D,cAAc,iCAAiC,CAAA"}
|
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.
|
|
4
|
+
"version": "1.3.14",
|
|
5
5
|
"description": "XYO Layer One React SDK Blockchain",
|
|
6
6
|
"homepage": "https://xylabs.com",
|
|
7
7
|
"bugs": {
|
|
@@ -55,21 +55,21 @@
|
|
|
55
55
|
"@xyo-network/boundwitness-builder": "^3.14.16",
|
|
56
56
|
"@xyo-network/boundwitness-model": "^3.14.16",
|
|
57
57
|
"@xyo-network/bridge-http": "^3.14.16",
|
|
58
|
-
"@xyo-network/chain-analyze": "^1.3.
|
|
59
|
-
"@xyo-network/chain-protocol": "^1.3.
|
|
60
|
-
"@xyo-network/chain-services": "^1.3.
|
|
58
|
+
"@xyo-network/chain-analyze": "^1.3.14",
|
|
59
|
+
"@xyo-network/chain-protocol": "^1.3.14",
|
|
60
|
+
"@xyo-network/chain-services": "^1.3.14",
|
|
61
61
|
"@xyo-network/module-model": "^3.14.16",
|
|
62
62
|
"@xyo-network/payload-builder": "^3.14.16",
|
|
63
63
|
"@xyo-network/payload-model": "^3.14.16",
|
|
64
64
|
"@xyo-network/react-boundwitness-plugin": "^5.2.7",
|
|
65
|
-
"@xyo-network/react-chain-blockies": "^1.3.
|
|
65
|
+
"@xyo-network/react-chain-blockies": "^1.3.14",
|
|
66
66
|
"@xyo-network/react-event": "^5.2.7",
|
|
67
67
|
"@xyo-network/react-payload-raw-info": "^5.2.7",
|
|
68
68
|
"@xyo-network/react-payload-table": "^5.2.7",
|
|
69
69
|
"@xyo-network/react-shared": "^5.2.7",
|
|
70
70
|
"@xyo-network/react-table": "^5.2.7",
|
|
71
|
-
"@xyo-network/xl1-protocol": "^1.3.
|
|
72
|
-
"@xyo-network/xl1-protocol-sdk": "^1.3.
|
|
71
|
+
"@xyo-network/xl1-protocol": "^1.3.11",
|
|
72
|
+
"@xyo-network/xl1-protocol-sdk": "^1.3.14"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@emotion/react": "^11.14.0",
|
|
@@ -84,8 +84,8 @@
|
|
|
84
84
|
"@xylabs/tsconfig-react": "^6.5.5",
|
|
85
85
|
"@xyo-network/api-models": "^3.14.16",
|
|
86
86
|
"@xyo-network/archivist-memory": "^3.14.16",
|
|
87
|
-
"@xyo-network/chain-ethereum": "^1.3.
|
|
88
|
-
"@xyo-network/chain-utils": "^1.3.
|
|
87
|
+
"@xyo-network/chain-ethereum": "^1.3.14",
|
|
88
|
+
"@xyo-network/chain-utils": "^1.3.14",
|
|
89
89
|
"knip": "^5.52.0",
|
|
90
90
|
"react": "^19.1.0",
|
|
91
91
|
"react-dom": "^19.1.0",
|
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
Alert, AlertTitle, List, ListItem, Stack,
|
|
3
3
|
} from '@mui/material'
|
|
4
4
|
import type { Meta, StoryFn } from '@storybook/react'
|
|
5
|
+
import { buildRandomBlockChainBlocksOnly } from '@xyo-network/react-chain-shared'
|
|
5
6
|
import React, { useState } from 'react'
|
|
6
7
|
|
|
7
|
-
import { buildRandomBlockChainBlocksOnly } from '../../stories/index.ts'
|
|
8
8
|
import { BlockHeadingFlexbox } from './BlockHeadingFlexbox.tsx'
|
|
9
9
|
import type { BlockHeaderEventNouns } from './hooks/index.ts'
|
|
10
10
|
import { useBlockHeadingEvents } from './hooks/index.ts'
|
|
@@ -59,11 +59,6 @@ const TemplateWithEvents: StoryFn<typeof BlockHeadingFlexbox> = (args) => {
|
|
|
59
59
|
)
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
// TODO - use buildRandomChain helper
|
|
63
|
-
// const blockWithMultipleTransactions = ExampleBlockchainWithPayloads.find(block => block.block === 4) as unknown as BlockBoundWitness
|
|
64
|
-
// // Not necessarily true but naively assuming a block with multiple boundwitnesses has multiple transactions
|
|
65
|
-
// const blockTxs = blockWithMultipleTransactions.payload_hashes
|
|
66
|
-
|
|
67
62
|
const Default = Template.bind({})
|
|
68
63
|
Default.args = {}
|
|
69
64
|
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
Alert, AlertTitle, Snackbar,
|
|
3
3
|
} from '@mui/material'
|
|
4
4
|
import type { Meta, StoryFn } from '@storybook/react'
|
|
5
|
+
import { buildRandomBlockChain } from '@xyo-network/react-chain-shared'
|
|
5
6
|
import type { Event } from '@xyo-network/react-event'
|
|
6
7
|
import { useEvent } from '@xyo-network/react-event'
|
|
7
8
|
import React, { useState } from 'react'
|
|
8
9
|
|
|
9
|
-
import { buildRandomBlockChain } from '../../../stories/index.ts'
|
|
10
10
|
import { BlockchainTableEx } from './Ex.tsx'
|
|
11
11
|
import { BlockChainTableRow } from './row/index.ts'
|
|
12
12
|
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import type { Hash } from '@xylabs/hex'
|
|
6
6
|
import React, { useMemo } from 'react'
|
|
7
7
|
|
|
8
|
-
import { useTxsFromBlock } from '../../../../hooks/
|
|
8
|
+
import { useTxsFromBlock } from '../../../../hooks/index.ts'
|
|
9
9
|
import { useLinkedBlockItem } from './hooks/index.ts'
|
|
10
10
|
import type { BlockTableCellProps } from './lib/index.ts'
|
|
11
11
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Table, TableBody } from '@mui/material'
|
|
2
2
|
import type { Meta, StoryFn } from '@storybook/react'
|
|
3
|
+
import { buildRandomBlockChainBlocksOnly } from '@xyo-network/react-chain-shared'
|
|
3
4
|
import React from 'react'
|
|
4
5
|
|
|
5
|
-
import { buildRandomBlockChainBlocksOnly } from '../../../../stories/index.ts'
|
|
6
6
|
import { BlockChainTableRow } from './TableRow.tsx'
|
|
7
7
|
|
|
8
8
|
const [block] = await buildRandomBlockChainBlocksOnly(1)
|
|
@@ -4,11 +4,11 @@ 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
6
|
import { flattenHydratedBlocks } from '@xyo-network/chain-protocol'
|
|
7
|
+
import { buildRandomBlockChain } from '@xyo-network/react-chain-shared'
|
|
7
8
|
import React, { useEffect } from 'react'
|
|
8
9
|
|
|
9
10
|
import { getChainInformation } from '../lib/index.ts'
|
|
10
11
|
import type { BlockChainRenderBaseProps } from '../types/index.ts'
|
|
11
|
-
import { buildRandomBlockChain } from './buildRandomBlockchain.ts'
|
|
12
12
|
|
|
13
13
|
export const ChainArchivistDecorator: Decorator = (Story, context) => {
|
|
14
14
|
const [randomBlockChain] = usePromise(async () => await buildRandomBlockChain(), [])
|
|
@@ -5,12 +5,12 @@ import { usePromise } from '@xylabs/react-promise'
|
|
|
5
5
|
import { MemoryArchivist } from '@xyo-network/archivist-memory'
|
|
6
6
|
import { ArchivistConfigSchema } from '@xyo-network/archivist-model'
|
|
7
7
|
import { flattenHydratedBlock } from '@xyo-network/chain-protocol'
|
|
8
|
+
import { buildRandomBlockChain } from '@xyo-network/react-chain-shared'
|
|
8
9
|
import type { BlockBoundWitness } from '@xyo-network/xl1-protocol'
|
|
9
10
|
import React, { useEffect, useState } from 'react'
|
|
10
11
|
|
|
11
12
|
import { getChainInformation } from '../lib/index.ts'
|
|
12
13
|
import type { BlockChainRenderBaseProps } from '../types/index.ts'
|
|
13
|
-
import { buildRandomBlockChain } from './buildRandomBlockchain.ts'
|
|
14
14
|
|
|
15
15
|
let chainArchivistRef: MemoryArchivist | undefined
|
|
16
16
|
|
package/src/stories/index.ts
CHANGED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { HydratedBlock } from '@xyo-network/xl1-protocol';
|
|
2
|
-
export declare const buildRandomBlockChain: (blockCount?: number) => Promise<HydratedBlock[]>;
|
|
3
|
-
export declare const buildRandomBlockChainBlocksOnly: (blockCount?: number) => Promise<HydratedBlock[]>;
|
|
4
|
-
//# sourceMappingURL=buildRandomBlockchain.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"buildRandomBlockchain.d.ts","sourceRoot":"","sources":["../../../src/stories/buildRandomBlockchain.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAE9D,eAAO,MAAM,qBAAqB,GAAU,mBAAe,6BAO1D,CAAA;AAED,eAAO,MAAM,+BAA+B,GAAU,mBAAe,6BAGpE,CAAA"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Account } from '@xyo-network/account'
|
|
2
|
-
import { buildRandomChain } from '@xyo-network/chain-protocol'
|
|
3
|
-
import type { HydratedBlock } from '@xyo-network/xl1-protocol'
|
|
4
|
-
|
|
5
|
-
export const buildRandomBlockChain = async (blockCount = 10) => {
|
|
6
|
-
// Create a producer
|
|
7
|
-
const initialBlockProducer = await Account.random()
|
|
8
|
-
|
|
9
|
-
// Create multiple blocks
|
|
10
|
-
const blocks: HydratedBlock[] = await buildRandomChain(initialBlockProducer, blockCount)
|
|
11
|
-
return blocks
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const buildRandomBlockChainBlocksOnly = async (blockCount = 10) => {
|
|
15
|
-
const chain = await buildRandomChain(await Account.random(), blockCount)
|
|
16
|
-
return chain
|
|
17
|
-
}
|