• Design
  • API Reference
  • Changelog
  • Contribute
Show / Hide Table of Contents
  • Libplanet
    • Address
    • AddressExtension
    • ByteUtil
    • Hashcash
    • Hashcash.Stamp
    • HashDigest<T>
    • HashDigestExtension
    • Nonce
  • Libplanet.Action
    • AccountStateGetter
    • ActionEvaluation<T>
    • ActionTypeAttribute
    • AddressStateMap
    • IAccountStateDelta
    • IAction
    • IActionContext
    • IRandom
    • MissingActionTypeException
    • PolymorphicAction<T>
  • Libplanet.Blockchain
    • BlockChain<T>
  • Libplanet.Blockchain.Policies
    • BlockPolicy<T>
    • BlockPolicyExtension
    • IBlockPolicy<T>
  • Libplanet.Blocks
    • Block<T>
    • InvalidBlockDifficultyException
    • InvalidBlockException
    • InvalidBlockHashException
    • InvalidBlockIndexException
    • InvalidBlockNonceException
    • InvalidBlockPreviousHashException
    • InvalidBlockTimestampException
  • Libplanet.Crypto
    • InvalidCiphertextException
    • PrivateKey
    • PublicKey
    • SymmetricKey
  • Libplanet.Net
    • BlockDownloadState
    • DifferentAppProtocolVersionException
    • DifferentProtocolVersionEventArgs
    • IceServer
    • IceServerException
    • InvalidMessageException
    • NoSwarmContextException
    • Peer
    • PeerNotFoundException
    • PeerSetDelta
    • Swarm
    • SwarmException
  • Libplanet.Serialization
    • BencodexFormatter<T>
    • SerializationInfoExtension
  • Libplanet.Store
    • BaseIndex<TKey, TVal>
    • BaseStore
    • BlockSet<T>
    • FileStore
    • IStore
    • NamespaceNotFoundException
    • TransactionSet<T>
  • Libplanet.Tx
    • InvalidTxException
    • InvalidTxIdException
    • InvalidTxNonceException
    • InvalidTxPublicKeyException
    • InvalidTxSignatureException
    • InvalidTxUpdatedAddressesException
    • Transaction<T>
    • TxId
    • UnexpectedlyTerminatedTxRehearsalException

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

Implements
ISerializable
Inherited Members
ValueType.Equals(Object)
ValueType.GetHashCode()
Object.Equals(Object, Object)
Object.GetType()
Object.ReferenceEquals(Object, Object)
Namespace: Libplanet.Tx
Assembly: Libplanet.dll
Syntax
[Serializable]
[Equals]
public struct TxId : ISerializable

Constructors

| Improve this Doc View Source

TxId(Byte[])

Converts a Byte array into a TxId.

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

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

Exceptions
Type Condition
ArgumentNullException

Thrown when the given txid is null.

ArgumentOutOfRangeException

Thrown when the given txid's Length is not the same to the required Size.

| Improve this Doc View Source

TxId(SerializationInfo, StreamingContext)

Declaration
public TxId(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
SerializationInfo info
StreamingContext context

Fields

| Improve this Doc View Source

Size

The Bytes size that each TxId takes.

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

Declaration
public const int Size = 32
Field Value
Type Description
Int32

Properties

| Improve this Doc View Source

ByteArray

A bare immutable Byte array of this TxId.

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

Methods

| Improve this Doc View Source

GetObjectData(SerializationInfo, StreamingContext)

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

ToByteArray()

Gets a bare mutable Byte array of this TxId.

Declaration
[Pure]
public byte[] ToByteArray()
Returns
Type Description
Byte[]

A new mutable Byte 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
[Pure]
public string ToHex()
Returns
Type Description
String

64 hexadecimal characters.

| Improve this Doc View Source

ToString()

Gets a TxId's representative string.

Declaration
[Pure]
public override string ToString()
Returns
Type Description
String

A string which represents this TxId.

Overrides
ValueType.ToString()

Implements

System.Runtime.Serialization.ISerializable

See Also

Id
  • Improve this Doc
  • View Source
Back to top Copyright © 2019 Planetarium
Generated by DocFX