@xyo-network/react-chain-blockchain 1.18.1 → 1.18.2

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.
Files changed (29) hide show
  1. package/dist/browser/components/block/ProducerChip.d.ts +1 -1
  2. package/dist/browser/components/block/ProducerChip.d.ts.map +1 -1
  3. package/dist/browser/components/block/menu/Expanded.d.ts +1 -1
  4. package/dist/browser/components/block/menu/Expanded.d.ts.map +1 -1
  5. package/dist/browser/components/payload/builder/transfer/Form.d.ts.map +1 -1
  6. package/dist/browser/components/payload/fields/BlockNumberTextField.d.ts +1 -1
  7. package/dist/browser/components/payload/fields/BlockNumberTextField.d.ts.map +1 -1
  8. package/dist/browser/components/transactions/TransactionsQuickTipButton.d.ts +1 -1
  9. package/dist/browser/components/transactions/TransactionsQuickTipButton.d.ts.map +1 -1
  10. package/dist/browser/components/transactions/submit/Builder.d.ts +1 -1
  11. package/dist/browser/components/transactions/submit/Builder.d.ts.map +1 -1
  12. package/dist/browser/index.mjs +17 -17
  13. package/dist/browser/index.mjs.map +1 -1
  14. package/package.json +33 -34
  15. package/src/components/account/BalanceHistoryFlexbox.stories.tsx +1 -1
  16. package/src/components/account/table/BalanceHistoryTableEx.stories.tsx +2 -2
  17. package/src/components/account/table/RawAmountTableCell.tsx +1 -1
  18. package/src/components/block/ProducerChip.tsx +1 -1
  19. package/src/components/block/menu/Expanded.tsx +1 -1
  20. package/src/components/chain/hooks/useOnBlock.ts +10 -10
  21. package/src/components/payload/builder/producer-intent/Form.tsx +1 -1
  22. package/src/components/payload/builder/transfer/Form.tsx +2 -3
  23. package/src/components/payload/fields/BlockNumberTextField.tsx +1 -1
  24. package/src/components/transactions/TransactionsQuickTipButton.tsx +1 -1
  25. package/src/components/transactions/submit/Builder.tsx +2 -2
  26. package/src/components/transactions/submit/SubmitChain.tsx +2 -2
  27. package/src/context/analyzer/Provider.tsx +1 -1
  28. package/src/stories/ChainArchivistDecorator.tsx +1 -1
  29. package/src/stories/ChainArchivistDelayedInsertDecorator.tsx +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.18.1",
4
+ "version": "1.18.2",
5
5
  "description": "XYO Layer One React SDK Blockchain",
6
6
  "homepage": "https://xylabs.com",
7
7
  "bugs": {
@@ -47,8 +47,8 @@
47
47
  "package-cycle": "echo Nothing to do"
48
48
  },
