diff --git a/public/favicon.ico b/public/favicon.ico
new file mode 100644
index 0000000..4ecec0c
Binary files /dev/null and b/public/favicon.ico differ
diff --git a/public/favicon.png b/public/favicon.png
new file mode 100644
index 0000000..90b2d12
Binary files /dev/null and b/public/favicon.png differ
diff --git a/public/favicon.svg b/public/favicon.svg
new file mode 100644
index 0000000..a880917
--- /dev/null
+++ b/public/favicon.svg
@@ -0,0 +1,3 @@
+
diff --git a/public/vite.svg b/public/vite.svg
index e7b8dfb..a880917 100644
--- a/public/vite.svg
+++ b/public/vite.svg
@@ -1 +1,3 @@
-
\ No newline at end of file
+
diff --git a/src/routes/Blocks/Inputs.tsx b/src/routes/Blocks/Inputs.tsx
index a1ca9ea..c3a218a 100644
--- a/src/routes/Blocks/Inputs.tsx
+++ b/src/routes/Blocks/Inputs.tsx
@@ -24,7 +24,6 @@ import { useState, Fragment } from 'react';
import {
InnerHeading,
StyledAccordion,
- TypographyData,
} from '../../components/StyledComponents';
import AccordionDetails from '@mui/material/AccordionDetails';
import AccordionSummary from '@mui/material/AccordionSummary';
@@ -33,9 +32,8 @@ import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
import { useGetBlockByHeightOrHash } from '../../api/hooks/useBlocks';
import { useTheme } from '@mui/material/styles';
import Grid from '@mui/material/Grid';
-import Divider from '@mui/material/Divider';
-import { shortenString } from '../../utils/helpers';
-import CopyToClipboard from '../../components/CopyToClipboard';
+import { toHexString } from '../../utils/helpers';
+import GridItem from './GridItem';
function Inputs({ blockHeight }: { blockHeight: string }) {
const { data } = useGetBlockByHeightOrHash(blockHeight);
@@ -48,8 +46,156 @@ function Inputs({ blockHeight }: { blockHeight: string }) {
};
const renderItems = data?.block.body.inputs.map(
- (input: any, index: number) => {
+ (content: any, index: number) => {
const expandedPanel = `panel${index}`;
+ const items = [
+ {
+ label: 'Features',
+ copy: false,
+ children: [
+ {
+ label: 'Version',
+ value: content.features.version,
+ copy: false,
+ },
+ {
+ label: 'Output Type',
+ value: content.features.output_type,
+ copy: false,
+ },
+ {
+ label: 'Maturity',
+ value: content.features.maturity,
+ copy: false,
+ },
+ ],
+ },
+ {
+ label: 'Commitment',
+ value: toHexString(content.commitment.data),
+ copy: true,
+ },
+ {
+ label: 'Hash',
+ value: toHexString(content.hash.data),
+ copy: true,
+ },
+ {
+ label: 'Script',
+ value: content.script.data,
+ copy: false,
+ },
+ {
+ label: 'Input Data',
+ value: toHexString(content.input_data.data),
+ copy: true,
+ },
+ {
+ label: 'Sender Offset Public Key',
+ value: toHexString(content.sender_offset_public_key.data),
+ copy: true,
+ },
+ {
+ label: 'Script Signature',
+ copy: false,
+ children: [
+ {
+ label: 'Ephemeral commitment',
+ value: toHexString(
+ content.script_signature.ephemeral_commitment.data
+ ),
+ copy: true,
+ },
+ {
+ label: 'Ephemeral pubkey',
+ value: toHexString(
+ content.script_signature.ephemeral_pubkey.data
+ ),
+ copy: true,
+ },
+ {
+ label: 'u_a',
+ value: toHexString(content.script_signature.u_a.data),
+ copy: true,
+ },
+ {
+ label: 'u_x',
+ value: toHexString(content.script_signature.u_x.data),
+ copy: true,
+ },
+ {
+ label: 'u_y',
+ value: toHexString(content.script_signature.u_y.data),
+ copy: true,
+ },
+ ],
+ },
+ {
+ label: 'Output Hash',
+ value: toHexString(content.output_hash.data),
+ copy: true,
+ },
+ {
+ label: 'Covenant',
+ value: content.covenant.data,
+ copy: false,
+ },
+ {
+ label: 'Version',
+ value: content.version,
+ copy: false,
+ },
+ {
+ label: 'Encrypted Data',
+ value: toHexString(content.encrypted_data.data),
+ copy: true,
+ },
+ {
+ label: 'Minimum Value Promise',
+ value: content.minimum_value_promise,
+ copy: false,
+ },
+ {
+ label: 'Metadata Signature',
+ copy: false,
+ children: [
+ {
+ label: 'Ephemeral commitment',
+ value: toHexString(
+ content.metadata_signature.ephemeral_commitment.data
+ ),
+ copy: true,
+ },
+ {
+ label: 'Ephemeral pubkey',
+ value: toHexString(
+ content.metadata_signature.ephemeral_pubkey.data
+ ),
+ copy: true,
+ },
+ {
+ label: 'u_a',
+ value: toHexString(content.metadata_signature.u_a.data),
+ copy: true,
+ },
+ {
+ label: 'u_x',
+ value: toHexString(content.metadata_signature.u_x.data),
+ copy: true,
+ },
+ {
+ label: 'u_y',
+ value: toHexString(content.metadata_signature.u_y.data),
+ copy: true,
+ },
+ ],
+ },
+ {
+ label: 'Rangeproof Hash',
+ value: toHexString(content.rangeproof_hash.data),
+ copy: true,
+ },
+ ];
return (
- {[
- {
- label: 'Features:',
- value: input.features,
- copy: false,
- header: false,
- },
- ].map((item, subIndex) => (
+ {items.map((item, subIndex) => (
-
-
-
-
- {item.label}
-
-
-
- {item.copy ? (
- <>
- {shortenString(item.value)}
-
- >
- ) : (
- item.value
+ {item.children ? (
+
+ {GridItem(
+ theme,
+ item.label,
+ item.value,
+ item.copy,
+ index,
+ subIndex,
+ true
)}
-
-
+ {item.children.map((child, innerIndex) => (
+
+ {GridItem(
+ theme,
+ child.label,
+ child.value,
+ child.copy,
+ index,
+ subIndex,
+ false
+ )}
+
+ ))}
+
+ ) : (
+ GridItem(
+ theme,
+ item.label,
+ item.value,
+ item.copy,
+ index,
+ subIndex,
+ true
+ )
+ )}
))}
diff --git a/src/routes/Blocks/Kernels.tsx b/src/routes/Blocks/Kernels.tsx
index bf1ed98..050036e 100644
--- a/src/routes/Blocks/Kernels.tsx
+++ b/src/routes/Blocks/Kernels.tsx
@@ -55,44 +55,44 @@ function Kernels({ blockHeight }: { blockHeight: string }) {
const items = [
{
- label: 'Features:',
+ label: 'Features',
value: content.features,
copy: false,
},
{
- label: 'Fee:',
+ label: 'Fee',
value: content.fee,
copy: false,
},
{
- label: 'Lock Height:',
+ label: 'Lock Height',
value: content.lock_height,
copy: false,
},
{
- label: 'Excess:',
+ label: 'Excess',
value: excessData,
copy: true,
},
{
- label: 'Excess Sig:',
+ label: 'Excess Sig',
copy: false,
children: [
{
- label: 'Public Nonce:',
+ label: 'Public Nonce',
value: publicNonce,
copy: true,
},
{
- label: 'Signature:',
+ label: 'Signature',
value: signature,
copy: true,
},
],
},
- { label: 'Hash:', value: hashData, copy: true, header: false },
+ { label: 'Hash', value: hashData, copy: true, header: false },
{
- label: 'Version:',
+ label: 'Version',
value: content.version,
copy: false,
},
diff --git a/src/routes/Blocks/Outputs.tsx b/src/routes/Blocks/Outputs.tsx
index 80e04e9..80bca2f 100644
--- a/src/routes/Blocks/Outputs.tsx
+++ b/src/routes/Blocks/Outputs.tsx
@@ -50,7 +50,7 @@ function Outputs({ blockHeight }: { blockHeight: string }) {
const expandedPanel = `panel${index}`;
const items = [
{
- label: 'Features:',
+ label: 'Features',
copy: false,
children: [
{
@@ -71,27 +71,27 @@ function Outputs({ blockHeight }: { blockHeight: string }) {
],
},
{
- label: 'Commitment:',
+ label: 'Commitment',
value: toHexString(content.commitment.data),
copy: true,
},
{
- label: 'Hash:',
+ label: 'Hash',
value: toHexString(content.hash.data),
copy: true,
},
{
- label: 'Script:',
- value: content.script.data,
- copy: false,
+ label: 'Script',
+ value: toHexString(content.script.data),
+ copy: true,
},
{
- label: 'Sender Offset Public Key:',
+ label: 'Sender Offset Public Key',
value: toHexString(content.sender_offset_public_key.data),
copy: true,
},
{
- label: 'Metadata Signature:',
+ label: 'Metadata Signature',
copy: false,
children: [
{
@@ -126,7 +126,7 @@ function Outputs({ blockHeight }: { blockHeight: string }) {
],
},
{
- label: 'Covenant Version:',
+ label: 'Covenant Version',
value: content.covenant.data,
copy: false,
},