• Overview
  • 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
    • ActionTypeAttribute
    • IAccountStateDelta
    • IAction
    • IActionContext
    • IRandom
    • MissingActionTypeException
    • PolymorphicAction<T>
    • RandomExtension
    • UnexpectedlyTerminatedActionException
  • Libplanet.Blockchain
    • BlockChain<T>
    • BlockChain<T>.TipChangedEventArgs
    • IncompleteBlockStatesException
    • MineBlockEventArgs<T>
  • Libplanet.Blockchain.Policies
    • BlockPolicy<T>
    • IBlockPolicy<T>
  • Libplanet.Blocks
    • Block<T>
    • InvalidBlockDifficultyException
    • InvalidBlockException
    • InvalidBlockHashException
    • InvalidBlockIndexException
    • InvalidBlockNonceException
    • InvalidBlockPreviousHashException
    • InvalidBlockTimestampException
    • InvalidGenesisBlockException
  • Libplanet.Crypto
    • CryptoConfig
    • DefaultCryptoBackend
    • ICryptoBackend
    • InvalidCiphertextException
    • PrivateKey
    • PublicKey
    • SymmetricKey
  • Libplanet.KeyStore
    • IncorrectPassphraseException
    • InvalidKeyJsonException
    • KeyJsonException
    • MismatchedAddressException
    • ProtectedPrivateKey
    • UnsupportedKeyJsonException
  • Libplanet.KeyStore.Ciphers
    • Aes128Ctr
    • ICipher
  • Libplanet.KeyStore.Kdfs
    • IKdf
    • Pbkdf2<T>
    • Scrypt
  • Libplanet.Net
    • ActionExecutionState
    • BlockDownloadState
    • BoundPeer
    • DifferentAppProtocolVersionException
    • DifferentProtocolVersionEventArgs
    • IceServer
    • IceServerException
    • InvalidMessageException
    • NoSwarmContextException
    • Peer
    • PeerNotFoundException
    • PeerState
    • PreloadBlockDownloadFailEventArgs
    • PreloadState
    • StateDownloadState
    • Swarm<T>
    • SwarmException
  • Libplanet.Net.Protocols
    • PeerDiscoveryException
  • Libplanet.Serialization
    • SerializationInfoExtension
  • Libplanet.Store
    • BaseIndex<TKey, TVal>
    • BaseStore
    • BlockSet<T>
    • ChainIdNotFoundException
    • DefaultStore
    • IStore
    • StoreExtension
    • TransactionSet<T>
  • Libplanet.Tx
    • InvalidTxException
    • InvalidTxIdException
    • InvalidTxNonceException
    • InvalidTxPublicKeyException
    • InvalidTxSignatureException
    • InvalidTxUpdatedAddressesException
    • Transaction<T>
    • TxId

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

Implements
ISerializable
IComparable<TxId>
IComparable
Namespace: Libplanet.Tx
Assembly: Libplanet.dll
Syntax
public struct TxId : ISerializable, IComparable<TxId>, IComparable

Constructors

| Improve this Doc View Source

TxId(SerializationInfo, StreamingContext)

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

TxId(Byte[])

Converts a array into a TxId.

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

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

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
Int32

Properties

| Improve this Doc View Source

ByteArray

A bare immutable 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

CompareTo(TxId)

Declaration
public int CompareTo(TxId other)
Parameters
Type Name Description
TxId other
Returns
Type Description
Int32
| Improve this Doc View Source

CompareTo(Object)

Declaration
public int CompareTo(object obj)
Parameters
Type Name Description
Object obj
Returns
Type Description
Int32
| 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 array of this TxId.

Declaration
public byte[] ToByteArray()
Returns
Type Description
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 string ToHex()
Returns
Type Description
String

64 hexadecimal characters.

| Improve this Doc View Source

ToString()

Gets a TxId's representative string.

Declaration
public override string ToString()
Returns
Type Description
String

A string which represents this TxId.

Implements

ISerializable
IComparable<>
IComparable

See Also

Id
  • Improve this Doc
  • View Source
Back to top Copyright © 2019–2020 Planetarium