@xyo-network/react-chain-boundwitness 1.3.25 → 1.3.26

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.
@@ -134,8 +134,224 @@ var BlockBoundWitnessDetails = /* @__PURE__ */ __name(({ block, paper, children,
134
134
  block: boundWitness
135
135
  })));
136
136
  }, "BlockBoundWitnessDetails");
137
+
138
+ // src/components/transactions/TransactionDetails.tsx
139
+ import { Divider as Divider2 } from "@mui/material";
140
+ import { ErrorRender as ErrorRender2 } from "@xylabs/react-error";
141
+ import { FlexCol as FlexCol3 } from "@xylabs/react-flexbox";
142
+ import { usePromise as usePromise2 } from "@xylabs/react-promise";
143
+ import { isDefined } from "@xylabs/typeof";
144
+ import { SignedHydratedTransactionWrapper } from "@xyo-network/chain-wrappers";
145
+ import { PayloadBuilder as PayloadBuilder2 } from "@xyo-network/payload-builder";
146
+ import { BoundWitnessSignatureTable as BoundWitnessSignatureTable2, BWActions as BWActions2, HashHeadingPaper as HashHeadingPaper2, HeadingPaper as HeadingPaper3 } from "@xyo-network/react-boundwitness-plugin";
147
+ import React5 from "react";
148
+ import { FaSignature as FaSignature2 } from "react-icons/fa";
149
+ import { VscSymbolMethod as VscSymbolMethod3 } from "react-icons/vsc";
150
+
151
+ // src/components/transactions/card/Card.tsx
152
+ import { Card, CardContent, Grid, Typography as Typography2 } from "@mui/material";
153
+ import { isUndefined } from "@xylabs/typeof";
154
+ import { bigIntToFixedPointString } from "@xyo-network/chain-utils";
155
+ import React4, { useCallback } from "react";
156
+ import { GiReceiveMoney, GiSandsOfTime } from "react-icons/gi";
157
+ import { IoStatsChartOutline } from "react-icons/io5";
158
+ import { MdOutlineAlternateEmail } from "react-icons/md";
159
+
160
+ // src/components/transactions/card/DetailsStack.tsx
161
+ import { Icon, Stack, styled, Typography } from "@mui/material";
162
+ import React3 from "react";
163
+ var DetailsStack = /* @__PURE__ */ __name(({ IconComponent, heading, children, ...props }) => {
164
+ return /* @__PURE__ */ React3.createElement(Stack, {
165
+ direction: "row",
166
+ mb: 1,
167
+ gap: 1,
168
+ ...props
169
+ }, IconComponent && /* @__PURE__ */ React3.createElement(Icon, {
170
+ fontSize: "small",
171
+ sx: {
172
+ mr: 0.25
173
+ }
174
+ }, /* @__PURE__ */ React3.createElement(IconComponent, {
175
+ style: {
176
+ height: "0.7em"
177
+ }
178
+ })), /* @__PURE__ */ React3.createElement(Stack, {
179
+ direction: "column",
180
+ flexWrap: "wrap",
181
+ mb: 1
182
+ }, /* @__PURE__ */ React3.createElement(SectionHeadingTypography, null, heading), children));
183
+ }, "DetailsStack");
184
+ var SectionHeadingTypography = styled(Typography, {
185
+ name: "SectionHeadingTypography"
186
+ })(({ theme }) => ({
187
+ display: "inline-flex",
188
+ alignItems: "baseline",
189
+ fontFamily: "monospace",
190
+ fontSize: 16,
191
+ marginBottom: theme.spacing(0.75)
192
+ }));
193
+
194
+ // src/components/transactions/card/Card.tsx
195
+ var TransactionBoundWitnessCard = /* @__PURE__ */ __name(({ wrapper, ...props }) => {
196
+ if (!wrapper) return null;
197
+ const formatFee = useCallback((fee) => {
198
+ if (isUndefined(fee)) return;
199
+ return bigIntToFixedPointString(fee, 12);
200
+ }, []);
201
+ return /* @__PURE__ */ React4.createElement(Card, props, /* @__PURE__ */ React4.createElement(CardContent, {
202
+ sx: {
203
+ display: "flex",
204
+ flexDirection: "row",
205
+ gap: 2,
206
+ flexWrap: "wrap"
207
+ }
208
+ }, /* @__PURE__ */ React4.createElement(Grid, {
209
+ container: true,
210
+ spacing: 3,
211
+ sx: {
212
+ width: "100%"
213
+ }
214
+ }, /* @__PURE__ */ React4.createElement(Grid, {
215
+ size: {
216
+ xs: 12
217
+ }
218
+ }, /* @__PURE__ */ React4.createElement(DetailsStack, {
219
+ IconComponent: MdOutlineAlternateEmail,
220
+ heading: "From:"
221
+ }, /* @__PURE__ */ React4.createElement(Typography2, {
222
+ variant: "body2",
223
+ sx: {
224
+ maxWidth: "100%",
225
+ textOverflow: "ellipsis",
226
+ overflow: "hidden"
227
+ }
228
+ }, wrapper?.boundWitness.from))), /* @__PURE__ */ React4.createElement(Grid, {
229
+ size: {
230
+ xs: 12,
231
+ sm: 6,
232
+ md: 4
233
+ }
234
+ }, /* @__PURE__ */ React4.createElement(DetailsStack, {
235
+ IconComponent: IoStatsChartOutline,
236
+ heading: "Stats"
237
+ }, /* @__PURE__ */ React4.createElement(Typography2, {
238
+ variant: "body2"
239
+ }, "Reward:", " ", wrapper?.reward()), /* @__PURE__ */ React4.createElement(Typography2, {
240
+ variant: "body2"
241
+ }, "Elevated Payloads:", " ", wrapper?.elevatedPayloadCount), /* @__PURE__ */ React4.createElement(Typography2, {
242
+ variant: "body2"
243
+ }, "Total Payloads:", " ", wrapper?.payloadCount), /* @__PURE__ */ React4.createElement(Typography2, {
244
+ variant: "body2"
245
+ }, "Signatures:", " ", wrapper?.signatureCount))), /* @__PURE__ */ React4.createElement(Grid, {
246
+ size: {
247
+ xs: 12,
248
+ sm: 6,
249
+ md: 4
250
+ }
251
+ }, /* @__PURE__ */ React4.createElement(DetailsStack, {
252
+ IconComponent: GiReceiveMoney,
253
+ heading: "Fees"
254
+ }, /* @__PURE__ */ React4.createElement(Typography2, {
255
+ variant: "body2"
256
+ }, "Base:", " ", formatFee(wrapper?.fees.base)), /* @__PURE__ */ React4.createElement(Typography2, {
257
+ variant: "body2"
258
+ }, "Gas:", " ", formatFee(wrapper?.fees.gasPrice)), /* @__PURE__ */ React4.createElement(Typography2, {
259
+ variant: "body2"
260
+ }, "Priority:", " ", formatFee(wrapper?.fees.priority)), /* @__PURE__ */ React4.createElement(Typography2, {
261
+ variant: "body2"
262
+ }, "Gas Limit:", " ", formatFee(wrapper?.fees.gasLimit)))), /* @__PURE__ */ React4.createElement(Grid, {
263
+ size: {
264
+ xs: 12,
265
+ sm: 6,
266
+ md: 4
267
+ }
268
+ }, /* @__PURE__ */ React4.createElement(DetailsStack, {
269
+ IconComponent: GiSandsOfTime,
270
+ heading: "Block Duration"
271
+ }, /* @__PURE__ */ React4.createElement(Typography2, {
272
+ variant: "body2"
273
+ }, "Expiration:", " ", wrapper?.boundWitness.exp), /* @__PURE__ */ React4.createElement(Typography2, {
274
+ variant: "body2"
275
+ }, "Not Before:", " ", wrapper?.boundWitness?.nbf))))));
276
+ }, "TransactionBoundWitnessCard");
277
+
278
+ // src/components/transactions/TransactionDetails.tsx
279
+ var TransactionBoundWitnessDetails = /* @__PURE__ */ __name(({ transaction, ...props }) => {
280
+ const [wrapper, wrapperError] = usePromise2(async () => {
281
+ if (transaction) {
282
+ return await SignedHydratedTransactionWrapper.parse(transaction);
283
+ }
284
+ }, [
285
+ transaction
286
+ ]);
287
+ const [elevatedPayloadSets, elevatedPayloadSetsError] = usePromise2(async () => {
288
+ if (isDefined(wrapper)) {
289
+ const elevatedPayloads = wrapper.elevatedPayloads;
290
+ const pairs = await PayloadBuilder2.hashPairs(elevatedPayloads);
291
+ return formatPayloadsForTable(pairs);
292
+ } else {
293
+ return {
294
+ hashes: [],
295
+ schemas: []
296
+ };
297
+ }
298
+ }, [
299
+ wrapper
300
+ ]);
301
+ const { hashes: elevatedPayloadHashes, schemas: elevatedPayloadSchemas } = elevatedPayloadSets ?? {};
302
+ return /* @__PURE__ */ React5.createElement(FlexCol3, {
303
+ alignItems: "stretch",
304
+ rowGap: 4,
305
+ ...props
306
+ }, /* @__PURE__ */ React5.createElement(HashHeadingPaper2, {
307
+ hash: wrapper?.boundWitness?._hash,
308
+ paperProps: {
309
+ sx: {
310
+ p: 2
311
+ }
312
+ },
313
+ AdornmentEnd: /* @__PURE__ */ React5.createElement(BWActions2, {
314
+ boundwitness: wrapper?.boundWitness
315
+ }),
316
+ identiconProps: {
317
+ p: 0.75,
318
+ size: 24
319
+ }
320
+ }), /* @__PURE__ */ React5.createElement(ErrorRender2, {
321
+ error: wrapperError,
322
+ scope: "wrapperError:TransactionBoundWitnessDetails.tsx"
323
+ }), /* @__PURE__ */ React5.createElement(ErrorRender2, {
324
+ error: elevatedPayloadSetsError,
325
+ scope: "elevatedPayloadSetsError:TransactionBoundWitnessDetails.tsx"
326
+ }), /* @__PURE__ */ React5.createElement(Divider2, {
327
+ flexItem: true
328
+ }), /* @__PURE__ */ React5.createElement(TransactionBoundWitnessCard, {
329
+ elevation: 4,
330
+ wrapper
331
+ }), /* @__PURE__ */ React5.createElement(Divider2, {
332
+ flexItem: true
333
+ }), /* @__PURE__ */ React5.createElement(BWPayloadTableFlexbox, {
334
+ IconComponent: /* @__PURE__ */ React5.createElement(VscSymbolMethod3, null),
335
+ hashes: elevatedPayloadHashes,
336
+ headingTitle: "Elevated Payloads",
337
+ schemas: elevatedPayloadSchemas,
338
+ sx: {
339
+ mb: 1
340
+ }
341
+ }), /* @__PURE__ */ React5.createElement(FlexCol3, {
342
+ alignItems: "stretch",
343
+ rowGap: 1,
344
+ mb: 1
345
+ }, /* @__PURE__ */ React5.createElement(HeadingPaper3, {
346
+ IconComponent: /* @__PURE__ */ React5.createElement(FaSignature2, null),
347
+ heading: "Signatures"
348
+ }), /* @__PURE__ */ React5.createElement(BoundWitnessSignatureTable2, {
349
+ block: wrapper?.boundWitness
350
+ })));
351
+ }, "TransactionBoundWitnessDetails");
137
352
  export {
138
353
  BWPayloadTableFlexbox,
139
- BlockBoundWitnessDetails
354
+ BlockBoundWitnessDetails,
355
+ TransactionBoundWitnessDetails
140
356
  };
