Struct TxId
TxId, abbreviation of transaction identifier, is a SHA-256 digest derived from a Transaction<T>'s content.
As it is a SHA-256 digest, it consists of 32
Namespace: Libplanet.Tx
Assembly: Libplanet.dll
Syntax
public struct TxId : ISerializable, IComparable<TxId>, IComparable
Constructors
| Improve this Doc View SourceTxId(SerializationInfo, StreamingContext)
Declaration
public TxId(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
SerializationInfo | info | |
StreamingContext | context |
TxId(Byte[])
Converts a
Declaration
public TxId(byte[] txid)
Parameters
Type | Name | Description |
---|---|---|
Byte[] | txid | A |
Fields
| Improve this Doc View SourceSize
The
As a txid is a SHA-256 digest, it is 32
Declaration
public const int Size = null
Field Value
Type | Description |
---|---|
Int32 |
Properties
| Improve this Doc View SourceByteArray
A bare immutable
Declaration
public ImmutableArray<byte> ByteArray { get; }
Property Value
Type | Description |
---|---|
ImmutableArray<Byte> |
Remarks
It is immutable. For a mutable array, use ToByteArray() method instead.
See Also
Methods
| Improve this Doc View SourceCompareTo(TxId)
Declaration
public int CompareTo(TxId other)
Parameters
Type | Name | Description |
---|---|---|
TxId | other |
Returns
Type | Description |
---|---|
Int32 |
CompareTo(Object)
Declaration
public int CompareTo(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Int32 |
GetObjectData(SerializationInfo, StreamingContext)
Declaration
public void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
SerializationInfo | info | |
StreamingContext | context |
ToByteArray()
Gets a bare mutable
Declaration
public byte[] ToByteArray()
Returns
Type | Description |
---|---|
Byte[] | A new mutable |
See Also
| Improve this Doc View SourceToHex()
Gets a hexadecimal form of a TxId.
Declaration
public string ToHex()
Returns
Type | Description |
---|---|
String | 64 hexadecimal characters. |
ToString()
Gets a TxId's representative string.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | A string which represents this TxId. |