49
49
  "dependencies": {
50
- "@storybook/react-vite": "~10.1.11",
51
- "@xylabs/axios": "~5.0.61",
50
+ "@storybook/react-vite": "~10.2.0",
51
+ "@xylabs/axios": "~5.0.64",
52
52
  "@xylabs/react-animation": "~7.1.9",
53
53
  "@xylabs/react-error": "~7.1.9",
54
54
  "@xylabs/react-flexbox": "~7.1.9",
@@ -56,52 +56,51 @@
56
56
  "@xylabs/react-quick-tip-button": "~7.1.9",
57
57
  "@xylabs/react-shared": "~7.1.9",
58
58
  "@xylabs/react-theme": "~7.1.9",
59
- "@xylabs/sdk-js": "~5.0.61",
60
- "@xyo-network/account": "~5.2.22",
61
- "@xyo-network/archivist-memory": "~5.2.22",
62
- "@xyo-network/archivist-model": "~5.2.22",
63
- "@xyo-network/boundwitness-builder": "~5.2.22",
64
- "@xyo-network/boundwitness-model": "~5.2.22",
65
- "@xyo-network/chain-analyze": "~1.18.1",
66
- "@xyo-network/chain-protocol": "~1.18.1",
67
- "@xyo-network/chain-wrappers": "~1.18.1",
68
- "@xyo-network/module-model": "~5.2.22",
69
- "@xyo-network/payload-builder": "~5.2.22",
70
- "@xyo-network/payload-model": "~5.2.22",
59
+ "@xylabs/sdk-js": "~5.0.64",
60
+ "@xyo-network/account": "~5.2.25",
61
+ "@xyo-network/archivist-memory": "~5.2.25",
62
+ "@xyo-network/archivist-model": "~5.2.25",
63
+ "@xyo-network/boundwitness-builder": "~5.2.25",
64
+ "@xyo-network/boundwitness-model": "~5.2.25",
65
+ "@xyo-network/chain-analyze": "~1.18.2",
66
+ "@xyo-network/chain-protocol": "~1.18.2",
67
+ "@xyo-network/chain-wrappers": "~1.18.2",
68
+ "@xyo-network/module-model": "~5.2.25",
69
+ "@xyo-network/payload-builder": "~5.2.25",
70
+ "@xyo-network/payload-model": "~5.2.25",
71
71
  "@xyo-network/react-boundwitness-plugin": "~7.4.2",
72
- "@xyo-network/react-chain-blockies": "~1.18.1",
73
- "@xyo-network/react-chain-provider": "~1.18.1",
74
- "@xyo-network/react-chain-shared": "~1.18.1",
72
+ "@xyo-network/react-chain-blockies": "~1.18.2",
73
+ "@xyo-network/react-chain-provider": "~1.18.2",
74
+ "@xyo-network/react-chain-shared": "~1.18.2",
75
75
  "@xyo-network/react-error": "~7.4.2",
76
76
  "@xyo-network/react-event": "~7.4.2",
77
77
  "@xyo-network/react-payload-raw-info": "~7.4.2",
78
78
  "@xyo-network/react-payload-table": "~7.4.2",
79
79
  "@xyo-network/react-shared": "~7.4.2",
80
80
  "@xyo-network/react-table": "~7.4.2",
81
- "@xyo-network/xl1-sdk": "~1.18.2"
81
+ "@xyo-network/xl1-sdk": "~1.19.4"
82
82
  },
83
83
  "devDependencies": {
84
84
  "@emotion/react": "~11.14.0",
85
85
  "@emotion/styled": "~11.14.1",
86
86
  "@mui/icons-material": "~7.3.7",
87
87
  "@mui/material": "~7.3.7",
88
- "@types/react": "~19.2.8",
88
+ "@types/react": "~19.2.9",
89
89
  "@xylabs/react-button": "~7.1.9",
90
- "@xylabs/sdk-js": "~5.0.61",
91
- "@xylabs/ts-scripts-yarn3": "~7.2.32",
92
- "@xylabs/tsconfig": "~7.2.32",
93
- "@xylabs/tsconfig-dom": "~7.2.32",
94
- "@xylabs/tsconfig-react": "~7.2.32",
95
- "@xyo-network/api-models": "~5.2.22",
96
- "@xyo-network/bridge-http": "~5.2.22",
97
- "@xyo-network/xl1-network-model": "~1.18.14",
98
- "@xyo-network/xl1-sdk": "~1.18.2",
99
- "axios": "^1.13.2",
90
+ "@xylabs/sdk-js": "~5.0.64",
91
+ "@xylabs/ts-scripts-yarn3": "~7.3.2",
92
+ "@xylabs/tsconfig": "~7.3.2",
93
+ "@xylabs/tsconfig-dom": "~7.3.2",
94
+ "@xylabs/tsconfig-react": "~7.3.2",
95
+ "@xyo-network/api-models": "~5.2.25",
96
+ "@xyo-network/bridge-http": "~5.2.25",
97
+ "@xyo-network/xl1-sdk": "~1.19.4",
98
+ "axios": "^1.13.3",
100
99
  "eslint": "^9.39.2",
101
- "react": "~19.2.3",
102
- "react-dom": "~19.2.3",
103
- "react-router-dom": "^7.12.0",
104
- "storybook": "~10.1.11",
100
+ "react": "~19.2.4",
101
+ "react-dom": "~19.2.4",
102
+ "react-router-dom": "^7.13.0",
103
+ "storybook": "~10.2.0",
105
104
  "typescript": "~5.9.3"
106
105
  },
