Struct TxId
TxId, abbreviation of transaction identifier, is a SHA-256 digest derived from a Transaction's content.
As it is a SHA-256 digest, it consists of 32
Namespace: Libplanet.Types.Tx
Assembly: Libplanet.Types.dll
Syntax
public readonly struct TxId
Constructors
| Improve this Doc View SourceTxId(in ImmutableArray<Byte>)
Converts an immutable
Declaration
public TxId(in ImmutableArray<byte> txid)
Parameters
Type | Name | Description |
---|---|---|
ImmutableArray<System.Byte> | txid | An immutable |
See Also
| Improve this Doc View SourceTxId(IValue)
Creates a TxId instance from given bencoded
.
Declaration
public TxId(IValue bencoded)
Parameters
Type | Name | Description |
---|---|---|
IValue | bencoded | A Bencodex |
See Also
| Improve this Doc View SourceTxId(SerializationInfo, StreamingContext)
TxId, abbreviation of transaction identifier, is a SHA-256 digest derived from a Transaction's content.
As it is a SHA-256 digest, it consists of 32
Declaration
public TxId(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
SerializationInfo | info | |
StreamingContext | context |
See Also
| Improve this Doc View SourceTxId(Byte[])
Converts a mutable
Declaration
public TxId(byte[] txid)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | txid | A mutable |
See Also
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 |
---|---|
System.Int32 |
See Also
Properties
| Improve this Doc View SourceBencoded
TxId, abbreviation of transaction identifier, is a SHA-256 digest derived from a Transaction's content.
As it is a SHA-256 digest, it consists of 32
Declaration
public readonly IValue Bencoded { get; }
Property Value
Type | Description |
---|---|
IValue |
See Also
| Improve this Doc View SourceByteArray
A bare immutable
Declaration
public readonly ImmutableArray<byte> ByteArray { get; }
Property Value
Type | Description |
---|---|
ImmutableArray<System.Byte> |
Remarks
It is immutable. For a mutable array, use ToByteArray() method instead.
See Also
Methods
| Improve this Doc View SourceCompareTo(TxId)
TxId, abbreviation of transaction identifier, is a SHA-256 digest derived from a Transaction's content.
As it is a SHA-256 digest, it consists of 32
Declaration
public readonly int CompareTo(TxId other)
Parameters
Type | Name | Description |
---|---|---|
TxId | other |
Returns
Type | Description |
---|---|
System.Int32 |
See Also
| Improve this Doc View SourceCompareTo(Nullable<Object>)
TxId, abbreviation of transaction identifier, is a SHA-256 digest derived from a Transaction's content.
As it is a SHA-256 digest, it consists of 32
Declaration
public readonly int CompareTo(object? obj)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Object> | obj |
Returns
Type | Description |
---|---|
System.Int32 |
See Also
| Improve this Doc View SourceEquals(TxId)
TxId, abbreviation of transaction identifier, is a SHA-256 digest derived from a Transaction's content.
As it is a SHA-256 digest, it consists of 32
Declaration
public readonly bool Equals(TxId other)
Parameters
Type | Name | Description |
---|---|---|
TxId | other |
Returns
Type | Description |
---|---|
System.Boolean |
See Also
| Improve this Doc View SourceEquals(Nullable<Object>)
TxId, abbreviation of transaction identifier, is a SHA-256 digest derived from a Transaction's content.
As it is a SHA-256 digest, it consists of 32
Declaration
public override readonly bool Equals(object? obj)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Object> | obj |
Returns
Type | Description |
---|---|
System.Boolean |
See Also
| Improve this Doc View SourceFromHex(String)
Creates a TxId value from a hex
string.
Declaration
public static TxId FromHex(string hex)
Parameters
Type | Name | Description |
---|---|---|
System.String | hex | A hexadecimal string which encodes a TxId. This has to contain 64 hexadecimal digits and must not be null This is usually made by ToHex() method. |
Returns
Type | Description |
---|---|
TxId | A corresponding TxId value. |
See Also
| Improve this Doc View SourceGetHashCode()
TxId, abbreviation of transaction identifier, is a SHA-256 digest derived from a Transaction's content.
As it is a SHA-256 digest, it consists of 32
Declaration
public override readonly int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
See Also
| Improve this Doc View SourceGetObjectData(SerializationInfo, StreamingContext)
TxId, abbreviation of transaction identifier, is a SHA-256 digest derived from a Transaction's content.
As it is a SHA-256 digest, it consists of 32
Declaration
public readonly void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
SerializationInfo | info | |
StreamingContext | context |
See Also
| Improve this Doc View SourceToByteArray()
Gets a bare mutable
Declaration
public readonly byte[] ToByteArray()
Returns
Type | Description |
---|---|
System.Byte[] | A new mutable |
See Also
| Improve this Doc View SourceToHex()
Gets a hexadecimal form of a TxId.
Declaration
public readonly string ToHex()
Returns
Type | Description |
---|---|
System.String | 64 hexadecimal characters. |
See Also
| Improve this Doc View SourceToString()
Gets a TxId's representative string.
Declaration
public override readonly string ToString()
Returns
Type | Description |
---|---|
System.String | A string which represents this TxId. |
See Also
Operators
| Improve this Doc View SourceEquality(TxId, TxId)
TxId, abbreviation of transaction identifier, is a SHA-256 digest derived from a Transaction's content.
As it is a SHA-256 digest, it consists of 32
Declaration
public static bool operator ==(TxId left, TxId right)
Parameters
Type | Name | Description |
---|---|---|
TxId | left | |
TxId | right |
Returns
Type | Description |
---|---|
System.Boolean |
See Also
| Improve this Doc View SourceInequality(TxId, TxId)
TxId, abbreviation of transaction identifier, is a SHA-256 digest derived from a Transaction's content.
As it is a SHA-256 digest, it consists of 32
Declaration
public static bool operator !=(TxId left, TxId right)
Parameters
Type | Name | Description |
---|---|---|
TxId | left | |
TxId | right |
Returns
Type | Description |
---|---|
System.Boolean |