@xyo-network/react-chain-blockchain 1.19.14 → 1.19.16
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/components/block/table/cell/Epoch.d.ts.map +1 -1
- package/dist/browser/components/block/table/cell/helpers/index.d.ts +2 -0
- package/dist/browser/components/block/table/cell/helpers/index.d.ts.map +1 -0
- package/dist/browser/components/block/table/cell/helpers/timeFunctions.d.ts.map +1 -0
- package/dist/browser/components/block/table/cell/lib/index.d.ts +0 -1
- package/dist/browser/components/block/table/cell/lib/index.d.ts.map +1 -1
- package/dist/browser/components/chain/stats/producer/ProducerFlexbox.d.ts +1 -1
- package/dist/browser/components/chain/stats/producer/ProducerFlexbox.d.ts.map +1 -1
- package/dist/browser/components/payload/builder/BuilderComponentProps.d.ts +1 -1
- package/dist/browser/components/payload/builder/BuilderComponentProps.d.ts.map +1 -1
- package/dist/browser/components/rate/TimeTypography.d.ts +1 -1
- package/dist/browser/components/rate/TimeTypography.d.ts.map +1 -1
- package/dist/browser/components/rate/flexbox/FlexBox.stories.d.ts.map +1 -1
- package/dist/browser/components/rate/gauge/Container.stories.d.ts.map +1 -1
- package/dist/browser/components/rate/gauge/WithLabel.stories.d.ts.map +1 -1
- package/dist/browser/components/transactions/submit/SubmitChain.d.ts.map +1 -1
- package/dist/browser/context/chain/State.d.ts +1 -1
- package/dist/browser/context/chain/State.d.ts.map +1 -1
- package/dist/browser/helpers/txsFromBlock.d.ts +1 -1
- package/dist/browser/helpers/txsFromBlock.d.ts.map +1 -1
- package/dist/browser/hooks/chain-iterator/useChainIteratorParams.d.ts +8 -9
- package/dist/browser/hooks/chain-iterator/useChainIteratorParams.d.ts.map +1 -1
- package/dist/browser/index.mjs +14 -17
- package/dist/browser/index.mjs.map +1 -1
- package/dist/browser/lib/getChainArchivist.d.ts +1 -2
- package/dist/browser/lib/getChainArchivist.d.ts.map +1 -1
- package/dist/browser/types/render/BlockChainRenderProps.d.ts +1 -1
- package/dist/browser/types/render/BlockChainRenderProps.d.ts.map +1 -1
- package/package.json +37 -33
- package/src/components/block/table/cell/Epoch.tsx +3 -5
- package/src/components/block/table/cell/helpers/index.ts +1 -0
- package/src/components/block/table/cell/lib/index.ts +0 -1
- package/src/components/chain/stats/producer/ProducerFlexbox.tsx +1 -1
- package/src/components/payload/builder/BuilderComponentProps.ts +1 -1
- package/src/components/payload/builder/Flexbox.tsx +1 -1
- package/src/components/rate/TimeTypography.tsx +3 -3
- package/src/components/rate/flexbox/FlexBox.stories.tsx +4 -2
- package/src/components/rate/flexbox/FlexBox.tsx +3 -3
- package/src/components/rate/gauge/Container.stories.tsx +6 -3
- package/src/components/rate/gauge/Container.tsx +2 -2
- package/src/components/rate/gauge/WithLabel.stories.tsx +6 -3
- package/src/components/rate/gauge/WithLabel.tsx +1 -1
- package/src/components/transactions/submit/SubmitChain.tsx +5 -6
- package/src/context/chain/State.ts +1 -1
- package/src/helpers/txsFromBlock.ts +2 -2
- package/src/hooks/chain-iterator/useChainIteratorParams.ts +4 -3
- package/src/lib/getChainArchivist.ts +2 -3
- package/src/stories/ChainArchivistDecorator.tsx +1 -1
- package/src/stories/ChainArchivistDelayedInsertDecorator.tsx +1 -1
- package/src/types/render/BlockChainRenderProps.ts +1 -1
- package/dist/browser/components/block/table/cell/lib/timeFunctions.d.ts.map +0 -1
- /package/dist/browser/components/block/table/cell/{lib → helpers}/timeFunctions.d.ts +0 -0
- /package/src/components/block/table/cell/{lib → helpers}/timeFunctions.ts +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { ArchivistInstance } from '@xyo-network/
|
|
2
|
-
import type { ModuleIdentifier } from '@xyo-network/module-model';
|
|
1
|
+
import type { ArchivistInstance, ModuleIdentifier } from '@xyo-network/sdk-js';
|
|
3
2
|
export interface BridgedChainArchivistParams {
|
|
4
3
|
chainArchivistModuleId: ModuleIdentifier;
|
|
5
4
|
url: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getChainArchivist.d.ts","sourceRoot":"","sources":["../../../src/lib/getChainArchivist.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getChainArchivist.d.ts","sourceRoot":"","sources":["../../../src/lib/getChainArchivist.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAG9E,MAAM,WAAW,2BAA2B;IAC1C,sBAAsB,EAAE,gBAAgB,CAAA;IACxC,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,eAAO,MAAM,2BAA2B,GAAU,QAAQ,2BAA2B,KAAG,OAAO,CAAC,iBAAiB,CAQhH,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CreatableName, Hash } from '@xylabs/sdk-js';
|
|
2
|
-
import type { Payload, WithStorageMeta } from '@xyo-network/
|
|
2
|
+
import type { Payload, WithStorageMeta } from '@xyo-network/sdk-js';
|
|
3
3
|
import type { ChainId, PayloadMapRead } from '@xyo-network/xl1-sdk';
|
|
4
4
|
/** Props that control the rendering (not blockchain specific) */
|
|
5
5
|
export interface RenderProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockChainRenderProps.d.ts","sourceRoot":"","sources":["../../../../src/types/render/BlockChainRenderProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AACzD,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"BlockChainRenderProps.d.ts","sourceRoot":"","sources":["../../../../src/types/render/BlockChainRenderProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AACzD,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACnE,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAEnE,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,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,cAAc,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAA;IACnD,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,IAAI,EAAE,aAAa,CAAA;CACpB;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.19.
|
|
4
|
+
"version": "1.19.16",
|
|
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.2.
|
|
51
|
-
"@xylabs/axios": "~5.0.
|
|
50
|
+
"@storybook/react-vite": "~10.2.10",
|
|
51
|
+
"@xylabs/axios": "~5.0.80",
|
|
52
52
|
"@xylabs/react-animation": "~7.1.15",
|
|
53
53
|
"@xylabs/react-error": "~7.1.15",
|
|
54
54
|
"@xylabs/react-flexbox": "~7.1.15",
|
|
@@ -56,52 +56,52 @@
|
|
|
56
56
|
"@xylabs/react-quick-tip-button": "~7.1.15",
|
|
57
57
|
"@xylabs/react-shared": "~7.1.15",
|
|
58
58
|
"@xylabs/react-theme": "~7.1.15",
|
|
59
|
-
"@xylabs/sdk-js": "~5.0.
|
|
60
|
-
"@xyo-network/
|
|
61
|
-
"@xyo-network/
|
|
62
|
-
"@xyo-network/
|
|
63
|
-
"@xyo-network/
|
|
64
|
-
"@xyo-network/
|
|
65
|
-
"@xyo-network/
|
|
66
|
-
"@xyo-network/chain-
|
|
67
|
-
"@xyo-network/chain-
|
|
68
|
-
"@xyo-network/
|
|
69
|
-
"@xyo-network/
|
|
70
|
-
"@xyo-network/
|
|
71
|
-
"@xyo-network/react-
|
|
72
|
-
"@xyo-network/react-
|
|
73
|
-
"@xyo-network/react-
|
|
74
|
-
"@xyo-network/react-
|
|
75
|
-
"@xyo-network/
|
|
76
|
-
"@xyo-network/
|
|
77
|
-
"@xyo-network/react-payload-raw-info": "~7.5.1",
|
|
78
|
-
"@xyo-network/react-payload-table": "~7.5.1",
|
|
79
|
-
"@xyo-network/react-shared": "~7.5.1",
|
|
80
|
-
"@xyo-network/react-table": "~7.5.1",
|
|
81
|
-
"@xyo-network/xl1-sdk": "~1.23.21"
|
|
59
|
+
"@xylabs/sdk-js": "~5.0.80",
|
|
60
|
+
"@xyo-network/archivist-memory": "~5.3.7",
|
|
61
|
+
"@xyo-network/boundwitness-model": "~5.3.7",
|
|
62
|
+
"@xyo-network/chain-analyze": "~1.19.16",
|
|
63
|
+
"@xyo-network/chain-protocol": "~1.19.16",
|
|
64
|
+
"@xyo-network/chain-wrappers": "~1.19.16",
|
|
65
|
+
"@xyo-network/react-boundwitness-plugin": "~7.5.5",
|
|
66
|
+
"@xyo-network/react-chain-blockies": "~1.19.16",
|
|
67
|
+
"@xyo-network/react-chain-provider": "~1.19.16",
|
|
68
|
+
"@xyo-network/react-chain-shared": "~1.19.16",
|
|
69
|
+
"@xyo-network/react-error": "~7.5.5",
|
|
70
|
+
"@xyo-network/react-event": "~7.5.5",
|
|
71
|
+
"@xyo-network/react-payload-raw-info": "~7.5.5",
|
|
72
|
+
"@xyo-network/react-payload-table": "~7.5.5",
|
|
73
|
+
"@xyo-network/react-shared": "~7.5.5",
|
|
74
|
+
"@xyo-network/react-table": "~7.5.5",
|
|
75
|
+
"@xyo-network/sdk-js": "~5.3.7",
|
|
76
|
+
"@xyo-network/xl1-sdk": "~1.24.24"
|
|
82
77
|
},
|
|
83
78
|
"devDependencies": {
|
|
84
79
|
"@emotion/react": "~11.14.0",
|
|
85
80
|
"@emotion/styled": "~11.14.1",
|
|
86
81
|
"@mui/icons-material": "~7.3.8",
|
|
87
82
|
"@mui/material": "~7.3.8",
|
|
83
|
+
"@textea/json-viewer": "~4.0.1",
|
|
88
84
|
"@types/react": "~19.2.14",
|
|
89
85
|
"@xylabs/react-button": "~7.1.15",
|
|
90
|
-
"@xylabs/sdk-js": "~5.0.
|
|
86
|
+
"@xylabs/sdk-js": "~5.0.80",
|
|
91
87
|
"@xylabs/ts-scripts-yarn3": "~7.3.2",
|
|
92
88
|
"@xylabs/tsconfig": "~7.3.2",
|
|
93
89
|
"@xylabs/tsconfig-dom": "~7.3.2",
|
|
94
90
|
"@xylabs/tsconfig-react": "~7.3.2",
|
|
95
|
-
"@xyo-network/api-models": "~5.3.
|
|
96
|
-
"@xyo-network/bridge-http": "~5.3.
|
|
97
|
-
"@xyo-network/
|
|
91
|
+
"@xyo-network/api-models": "~5.3.7",
|
|
92
|
+
"@xyo-network/bridge-http": "~5.3.7",
|
|
93
|
+
"@xyo-network/sdk-js": "~5.3.7",
|
|
94
|
+
"@xyo-network/xl1-sdk": "~1.24.24",
|
|
98
95
|
"axios": "^1.13.5",
|
|
99
96
|
"eslint": "^9.39.2",
|
|
100
97
|
"react": "~19.2.4",
|
|
101
98
|
"react-dom": "~19.2.4",
|
|
102
99
|
"react-router-dom": "^7.13.0",
|
|
103
|
-
"
|
|
104
|
-
"
|
|
100
|
+
"rollbar": "^2.26.5",
|
|
101
|
+
"storybook": "~10.2.10",
|
|
102
|
+
"typescript": "~5.9.3",
|
|
103
|
+
"vite": "^7.3.1",
|
|
104
|
+
"zod": "^4.3.6"
|
|
105
105
|
},
|
|
106
106
|
"peerDependencies": {
|
|
107
107
|
"@emotion/react": "~11",
|
|
@@ -109,10 +109,14 @@
|
|
|
109
109
|
"@mui/icons-material": ">=6 <8",
|
|
110
110
|
"@mui/material": ">=6 <8",
|
|
111
111
|
"@mui/x-charts": "~8.23.0",
|
|
112
|
+
"@textea/json-viewer": "~4.0.1",
|
|
113
|
+
"@xyo-network/sdk-js": "~5.3.2",
|
|
112
114
|
"axios": "^1",
|
|
113
115
|
"react": "~19",
|
|
114
116
|
"react-dom": "~19",
|
|
115
|
-
"react-router-dom": "^7"
|
|
117
|
+
"react-router-dom": "^7",
|
|
118
|
+
"rollbar": "^2",
|
|
119
|
+
"zod": "^4"
|
|
116
120
|
},
|
|
117
121
|
"publishConfig": {
|
|
118
122
|
"access": "restricted"
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
-
Skeleton,
|
|
3
|
-
TableCell, Tooltip, Typography,
|
|
2
|
+
Skeleton, TableCell, Tooltip, Typography,
|
|
4
3
|
} from '@mui/material'
|
|
5
4
|
import { isDefined } from '@xylabs/sdk-js'
|
|
6
5
|
import React from 'react'
|
|
7
6
|
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
} from './lib/index.ts'
|
|
7
|
+
import { dateFormat, timeAgo } from './helpers/index.ts'
|
|
8
|
+
import { type BlockTableCellProps } from './lib/index.ts'
|
|
11
9
|
|
|
12
10
|
export interface BlockEpochTableCellProps extends BlockTableCellProps {}
|
|
13
11
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './timeFunctions.ts'
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import { ErrorRender } from '@xylabs/react-error'
|
|
5
5
|
import { FlexCol } from '@xylabs/react-flexbox'
|
|
6
6
|
import { isChainSummaryProducers } from '@xyo-network/chain-analyze'
|
|
7
|
-
import type { Payload } from '@xyo-network/
|
|
7
|
+
import type { Payload } from '@xyo-network/sdk-js'
|
|
8
8
|
import React, { useMemo } from 'react'
|
|
9
9
|
|
|
10
10
|
import { ChainProducerStatsTable } from './Table.tsx'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FlexBoxProps } from '@xylabs/react-flexbox'
|
|
2
2
|
import { FlexCol } from '@xylabs/react-flexbox'
|
|
3
|
-
import type { Payload } from '@xyo-network/payload-model'
|
|
4
3
|
import { JsonViewerEx } from '@xyo-network/react-payload-raw-info'
|
|
4
|
+
import type { Payload } from '@xyo-network/sdk-js'
|
|
5
5
|
import type { ComponentType } from 'react'
|
|
6
6
|
import React, { useState } from 'react'
|
|
7
7
|
|
|
@@ -4,14 +4,14 @@ import { type TypographyProps } from '@mui/material'
|
|
|
4
4
|
import { MetricTypography } from './support/index.ts'
|
|
5
5
|
|
|
6
6
|
export interface BlockRateTimeTypographyProps extends TypographyProps {
|
|
7
|
-
rateUnit?: string
|
|
8
7
|
timeDifference?: number
|
|
8
|
+
timeUnit?: string
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export const BlockRateTimeTypography: React.FC<BlockRateTimeTypographyProps> = ({
|
|
12
|
-
|
|
12
|
+
timeUnit, timeDifference, sx, ...props
|
|
13
13
|
}) => {
|
|
14
14
|
return (
|
|
15
|
-
<MetricTypography icon={<TimelapseOutlined fontSize="large" />} metric={timeDifference} label={
|
|
15
|
+
<MetricTypography icon={<TimelapseOutlined fontSize="large" />} metric={timeDifference} label={timeUnit} {...props} />
|
|
16
16
|
)
|
|
17
17
|
}
|
|
@@ -8,16 +8,18 @@ const blockRateSeconds: BlockRate = {
|
|
|
8
8
|
range: asXL1BlockRange([100, 200], true),
|
|
9
9
|
span: 100,
|
|
10
10
|
rate: 0.12,
|
|
11
|
-
|
|
11
|
+
timeUnit: 'seconds',
|
|
12
12
|
timeDifference: (100 * 12),
|
|
13
|
+
timePerBlock: 12,
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
const blockRateMinutes: BlockRate = {
|
|
16
17
|
range: asXL1BlockRange([100, 200], true),
|
|
17
18
|
span: 100,
|
|
18
19
|
rate: 12,
|
|
19
|
-
|
|
20
|
+
timeUnit: 'minutes',
|
|
20
21
|
timeDifference: (100 * 12) / 60,
|
|
22
|
+
timePerBlock: 12 / 60,
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
export default {
|
|
@@ -17,15 +17,15 @@ export const BlockRateFlexBox: React.FC<BlockRateFlexBoxProps> = ({
|
|
|
17
17
|
...flexBoxProps
|
|
18
18
|
}) => {
|
|
19
19
|
const {
|
|
20
|
-
range, span, rate,
|
|
20
|
+
range, span, rate, timeUnit, timeDifference,
|
|
21
21
|
} = blockRate ?? {}
|
|
22
|
-
const rateUnitLabel = isDefined(
|
|
22
|
+
const rateUnitLabel = isDefined(timeUnit) ? rateUnitToLabel(timeUnit) : ''
|
|
23
23
|
|
|
24
24
|
return (
|
|
25
25
|
<FlexCol alignItems="start" {...flexBoxProps}>
|
|
26
26
|
<BlockRateSpeedTypography rate={rate} rateUnitLabel={rateUnitLabel} />
|
|
27
27
|
<BlockRateSpanTypography range={range} span={span} />
|
|
28
|
-
<BlockRateTimeTypography
|
|
28
|
+
<BlockRateTimeTypography timeUnit={timeUnit} timeDifference={timeDifference} />
|
|
29
29
|
</FlexCol>
|
|
30
30
|
)
|
|
31
31
|
}
|
|
@@ -9,16 +9,18 @@ const blockRateSeconds: BlockRate = {
|
|
|
9
9
|
range: asXL1BlockRange([100, 200], true),
|
|
10
10
|
span: 100,
|
|
11
11
|
rate: 0.083_33,
|
|
12
|
-
|
|
12
|
+
timeUnit: 'seconds',
|
|
13
13
|
timeDifference: (100 * 12),
|
|
14
|
+
timePerBlock: 12,
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
const blockRateMinutes: BlockRate = {
|
|
17
18
|
range: asXL1BlockRange([100, 200], true),
|
|
18
19
|
span: 100,
|
|
19
20
|
rate: 5,
|
|
20
|
-
|
|
21
|
+
timeUnit: 'minutes',
|
|
21
22
|
timeDifference: (100 * 12) / 60,
|
|
23
|
+
timePerBlock: 12,
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
const blockRateHour: BlockRate = {
|
|
@@ -26,8 +28,9 @@ const blockRateHour: BlockRate = {
|
|
|
26
28
|
span: 100,
|
|
27
29
|
// up the block rate to test gauge scaling
|
|
28
30
|
rate: 7 * 60,
|
|
29
|
-
|
|
31
|
+
timeUnit: 'hours',
|
|
30
32
|
timeDifference: (100 * 12) / 60,
|
|
33
|
+
timePerBlock: 12,
|
|
31
34
|
}
|
|
32
35
|
|
|
33
36
|
const gaugeConfigHour: GaugeConfig = {
|
|
@@ -36,7 +36,7 @@ export const BlockRateSpeedGaugeContainer: React.FC<BlockRateSpeedGaugeProps> =
|
|
|
36
36
|
height = 150,
|
|
37
37
|
...props
|
|
38
38
|
}) => {
|
|
39
|
-
const { rate,
|
|
39
|
+
const { rate, timeUnit } = blockRate || {}
|
|
40
40
|
const {
|
|
41
41
|
targetBlockRate = 5, targetBlockRateUnit = 'minutes', targetPosition = 75, showTicks = true,
|
|
42
42
|
} = gaugeConfig || {}
|
|
@@ -46,7 +46,7 @@ export const BlockRateSpeedGaugeContainer: React.FC<BlockRateSpeedGaugeProps> =
|
|
|
46
46
|
|
|
47
47
|
// Normalize rate to the gauge
|
|
48
48
|
const maxGaugeValue = endAngle // matches endAngle
|
|
49
|
-
const blocksPerMinute = rate === undefined ? 0 : converter(rate,
|
|
49
|
+
const blocksPerMinute = rate === undefined ? 0 : converter(rate, timeUnit)
|
|
50
50
|
|
|
51
51
|
// Scale: 5 blocks/min should map to 75 out of 110 max
|
|
52
52
|
// This means: normalizedValue = (blocksPerMinute / targetRate) * targetPosition
|
|
@@ -9,24 +9,27 @@ const blockRateSeconds: BlockRate = {
|
|
|
9
9
|
range: asXL1BlockRange([100, 200], true),
|
|
10
10
|
span: 100,
|
|
11
11
|
rate: 0.083_33,
|
|
12
|
-
|
|
12
|
+
timeUnit: 'seconds',
|
|
13
13
|
timeDifference: (100 * 12),
|
|
14
|
+
timePerBlock: 12,
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
const blockRateMinutes: BlockRate = {
|
|
17
18
|
range: asXL1BlockRange([100, 200], true),
|
|
18
19
|
span: 100,
|
|
19
20
|
rate: 5,
|
|
20
|
-
|
|
21
|
+
timeUnit: 'minutes',
|
|
21
22
|
timeDifference: (100 * 12) / 60,
|
|
23
|
+
timePerBlock: 12,
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
const blockRateHour: BlockRate = {
|
|
25
27
|
range: asXL1BlockRange([100, 200], true),
|
|
26
28
|
span: 100,
|
|
27
29
|
rate: 7 * 60,
|
|
28
|
-
|
|
30
|
+
timeUnit: 'hours',
|
|
29
31
|
timeDifference: (100 * 12) / 60,
|
|
32
|
+
timePerBlock: 12,
|
|
30
33
|
}
|
|
31
34
|
|
|
32
35
|
const gaugeConfigHours: GaugeConfig = {
|
|
@@ -9,7 +9,7 @@ import { BlockRateSpeedGaugeContainer } from './Container.tsx'
|
|
|
9
9
|
export interface BlockRateSpeedGaugeWithLabelProps extends BlockRateSpeedGaugeProps {}
|
|
10
10
|
|
|
11
11
|
export const BlockRateSpeedGaugeWithLabel: React.FC<BlockRateSpeedGaugeProps> = ({ blockRate, ...props }) => {
|
|
12
|
-
const rateUnitLabel = isDefined(blockRate?.
|
|
12
|
+
const rateUnitLabel = isDefined(blockRate?.rate) ? rateUnitToLabel(blockRate?.timeUnit) : ''
|
|
13
13
|
|
|
14
14
|
return (
|
|
15
15
|
<FlexCol>
|
|
@@ -4,13 +4,12 @@ import {
|
|
|
4
4
|
import { axiosJsonConfig } from '@xylabs/axios'
|
|
5
5
|
import { ErrorRender } from '@xylabs/react-error'
|
|
6
6
|
import { FlexGrowCol } from '@xylabs/react-flexbox'
|
|
7
|
-
import { Account } from '@xyo-network/account'
|
|
8
7
|
import type { ApiEnvelope } from '@xyo-network/api-models'
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
import type { ModuleQueryResult, Payload } from '@xyo-network/sdk-js'
|
|
9
|
+
import {
|
|
10
|
+
Account, ArchivistInsertQuerySchema,
|
|
11
|
+
PayloadBuilder, QueryBoundWitnessBuilder,
|
|
12
|
+
} from '@xyo-network/sdk-js'
|
|
14
13
|
import type { TransactionBoundWitnessFields } from '@xyo-network/xl1-sdk'
|
|
15
14
|
import { buildTransaction } from '@xyo-network/xl1-sdk'
|
|
16
15
|
import { Axios } from 'axios'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ContextExState } from '@xylabs/react-shared'
|
|
2
|
-
import type { ArchivistInstance } from '@xyo-network/
|
|
2
|
+
import type { ArchivistInstance } from '@xyo-network/sdk-js'
|
|
3
3
|
import type { ChainId } from '@xyo-network/xl1-sdk'
|
|
4
4
|
|
|
5
5
|
export type ChainInfoState = ContextExState<{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Hash } from '@xylabs/sdk-js'
|
|
2
2
|
import { HydratedBlockWrapper } from '@xyo-network/chain-wrappers'
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
3
|
+
import type { Payload } from '@xyo-network/sdk-js'
|
|
4
|
+
import { PayloadBuilder } from '@xyo-network/sdk-js'
|
|
5
5
|
import type { HydratedBlockWithHashMeta } from '@xyo-network/xl1-sdk'
|
|
6
6
|
|
|
7
7
|
export const txsFromBlock = async (block: HydratedBlockWithHashMeta): Promise<[Payload, Hash][]> => {
|
|
@@ -2,9 +2,10 @@ import type { UsePromiseState } from '@xylabs/react-promise'
|
|
|
2
2
|
import { usePromise } from '@xylabs/react-promise'
|
|
3
3
|
import { type Hash, isHash } from '@xylabs/sdk-js'
|
|
4
4
|
import { assertEx, isDefined } from '@xylabs/sdk-js'
|
|
5
|
-
import type {
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
import type {
|
|
6
|
+
Payload, ReadArchivist, WithStorageMeta,
|
|
7
|
+
} from '@xyo-network/sdk-js'
|
|
8
|
+
import { BoundWitnessBuilder } from '@xyo-network/sdk-js'
|
|
8
9
|
import type {
|
|
9
10
|
BlockBoundWitness, BlockBoundWitnessWithHashMeta, ChainId, Config, PayloadMapRead,
|
|
10
11
|
} from '@xyo-network/xl1-sdk'
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { assertEx } from '@xylabs/sdk-js'
|
|
2
|
-
import type { ArchivistInstance } from '@xyo-network/archivist-model'
|
|
3
|
-
import { asArchivistInstance } from '@xyo-network/archivist-model'
|
|
4
2
|
import type { HttpBridgeConfig } from '@xyo-network/bridge-http'
|
|
5
3
|
import { HttpBridge, HttpBridgeConfigSchema } from '@xyo-network/bridge-http'
|
|
6
|
-
import type { ModuleIdentifier } from '@xyo-network/
|
|
4
|
+
import type { ArchivistInstance, ModuleIdentifier } from '@xyo-network/sdk-js'
|
|
5
|
+
import { asArchivistInstance } from '@xyo-network/sdk-js'
|
|
7
6
|
|
|
8
7
|
export interface BridgedChainArchivistParams {
|
|
9
8
|
chainArchivistModuleId: ModuleIdentifier
|
|
@@ -2,8 +2,8 @@ import { CircularProgress } from '@mui/material'
|
|
|
2
2
|
import type { Decorator } from '@storybook/react-vite'
|
|
3
3
|
import { usePromise } from '@xylabs/react-promise'
|
|
4
4
|
import { MemoryArchivist } from '@xyo-network/archivist-memory'
|
|
5
|
-
import { ArchivistConfigSchema } from '@xyo-network/archivist-model'
|
|
6
5
|
import { buildRandomBlockChain } from '@xyo-network/react-chain-shared'
|
|
6
|
+
import { ArchivistConfigSchema } from '@xyo-network/sdk-js'
|
|
7
7
|
import { flattenHydratedBlocks } from '@xyo-network/xl1-sdk'
|
|
8
8
|
import React, { useEffect } from 'react'
|
|
9
9
|
|
|
@@ -3,8 +3,8 @@ import type { Decorator } from '@storybook/react-vite'
|
|
|
3
3
|
import { usePromise } from '@xylabs/react-promise'
|
|
4
4
|
import { delay } from '@xylabs/sdk-js'
|
|
5
5
|
import { MemoryArchivist } from '@xyo-network/archivist-memory'
|
|
6
|
-
import { ArchivistConfigSchema } from '@xyo-network/archivist-model'
|
|
7
6
|
import { buildRandomBlockChain } from '@xyo-network/react-chain-shared'
|
|
7
|
+
import { ArchivistConfigSchema } from '@xyo-network/sdk-js'
|
|
8
8
|
import type { BlockBoundWitness } from '@xyo-network/xl1-sdk'
|
|
9
9
|
import { flattenHydratedBlock } from '@xyo-network/xl1-sdk'
|
|
10
10
|
import React, { useEffect, useState } from 'react'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CreatableName, Hash } from '@xylabs/sdk-js'
|
|
2
|
-
import type { Payload, WithStorageMeta } from '@xyo-network/
|
|
2
|
+
import type { Payload, WithStorageMeta } from '@xyo-network/sdk-js'
|
|
3
3
|
import type { ChainId, PayloadMapRead } from '@xyo-network/xl1-sdk'
|
|
4
4
|
|
|
5
5
|
/** Props that control the rendering (not blockchain specific) */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"timeFunctions.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/block/table/cell/lib/timeFunctions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,qBAOrB,CAAA;AAEF,eAAO,MAAM,OAAO,GAAI,OAAO,MAAM,EAAE,eAAsC,uBAkC5E,CAAA"}
|
|
File without changes
|
|
File without changes
|