@xyo-network/react-chain-blockchain 1.1.6 → 1.2.0
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 +9 -10
- package/dist/browser/index.mjs.map +1 -1
- package/dist/types/components/block/ProducerChip.d.ts +1 -1
- package/dist/types/components/block/ProducerChip.d.ts.map +1 -1
- package/dist/types/components/block/helpers/blockProducer.d.ts +1 -1
- package/dist/types/components/block/helpers/blockProducer.d.ts.map +1 -1
- package/dist/types/components/block/helpers/tsxFromBlock.d.ts +2 -2
- package/dist/types/components/block/helpers/tsxFromBlock.d.ts.map +1 -1
- package/dist/types/components/block/hooks/useBlockProducer.d.ts +1 -1
- package/dist/types/components/block/hooks/useBlockProducer.d.ts.map +1 -1
- package/dist/types/components/block/hooks/useDynamicBlockComponents.d.ts +1 -1
- package/dist/types/components/block/hooks/useDynamicBlockComponents.d.ts.map +1 -1
- package/dist/types/components/block/hooks/useStaticBlockComponents.d.ts +1 -1
- package/dist/types/components/block/hooks/useStaticBlockComponents.d.ts.map +1 -1
- package/dist/types/components/block/hooks/useTxsFromBlock.d.ts +2 -2
- package/dist/types/components/block/hooks/useTxsFromBlock.d.ts.map +1 -1
- package/dist/types/components/block/menu/Expanded.d.ts +1 -1
- package/dist/types/components/block/menu/Expanded.d.ts.map +1 -1
- package/dist/types/components/block/table/cell/lib/BlockTableCellProps.d.ts +1 -1
- package/dist/types/components/block/table/cell/lib/BlockTableCellProps.d.ts.map +1 -1
- package/dist/types/components/chain/hooks/useOnBlock.d.ts +1 -1
- package/dist/types/components/chain/hooks/useOnBlock.d.ts.map +1 -1
- package/dist/types/components/chain/render/dynamic/hooks/useDynamicBlockRenderComponents.d.ts +1 -1
- package/dist/types/components/payload/builder/transfer/Form.d.ts.map +1 -1
- package/dist/types/components/transactions/TransactionsQuickTipButton.d.ts +1 -1
- package/dist/types/components/transactions/TransactionsQuickTipButton.d.ts.map +1 -1
- package/dist/types/components/transactions/submit/Builder.d.ts +1 -1
- package/dist/types/components/transactions/submit/Builder.d.ts.map +1 -1
- package/dist/types/context/analyzer/state.d.ts +1 -1
- package/dist/types/context/analyzer/state.d.ts.map +1 -1
- package/dist/types/context/chain/State.d.ts +1 -1
- package/dist/types/context/chain/State.d.ts.map +1 -1
- package/dist/types/hooks/chain-iterator/ChainIteratorStore.d.ts +1 -1
- package/dist/types/hooks/chain-iterator/ChainIteratorStore.d.ts.map +1 -1
- package/dist/types/hooks/chain-iterator/useChainIteratorParams.d.ts +3 -3
- 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/chain-iterator/useChainIteratorUpdatingHead.d.ts +1 -1
- package/dist/types/hooks/chain-iterator/useChainIteratorUpdatingHead.d.ts.map +1 -1
- package/dist/types/hooks/useIterateChain.d.ts +1 -1
- package/dist/types/hooks/useIterateChain.d.ts.map +1 -1
- package/dist/types/lib/getChainInformation.d.ts +1 -1
- package/dist/types/lib/getChainInformation.d.ts.map +1 -1
- package/dist/types/stories/buildRandomBlockchain.d.ts +1 -1
- package/dist/types/stories/buildRandomBlockchain.d.ts.map +1 -1
- package/dist/types/types/BlockComponentProps.d.ts +1 -1
- package/dist/types/types/BlockComponentProps.d.ts.map +1 -1
- package/dist/types/types/BlockComponents.d.ts +1 -1
- package/dist/types/types/BlockComponents.d.ts.map +1 -1
- package/dist/types/types/render/BlockChainRenderProps.d.ts +1 -1
- package/dist/types/types/render/BlockChainRenderProps.d.ts.map +1 -1
- package/package.json +41 -41
- package/src/components/block/ProducerChip.tsx +1 -1
- package/src/components/block/helpers/blockProducer.ts +1 -1
- package/src/components/block/helpers/tsxFromBlock.ts +1 -1
- package/src/components/block/hooks/useBlockProducer.ts +1 -1
- package/src/components/block/hooks/useDynamicBlockComponents.ts +1 -1
- package/src/components/block/hooks/useStaticBlockComponents.ts +1 -1
- package/src/components/block/hooks/useTxsFromBlock.ts +1 -1
- package/src/components/block/menu/Expanded.tsx +1 -1
- package/src/components/block/table/cell/lib/BlockTableCellProps.ts +1 -1
- package/src/components/chain/hooks/useOnBlock.ts +1 -1
- package/src/components/payload/builder/producer-intent/Form.tsx +1 -1
- package/src/components/payload/builder/transfer/Form.tsx +6 -6
- package/src/components/transactions/TransactionsQuickTipButton.tsx +1 -1
- package/src/components/transactions/submit/Builder.tsx +1 -2
- package/src/components/transactions/submit/SubmitChain.tsx +2 -2
- package/src/context/analyzer/Provider.tsx +1 -1
- package/src/context/analyzer/state.ts +1 -1
- package/src/context/chain/State.ts +1 -1
- package/src/hooks/chain-iterator/ChainIteratorStore.ts +4 -4
- package/src/hooks/chain-iterator/useChainIteratorParams.ts +2 -2
- package/src/hooks/chain-iterator/useChainIteratorStore.ts +1 -1
- package/src/hooks/chain-iterator/useChainIteratorUpdatingHead.ts +1 -1
- package/src/hooks/useIterateChain.ts +4 -4
- package/src/lib/getChainInformation.ts +1 -1
- package/src/stories/ChainArchivistDelayedInsertDecorator.tsx +1 -1
- package/src/stories/ChainInfoContextDecorator.tsx +1 -1
- package/src/stories/buildRandomBlockchain.ts +1 -1
- package/src/types/BlockComponentProps.ts +1 -1
- package/src/types/BlockComponents.ts +1 -1
- package/src/types/render/BlockChainRenderProps.ts +1 -1
package/dist/browser/index.mjs
CHANGED
|
@@ -161,8 +161,7 @@ var ChainTransactionBuilder = /* @__PURE__ */ __name(({ onSubmitTx }) => {
|
|
|
161
161
|
gasPrice: toHex(defaultFees.gasPrice),
|
|
162
162
|
base: toHex(defaultFees.base),
|
|
163
163
|
priority: toHex(defaultFees.priority)
|
|
164
|
-
}
|
|
165
|
-
nonce: []
|
|
164
|
+
}
|
|
166
165
|
};
|
|
167
166
|
await onSubmitTx?.(chainTx);
|
|
168
167
|
}, "handleSubmit");
|
|
@@ -254,7 +253,7 @@ var SubmitChainTransaction = /* @__PURE__ */ __name(() => {
|
|
|
254
253
|
const onSubmitTx = /* @__PURE__ */ __name(async (chainTx) => {
|
|
255
254
|
if (!network) throw new Error("Network not set");
|
|
256
255
|
const randomAccount = await Account.random();
|
|
257
|
-
const [transactionBoundWitness] = await buildTransaction(chainTx.chain, [], randomAccount, chainTx.nbf, chainTx.exp
|
|
256
|
+
const [transactionBoundWitness] = await buildTransaction(chainTx.chain, [], [], randomAccount, chainTx.nbf, chainTx.exp);
|
|
258
257
|
const insertQuery = new PayloadBuilder({
|
|
259
258
|
schema: ArchivistInsertQuerySchema
|
|
260
259
|
}).build();
|
|
@@ -1289,7 +1288,7 @@ var ChainIteratorStore = class _ChainIteratorStore {
|
|
|
1289
1288
|
import { assertEx as assertEx2 } from "@xylabs/assert";
|
|
1290
1289
|
import { usePromise as usePromise3 } from "@xylabs/react-promise";
|
|
1291
1290
|
import { BoundWitnessBuilder } from "@xyo-network/boundwitness-builder";
|
|
1292
|
-
import { isBlockBoundWitness } from "@xyo-network/
|
|
1291
|
+
import { isBlockBoundWitness } from "@xyo-network/xl1-model";
|
|
1293
1292
|
var resolveDefinedHead = /* @__PURE__ */ __name(async (head, chainArchivist) => {
|
|
1294
1293
|
const [headPayload] = await chainArchivist.get([
|
|
1295
1294
|
head
|
|
@@ -1426,10 +1425,10 @@ var useChainIteratorStore = /* @__PURE__ */ __name((chainIteratorParams) => {
|
|
|
1426
1425
|
// src/hooks/useIterateChain.ts
|
|
1427
1426
|
import { assertEx as assertEx3 } from "@xylabs/assert";
|
|
1428
1427
|
import { usePromise as usePromise5 } from "@xylabs/react-promise";
|
|
1429
|
-
import { isBlockBoundWitness as isBlockBoundWitness2 } from "@xyo-network/chain-model";
|
|
1430
1428
|
import { hydrateBlock as hydrateBlock2 } from "@xyo-network/chain-protocol";
|
|
1431
1429
|
import { XyoChainBlockNumberIterator as XyoChainBlockNumberIterator2 } from "@xyo-network/chain-services";
|
|
1432
1430
|
import { PayloadBuilder as PayloadBuilder4 } from "@xyo-network/payload-builder";
|
|
1431
|
+
import { isBlockBoundWitness as isBlockBoundWitness2 } from "@xyo-network/xl1-model";
|
|
1433
1432
|
var getHydratedBlock = /* @__PURE__ */ __name(async (chainArchivist, head) => {
|
|
1434
1433
|
const headHash = await PayloadBuilder4.hash(head);
|
|
1435
1434
|
return await hydrateBlock2(chainArchivist, headHash);
|
|
@@ -1856,8 +1855,7 @@ import React42 from "react";
|
|
|
1856
1855
|
|
|
1857
1856
|
// src/components/payload/builder/transfer/Form.tsx
|
|
1858
1857
|
import { Button as Button5, FormControl as FormControl7 } from "@mui/material";
|
|
1859
|
-
import { TransferSchema } from "@xyo-network/
|
|
1860
|
-
import { elevate } from "@xyo-network/chain-protocol";
|
|
1858
|
+
import { TransferSchema } from "@xyo-network/xl1-model";
|
|
1861
1859
|
import React41, { useMemo as useMemo20, useState as useState18 } from "react";
|
|
1862
1860
|
|
|
1863
1861
|
// src/components/payload/builder/transfer/builder/SingleFlexbox.tsx
|
|
@@ -1922,11 +1920,12 @@ var TransferBuilderForm = /* @__PURE__ */ __name(({ onBuild }) => {
|
|
|
1922
1920
|
for (const transfer of transfers) {
|
|
1923
1921
|
transfersRecord[transfer.to] = transfer.amount;
|
|
1924
1922
|
}
|
|
1925
|
-
return
|
|
1923
|
+
return {
|
|
1924
|
+
from: fromAddress,
|
|
1926
1925
|
schema: TransferSchema,
|
|
1927
1926
|
transfers: transfersRecord,
|
|
1928
1927
|
epoch: Date.now()
|
|
1929
|
-
}
|
|
1928
|
+
};
|
|
1930
1929
|
}
|
|
1931
1930
|
}, [
|
|
1932
1931
|
fromAddress,
|
|
@@ -2126,9 +2125,9 @@ var ChainArchivistDelayedInsertDecorator = /* @__PURE__ */ __name((Story, contex
|
|
|
2126
2125
|
// src/stories/ChainInfoContextDecorator.tsx
|
|
2127
2126
|
import { assertEx as assertEx5 } from "@xylabs/assert";
|
|
2128
2127
|
import { usePromise as usePromise9 } from "@xylabs/react-promise";
|
|
2129
|
-
import { isBlockBoundWitness as isBlockBoundWitness3 } from "@xyo-network/chain-model";
|
|
2130
2128
|
import { XyoChainBlockNumberIterator as XyoChainBlockNumberIterator3 } from "@xyo-network/chain-services";
|
|
2131
2129
|
import { findFirstMatching } from "@xyo-network/chain-utils";
|
|
2130
|
+
import { isBlockBoundWitness as isBlockBoundWitness3 } from "@xyo-network/xl1-model";
|
|
2132
2131
|
import React45 from "react";
|
|
2133
2132
|
var archivistConfig = {
|
|
2134
2133
|
url: "http://localhost:8080",
|