107
106
  "peerDependencies": {
@@ -1,7 +1,7 @@
1
1
  import type { Meta, StoryFn } from '@storybook/react-vite'
2
2
  import type { Address } from '@xylabs/sdk-js'
3
3
  import { useHttpRpcViewer } from '@xyo-network/react-chain-provider'
4
- import { LocalNetwork } from '@xyo-network/xl1-network-model'
4
+ import { LocalNetwork } from '@xyo-network/xl1-sdk'
5
5
  import React from 'react'
6
6
 
7
7
  import { AccountBalanceHistoryFlexBox } from './BalanceHistoryFlexbox.tsx'
@@ -10,8 +10,8 @@ import { useAccountBalanceHistory, useHttpRpcViewer } from '@xyo-network/react-c
10
10
  import { ErrorRender } from '@xyo-network/react-error'
11
11
  import type { Event } from '@xyo-network/react-event'
12
12
  import { useEvent } from '@xyo-network/react-event'
13
- import { LocalNetwork } from '@xyo-network/xl1-network-model'
14
- import type { XL1BlockRange } from '@xyo-network/xl1-protocol'
13
+ import type { XL1BlockRange } from '@xyo-network/xl1-sdk'
14
+ import { LocalNetwork } from '@xyo-network/xl1-sdk'
15
15
  import { useState } from 'react'
16
16
 
17
17
  import { usePagedAccountBalanceHistory } from '../hooks/index.ts'
@@ -5,7 +5,7 @@ import {
5
5
  import { isDefined, toHex } from '@xylabs/sdk-js'
6
6
  import type { BalanceTransactionType } from '@xyo-network/react-chain-provider'
7
7
  import { useEvent } from '@xyo-network/react-event'
8
- import { XL1Amount } from '@xyo-network/xl1-protocol'
8
+ import { XL1Amount } from '@xyo-network/xl1-sdk'
9
9
  import React from 'react'
10
10
 
11
11
  import type { BalanceHistoryEventNouns } from './types/index.ts'
@@ -4,7 +4,7 @@ import {
4
4
  EthAddressWrapper, isString, isUndefined, toAddress,
5
5
  } from '@xylabs/sdk-js'
6
6
  import { BlockiesAvatar } from '@xyo-network/react-chain-blockies'
7
- import type { HydratedBlock } from '@xyo-network/xl1-protocol'
7
+ import type { HydratedBlock } from '@xyo-network/xl1-sdk'
8
8
  import React, { useMemo } from 'react'
9
9
 
10
10
  import { ChipSkeleton } from './ChipSkeleton.tsx'
@@ -1,7 +1,7 @@
1
1
  import { MoreVert } from '@mui/icons-material'
2
2
  import { IconButton, Menu } from '@mui/material'
3
3
  import { BWJsonMenuItem, BWPreviousHashMenuItem } from '@xyo-network/react-boundwitness-plugin'
4
- import type { HydratedBlock } from '@xyo-network/xl1-protocol'
4
+ import type { HydratedBlock } from '@xyo-network/xl1-sdk'
5
5
  import React from 'react'
6
6
 
7
7
  import { useAnchorElement } from '../hooks/index.ts'
@@ -14,15 +14,15 @@ export const useOnBlock = (
14
14
  * But, since we get new blockComponents regardless, the hook rerenders anyway so consumers can get
15
15
  * the latest blocksWhilePaused value without having to rely on a state update.
16
16
  */
17
- const blocksWhilePaused = useRef<HydratedBlock[]>([])
17
+ const blocksWhilePausedRef = useRef<HydratedBlock[]>([])
18
18
  // Because the useEffect has liveHead AND pollingState, every time the polling state changes, the hook will
19
19
  // run a second time with the live head from the previous run. This is why we need to keep track of the last
20
20
  // live head so we can compare it to the current live head and prevent the hook from adding the same block twice
21
- const lastLiveHead = useRef<HydratedBlock | undefined>(liveHead)
21
+ const lastLiveHeadRef = useRef<HydratedBlock | undefined>(liveHead)
22
22
 
23
23
  useEffect(() => {
24
- const lastLiveHeadBlock = lastLiveHead.current?.[0]
25
- const blocksWhilePausedBlock = lastLiveHead.current?.[0]
24
+ const lastLiveHeadBlock = lastLiveHeadRef.current?.[0]
25
+ const blocksWhilePausedBlock = lastLiveHeadRef.current?.[0]
26
26
  const liveHeadBlock = liveHead?.[0]
27
27
 
28
28
  // use lastLiveHead to prevent the hook from adding the same block multiple times
@@ -30,20 +30,20 @@ export const useOnBlock = (
30
30
 
31
31
  if (liveHead && onAddBlock) {
32
32
  // update lastLiveHead
33
- lastLiveHead.current = liveHead
33
+ lastLiveHeadRef.current = liveHead
34
34
 
35
35
  // if the polling state is paused and the block is new, add it to the blocksWhilePaused array
36
36
  const isNewBlock = initialHeadNumber !== liveHeadBlock?.block && liveHeadBlock?.block !== blocksWhilePausedBlock?.block
37
37
  if (pollingState === 'paused' && isNewBlock) {
38
- blocksWhilePaused.current.push(liveHead)
38
+ blocksWhilePausedRef.current.push(liveHead)
39
39
  } else if (pollingState === 'running') {
40
40
  // if the polling state is running, add the blocksWhilePaused
41
- if (blocksWhilePaused.current.length > 0) {
42
- for (const block of blocksWhilePaused.current) {
41
+ if (blocksWhilePausedRef.current.length > 0) {
42
+ for (const block of blocksWhilePausedRef.current) {
43
43
  void onAddBlock(block)
44
44
  }
45
45
  // clear the blocksWhilePaused array
46
- blocksWhilePaused.current = []
46
+ blocksWhilePausedRef.current = []
47
47
  }
48
48
  // add the liveHead block
49
49
  void onAddBlock(liveHead)
@@ -51,5 +51,5 @@ export const useOnBlock = (
51
51
  }
52
52
  }, [initialHeadNumber, liveHead, onAddBlock, pollingState])
53
53
 
54
- return blocksWhilePaused
54
+ return blocksWhilePausedRef
55
55
  }
@@ -2,7 +2,7 @@ import { Button, FormControl } from '@mui/material'
2
2
  import { usePromise } from '@xylabs/react-promise'
3
3
  import type { Address } from '@xylabs/sdk-js'
4
4
  import { createProducerChainStakeIntent } from '@xyo-network/chain-protocol'
5
- import type { XL1BlockNumber } from '@xyo-network/xl1-protocol'
5
+ import type { XL1BlockNumber } from '@xyo-network/xl1-sdk'
6
6
  import type { MouseEventHandler } from 'react'
7
7
  import React, { useState } from 'react'
8
8
 
@@ -1,8 +1,8 @@
1
1
  import { Button, FormControl } from '@mui/material'
2
2
  import type { Address, Hex } from '@xylabs/sdk-js'
3
3
  import { isAddress } from '@xylabs/sdk-js'
4
- import type { Transfer } from '@xyo-network/xl1-protocol'
5
- import { TransferSchema } from '@xyo-network/xl1-protocol'
4
+ import type { Transfer } from '@xyo-network/xl1-sdk'
5
+ import { TransferSchema } from '@xyo-network/xl1-sdk'
6
6
  import type { MouseEventHandler } from 'react'
7
7
  import React, { useMemo, useState } from 'react'
8
8
 
@@ -17,7 +17,6 @@ export const TransferBuilderForm: React.FC<TransferBuilderFormProps> = ({ onBuil
17
17
  const [fromAddress, setFromAddress] = useState<Address>()
18
18
  const [transfers, setTransfers] = useState<TransferAmount[]>([])
19
19
 
20
- // eslint-disable-next-line react-naming-convention/use-state
21
20
  const [epoch] = useState(() => Date.now())
22
21
 
23
22
  const transferPayload: Transfer | undefined = useMemo(() => {
@@ -2,7 +2,7 @@ import type { StandardTextFieldProps } from '@mui/material'
2
2
  import {
3
3
  FormControl, FormHelperText, TextField,
4
4
  } from '@mui/material'
5
- import { toXL1BlockNumber, type XL1BlockNumber } from '@xyo-network/xl1-protocol'
5
+ import { toXL1BlockNumber, type XL1BlockNumber } from '@xyo-network/xl1-sdk'
6
6
  import type { ChangeEventHandler } from 'react'
7
7
  import React, { useState } from 'react'
8
8
 
@@ -9,7 +9,7 @@ import {
9
9
  import type { QuickTipButtonProps } from '@xylabs/react-quick-tip-button'
10
10
  import { QuickTipButton } from '@xylabs/react-quick-tip-button'
11
11
  import { type Hash, isDefined } from '@xylabs/sdk-js'
12
- import type { HydratedBlockWithHashMeta } from '@xyo-network/xl1-protocol'
12
+ import type { HydratedBlockWithHashMeta } from '@xyo-network/xl1-sdk'
13
13
  import React, { Fragment, useState } from 'react'
14
14
 
15
15
  import { useTxsFromBlock } from '../../hooks/index.ts'
@@ -3,8 +3,8 @@ import {
3
3
  } from '@mui/material'
4
4
  import { FlexCol } from '@xylabs/react-flexbox'
5
5
  import { toHex } from '@xylabs/sdk-js'
6
- import type { ChainId, TransactionBoundWitnessFields } from '@xyo-network/xl1-protocol'
7
- import { defaultTransactionFees, toXL1BlockNumber } from '@xyo-network/xl1-protocol'
6
+ import type { ChainId, TransactionBoundWitnessFields } from '@xyo-network/xl1-sdk'
7
+ import { defaultTransactionFees, toXL1BlockNumber } from '@xyo-network/xl1-sdk'
8
8
  import React from 'react'
9
9
 
10
10
  export interface ChainTransactionBuilder {
@@ -11,8 +11,8 @@ import { QueryBoundWitnessBuilder } from '@xyo-network/boundwitness-builder'
11
11
  import type { ModuleQueryResult } from '@xyo-network/module-model'
12
12
  import { PayloadBuilder } from '@xyo-network/payload-builder'
13
13
  import type { Payload } from '@xyo-network/payload-model'
14
- import type { TransactionBoundWitnessFields } from '@xyo-network/xl1-protocol'
15
- import { buildTransaction } from '@xyo-network/xl1-protocol-sdk'
14
+ import type { TransactionBoundWitnessFields } from '@xyo-network/xl1-sdk'
15
+ import { buildTransaction } from '@xyo-network/xl1-sdk'
16
16
  import { Axios } from 'axios'
17
17
  import React, { useState } from 'react'
18
18
 
@@ -1,5 +1,5 @@
1
1
  import { isUndefined } from '@xylabs/sdk-js'
2
- import type { HydratedBlock } from '@xyo-network/xl1-protocol'
2
+ import type { HydratedBlock } from '@xyo-network/xl1-sdk'
3
3
  import type { PropsWithChildren } from 'react'
4
4
  import React, {
5
5
  useCallback, useMemo, useState,
@@ -4,7 +4,7 @@ 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 { buildRandomBlockChain } from '@xyo-network/react-chain-shared'
7
- import { flattenHydratedBlocks } from '@xyo-network/xl1-protocol-sdk'
7
+ import { flattenHydratedBlocks } from '@xyo-network/xl1-sdk'
8
8
  import React, { useEffect } from 'react'
9
9
 
10
10
  import { getChainId } from '../lib/index.ts'
@@ -5,8 +5,8 @@ import { delay } from '@xylabs/sdk-js'
5
5
  import { MemoryArchivist } from '@xyo-network/archivist-memory'
6
6
  import { ArchivistConfigSchema } from '@xyo-network/archivist-model'
7
7
  import { buildRandomBlockChain } from '@xyo-network/react-chain-shared'
8
- import type { BlockBoundWitness } from '@xyo-network/xl1-protocol'
9
- import { flattenHydratedBlock } from '@xyo-network/xl1-protocol-sdk'
8
+ import type { BlockBoundWitness } from '@xyo-network/xl1-sdk'
9
+ import { flattenHydratedBlock } from '@xyo-network/xl1-sdk'
10
10
  import React, { useEffect, useState } from 'react'
11
11
 
12
12
  import { getChainId } from '../lib/index.ts'