Class BlockItem
A single item within a block stream block.
Implements
Inherited Members
Namespace: Hiero.BlockNode
Assembly: Hiero.dll
Syntax
[Experimental("HIERO001", UrlFormat = "https://github.com/bugbytesinc/Hiero/blob/main/docs/blocknode-client-plan.md")]
public sealed record BlockItem : IEquatable<BlockItem>
Remarks
This is a thin wrapper over the underlying block stream protobuf item. The Kind discriminator identifies the content; transaction bytes are promoted to SignedTransactionBytes because they are the most commonly consumed payload. All other content (transaction results, state changes, traces, …) is reachable losslessly through ToProtobuf() — the SDK deliberately does not domain-map those structures while the upstream block stream format remains in flux.
Properties
| Edit this page View SourceKind
The kind of content this item carries.
Declaration
public BlockItemKind Kind { get; }
Property Value
| Type | Description |
|---|---|
| BlockItemKind |
SignedTransactionBytes
The serialized signed transaction bytes, populated only when Kind is SignedTransaction; empty otherwise.
Declaration
public ReadOnlyMemory<byte> SignedTransactionBytes { get; }
Property Value
| Type | Description |
|---|---|
| ReadOnlyMemory<byte> |
Methods
| Edit this page View SourceFromProtobuf(BlockItem)
Constructs a
BlockItem
from a raw block stream protobuf item (round-trip counterpart of ToProtobuf(); also the entry point for constructing items to publish).
Declaration
public static BlockItem FromProtobuf(BlockItem item)
Parameters
| Type | Name | Description |
|---|---|---|
| BlockItem | item | The protobuf item to wrap. |
Returns
| Type | Description |
|---|---|
| BlockItem |
exposing the protobuf's content. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If the item is null. |
ToProtobuf()
Returns the underlying block stream protobuf item — the lossless escape hatch to content the SDK does not domain-map (transaction results, state changes, traces, …).
Declaration
public BlockItem ToProtobuf()
Returns
| Type | Description |
|---|---|
| BlockItem |