Class TxMetadata
A Transaction without actions and signature.
Inherited Members
Namespace: Libplanet.Types.Tx
Assembly: Libplanet.Types.dll
Syntax
public sealed class TxMetadata
Constructors
| Improve this Doc View SourceTxMetadata(Dictionary)
Creates a TxMetadata from a Bencodex dictionary
.
Declaration
public TxMetadata(Dictionary dictionary)
Parameters
Type | Name | Description |
---|---|---|
Bencodex.Types.Dictionary | dictionary | A Bencodex dictionary made using ToBencodex() method. |
Exceptions
Type | Condition |
---|---|
KeyNotFoundException | Thrown when the given
|
InvalidCastException | Thrown when the given
|
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 |
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 SourceGenesisHash
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 |
---|---|
Nullable<BlockHash> |
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 |
---|---|
Int64 |
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 |
Signer
Declaration
public Address Signer { get; }
Property Value
Type | Description |
---|---|
Address |
Remarks
This is automatically derived from PublicKey.
Timestamp
The time this transaction is created and signed.
Declaration
public DateTimeOffset Timestamp { get; set; }
Property Value
Type | Description |
---|---|
DateTimeOffset |
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
Methods
| Improve this Doc View SourceToBencodex()
A Transaction without actions and signature.
Declaration
[Pure]
public Dictionary ToBencodex()
Returns
Type | Description |
---|---|
Bencodex.Types.Dictionary |
ToString()
A Transaction without actions and signature.
Declaration
[Pure]
public override string ToString()
Returns
Type | Description |
---|---|
String |