141
357
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/block/BlockBoundWitnessDetails.tsx","../../src/lib/formatPayloadsForTable.ts","../../src/components/BwPayloadTable.tsx"],"sourcesContent":["import { Divider } from '@mui/material'\nimport { filterAs } from '@xylabs/array'\nimport { ErrorRender } from '@xylabs/react-error'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport { usePromise } from '@xylabs/react-promise'\nimport { isBoundWitness } from '@xyo-network/boundwitness-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport {\n BoundWitnessPayloadsTable,\n BoundWitnessSignatureTable,\n BWActions,\n HashHeadingPaper,\n HeadingPaper,\n} from '@xyo-network/react-boundwitness-plugin'\nimport { useTxsFromBlock } from '@xyo-network/react-chain-blockchain'\nimport { usePayloadHash } from '@xyo-network/react-shared'\nimport { isTransactionBoundWitness, type SignedHydratedBlock } from '@xyo-network/xl1-protocol'\nimport React, { useMemo } from 'react'\nimport { FaSignature } from 'react-icons/fa'\nimport { GrTransaction } from 'react-icons/gr'\nimport { VscSymbolMethod, VscSymbolNamespace } from 'react-icons/vsc'\n\nimport { formatPayloadsForTable } from '../../lib/index.ts'\nimport type { TransactionBoundWitnessEvents } from '../../types/index.ts'\nimport { BWPayloadTableFlexbox } from '../BwPayloadTable.tsx'\n\nexport interface BoundWitnessDetailsProps extends FlexBoxProps {\n block?: SignedHydratedBlock\n}\n\nexport const BlockBoundWitnessDetails = ({\n block, paper, children, ...props\n}: BoundWitnessDetailsProps) => {\n const boundWitness = block?.[0]\n const payloads = block?.[1]\n\n const hash = usePayloadHash(boundWitness)\n\n const [transactions, txFromBlockError] = useTxsFromBlock(block)\n\n const { hashes: txHashes, schemas: txSchemas } = useMemo(() => formatPayloadsForTable(transactions ?? []), [transactions])\n\n const [nonTxBoundWitnesses, bwsFromBlockError] = usePromise(async () => {\n const bws = filterAs(payloads ?? [], payload =>\n (!isTransactionBoundWitness(payload) && isBoundWitness(payload)) ? payload : undefined)\n return await PayloadBuilder.hashPairs(bws)\n }, [payloads])\n\n const { hashes: nonTxBwHashes, schemas: nonTxBwSchemas } = useMemo(() => formatPayloadsForTable(nonTxBoundWitnesses ?? []), [nonTxBoundWitnesses])\n const hasNonTxBoundWitnesses = (nonTxBoundWitnesses?.length ?? 0) > 0\n\n return (\n <FlexCol alignItems=\"stretch\" rowGap={4} {...props}>\n <ErrorRender error={txFromBlockError ?? bwsFromBlockError} scope=\"BlockBoundWitnessDetails.tsx\" />\n <HashHeadingPaper\n hash={hash}\n paperProps={{ sx: { p: 2 } }}\n AdornmentEnd={<BWActions boundwitness={boundWitness} />}\n identiconProps={{ p: 0.75, size: 24 }}\n />\n <Divider flexItem />\n {(transactions?.length ?? 0) > 0 && (\n <BWPayloadTableFlexbox<TransactionBoundWitnessEvents>\n IconComponent={<GrTransaction />}\n eventNoun=\"transaction\"\n hashes={txHashes}\n headingTitle=\"Transactions\"\n schemas={txSchemas}\n sx={{ mb: 1 }}\n />\n )}\n <FlexCol alignItems=\"stretch\" rowGap={1} mb={1}>\n <HeadingPaper IconComponent={<VscSymbolNamespace />} heading=\"Payloads\" />\n <BoundWitnessPayloadsTable boundwitness={boundWitness} />\n </FlexCol>\n {hasNonTxBoundWitnesses\n ? (\n <BWPayloadTableFlexbox<TransactionBoundWitnessEvents>\n IconComponent={<VscSymbolMethod />}\n eventNoun=\"boundwitness\"\n hashes={nonTxBwHashes}\n headingTitle=\"Bound Witnesses\"\n schemas={nonTxBwSchemas}\n sx={{ mb: 1 }}\n />\n )\n : null}\n <FlexCol alignItems=\"stretch\" rowGap={1} mb={1}>\n <HeadingPaper IconComponent={<FaSignature />} heading=\"Signatures\" />\n <BoundWitnessSignatureTable block={boundWitness} />\n </FlexCol>\n </FlexCol>\n )\n}\n","import type { Hash } from '@xylabs/hex'\nimport type { Payload } from '@xyo-network/payload-model'\n\nexport const formatPayloadsForTable = (pairs: [Payload, Hash][]) => {\n let hashes: Hash[] = []\n let schemas: string[] = []\n for (const [bw, hash] of pairs ?? []) {\n hashes.push(hash)\n schemas.push(bw?.schema ?? '')\n }\n return { hashes, schemas }\n}\n","import type { Hash } from '@xylabs/hex'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport {\n BoundWitnessPayloadTableBody, BoundWitnessPayloadTableHead, HeadingPaper,\n} from '@xyo-network/react-boundwitness-plugin'\nimport type { EventNoun, ExtendEventNoun } from '@xyo-network/react-event'\nimport { TableEx } from '@xyo-network/react-table'\nimport React from 'react'\nimport { VscSymbolMethod } from 'react-icons/vsc'\n\nexport interface BWPayloadTableFlexboxProps<TNoun extends ExtendEventNoun = EventNoun> extends FlexBoxProps {\n IconComponent?: React.ReactNode\n eventNoun?: TNoun\n hashes?: Hash[]\n headingTitle?: string\n schemas?: string[]\n}\n\nexport const BWPayloadTableFlexbox = <TNoun extends ExtendEventNoun = EventNoun>({\n IconComponent,\n eventNoun,\n hashes,\n schemas,\n headingTitle,\n ...props\n}: BWPayloadTableFlexboxProps<TNoun>) => {\n const resolvedIconComponent = IconComponent ?? <VscSymbolMethod />\n return (\n <FlexCol alignItems=\"stretch\" rowGap={1} {...props}>\n <HeadingPaper IconComponent={resolvedIconComponent} heading={headingTitle} />\n <TableEx>\n <BoundWitnessPayloadTableHead />\n <BoundWitnessPayloadTableBody<TNoun> payloadHashes={hashes} payloadSchemas={schemas} eventNoun={eventNoun} />\n </TableEx>\n </FlexCol>\n )\n}\n"],"mappings":";;;;AAAA,SAASA,eAAe;AACxB,SAASC,gBAAgB;AACzB,SAASC,mBAAmB;AAE5B,SAASC,WAAAA,gBAAe;AACxB,SAASC,kBAAkB;AAC3B,SAASC,sBAAsB;AAC/B,SAASC,sBAAsB;AAC/B,SACEC,2BACAC,4BACAC,WACAC,kBACAC,gBAAAA,qBACK;AACP,SAASC,uBAAuB;AAChC,SAASC,sBAAsB;AAC/B,SAASC,iCAA2D;AACpE,OAAOC,UAASC,eAAe;AAC/B,SAASC,mBAAmB;AAC5B,SAASC,qBAAqB;AAC9B,SAASC,mBAAAA,kBAAiBC,0BAA0B;;;AClB7C,IAAMC,yBAAyB,wBAACC,UAAAA;AACrC,MAAIC,SAAiB,CAAA;AACrB,MAAIC,UAAoB,CAAA;AACxB,aAAW,CAACC,IAAIC,IAAAA,KAASJ,SAAS,CAAA,GAAI;AACpCC,WAAOI,KAAKD,IAAAA;AACZF,YAAQG,KAAKF,IAAIG,UAAU,EAAA;EAC7B;AACA,SAAO;IAAEL;IAAQC;EAAQ;AAC3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vB,OAAA,cAACwB,eAAAA;IAAaL,eAAe,gBAAAnB,OAAA,cAAC6B,aAAAA,IAAAA;IAAgBH,SAAQ;MACtD,gBAAA1B,OAAA,cAAC8B,4BAAAA;IAA2B9D,OAAOI;;AAI3C,GA/DwC;","names":["Divider","filterAs","ErrorRender","FlexCol","usePromise","isBoundWitness","PayloadBuilder","BoundWitnessPayloadsTable","BoundWitnessSignatureTable","BWActions","HashHeadingPaper","HeadingPaper","useTxsFromBlock","usePayloadHash","isTransactionBoundWitness","React","useMemo","FaSignature","GrTransaction","VscSymbolMethod","VscSymbolNamespace","formatPayloadsForTable","pairs","hashes","schemas","bw","hash","push","schema","FlexCol","BoundWitnessPayloadTableBody","BoundWitnessPayloadTableHead","HeadingPaper","TableEx","React","VscSymbolMethod","BWPayloadTableFlexbox","IconComponent","eventNoun","hashes","schemas","headingTitle","props","resolvedIconComponent","VscSymbolMethod","FlexCol","alignItems","rowGap","HeadingPaper","heading","TableEx","BoundWitnessPayloadTableHead","BoundWitnessPayloadTableBody","payloadHashes","payloadSchemas","BlockBoundWitnessDetails","block","paper","children","props","boundWitness","payloads","hash","usePayloadHash","transactions","txFromBlockError","useTxsFromBlock","hashes","txHashes","schemas","txSchemas","useMemo","formatPayloadsForTable","nonTxBoundWitnesses","bwsFromBlockError","usePromise","bws","filterAs","payload","isTransactionBoundWitness","isBoundWitness","undefined","PayloadBuilder","hashPairs","nonTxBwHashes","nonTxBwSchemas","hasNonTxBoundWitnesses","length","React","FlexCol","alignItems","rowGap","ErrorRender","error","scope","HashHeadingPaper","paperProps","sx","p","AdornmentEnd","BWActions","boundwitness","identiconProps","size","Divider","flexItem","BWPayloadTableFlexbox","IconComponent","GrTransaction","eventNoun","headingTitle","mb","HeadingPaper","VscSymbolNamespace","heading","BoundWitnessPayloadsTable","VscSymbolMethod","FaSignature","BoundWitnessSignatureTable"]}
1
+ {"version":3,"sources":["../../src/components/block/BlockBoundWitnessDetails.tsx","../../src/lib/formatPayloadsForTable.ts","../../src/components/BwPayloadTable.tsx","../../src/components/transactions/TransactionDetails.tsx","../../src/components/transactions/card/Card.tsx","../../src/components/transactions/card/DetailsStack.tsx"],"sourcesContent":["import { Divider } from '@mui/material'\nimport { filterAs } from '@xylabs/array'\nimport { ErrorRender } from '@xylabs/react-error'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport { usePromise } from '@xylabs/react-promise'\nimport { isBoundWitness } from '@xyo-network/boundwitness-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport {\n BoundWitnessPayloadsTable,\n BoundWitnessSignatureTable,\n BWActions,\n HashHeadingPaper,\n HeadingPaper,\n} from '@xyo-network/react-boundwitness-plugin'\nimport { useTxsFromBlock } from '@xyo-network/react-chain-blockchain'\nimport { usePayloadHash } from '@xyo-network/react-shared'\nimport { isTransactionBoundWitness, type SignedHydratedBlock } from '@xyo-network/xl1-protocol'\nimport React, { useMemo } from 'react'\nimport { FaSignature } from 'react-icons/fa'\nimport { GrTransaction } from 'react-icons/gr'\nimport { VscSymbolMethod, VscSymbolNamespace } from 'react-icons/vsc'\n\nimport { formatPayloadsForTable } from '../../lib/index.ts'\nimport type { TransactionBoundWitnessEvents } from '../../types/index.ts'\nimport { BWPayloadTableFlexbox } from '../BwPayloadTable.tsx'\n\nexport interface BoundWitnessDetailsProps extends FlexBoxProps {\n block?: SignedHydratedBlock\n}\n\nexport const BlockBoundWitnessDetails = ({\n block, paper, children, ...props\n}: BoundWitnessDetailsProps) => {\n const boundWitness = block?.[0]\n const payloads = block?.[1]\n\n const hash = usePayloadHash(boundWitness)\n\n const [transactions, txFromBlockError] = useTxsFromBlock(block)\n\n const { hashes: txHashes, schemas: txSchemas } = useMemo(() => formatPayloadsForTable(transactions ?? []), [transactions])\n\n const [nonTxBoundWitnesses, bwsFromBlockError] = usePromise(async () => {\n const bws = filterAs(payloads ?? [], payload =>\n (!isTransactionBoundWitness(payload) && isBoundWitness(payload)) ? payload : undefined)\n return await PayloadBuilder.hashPairs(bws)\n }, [payloads])\n\n const { hashes: nonTxBwHashes, schemas: nonTxBwSchemas } = useMemo(() => formatPayloadsForTable(nonTxBoundWitnesses ?? []), [nonTxBoundWitnesses])\n const hasNonTxBoundWitnesses = (nonTxBoundWitnesses?.length ?? 0) > 0\n\n return (\n <FlexCol alignItems=\"stretch\" rowGap={4} {...props}>\n <ErrorRender error={txFromBlockError ?? bwsFromBlockError} scope=\"BlockBoundWitnessDetails.tsx\" />\n <HashHeadingPaper\n hash={hash}\n paperProps={{ sx: { p: 2 } }}\n AdornmentEnd={<BWActions boundwitness={boundWitness} />}\n identiconProps={{ p: 0.75, size: 24 }}\n />\n <Divider flexItem />\n {(transactions?.length ?? 0) > 0 && (\n <BWPayloadTableFlexbox<TransactionBoundWitnessEvents>\n IconComponent={<GrTransaction />}\n eventNoun=\"transaction\"\n hashes={txHashes}\n headingTitle=\"Transactions\"\n schemas={txSchemas}\n sx={{ mb: 1 }}\n />\n )}\n <FlexCol alignItems=\"stretch\" rowGap={1} mb={1}>\n <HeadingPaper IconComponent={<VscSymbolNamespace />} heading=\"Payloads\" />\n <BoundWitnessPayloadsTable boundwitness={boundWitness} />\n </FlexCol>\n {hasNonTxBoundWitnesses\n ? (\n <BWPayloadTableFlexbox<TransactionBoundWitnessEvents>\n IconComponent={<VscSymbolMethod />}\n eventNoun=\"boundwitness\"\n hashes={nonTxBwHashes}\n headingTitle=\"Bound Witnesses\"\n schemas={nonTxBwSchemas}\n sx={{ mb: 1 }}\n />\n )\n : null}\n <FlexCol alignItems=\"stretch\" rowGap={1} mb={1}>\n <HeadingPaper IconComponent={<FaSignature />} heading=\"Signatures\" />\n <BoundWitnessSignatureTable block={boundWitness} />\n </FlexCol>\n </FlexCol>\n )\n}\n","import type { Hash } from '@xylabs/hex'\nimport type { Payload } from '@xyo-network/payload-model'\n\nexport const formatPayloadsForTable = (pairs: [Payload, Hash][]) => {\n let hashes: Hash[] = []\n let schemas: string[] = []\n for (const [bw, hash] of pairs ?? []) {\n hashes.push(hash)\n schemas.push(bw?.schema ?? '')\n }\n return { hashes, schemas }\n}\n","import type { Hash } from '@xylabs/hex'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport {\n BoundWitnessPayloadTableBody, BoundWitnessPayloadTableHead, HeadingPaper,\n} from '@xyo-network/react-boundwitness-plugin'\nimport type { EventNoun, ExtendEventNoun } from '@xyo-network/react-event'\nimport { TableEx } from '@xyo-network/react-table'\nimport React from 'react'\nimport { VscSymbolMethod } from 'react-icons/vsc'\n\nexport interface BWPayloadTableFlexboxProps<TNoun extends ExtendEventNoun = EventNoun> extends FlexBoxProps {\n IconComponent?: React.ReactNode\n eventNoun?: TNoun\n hashes?: Hash[]\n headingTitle?: string\n schemas?: string[]\n}\n\nexport const BWPayloadTableFlexbox = <TNoun extends ExtendEventNoun = EventNoun>({\n IconComponent,\n eventNoun,\n hashes,\n schemas,\n headingTitle,\n ...props\n}: BWPayloadTableFlexboxProps<TNoun>) => {\n const resolvedIconComponent = IconComponent ?? <VscSymbolMethod />\n return (\n <FlexCol alignItems=\"stretch\" rowGap={1} {...props}>\n <HeadingPaper IconComponent={resolvedIconComponent} heading={headingTitle} />\n <TableEx>\n <BoundWitnessPayloadTableHead />\n <BoundWitnessPayloadTableBody<TNoun> payloadHashes={hashes} payloadSchemas={schemas} eventNoun={eventNoun} />\n </TableEx>\n </FlexCol>\n )\n}\n","import { Divider } from '@mui/material'\nimport { ErrorRender } from '@xylabs/react-error'\nimport { type FlexBoxProps, FlexCol } from '@xylabs/react-flexbox'\nimport { usePromise } from '@xylabs/react-promise'\nimport { isDefined } from '@xylabs/typeof'\nimport { SignedHydratedTransactionWrapper } from '@xyo-network/chain-wrappers'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport {\n BoundWitnessSignatureTable, BWActions, HashHeadingPaper, HeadingPaper,\n} from '@xyo-network/react-boundwitness-plugin'\nimport type { SignedHydratedTransaction } from '@xyo-network/xl1-protocol'\nimport React from 'react'\nimport { FaSignature } from 'react-icons/fa'\nimport { VscSymbolMethod } from 'react-icons/vsc'\n\nimport { formatPayloadsForTable } from '../../lib/index.ts'\nimport { BWPayloadTableFlexbox } from '../BwPayloadTable.tsx'\nimport { TransactionBoundWitnessCard } from './card/index.ts'\n\nexport interface TransactionBoundWitnessDetailsProps extends FlexBoxProps {\n transaction?: SignedHydratedTransaction\n}\n\nexport const TransactionBoundWitnessDetails: React.FC<TransactionBoundWitnessDetailsProps> = ({ transaction, ...props }) => {\n const [wrapper, wrapperError] = usePromise(async () => {\n if (transaction) {\n return await SignedHydratedTransactionWrapper.parse(transaction)\n }\n }, [transaction])\n\n const [elevatedPayloadSets, elevatedPayloadSetsError] = usePromise(async () => {\n if (isDefined(wrapper)) {\n const elevatedPayloads = wrapper.elevatedPayloads\n const pairs = await PayloadBuilder.hashPairs(elevatedPayloads)\n return formatPayloadsForTable(pairs)\n } else {\n return { hashes: [], schemas: [] }\n }\n }, [wrapper])\n\n const { hashes: elevatedPayloadHashes, schemas: elevatedPayloadSchemas } = elevatedPayloadSets ?? {}\n\n return (\n <FlexCol alignItems=\"stretch\" rowGap={4} {...props}>\n <HashHeadingPaper\n hash={wrapper?.boundWitness?._hash}\n paperProps={{ sx: { p: 2 } }}\n AdornmentEnd={<BWActions boundwitness={wrapper?.boundWitness} />}\n identiconProps={{ p: 0.75, size: 24 }}\n />\n <ErrorRender error={wrapperError} scope=\"wrapperError:TransactionBoundWitnessDetails.tsx\" />\n <ErrorRender error={elevatedPayloadSetsError} scope=\"elevatedPayloadSetsError:TransactionBoundWitnessDetails.tsx\" />\n <Divider flexItem />\n <TransactionBoundWitnessCard elevation={4} wrapper={wrapper} />\n <Divider flexItem />\n <BWPayloadTableFlexbox\n IconComponent={<VscSymbolMethod />}\n hashes={elevatedPayloadHashes}\n headingTitle=\"Elevated Payloads\"\n schemas={elevatedPayloadSchemas}\n sx={{ mb: 1 }}\n />\n <FlexCol alignItems=\"stretch\" rowGap={1} mb={1}>\n <HeadingPaper IconComponent={<FaSignature />} heading=\"Signatures\" />\n <BoundWitnessSignatureTable block={wrapper?.boundWitness} />\n </FlexCol>\n </FlexCol>\n )\n}\n","import type { CardProps } from '@mui/material'\nimport {\n Card, CardContent, Grid, Typography,\n} from '@mui/material'\nimport { isUndefined } from '@xylabs/typeof'\nimport { bigIntToFixedPointString } from '@xyo-network/chain-utils'\nimport type { SignedHydratedTransactionInstance } from '@xyo-network/xl1-protocol-sdk'\nimport React, { useCallback } from 'react'\nimport { GiReceiveMoney, GiSandsOfTime } from 'react-icons/gi'\nimport { IoStatsChartOutline } from 'react-icons/io5'\nimport { MdOutlineAlternateEmail } from 'react-icons/md'\n\nimport { DetailsStack } from './DetailsStack.tsx'\n\nexport interface TransactionBoundWitnessCardProps extends CardProps {\n wrapper?: SignedHydratedTransactionInstance\n}\n\nexport const TransactionBoundWitnessCard: React.FC<TransactionBoundWitnessCardProps> = ({ wrapper, ...props }) => {\n if (!wrapper) return null\n\n const formatFee = useCallback((fee?: bigint) => {\n if (isUndefined(fee)) return\n return bigIntToFixedPointString(fee, 12)\n }, [])\n\n return (\n <Card {...props}>\n <CardContent sx={{\n display: 'flex', flexDirection: 'row', gap: 2, flexWrap: 'wrap',\n }}\n >\n <Grid container spacing={3} sx={{ width: '100%' }}>\n <Grid size={{ xs: 12 }}>\n <DetailsStack IconComponent={MdOutlineAlternateEmail} heading=\"From:\">\n <Typography\n variant=\"body2\"\n sx={{\n maxWidth: '100%', textOverflow: 'ellipsis', overflow: 'hidden',\n }}\n >\n {wrapper?.boundWitness.from}\n </Typography>\n </DetailsStack>\n </Grid>\n <Grid size={{\n xs: 12, sm: 6, md: 4,\n }}\n >\n <DetailsStack IconComponent={IoStatsChartOutline} heading=\"Stats\">\n <Typography variant=\"body2\">\n Reward:\n {' '}\n {wrapper?.reward()}\n </Typography>\n <Typography variant=\"body2\">\n Elevated Payloads:\n {' '}\n {wrapper?.elevatedPayloadCount}\n </Typography>\n <Typography variant=\"body2\">\n Total Payloads:\n {' '}\n {wrapper?.payloadCount}\n </Typography>\n <Typography variant=\"body2\">\n Signatures:\n {' '}\n {wrapper?.signatureCount}\n </Typography>\n </DetailsStack>\n </Grid>\n <Grid size={{\n xs: 12, sm: 6, md: 4,\n }}\n >\n <DetailsStack IconComponent={GiReceiveMoney} heading=\"Fees\">\n <Typography variant=\"body2\">\n Base:\n {' '}\n {formatFee(wrapper?.fees.base)}\n </Typography>\n <Typography variant=\"body2\">\n Gas:\n {' '}\n {formatFee(wrapper?.fees.gasPrice)}\n </Typography>\n <Typography variant=\"body2\">\n Priority:\n {' '}\n {formatFee(wrapper?.fees.priority)}\n </Typography>\n <Typography variant=\"body2\">\n Gas Limit:\n {' '}\n {formatFee(wrapper?.fees.gasLimit)}\n </Typography>\n </DetailsStack>\n </Grid>\n <Grid size={{\n xs: 12, sm: 6, md: 4,\n }}\n >\n <DetailsStack IconComponent={GiSandsOfTime} heading=\"Block Duration\">\n <Typography variant=\"body2\">\n Expiration:\n {' '}\n {wrapper?.boundWitness.exp}\n </Typography>\n <Typography variant=\"body2\">\n Not Before:\n {' '}\n {wrapper?.boundWitness?.nbf}\n </Typography>\n </DetailsStack>\n </Grid>\n </Grid>\n </CardContent>\n </Card>\n )\n}\n","import type { StackProps } from '@mui/material'\nimport {\n Icon, Stack, styled, Typography,\n} from '@mui/material'\nimport type { ComponentType, SVGAttributes } from 'react'\nimport React from 'react'\n\nexport interface DetailsStackProps extends StackProps {\n IconComponent?: ComponentType<SVGAttributes<SVGElement>>\n heading?: string\n}\n\nexport const DetailsStack: React.FC<DetailsStackProps> = ({\n IconComponent, heading, children, ...props\n}) => {\n return (\n <Stack direction=\"row\" mb={1} gap={1} {...props}>\n {IconComponent && <Icon fontSize=\"small\" sx={{ mr: 0.25 }}><IconComponent style={{ height: '0.7em' }} /></Icon>}\n <Stack direction=\"column\" flexWrap=\"wrap\" mb={1}>\n <SectionHeadingTypography>\n {heading}\n </SectionHeadingTypography>\n {children}\n </Stack>\n </Stack>\n )\n}\n\nconst SectionHeadingTypography = styled(Typography, { name: 'SectionHeadingTypography' })(({ theme }) => ({\n display: 'inline-flex',\n alignItems: 'baseline',\n fontFamily: 'monospace',\n fontSize: 16,\n marginBottom: theme.spacing(0.75),\n}))\n"],"mappings":";;;;AAAA,SAASA,eAAe;AACxB,SAASC,gBAAgB;AACzB,SAASC,mBAAmB;AAE5B,SAASC,WAAAA,gBAAe;AACxB,SAASC,kBAAkB;AAC3B,SAASC,sBAAsB;AAC/B,SAASC,sBAAsB;AAC/B,SACEC,2BACAC,4BACAC,WACAC,kBACAC,gBAAAA,qBACK;AACP,SAASC,uBAAuB;AAChC,SAASC,sBAAsB;AAC/B,SAASC,iCAA2D;AACpE,OAAOC,UAASC,eAAe;AAC/B,SAASC,mBAAmB;AAC5B,SAASC,qBAAqB;AAC9B,SAASC,mBAAAA,kBAAiBC,0BAA0B;;;AClB7C,IAAMC,yBAAyB,wBAACC,UAAAA;AACrC,MAAIC,SAAiB,CAAA;AACrB,MAAIC,UAAoB,CAAA;AACxB,aAAW,CAACC,IAAIC,IAAAA,KAASJ,SAAS,CAAA,GAAI;AACpCC,WAAOI,KAAKD,IAAAA;AACZF,YAAQG,KAAKF,IAAIG,UAAU,EAAA;EAC7B;AACA,SAAO;IAAEL;IAAQC;EAAQ;AAC3B,GARsC;;;ACDtC,SAASK,eAAe;AACxB,SACEC,8BAA8BC,8BAA8BC,oBACvD;AAEP,SAASC,eAAe;AACxB,OAAOC,WAAW;AAClB,SAASC,uBAAuB;AAUzB,IAAMC,wBAAwB,wBAA4C,EAC/EC,eACAC,WACAC,QACAC,SACAC,cACA,GAAGC,MAAAA,MAC+B;AAClC,QAAMC,wBAAwBN,iBAAiB,sBAAA,cAACO,iBAAAA,IAAAA;AAChD,SACE,sBAAA,cAACC,SAAAA;IAAQC,YAAW;IAAUC,QAAQ;IAAI,GAAGL;KAC3C,sBAAA,cAACM,cAAAA;I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,OAAA,cAAC+B,6BAAAA;IAA2BC,OAAOjD,SAASuB;;AAIpD,GA7C6F;","names":["Divider","filterAs","ErrorRender","FlexCol","usePromise","isBoundWitness","PayloadBuilder","BoundWitnessPayloadsTable","BoundWitnessSignatureTable","BWActions","HashHeadingPaper","HeadingPaper","useTxsFromBlock","usePayloadHash","isTransactionBoundWitness","React","useMemo","FaSignature","GrTransaction","VscSymbolMethod","VscSymbolNamespace","formatPayloadsForTable","pairs","hashes","schemas","bw","hash","push","schema","FlexCol","BoundWitnessPayloadTableBody","BoundWitnessPayloadTableHead","HeadingPaper","TableEx","React","VscSymbolMethod","BWPayloadTableFlexbox","IconComponent","eventNoun","hashes","schemas","headingTitle","props","resolvedIconComponent","VscSymbolMethod","FlexCol","alignItems","rowGap","HeadingPaper","heading","TableEx","BoundWitnessPayloadTableHead","BoundWitnessPayloadTableBody","payloadHashes","payloadSchemas","BlockBoundWitnessDetails","block","paper","children","props","boundWitness","payloads","hash","usePayloadHash","transactions","txFromBlockError","useTxsFromBlock","hashes","txHashes","schemas","txSchemas","useMemo","formatPayloadsForTable","nonTxBoundWitnesses","bwsFromBlockError","usePromise","bws","filterAs","payload","isTransactionBoundWitness","isBoundWitness","undefined","PayloadBuilder","hashPairs","nonTxBwHashes","nonTxBwSchemas","hasNonTxBoundWitnesses","length","React","FlexCol","alignItems","rowGap","ErrorRender","error","scope","HashHeadingPaper","paperProps","sx","p","AdornmentEnd","BWActions","boundwitness","identiconProps","size","Divider","flexItem","BWPayloadTableFlexbox","IconComponent","GrTransaction","eventNoun","headingTitle","mb","HeadingPaper","VscSymbolNamespace","heading","BoundWitnessPayloadsTable","VscSymbolMethod","FaSignature","BoundWitnessSignatureTable","Divider","ErrorRender","FlexCol","usePromise","isDefined","SignedHydratedTransactionWrapper","PayloadBuilder","BoundWitnessSignatureTable","BWActions","HashHeadingPaper","HeadingPaper","React","FaSignature","VscSymbolMethod","Card","CardContent","Grid","Typography","isUndefined","bigIntToFixedPointString","React","useCallback","GiReceiveMoney","GiSandsOfTime","IoStatsChartOutline","MdOutlineAlternateEmail","Icon","Stack","styled","Typography","React","DetailsStack","IconComponent","heading","children","props","React","Stack","direction","mb","gap","Icon","fontSize","sx","mr","style","height","flexWrap","SectionHeadingTypography","styled","Typography","name","theme","display","alignItems","fontFamily","marginBottom","spacing","TransactionBoundWitnessCard","wrapper","props","formatFee","useCallback","fee","isUndefined","bigIntToFixedPointString","React","Card","CardContent","sx","display","flexDirection","gap","flexWrap","Grid","container","spacing","width","size","xs","DetailsStack","IconComponent","MdOutlineAlternateEmail","heading","Typography","variant","maxWidth","textOverflow","overflow","boundWitness","from","sm","md","IoStatsChartOutline","reward","elevatedPayloadCount","payloadCount","signatureCount","GiReceiveMoney","fees","base","gasPrice","priority","gasLimit","GiSandsOfTime","exp","nbf","TransactionBoundWitnessDetails","transaction","props","wrapper","wrapperError","usePromise","SignedHydratedTransactionWrapper","parse","elevatedPayloadSets","elevatedPayloadSetsError","isDefined","elevatedPayloads","pairs","PayloadBuilder","hashPairs","formatPayloadsForTable","hashes","schemas","elevatedPayloadHashes","elevatedPayloadSchemas","React","FlexCol","alignItems","rowGap","HashHeadingPaper","hash","boundWitness","_hash","paperProps","sx","p","AdornmentEnd","BWActions","boundwitness","identiconProps","size","ErrorRender","error","scope","Divider","flexItem","TransactionBoundWitnessCard","elevation","BWPayloadTableFlexbox","IconComponent","VscSymbolMethod","headingTitle","mb","HeadingPaper","FaSignature","heading","BoundWitnessSignatureTable","block"]}
@@ -1,3 +1,4 @@
1
1
  export * from './block/index.ts';
