@xyo-network/react-chain-blockchain 1.8.2 → 1.8.4
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/context/chain/Context.d.ts +3 -3
- package/dist/browser/context/chain/State.d.ts +2 -2
- package/dist/browser/context/chain/State.d.ts.map +1 -1
- package/dist/browser/context/chain/use.d.ts +1 -1
- package/dist/browser/hooks/chain-iterator/ChainIteratorStore.d.ts +2 -2
- package/dist/browser/hooks/chain-iterator/ChainIteratorStore.d.ts.map +1 -1
- package/dist/browser/hooks/chain-iterator/useChainIteratorUpdatingHead.d.ts +2 -2
- package/dist/browser/hooks/chain-iterator/useChainIteratorUpdatingHead.d.ts.map +1 -1
- package/dist/browser/index.mjs +2 -2
- package/dist/browser/index.mjs.map +1 -1
- package/package.json +21 -21
- package/src/components/block/ProducerChip.tsx +2 -2
- package/src/context/chain/State.ts +2 -2
- package/src/hooks/chain-iterator/ChainIteratorStore.ts +3 -3
- package/src/hooks/chain-iterator/useChainIteratorUpdatingHead.ts +2 -2
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.8.
|
|
4
|
+
"version": "1.8.4",
|
|
5
5
|
"description": "XYO Layer One React SDK Blockchain",
|
|
6
6
|
"homepage": "https://xylabs.com",
|
|
7
7
|
"bugs": {
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@storybook/react-vite": "^9.0.18",
|
|
48
|
-
"@xylabs/assert": "^4.15.
|
|
49
|
-
"@xylabs/axios": "^4.15.
|
|
50
|
-
"@xylabs/delay": "^4.15.
|
|
51
|
-
"@xylabs/eth-address": "^4.15.
|
|
52
|
-
"@xylabs/exists": "^4.15.
|
|
53
|
-
"@xylabs/hex": "^4.15.
|
|
54
|
-
"@xylabs/promise": "^4.15.
|
|
48
|
+
"@xylabs/assert": "^4.15.3",
|
|
49
|
+
"@xylabs/axios": "^4.15.3",
|
|
50
|
+
"@xylabs/delay": "^4.15.3",
|
|
51
|
+
"@xylabs/eth-address": "^4.15.3",
|
|
52
|
+
"@xylabs/exists": "^4.15.3",
|
|
53
|
+
"@xylabs/hex": "^4.15.3",
|
|
54
|
+
"@xylabs/promise": "^4.15.3",
|
|
55
55
|
"@xylabs/react-animation": "^6.4.0",
|
|
56
56
|
"@xylabs/react-error": "^6.4.0",
|
|
57
57
|
"@xylabs/react-flexbox": "^6.4.0",
|
|
@@ -59,41 +59,41 @@
|
|
|
59
59
|
"@xylabs/react-quick-tip-button": "^6.4.0",
|
|
60
60
|
"@xylabs/react-shared": "^6.4.0",
|
|
61
61
|
"@xylabs/react-theme": "^6.4.0",
|
|
62
|
-
"@xylabs/typeof": "^4.15.
|
|
62
|
+
"@xylabs/typeof": "^4.15.3",
|
|
63
63
|
"@xyo-network/account": "^4.3.0",
|
|
64
64
|
"@xyo-network/archivist-memory": "^4.3.0",
|
|
65
65
|
"@xyo-network/archivist-model": "^4.3.0",
|
|
66
66
|
"@xyo-network/boundwitness-builder": "^4.3.0",
|
|
67
67
|
"@xyo-network/boundwitness-model": "^4.3.0",
|
|
68
68
|
"@xyo-network/bridge-http": "^4.3.0",
|
|
69
|
-
"@xyo-network/chain-analyze": "^1.8.
|
|
70
|
-
"@xyo-network/chain-protocol": "^1.8.
|
|
71
|
-
"@xyo-network/chain-services": "^1.8.
|
|
72
|
-
"@xyo-network/chain-utils": "^1.8.
|
|
73
|
-
"@xyo-network/chain-wrappers": "^1.8.
|
|
69
|
+
"@xyo-network/chain-analyze": "^1.8.4",
|
|
70
|
+
"@xyo-network/chain-protocol": "^1.8.4",
|
|
71
|
+
"@xyo-network/chain-services": "^1.8.4",
|
|
72
|
+
"@xyo-network/chain-utils": "^1.8.4",
|
|
73
|
+
"@xyo-network/chain-wrappers": "^1.8.4",
|
|
74
74
|
"@xyo-network/module-model": "^4.3.0",
|
|
75
75
|
"@xyo-network/payload-builder": "^4.3.0",
|
|
76
76
|
"@xyo-network/payload-model": "^4.3.0",
|
|
77
77
|
"@xyo-network/react-boundwitness-plugin": "^6.2.0",
|
|
78
|
-
"@xyo-network/react-chain-blockies": "^1.8.
|
|
79
|
-
"@xyo-network/react-chain-shared": "^1.8.
|
|
78
|
+
"@xyo-network/react-chain-blockies": "^1.8.4",
|
|
79
|
+
"@xyo-network/react-chain-shared": "^1.8.4",
|
|
80
80
|
"@xyo-network/react-event": "^6.2.0",
|
|
81
81
|
"@xyo-network/react-payload-raw-info": "^6.2.0",
|
|
82
82
|
"@xyo-network/react-payload-table": "^6.2.0",
|
|
83
83
|
"@xyo-network/react-shared": "^6.2.0",
|
|
84
84
|
"@xyo-network/react-table": "^6.2.0",
|
|
85
85
|
"@xyo-network/xl1-protocol": "^1.7.33",
|
|
86
|
-
"@xyo-network/xl1-protocol-sdk": "^1.8.
|
|
86
|
+
"@xyo-network/xl1-protocol-sdk": "^1.8.4"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
89
|
"@emotion/react": "^11.14.0",
|
|
90
90
|
"@emotion/styled": "^11.14.1",
|
|
91
91
|
"@mui/icons-material": "^7.2.0",
|
|
92
92
|
"@mui/material": "^7.2.0",
|
|
93
|
-
"@types/react": "^19.1.
|
|
94
|
-
"@xylabs/hex": "^4.15.
|
|
95
|
-
"@xylabs/ts-scripts-yarn3": "^7.0.
|
|
96
|
-
"@xylabs/tsconfig-react": "^7.0.
|
|
93
|
+
"@types/react": "^19.1.9",
|
|
94
|
+
"@xylabs/hex": "^4.15.3",
|
|
95
|
+
"@xylabs/ts-scripts-yarn3": "^7.0.2",
|
|
96
|
+
"@xylabs/tsconfig-react": "^7.0.2",
|
|
97
97
|
"@xyo-network/api-models": "^4.3.0",
|
|
98
98
|
"knip": "^5.62.0",
|
|
99
99
|
"react": "^19.1.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ChipProps } from '@mui/material'
|
|
2
2
|
import { Chip } from '@mui/material'
|
|
3
|
-
import {
|
|
3
|
+
import { EthAddressWrapper } from '@xylabs/eth-address'
|
|
4
4
|
import { toAddress } from '@xylabs/hex'
|
|
5
5
|
import { isString, isUndefined } from '@xylabs/typeof'
|
|
6
6
|
import { BlockiesAvatar } from '@xyo-network/react-chain-blockies'
|
|
@@ -12,7 +12,7 @@ import { ChipSkeleton } from './ChipSkeleton.tsx'
|
|
|
12
12
|
const formatProducerAddress = (address?: string): string | undefined => {
|
|
13
13
|
if (isUndefined(address) || !isString(address)) return undefined
|
|
14
14
|
const formattedAddress = toAddress(address)
|
|
15
|
-
return
|
|
15
|
+
return EthAddressWrapper.parse(formattedAddress)?.toShortString(4)
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export interface BlockProducerChipProps extends ChipProps {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Address } from '@xylabs/hex'
|
|
2
2
|
import type { ContextExState } from '@xylabs/react-shared'
|
|
3
3
|
import type { ArchivistInstance } from '@xyo-network/archivist-model'
|
|
4
|
-
import type {
|
|
4
|
+
import type { ChainBlockNumberIteratorService } from '@xyo-network/xl1-protocol'
|
|
5
5
|
|
|
6
6
|
export type ChainInfoState = ContextExState<{
|
|
7
7
|
chainArchivist?: ArchivistInstance
|
|
8
8
|
chainId?: Address
|
|
9
|
-
chainIterator?:
|
|
9
|
+
chainIterator?: ChainBlockNumberIteratorService
|
|
10
10
|
}>
|
|
@@ -3,7 +3,7 @@ import type { XyoChainIteratorParams } from '@xyo-network/chain-services'
|
|
|
3
3
|
import { ChainBlockNumberIterationService } from '@xyo-network/chain-services'
|
|
4
4
|
import { PayloadBuilder } from '@xyo-network/payload-builder'
|
|
5
5
|
import type {
|
|
6
|
-
|
|
6
|
+
EventingChainBlockNumberIteratorService, HeadEventArgs,
|
|
7
7
|
HydratedBlock,
|
|
8
8
|
} from '@xyo-network/xl1-protocol'
|
|
9
9
|
import { hydrateBlock } from '@xyo-network/xl1-protocol-sdk'
|
|
@@ -13,12 +13,12 @@ export type Listener = (...args: Array<unknown>) => void
|
|
|
13
13
|
export type ChainIteratorStoreValues = { chainIterator: ChainBlockNumberIterationService; error?: Error; head: HydratedBlock }
|
|
14
14
|
|
|
15
15
|
export class ChainIteratorStore {
|
|
16
|
-
private _chainIterator:
|
|
16
|
+
private _chainIterator: EventingChainBlockNumberIteratorService | undefined
|
|
17
17
|
private _externalListeners: Listener[] = []
|
|
18
18
|
private _internalUnsubscribes: WeakRef<() => void>[] = []
|
|
19
19
|
private _values: ChainIteratorStoreValues | undefined
|
|
20
20
|
|
|
21
|
-
get chainIterator():
|
|
21
|
+
get chainIterator(): EventingChainBlockNumberIteratorService {
|
|
22
22
|
return assertEx(this._chainIterator, () => 'ChainIteratorStore has not been initialized')
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { toHex } from '@xylabs/hex'
|
|
2
2
|
import type { ArchivistInstance } from '@xyo-network/archivist-model'
|
|
3
3
|
import { findMostRecentBlock } from '@xyo-network/chain-protocol'
|
|
4
|
-
import type {
|
|
4
|
+
import type { ChainBlockNumberIteratorService } from '@xyo-network/xl1-protocol'
|
|
5
5
|
import { useEffect, useState } from 'react'
|
|
6
6
|
|
|
7
7
|
export interface ChainIteratorUpdatingHeadParams {
|
|
8
8
|
chainArchivist?: ArchivistInstance
|
|
9
|
-
chainIterator?:
|
|
9
|
+
chainIterator?: ChainBlockNumberIteratorService
|
|
10
10
|
interval?: number
|
|
11
11
|
maxBlocks?: number
|
|
12
12
|
}
|