Show / Hide Table of Contents

Class TxMetadata

A Transaction without actions and signature.

Inheritance
System.Object
TxMetadata
Namespace: Libplanet.Types.Tx
Assembly: Libplanet.Types.dll
Syntax
public sealed class TxMetadata : object

Constructors

| Improve this Doc View Source

TxMetadata(Bencodex.Types.Dictionary)

Creates a TxMetadata from a Bencodex dictionary.

Declaration
public TxMetadata(Bencodex.Types.Dictionary dictionary)
Parameters
Type Name Description
Bencodex.Types.Dictionary dictionary

A Bencodex dictionary made using ToBencodex() method.

| Improve this Doc View Source

TxMetadata(PublicKey)

Creates a TxMetadata instance with a publicKey. Other fields can be set using property setters.

Declaration
public TxMetadata(PublicKey publicKey)
Parameters
Type Name Description
PublicKey publicKey

Configures PublicKey and Signer.

| Improve this Doc View Source

TxMetadata(ITransaction)

Creates a TxMetadata instance by copying fields from the specified metadata.

Declaration
public TxMetadata(ITransaction metadata)
Parameters
Type Name Description
ITransaction metadata

The transaction metadata whose data to copy.

Remarks

Signer from the specified metadata is ignored. Signer field is automatically derived from PublicKey instead.

Properties

| Improve this Doc View Source

GenesisHash

A BlockHash value of the genesis which this transaction is made from. This can be null iff the transaction is contained in the genesis block.

Declaration
public BlockHash? GenesisHash { get; set; }
Property Value
Type Description
System.Nullable<BlockHash>
| Improve this Doc View Source

Nonce

The number of previous Transactions committed by the Signer of this transaction. This nonce is used for preventing replay attack.

Declaration
public long Nonce { get; set; }
Property Value
Type Description
System.Int64
| Improve this Doc View Source

PublicKey

A PublicKey of the account who signs this transaction. The Signer address is always corresponding to this for each transaction. This cannot be null.

Declaration
public PublicKey PublicKey { get; }
Property Value
Type Description
PublicKey
| Improve this Doc View Source

Signer

A Address of the account who signs this transaction. This is derived from the PublicKey.

Declaration
public Address Signer { get; }
Property Value
Type Description
Address
Remarks

This is automatically derived from PublicKey.

| Improve this Doc View Source

Timestamp

The time this transaction is created and signed.

Declaration
public DateTimeOffset Timestamp { get; set; }
Property Value
Type Description
DateTimeOffset
| Improve this Doc View Source

UpdatedAddresses

An approximated list of addresses whose states would be affected by actions in this transaction. However, it could be wrong.

Declaration
public IImmutableSet<Address> UpdatedAddresses { get; set; }
Property Value
Type Description
IImmutableSet<Address>
Remarks

See also https://github.com/planetarium/libplanet/issues/368 .

Methods

| Improve this Doc View Source

ToBencodex()

A Transaction without actions and signature.

Declaration
public Bencodex.Types.Dictionary ToBencodex()
Returns
Type Description
Bencodex.Types.Dictionary
| Improve this Doc View Source

ToString()

A Transaction without actions and signature.

Declaration
public override string ToString()
Returns
Type Description
System.String
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2018–2023 Planetarium