2
2
  export * from './BwPayloadTable.tsx';
3
+ export * from './transactions/index.ts';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,CAAA;AACpC,cAAc,yBAAyB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './TransactionDetails.tsx';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/transactions/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA"}
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-boundwitness",
4
- "version": "1.3.25",
4
+ "version": "1.3.26",
5
5
  "description": "XYO Layer One React SDK BoundWitness",
6
6
  "homepage": "https://xylabs.com",
7
7
  "bugs": {
@@ -41,11 +41,11 @@
41
41
  "@xylabs/react-promise": "^6.3.1",
42
42
  "@xylabs/typeof": "^4.9.18",
43
43
  "@xyo-network/boundwitness-model": "^3.15.10",
44
- "@xyo-network/chain-utils": "^1.3.25",
45
- "@xyo-network/chain-wrappers": "^1.3.25",
44
+ "@xyo-network/chain-utils": "^1.3.26",
45
+ "@xyo-network/chain-wrappers": "^1.3.26",
46
46
  "@xyo-network/payload-builder": "^3.15.10",
47
47
  "@xyo-network/react-boundwitness-plugin": "^5.3.3",
48
- "@xyo-network/react-chain-blockchain": "^1.3.25",
48
+ "@xyo-network/react-chain-blockchain": "^1.3.26",
49
49
  "@xyo-network/react-event": "^5.3.3",
50
50
  "@xyo-network/react-shared": "^5.3.3",
51
51
  "@xyo-network/react-table": "^5.3.3",
@@ -59,7 +59,7 @@
59
59
  "@mui/material": "^7.1.0",
60
60
  "@xylabs/ts-scripts-yarn3": "^6.5.6",
61
61
  "@xylabs/tsconfig-react": "^6.5.6",
62
- "@xyo-network/react-chain-shared": "^1.3.25",
62
+ "@xyo-network/react-chain-shared": "^1.3.26",
63
63
  "knip": "^5.56.0",
64
64
  "react": "^19.1.0",
65
65
  "react-dom": "^19.1.0",
@@ -1,2 +1,3 @@
1
1
  export * from './block/index.ts'
2
2
  export * from './BwPayloadTable.tsx'
3
+ export * from './transactions/index.ts'
@@ -0,0 +1 @@
1
+ export * from './TransactionDetails.tsx'