Show / Hide Table of Contents

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 s, and 64 characters in hexadecimal. (See also Size constant.)

Implements
ISerializable
IEquatable<TxId>
IComparable<TxId>
IComparable
IBencodable
Namespace: Libplanet.Types.Tx
Assembly: Libplanet.Types.dll
Syntax
public readonly struct TxId

Constructors

| Improve this Doc View Source

TxId(in ImmutableArray<Byte>)

Converts an immutable array into a TxId.

Declaration
public TxId(in ImmutableArray<byte> txid)
Parameters
Type Name Description
ImmutableArray<System.Byte> txid

An immutable array that encodes a TxId. It must not be null, and its must be the same to Size.

See Also
Id
| Improve this Doc View Source

TxId(IValue)

Creates a TxId instance from given bencoded.

Declaration
public TxId(IValue bencoded)
Parameters
Type Name Description
IValue bencoded

A Bencodex of 32 s which represents an TxId.

See Also
TxId(in ImmutableArray<Byte>)
| Improve this Doc View Source

TxId(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 s, and 64 characters in hexadecimal. (See also Size constant.)

Declaration
public TxId(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
SerializationInfo info
StreamingContext context
See Also
Id
| Improve this Doc View Source

TxId(Byte[])

Converts a mutable array into a TxId.

Declaration
public TxId(byte[] txid)
Parameters
Type Name Description
System.Byte[] txid

A mutable array that encodes a TxId. It must not be null, and its must be the same to Size.

See Also
Id

Fields

| Improve this Doc View Source

Size

The s size that each TxId takes.

As a txid is a SHA-256 digest, it is 32 s.

Declaration
public const int Size = null
Field Value
Type Description
System.Int32
See Also
Id

Properties

| Improve this Doc View Source

Bencoded

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 s, and 64 characters in hexadecimal. (See also Size constant.)

Declaration
public readonly IValue Bencoded { get; }
Property Value
Type Description
IValue
See Also
Id
| Improve this Doc View Source

ByteArray

A bare immutable array of this TxId.

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
ToByteArray()

Methods

| Improve this Doc View Source

CompareTo(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 s, and 64 characters in hexadecimal. (See also Size constant.)

Declaration
public readonly int CompareTo(TxId other)
Parameters
Type Name Description
TxId other
Returns
Type Description
System.Int32
See Also
Id
| Improve this Doc View Source

CompareTo(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 s, and 64 characters in hexadecimal. (See also Size constant.)

Declaration
public readonly int CompareTo(object? obj)
Parameters
Type Name Description
System.Nullable<System.Object> obj
Returns
Type Description
System.Int32
See Also
Id
| Improve this Doc View Source

Equals(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 s, and 64 characters in hexadecimal. (See also Size constant.)

Declaration
public readonly bool Equals(TxId other)
Parameters
Type Name Description
TxId other
Returns
Type Description
System.Boolean
See Also
Id
| Improve this Doc View Source

Equals(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 s, and 64 characters in hexadecimal. (See also Size constant.)

Declaration
public override readonly bool Equals(object? obj)
Parameters
Type Name Description
System.Nullable<System.Object> obj
Returns
Type Description
System.Boolean
See Also
Id
| Improve this Doc View Source

FromHex(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
ToHex()
| Improve this Doc View Source

GetHashCode()

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 s, and 64 characters in hexadecimal. (See also Size constant.)

Declaration
public override readonly int GetHashCode()
Returns
Type Description
System.Int32
See Also
Id
| Improve this Doc View Source

GetObjectData(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 s, and 64 characters in hexadecimal. (See also Size constant.)

Declaration
public readonly void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
SerializationInfo info
StreamingContext context
See Also
Id
| Improve this Doc View Source

ToByteArray()

Gets a bare mutable array of this TxId.

Declaration
public readonly byte[] ToByteArray()
Returns
Type Description
System.Byte[]

A new mutable array of this TxId. Since a returned array is created every time the method is called, any mutations on that array does not affect to the TxId object.

See Also
ByteArray
| Improve this Doc View Source

ToHex()

Gets a hexadecimal form of a TxId.

Declaration
public readonly string ToHex()
Returns
Type Description
System.String

64 hexadecimal characters.

See Also
Id
| Improve this Doc View Source

ToString()

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
Id

Operators

| Improve this Doc View Source

Equality(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 s, and 64 characters in hexadecimal. (See also Size constant.)

Declaration
public static bool operator ==(TxId left, TxId right)
Parameters
Type Name Description
TxId left
TxId right
Returns
Type Description
System.Boolean
See Also
Id
| Improve this Doc View Source

Inequality(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 s, and 64 characters in hexadecimal. (See also Size constant.)

Declaration
public static bool operator !=(TxId left, TxId right)
Parameters
Type Name Description
TxId left
TxId right
Returns
Type Description
System.Boolean
See Also
Id

Implements

ISerializable
IEquatable<>
IComparable<>
IComparable
IBencodable

See Also

Id
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2018–2023 Planetarium