@xyo-network/react-chain-blockchain 1.16.24 → 1.16.25
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/hooks/useDynamicBlockComponents.d.ts +2 -2
- package/dist/browser/components/block/hooks/useDynamicBlockComponents.d.ts.map +1 -1
- package/dist/browser/components/block/hooks/useStaticBlockComponents.d.ts +2 -2
- package/dist/browser/components/block/hooks/useStaticBlockComponents.d.ts.map +1 -1
- package/dist/browser/components/block/table/cell/lib/BlockTableCellProps.d.ts +2 -2
- package/dist/browser/components/block/table/cell/lib/BlockTableCellProps.d.ts.map +1 -1
- package/dist/browser/components/chain/hooks/useOnBlock.d.ts +18 -1
- package/dist/browser/components/chain/hooks/useOnBlock.d.ts.map +1 -1
- package/dist/browser/components/payload/builder/producer-intent/Form.d.ts.map +1 -1
- package/dist/browser/components/payload/fields/BlockNumberTextField.d.ts +2 -1
- package/dist/browser/components/payload/fields/BlockNumberTextField.d.ts.map +1 -1
- package/dist/browser/components/transactions/TransactionsQuickTipButton.d.ts +2 -2
- package/dist/browser/components/transactions/TransactionsQuickTipButton.d.ts.map +1 -1
- package/dist/browser/components/transactions/submit/Builder.d.ts +1 -1
- package/dist/browser/components/transactions/submit/Builder.d.ts.map +1 -1
- package/dist/browser/helpers/txsFromBlock.d.ts +22 -2
- package/dist/browser/helpers/txsFromBlock.d.ts.map +1 -1
- package/dist/browser/hooks/chain-iterator/useChainIteratorParams.d.ts +57 -6
- package/dist/browser/hooks/chain-iterator/useChainIteratorParams.d.ts.map +1 -1
- package/dist/browser/hooks/useIterateChain.d.ts +22 -2
- package/dist/browser/hooks/useIterateChain.d.ts.map +1 -1
- package/dist/browser/hooks/useTxsFromBlock.d.ts +22 -2
- package/dist/browser/hooks/useTxsFromBlock.d.ts.map +1 -1
- package/dist/browser/index.mjs +25 -23
- package/dist/browser/index.mjs.map +1 -1
- package/dist/browser/types/BlockComponentProps.d.ts +2 -2
- package/dist/browser/types/BlockComponentProps.d.ts.map +1 -1
- package/package.json +33 -33
- package/src/components/block/hooks/useDynamicBlockComponents.ts +2 -2
- package/src/components/block/hooks/useStaticBlockComponents.ts +2 -2
- package/src/components/block/table/cell/lib/BlockTableCellProps.ts +2 -2
- package/src/components/payload/builder/producer-intent/Form.tsx +7 -6
- package/src/components/payload/fields/BlockNumberTextField.tsx +3 -2
- package/src/components/transactions/TransactionsQuickTipButton.tsx +2 -2
- package/src/components/transactions/submit/Builder.tsx +5 -5
- package/src/components/transactions/submit/SubmitChain.tsx +1 -1
- package/src/helpers/txsFromBlock.ts +2 -2
- package/src/hooks/useIterateChain.ts +2 -2
- package/src/hooks/useTxsFromBlock.ts +2 -2
- package/src/types/BlockComponentProps.ts +2 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { XyoChainIteratorParams } from '@xyo-network/chain-services';
|
|
2
|
-
import type {
|
|
2
|
+
import type { HydratedBlockWithHashMeta } from '@xyo-network/xl1-protocol';
|
|
3
3
|
import type { ComponentType } from 'react';
|
|
4
4
|
import type { BlockChainRenderComponent, BlockComponentWithTxsProps } from '../../../types/index.ts';
|
|
5
5
|
export declare const useDynamicBlockComponents: (BlockComponent: ComponentType<BlockComponentWithTxsProps>, params?: XyoChainIteratorParams, maxBlocks?: number) => {
|
|
6
6
|
blockChainRenderComponents: BlockChainRenderComponent[];
|
|
7
|
-
onAddBlock: (block:
|
|
7
|
+
onAddBlock: (block: HydratedBlockWithHashMeta | undefined) => Promise<void>;
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=useDynamicBlockComponents.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDynamicBlockComponents.d.ts","sourceRoot":"","sources":["../../../../../src/components/block/hooks/useDynamicBlockComponents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACzE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"useDynamicBlockComponents.d.ts","sourceRoot":"","sources":["../../../../../src/components/block/hooks/useDynamicBlockComponents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACzE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAI1C,OAAO,KAAK,EACV,yBAAyB,EACJ,0BAA0B,EAChD,MAAM,yBAAyB,CAAA;AAGhC,eAAO,MAAM,yBAAyB,GAAI,gBAAgB,aAAa,CAAC,0BAA0B,CAAC,EAAE,SAAS,sBAAsB,EAAE,YAAY,MAAM;;wBAMrH,yBAAyB,GAAG,SAAS;CAuBvE,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { XyoChainIteratorParams } from '@xyo-network/chain-services';
|
|
2
|
-
import type {
|
|
2
|
+
import type { HydratedBlockWithHashMeta } from '@xyo-network/xl1-protocol';
|
|
3
3
|
import type { ComponentType } from 'react';
|
|
4
4
|
import type { BlockComponentWithTxsProps } from '../../../types/index.ts';
|
|
5
|
-
export declare const useStaticBlockComponents: (BlockComponent: ComponentType<BlockComponentWithTxsProps>, params?: XyoChainIteratorParams, blocks?:
|
|
5
|
+
export declare const useStaticBlockComponents: (BlockComponent: ComponentType<BlockComponentWithTxsProps>, params?: XyoChainIteratorParams, blocks?: HydratedBlockWithHashMeta[]) => {
|
|
6
6
|
blockComponents: import("../../../types/BlockComponents.ts").BlockChainRenderComponent[] | undefined;
|
|
7
7
|
errors: Error | undefined;
|
|
8
8
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStaticBlockComponents.d.ts","sourceRoot":"","sources":["../../../../../src/components/block/hooks/useStaticBlockComponents.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACzE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"useStaticBlockComponents.d.ts","sourceRoot":"","sources":["../../../../../src/components/block/hooks/useStaticBlockComponents.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACzE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAG1C,OAAO,KAAK,EAAuB,0BAA0B,EAAE,MAAM,yBAAyB,CAAA;AAG9F,eAAO,MAAM,wBAAwB,GACnC,gBAAgB,aAAa,CAAC,0BAA0B,CAAC,EACzD,SAAS,sBAAsB,EAC/B,SAAS,yBAAyB,EAAE;;;CAoBrC,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { TableCellProps } from '@mui/material';
|
|
2
|
-
import type {
|
|
2
|
+
import type { HydratedBlockWithHashMeta } from '@xyo-network/xl1-protocol';
|
|
3
3
|
export interface BlockTableCellProps extends TableCellProps {
|
|
4
|
-
block?:
|
|
4
|
+
block?: HydratedBlockWithHashMeta;
|
|
5
5
|
linked?: boolean;
|
|
6
6
|
}
|
|
7
7
|
//# sourceMappingURL=BlockTableCellProps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockTableCellProps.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/block/table/cell/lib/BlockTableCellProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"BlockTableCellProps.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/block/table/cell/lib/BlockTableCellProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAA;AAE1E,MAAM,WAAW,mBAAoB,SAAQ,cAAc;IACzD,KAAK,CAAC,EAAE,yBAAyB,CAAA;IACjC,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB"}
|
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
import type { HydratedBlock } from '@xyo-network/xl1-protocol';
|
|
2
2
|
export type PollingState = 'paused' | 'running';
|
|
3
|
-
export declare const useOnBlock: (initialHeadNumber?: number, onAddBlock?: (block: HydratedBlock) => Promise<void>, liveHead?: HydratedBlock, pollingState?: PollingState) =>
|
|
3
|
+
export declare const useOnBlock: (initialHeadNumber?: number, onAddBlock?: (block: HydratedBlock) => Promise<void>, liveHead?: HydratedBlock, pollingState?: PollingState) => [{
|
|
4
|
+
schema: "network.xyo.boundwitness";
|
|
5
|
+
addresses: import("@xylabs/hex").Address[];
|
|
6
|
+
payload_hashes: import("@xylabs/hex").Hash[];
|
|
7
|
+
payload_schemas: string[];
|
|
8
|
+
previous_hashes: (import("@xylabs/hex").Hash | null)[];
|
|
9
|
+
$signatures: (import("@xylabs/hex").Hex | null)[];
|
|
10
|
+
block: import("@xyo-network/xl1-protocol").XL1BlockNumber;
|
|
11
|
+
chain: import("@xylabs/hex").Hex;
|
|
12
|
+
previous: import("@xylabs/hex").Hash | null;
|
|
13
|
+
$epoch: number;
|
|
14
|
+
$destination?: import("@xylabs/hex").Address | undefined;
|
|
15
|
+
$sourceQuery?: import("@xylabs/hex").Hash | undefined;
|
|
16
|
+
protocol?: number | undefined;
|
|
17
|
+
step_hashes?: import("@xylabs/hex").Hash[] | undefined;
|
|
18
|
+
}, {
|
|
19
|
+
schema: string;
|
|
20
|
+
}[]][];
|
|
4
21
|
//# sourceMappingURL=useOnBlock.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOnBlock.d.ts","sourceRoot":"","sources":["../../../../../src/components/chain/hooks/useOnBlock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAG9D,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,SAAS,CAAA;AAE/C,eAAO,MAAM,UAAU,GACrB,oBAAoB,MAAM,EAC1B,aAAa,CAAC,KAAK,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC,EACpD,WAAW,aAAa,EACxB,eAAe,YAAY,
|
|
1
|
+
{"version":3,"file":"useOnBlock.d.ts","sourceRoot":"","sources":["../../../../../src/components/chain/hooks/useOnBlock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAG9D,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,SAAS,CAAA;AAE/C,eAAO,MAAM,UAAU,GACrB,oBAAoB,MAAM,EAC1B,aAAa,CAAC,KAAK,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC,EACpD,WAAW,aAAa,EACxB,eAAe,YAAY;;;;;;;;;;;;;;;;;MA6C5B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../../../../src/components/payload/builder/producer-intent/Form.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../../../../src/components/payload/builder/producer-intent/Form.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAGvC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAE/E,MAAM,WAAW,8BAA+B,SAAQ,4BAA4B;CAAG;AAEvF,eAAO,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,8BAA8B,CAuD9E,CAAA"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { StandardTextFieldProps } from '@mui/material';
|
|
2
|
+
import { type XL1BlockNumber } from '@xyo-network/xl1-protocol';
|
|
2
3
|
import React from 'react';
|
|
3
4
|
interface BlockNumberTextFieldProps extends StandardTextFieldProps {
|
|
4
5
|
errorMessage?: string;
|
|
5
|
-
onBlockNumberChanged?: (blockNumber?:
|
|
6
|
+
onBlockNumberChanged?: (blockNumber?: XL1BlockNumber) => void;
|
|
6
7
|
}
|
|
7
8
|
export declare const BlockNumberTextField: React.FC<BlockNumberTextFieldProps>;
|
|
8
9
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockNumberTextField.d.ts","sourceRoot":"","sources":["../../../../../src/components/payload/fields/BlockNumberTextField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"BlockNumberTextField.d.ts","sourceRoot":"","sources":["../../../../../src/components/payload/fields/BlockNumberTextField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAI3D,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAEjF,OAAO,KAAmB,MAAM,OAAO,CAAA;AAEvC,UAAU,yBAA0B,SAAQ,sBAAsB;IAChE,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,oBAAoB,CAAC,EAAE,CAAC,WAAW,CAAC,EAAE,cAAc,KAAK,IAAI,CAAA;CAC9D;AAED,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CA0BpE,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { QuickTipButtonProps } from '@xylabs/react-quick-tip-button';
|
|
2
|
-
import type {
|
|
2
|
+
import type { HydratedBlockWithHashMeta } from '@xyo-network/xl1-protocol';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
export interface TransactionsQuickTipButtonQuickTipButtonProps extends QuickTipButtonProps {
|
|
5
|
-
block?:
|
|
5
|
+
block?: HydratedBlockWithHashMeta;
|
|
6
6
|
}
|
|
7
7
|
export declare const TransactionsQuickTipButton: React.FC<TransactionsQuickTipButtonQuickTipButtonProps>;
|
|
8
8
|
//# sourceMappingURL=TransactionsQuickTipButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransactionsQuickTipButton.d.ts","sourceRoot":"","sources":["../../../../src/components/transactions/TransactionsQuickTipButton.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAA;AAGzE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"TransactionsQuickTipButton.d.ts","sourceRoot":"","sources":["../../../../src/components/transactions/TransactionsQuickTipButton.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAA;AAGzE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,KAEN,MAAM,OAAO,CAAA;AAId,MAAM,WAAW,6CAA8C,SAAQ,mBAAmB;IACxF,KAAK,CAAC,EAAE,yBAAyB,CAAA;CAClC;AAED,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAAC,6CAA6C,CA0D9F,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { TransactionBoundWitnessFields } from '@xyo-network/xl1-protocol';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export interface ChainTransactionBuilder {
|
|
4
|
-
onSubmitTx?: (chainTx: TransactionBoundWitnessFields) => Promise<void>;
|
|
4
|
+
onSubmitTx?: (chainTx: Omit<TransactionBoundWitnessFields, 'from'>) => Promise<void>;
|
|
5
5
|
}
|
|
6
6
|
export declare const ChainTransactionBuilder: React.FC<ChainTransactionBuilder>;
|
|
7
7
|
//# sourceMappingURL=Builder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Builder.d.ts","sourceRoot":"","sources":["../../../../../src/components/transactions/submit/Builder.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAW,6BAA6B,EAAE,MAAM,2BAA2B,CAAA;AAEvF,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,WAAW,uBAAuB;IACtC,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,6BAA6B,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"Builder.d.ts","sourceRoot":"","sources":["../../../../../src/components/transactions/submit/Builder.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAW,6BAA6B,EAAE,MAAM,2BAA2B,CAAA;AAEvF,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,WAAW,uBAAuB;IACtC,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,6BAA6B,EAAE,MAAM,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CACrF;AAED,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAyCrE,CAAA"}
|
|
@@ -1,3 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const txsFromBlock: (block:
|
|
1
|
+
import type { HydratedBlockWithHashMeta } from '@xyo-network/xl1-protocol';
|
|
2
|
+
export declare const txsFromBlock: (block: HydratedBlockWithHashMeta) => Promise<[{
|
|
3
|
+
schema: "network.xyo.boundwitness";
|
|
4
|
+
addresses: import("@xylabs/hex").Address[];
|
|
5
|
+
payload_hashes: import("@xylabs/hex").Hash[];
|
|
6
|
+
payload_schemas: string[];
|
|
7
|
+
previous_hashes: (import("@xylabs/hex").Hash | null)[];
|
|
8
|
+
$signatures: (import("@xylabs/hex").Hex | null)[];
|
|
9
|
+
nbf: import("@xyo-network/xl1-protocol").XL1BlockNumber;
|
|
10
|
+
exp: import("@xyo-network/xl1-protocol").XL1BlockNumber;
|
|
11
|
+
fees: {
|
|
12
|
+
base: import("@xylabs/hex").Hex;
|
|
13
|
+
gasLimit: import("@xylabs/hex").Hex;
|
|
14
|
+
gasPrice: import("@xylabs/hex").Hex;
|
|
15
|
+
priority: import("@xylabs/hex").Hex;
|
|
16
|
+
};
|
|
17
|
+
chain: import("@xylabs/hex").Hex;
|
|
18
|
+
from: import("@xylabs/hex").Address;
|
|
19
|
+
$destination?: import("@xylabs/hex").Address | undefined;
|
|
20
|
+
$sourceQuery?: import("@xylabs/hex").Hash | undefined;
|
|
21
|
+
script?: string[] | undefined;
|
|
22
|
+
}, import("@xylabs/hex").Hash][]>;
|
|
3
23
|
//# sourceMappingURL=txsFromBlock.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"txsFromBlock.d.ts","sourceRoot":"","sources":["../../../src/helpers/txsFromBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"txsFromBlock.d.ts","sourceRoot":"","sources":["../../../src/helpers/txsFromBlock.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAA;AAE1E,eAAO,MAAM,YAAY,GAAU,OAAO,yBAAyB;;;;;;;;;;;;;;;;;;;;iCAKlE,CAAA"}
|
|
@@ -1,11 +1,46 @@
|
|
|
1
1
|
import { type Hash } from '@xylabs/sdk-js';
|
|
2
2
|
import type { ReadArchivist } from '@xyo-network/archivist-model';
|
|
3
|
-
import type { BlockBoundWitness } from '@xyo-network/xl1-protocol';
|
|
4
3
|
import type { BlockChainIterator } from '../../types/index.ts';
|
|
5
|
-
export declare const resolveDefinedHead: (head: Hash, chainArchivist: ReadArchivist) => Promise<import("@xyo-network/boundwitness-model").Signed<
|
|
4
|
+
export declare const resolveDefinedHead: (head: Hash, chainArchivist: ReadArchivist) => Promise<import("@xyo-network/boundwitness-model").Signed<{
|
|
5
|
+
schema: "network.xyo.boundwitness";
|
|
6
|
+
addresses: import("@xylabs/sdk-js").Address[];
|
|
7
|
+
payload_hashes: Hash[];
|
|
8
|
+
payload_schemas: string[];
|
|
9
|
+
previous_hashes: (Hash | null)[];
|
|
10
|
+
$signatures: (import("@xylabs/sdk-js").Hex | null)[];
|
|
11
|
+
block: import("@xyo-network/xl1-protocol").XL1BlockNumber;
|
|
12
|
+
chain: import("@xylabs/sdk-js").Hex;
|
|
13
|
+
previous: Hash | null;
|
|
14
|
+
$epoch: number;
|
|
15
|
+
$destination?: import("@xylabs/sdk-js").Address | undefined;
|
|
16
|
+
$sourceQuery?: Hash | undefined;
|
|
17
|
+
protocol?: number | undefined;
|
|
18
|
+
step_hashes?: Hash[] | undefined;
|
|
19
|
+
}> | (import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
20
|
+
schema: string;
|
|
21
|
+
} & Partial<import("@xyo-network/payload-model").PayloadMetaFields> & {
|
|
22
|
+
_hash: Hash;
|
|
23
|
+
_dataHash: Hash;
|
|
24
|
+
_sequence: import("@xyo-network/payload-model").LocalSequence | import("@xyo-network/payload-model").QualifiedSequence;
|
|
25
|
+
} & {
|
|
26
|
+
schema: "network.xyo.boundwitness";
|
|
27
|
+
addresses: import("@xylabs/sdk-js").Address[];
|
|
28
|
+
payload_hashes: import("@xylabs/sdk-js").Hash[];
|
|
29
|
+
payload_schemas: string[];
|
|
30
|
+
previous_hashes: (import("@xylabs/sdk-js").Hash | null)[];
|
|
31
|
+
$signatures: (import("@xylabs/sdk-js").Hex | null)[];
|
|
32
|
+
block: import("@xyo-network/xl1-protocol").XL1BlockNumber;
|
|
33
|
+
chain: import("@xylabs/sdk-js").Hex;
|
|
34
|
+
previous: import("@xylabs/sdk-js").Hash | null;
|
|
35
|
+
$epoch: number;
|
|
36
|
+
$destination?: import("@xylabs/sdk-js").Address | undefined;
|
|
37
|
+
$sourceQuery?: import("@xylabs/sdk-js").Hash | undefined;
|
|
38
|
+
protocol?: number | undefined;
|
|
39
|
+
step_hashes?: import("@xylabs/sdk-js").Hash[] | undefined;
|
|
40
|
+
})>;
|
|
6
41
|
export declare const useChainIteratorParams: ({ chainMap, chainId, head, name, }: BlockChainIterator) => [{
|
|
7
42
|
chainMap: import("@xyo-network/xl1-protocol-sdk").PayloadMapRead<import("@xyo-network/payload-model").WithStorageMeta<import("@xyo-network/payload-model").Payload>>;
|
|
8
|
-
chainId: import("@
|
|
43
|
+
chainId: import("@xylabs/sdk-js").Hex;
|
|
9
44
|
config: {
|
|
10
45
|
api: {
|
|
11
46
|
host: string;
|
|
@@ -56,6 +91,7 @@ export declare const useChainIteratorParams: ({ chainMap, chainId, head, name, }
|
|
|
56
91
|
};
|
|
57
92
|
services: {
|
|
58
93
|
accountBalanceViewerEndpoint?: string | undefined;
|
|
94
|
+
apiEndpoint?: string | undefined;
|
|
59
95
|
};
|
|
60
96
|
storage: {
|
|
61
97
|
mongo?: {
|
|
@@ -87,10 +123,25 @@ export declare const useChainIteratorParams: ({ chainMap, chainId, head, name, }
|
|
|
87
123
|
};
|
|
88
124
|
head: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
89
125
|
schema: string;
|
|
90
|
-
} & Partial<import("@xyo-network/payload-model").PayloadMetaFields> &
|
|
126
|
+
} & Partial<import("@xyo-network/payload-model").PayloadMetaFields> & {
|
|
127
|
+
_hash: Hash;
|
|
128
|
+
_dataHash: Hash;
|
|
129
|
+
_sequence: import("@xyo-network/payload-model").LocalSequence | import("@xyo-network/payload-model").QualifiedSequence;
|
|
130
|
+
} & {
|
|
91
131
|
schema: "network.xyo.boundwitness";
|
|
92
|
-
|
|
93
|
-
|
|
132
|
+
addresses: import("@xylabs/sdk-js").Address[];
|
|
133
|
+
payload_hashes: import("@xylabs/sdk-js").Hash[];
|
|
134
|
+
payload_schemas: string[];
|
|
135
|
+
previous_hashes: (import("@xylabs/sdk-js").Hash | null)[];
|
|
136
|
+
$signatures: (import("@xylabs/sdk-js").Hex | null)[];
|
|
137
|
+
block: import("@xyo-network/xl1-protocol").XL1BlockNumber;
|
|
138
|
+
chain: import("@xylabs/sdk-js").Hex;
|
|
139
|
+
previous: import("@xylabs/sdk-js").Hash | null;
|
|
140
|
+
$epoch: number;
|
|
141
|
+
$destination?: import("@xylabs/sdk-js").Address | undefined;
|
|
142
|
+
$sourceQuery?: import("@xylabs/sdk-js").Hash | undefined;
|
|
143
|
+
protocol?: number | undefined;
|
|
144
|
+
step_hashes?: import("@xylabs/sdk-js").Hash[] | undefined;
|
|
94
145
|
};
|
|
95
146
|
name: import("@xylabs/sdk-js").CreatableName;
|
|
96
147
|
} | undefined, Error | undefined, import("@xylabs/react-promise").UsePromiseState | undefined];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChainIteratorParams.d.ts","sourceRoot":"","sources":["../../../../src/hooks/chain-iterator/useChainIteratorParams.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,EAAU,MAAM,gBAAgB,CAAA;AAElD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;
|
|
1
|
+
{"version":3,"file":"useChainIteratorParams.d.ts","sourceRoot":"","sources":["../../../../src/hooks/chain-iterator/useChainIteratorParams.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,EAAU,MAAM,gBAAgB,CAAA;AAElD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAMjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAE9D,eAAO,MAAM,kBAAkB,GAAU,MAAM,IAAI,EAAE,gBAAgB,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAajF,CAAA;AAED,eAAO,MAAM,sBAAsB,GAAI,oCAEpC,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8FAgBpB,CAAA"}
|
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
import type { XyoChainIteratorParams } from '@xyo-network/chain-services';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
export declare const useIterateChain: (chainIteratorParams?: XyoChainIteratorParams, maxDepth?: number) => [[{
|
|
3
|
+
schema: "network.xyo.boundwitness";
|
|
4
|
+
addresses: import("@xylabs/sdk-js").Address[];
|
|
5
|
+
payload_hashes: import("@xylabs/sdk-js").Hash[];
|
|
6
|
+
payload_schemas: string[];
|
|
7
|
+
previous_hashes: (import("@xylabs/sdk-js").Hash | null)[];
|
|
8
|
+
$signatures: (import("@xylabs/sdk-js").Hex | null)[];
|
|
9
|
+
block: import("@xyo-network/xl1-protocol").XL1BlockNumber;
|
|
10
|
+
chain: import("@xylabs/sdk-js").Hex;
|
|
11
|
+
previous: import("@xylabs/sdk-js").Hash | null;
|
|
12
|
+
$epoch: number;
|
|
13
|
+
_hash: import("@xylabs/sdk-js").Hash;
|
|
14
|
+
_dataHash: import("@xylabs/sdk-js").Hash;
|
|
15
|
+
$destination?: import("@xylabs/sdk-js").Address | undefined;
|
|
16
|
+
$sourceQuery?: import("@xylabs/sdk-js").Hash | undefined;
|
|
17
|
+
protocol?: number | undefined;
|
|
18
|
+
step_hashes?: import("@xylabs/sdk-js").Hash[] | undefined;
|
|
19
|
+
}, {
|
|
20
|
+
schema: string;
|
|
21
|
+
_hash: import("@xylabs/sdk-js").Hash;
|
|
22
|
+
_dataHash: import("@xylabs/sdk-js").Hash;
|
|
23
|
+
}[]][] | undefined, Error | undefined, import("@xylabs/react-promise").UsePromiseState | undefined];
|
|
4
24
|
//# sourceMappingURL=useIterateChain.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIterateChain.d.ts","sourceRoot":"","sources":["../../../src/hooks/useIterateChain.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"useIterateChain.d.ts","sourceRoot":"","sources":["../../../src/hooks/useIterateChain.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAiDzE,eAAO,MAAM,eAAe,GAC1B,sBAAsB,sBAAsB,EAC5C,WAAW,MAAM;;;;;;;;;;;;;;;;;;;;;mGAKlB,CAAA"}
|
|
@@ -1,3 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const useTxsFromBlock: (block?:
|
|
1
|
+
import type { HydratedBlockWithHashMeta } from '@xyo-network/xl1-protocol';
|
|
2
|
+
export declare const useTxsFromBlock: (block?: HydratedBlockWithHashMeta) => [[{
|
|
3
|
+
schema: "network.xyo.boundwitness";
|
|
4
|
+
addresses: import("@xylabs/hex").Address[];
|
|
5
|
+
payload_hashes: import("@xylabs/hex").Hash[];
|
|
6
|
+
payload_schemas: string[];
|
|
7
|
+
previous_hashes: (import("@xylabs/hex").Hash | null)[];
|
|
8
|
+
$signatures: (import("@xylabs/hex").Hex | null)[];
|
|
9
|
+
nbf: import("@xyo-network/xl1-protocol").XL1BlockNumber;
|
|
10
|
+
exp: import("@xyo-network/xl1-protocol").XL1BlockNumber;
|
|
11
|
+
fees: {
|
|
12
|
+
base: import("@xylabs/hex").Hex;
|
|
13
|
+
gasLimit: import("@xylabs/hex").Hex;
|
|
14
|
+
gasPrice: import("@xylabs/hex").Hex;
|
|
15
|
+
priority: import("@xylabs/hex").Hex;
|
|
16
|
+
};
|
|
17
|
+
chain: import("@xylabs/hex").Hex;
|
|
18
|
+
from: import("@xylabs/hex").Address;
|
|
19
|
+
$destination?: import("@xylabs/hex").Address | undefined;
|
|
20
|
+
$sourceQuery?: import("@xylabs/hex").Hash | undefined;
|
|
21
|
+
script?: string[] | undefined;
|
|
22
|
+
}, import("@xylabs/hex").Hash][] | undefined, Error | undefined, import("@xylabs/react-promise").UsePromiseState | undefined];
|
|
3
23
|
//# sourceMappingURL=useTxsFromBlock.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTxsFromBlock.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTxsFromBlock.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"useTxsFromBlock.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTxsFromBlock.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAA;AAI1E,eAAO,MAAM,eAAe,GAAI,QAAQ,yBAAyB;;;;;;;;;;;;;;;;;;;;6HAMhE,CAAA"}
|
package/dist/browser/index.mjs
CHANGED
|
@@ -165,7 +165,7 @@ var useChainPollingContext = /* @__PURE__ */ __name((required = false) => useCon
|
|
|
165
165
|
import { Button, FormControl, TextField } from "@mui/material";
|
|
166
166
|
import { FlexCol } from "@xylabs/react-flexbox";
|
|
167
167
|
import { toHex } from "@xylabs/sdk-js";
|
|
168
|
-
import { defaultTransactionFees } from "@xyo-network/xl1-protocol";
|
|
168
|
+
import { defaultTransactionFees, toXL1BlockNumber } from "@xyo-network/xl1-protocol";
|
|
169
169
|
import React3 from "react";
|
|
170
170
|
var ChainTransactionBuilder = /* @__PURE__ */ __name(({ onSubmitTx }) => {
|
|
171
171
|
const handleSubmit = /* @__PURE__ */ __name(async (event) => {
|
|
@@ -173,8 +173,8 @@ var ChainTransactionBuilder = /* @__PURE__ */ __name(({ onSubmitTx }) => {
|
|
|
173
173
|
const formData = new FormData(event.currentTarget);
|
|
174
174
|
const chainTx = {
|
|
175
175
|
chain: formData.get("chain"),
|
|
176
|
-
nbf:
|
|
177
|
-
exp:
|
|
176
|
+
nbf: toXL1BlockNumber(formData.get("nbf"), true),
|
|
177
|
+
exp: toXL1BlockNumber(formData.get("exp"), true),
|
|
178
178
|
fees: {
|
|
179
179
|
gasLimit: toHex(defaultTransactionFees.gasLimit),
|
|
180
180
|
gasPrice: toHex(defaultTransactionFees.gasPrice),
|
|
@@ -2055,18 +2055,20 @@ var PayloadBuilderFlexbox = /* @__PURE__ */ __name(({ BuilderComponent, onBuild,
|
|
|
2055
2055
|
|
|
2056
2056
|
// src/components/payload/builder/producer-intent/Form.tsx
|
|
2057
2057
|
import { Button as Button5, FormControl as FormControl5 } from "@mui/material";
|
|
2058
|
+
import { usePromise as usePromise5 } from "@xylabs/react-promise";
|
|
2058
2059
|
import { createProducerChainStakeIntent } from "@xyo-network/chain-protocol";
|
|
2059
|
-
import React45, {
|
|
2060
|
+
import React45, { useState as useState18 } from "react";
|
|
2060
2061
|
|
|
2061
2062
|
// src/components/payload/fields/BlockNumberTextField.tsx
|
|
2062
2063
|
import { FormControl as FormControl3, FormHelperText as FormHelperText2, TextField as TextField3 } from "@mui/material";
|
|
2064
|
+
import { toXL1BlockNumber as toXL1BlockNumber2 } from "@xyo-network/xl1-protocol";
|
|
2063
2065
|
import React43, { useState as useState16 } from "react";
|
|
2064
2066
|
var BlockNumberTextField = /* @__PURE__ */ __name(({ errorMessage, onBlockNumberChanged, onChange, ...props }) => {
|
|
2065
2067
|
const [blockNumber, setBlockNumber] = useState16();
|
|
2066
2068
|
const handleChange = /* @__PURE__ */ __name((e) => {
|
|
2067
2069
|
const value = e.target.value.replaceAll(/\D/g, "");
|
|
2068
2070
|
setBlockNumber(value.length > 0 ? Number(value) : void 0);
|
|
2069
|
-
onBlockNumberChanged?.(
|
|
2071
|
+
onBlockNumberChanged?.(toXL1BlockNumber2(value));
|
|
2070
2072
|
onChange?.(e);
|
|
2071
2073
|
}, "handleChange");
|
|
2072
2074
|
const errored = errorMessage !== void 0;
|
|
@@ -2133,14 +2135,14 @@ var ProducerIntentBuilderForm = /* @__PURE__ */ __name(({ onBuild }) => {
|
|
|
2133
2135
|
const [exp, setExp] = useState18();
|
|
2134
2136
|
const [nbf, setNbf] = useState18();
|
|
2135
2137
|
const [blockRangeError, setBlockRangeError] = useState18();
|
|
2136
|
-
const intentPayload =
|
|
2138
|
+
const [intentPayload] = usePromise5(async () => {
|
|
2137
2139
|
if (exp !== void 0 && nbf !== void 0) {
|
|
2138
2140
|
if (exp <= nbf) {
|
|
2139
2141
|
setBlockRangeError(new Error("Expires must be greater than Not Before"));
|
|
2140
2142
|
} else {
|
|
2141
2143
|
setBlockRangeError(void 0);
|
|
2142
2144
|
if (delegate !== void 0) {
|
|
2143
|
-
const payload = createProducerChainStakeIntent(delegate, exp, nbf);
|
|
2145
|
+
const payload = await createProducerChainStakeIntent(delegate, exp, nbf);
|
|
2144
2146
|
return payload;
|
|
2145
2147
|
}
|
|
2146
2148
|
}
|
|
@@ -2193,7 +2195,7 @@ import React48 from "react";
|
|
|
2193
2195
|
import { Button as Button6, FormControl as FormControl7 } from "@mui/material";
|
|
2194
2196
|
import { isAddress as isAddress4 } from "@xylabs/sdk-js";
|
|
2195
2197
|
import { TransferSchema } from "@xyo-network/xl1-protocol";
|
|
2196
|
-
import React47, { useMemo as
|
|
2198
|
+
import React47, { useMemo as useMemo18, useState as useState20 } from "react";
|
|
2197
2199
|
|
|
2198
2200
|
// src/components/payload/builder/transfer/builder/SingleFlexbox.tsx
|
|
2199
2201
|
import { RemoveCircle } from "@mui/icons-material";
|
|
@@ -2201,11 +2203,11 @@ import { FormControl as FormControl6, Icon as Icon3, IconButton as IconButton5 }
|
|
|
2201
2203
|
import { FlexRow as FlexRow7 } from "@xylabs/react-flexbox";
|
|
2202
2204
|
import { isAddress as isAddress3, toHex as toHex4 } from "@xylabs/sdk-js";
|
|
2203
2205
|
import { BigIntInput } from "@xyo-network/react-shared";
|
|
2204
|
-
import React46, { useEffect as useEffect3, useMemo as
|
|
2206
|
+
import React46, { useEffect as useEffect3, useMemo as useMemo17, useState as useState19 } from "react";
|
|
2205
2207
|
var SingleTransferBuilderFlexbox = /* @__PURE__ */ __name(({ onTransferUpdated, onRemoveTransfer, singleTransfer, ...props }) => {
|
|
2206
2208
|
const [toAddress3, setToAddress] = useState19();
|
|
2207
2209
|
const [amount, setAmount] = useState19();
|
|
2208
|
-
const transferAmount =
|
|
2210
|
+
const transferAmount = useMemo17(() => {
|
|
2209
2211
|
if (isAddress3(toAddress3) && amount !== void 0) {
|
|
2210
2212
|
return {
|
|
2211
2213
|
...singleTransfer,
|
|
@@ -2251,7 +2253,7 @@ var SingleTransferBuilderFlexbox = /* @__PURE__ */ __name(({ onTransferUpdated,
|
|
|
2251
2253
|
var TransferBuilderForm = /* @__PURE__ */ __name(({ onBuild }) => {
|
|
2252
2254
|
const [fromAddress, setFromAddress] = useState20();
|
|
2253
2255
|
const [transfers, setTransfers] = useState20([]);
|
|
2254
|
-
const transferPayload =
|
|
2256
|
+
const transferPayload = useMemo18(() => {
|
|
2255
2257
|
if (isAddress4(fromAddress) && transfers.length > 0) {
|
|
2256
2258
|
const transfersRecord = {};
|
|
2257
2259
|
for (const transfer of transfers) {
|
|
@@ -2331,7 +2333,7 @@ var TransferBuilderFlexbox = /* @__PURE__ */ __name(({ onBuild, ...props }) => /
|
|
|
2331
2333
|
|
|
2332
2334
|
// src/stories/ChainArchivistDecorator.tsx
|
|
2333
2335
|
import { CircularProgress } from "@mui/material";
|
|
2334
|
-
import { usePromise as
|
|
2336
|
+
import { usePromise as usePromise6 } from "@xylabs/react-promise";
|
|
2335
2337
|
import { MemoryArchivist } from "@xyo-network/archivist-memory";
|
|
2336
2338
|
import { ArchivistConfigSchema } from "@xyo-network/archivist-model";
|
|
2337
2339
|
import { buildRandomBlockChain } from "@xyo-network/react-chain-shared";
|
|
@@ -2367,8 +2369,8 @@ var getChainId = /* @__PURE__ */ __name(() => {
|
|
|
2367
2369
|
|
|
2368
2370
|
// src/stories/ChainArchivistDecorator.tsx
|
|
2369
2371
|
var ChainArchivistDecorator = /* @__PURE__ */ __name((Story, { args, ...context }) => {
|
|
2370
|
-
const [randomBlockChain] =
|
|
2371
|
-
const [blockChainRenderProps, blockChainRenderPropsError] =
|
|
2372
|
+
const [randomBlockChain] = usePromise6(async () => await buildRandomBlockChain(), []);
|
|
2373
|
+
const [blockChainRenderProps, blockChainRenderPropsError] = usePromise6(async () => {
|
|
2372
2374
|
if (randomBlockChain) {
|
|
2373
2375
|
const chainArchivist = await MemoryArchivist.create({
|
|
2374
2376
|
config: {
|
|
@@ -2410,7 +2412,7 @@ var ChainArchivistDecorator = /* @__PURE__ */ __name((Story, { args, ...context
|
|
|
2410
2412
|
|
|
2411
2413
|
// src/stories/ChainArchivistDelayedInsertDecorator.tsx
|
|
2412
2414
|
import { CircularProgress as CircularProgress2 } from "@mui/material";
|
|
2413
|
-
import { usePromise as
|
|
2415
|
+
import { usePromise as usePromise7 } from "@xylabs/react-promise";
|
|
2414
2416
|
import { delay } from "@xylabs/sdk-js";
|
|
2415
2417
|
import { MemoryArchivist as MemoryArchivist2 } from "@xyo-network/archivist-memory";
|
|
2416
2418
|
import { ArchivistConfigSchema as ArchivistConfigSchema2 } from "@xyo-network/archivist-model";
|
|
@@ -2420,8 +2422,8 @@ import React50, { useEffect as useEffect5, useState as useState21 } from "react"
|
|
|
2420
2422
|
var chainArchivistRef;
|
|
2421
2423
|
var ChainArchivistDelayedInsertDecorator = /* @__PURE__ */ __name((Story, context) => {
|
|
2422
2424
|
const [firstBlock, setFirstBlock] = useState21();
|
|
2423
|
-
const [randomBlockChain] =
|
|
2424
|
-
const [chainArchivist] =
|
|
2425
|
+
const [randomBlockChain] = usePromise7(async () => await buildRandomBlockChain2(), []);
|
|
2426
|
+
const [chainArchivist] = usePromise7(async () => {
|
|
2425
2427
|
if (chainArchivistRef) {
|
|
2426
2428
|
return chainArchivistRef;
|
|
2427
2429
|
} else {
|
|
@@ -2434,7 +2436,7 @@ var ChainArchivistDelayedInsertDecorator = /* @__PURE__ */ __name((Story, contex
|
|
|
2434
2436
|
return chainArchivistRef;
|
|
2435
2437
|
}
|
|
2436
2438
|
}, []);
|
|
2437
|
-
const [, delayedInsertError] =
|
|
2439
|
+
const [, delayedInsertError] = usePromise7(async () => {
|
|
2438
2440
|
if (chainArchivist && randomBlockChain) {
|
|
2439
2441
|
for (const hydratedBlock of randomBlockChain) {
|
|
2440
2442
|
const flattened = flattenHydratedBlock(hydratedBlock);
|
|
@@ -2454,7 +2456,7 @@ var ChainArchivistDelayedInsertDecorator = /* @__PURE__ */ __name((Story, contex
|
|
|
2454
2456
|
}, [
|
|
2455
2457
|
delayedInsertError
|
|
2456
2458
|
]);
|
|
2457
|
-
const [blockChainRenderProps] =
|
|
2459
|
+
const [blockChainRenderProps] = usePromise7(async () => {
|
|
2458
2460
|
const chainId = await getChainId();
|
|
2459
2461
|
return {
|
|
2460
2462
|
chainArchivist,
|
|
@@ -2479,7 +2481,7 @@ var ChainArchivistDelayedInsertDecorator = /* @__PURE__ */ __name((Story, contex
|
|
|
2479
2481
|
}, "ChainArchivistDelayedInsertDecorator");
|
|
2480
2482
|
|
|
2481
2483
|
// src/stories/ChainInfoContextDecorator.tsx
|
|
2482
|
-
import { usePromise as
|
|
2484
|
+
import { usePromise as usePromise8 } from "@xylabs/react-promise";
|
|
2483
2485
|
import { assertEx as assertEx5, isDefined as isDefined9 } from "@xylabs/sdk-js";
|
|
2484
2486
|
import { ChainBlockNumberIterationService as ChainBlockNumberIterationService3 } from "@xyo-network/chain-services";
|
|
2485
2487
|
import { findFirstMatching } from "@xyo-network/chain-utils";
|
|
@@ -2491,14 +2493,14 @@ var archivistConfig = {
|
|
|
2491
2493
|
chainArchivistModuleId: "XYOPublic:XYOChain:Chain"
|
|
2492
2494
|
};
|
|
2493
2495
|
var ChainInfoContextDecorator = /* @__PURE__ */ __name((Story, context) => {
|
|
2494
|
-
const [chainIdResponse] =
|
|
2496
|
+
const [chainIdResponse] = usePromise8(async () => {
|
|
2495
2497
|
return await getChainId();
|
|
2496
2498
|
}, []);
|
|
2497
2499
|
const chainId = chainIdResponse;
|
|
2498
|
-
const [chainArchivist] =
|
|
2500
|
+
const [chainArchivist] = usePromise8(async () => {
|
|
2499
2501
|
return await getChainArchivistFromBridge(archivistConfig);
|
|
2500
2502
|
}, []);
|
|
2501
|
-
const [chainIterator] =
|
|
2503
|
+
const [chainIterator] = usePromise8(async () => {
|
|
2502
2504
|
if (isDefined9(chainArchivist) && isDefined9(chainId)) {
|
|
2503
2505
|
const firstMatch = assertEx5(await findFirstMatching(chainArchivist), () => `No head found in archivist: ${chainArchivist.id} `);
|
|
2504
2506
|
const head = assertEx5(isBlockBoundWitness3(firstMatch) ? firstMatch : void 0, () => `Expected a block bound witness: ${JSON.stringify(firstMatch)}`);
|