Show / Hide Table of Contents

Class UnsignedTx

A concrete implementation of IUnsignedTx.

Inheritance
Object
UnsignedTx
Implements
IUnsignedTx
ITxInvoice
IEquatable<ITxInvoice>
ITxSigningMetadata
IEquatable<ITxSigningMetadata>
IEquatable<IUnsignedTx>
IEquatable<UnsignedTx>
Inherited Members
Object.Equals(Object, Object)
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Namespace: Libplanet.Types.Tx
Assembly: Libplanet.Types.dll
Syntax
public sealed class UnsignedTx : IUnsignedTx, ITxInvoice, IEquatable<ITxInvoice>, ITxSigningMetadata, IEquatable<ITxSigningMetadata>, IEquatable<IUnsignedTx>, IEquatable<UnsignedTx>

Constructors

| Improve this Doc View Source

UnsignedTx(ITxInvoice, ITxSigningMetadata)

Creates a new UnsignedTx instance by combining an ITxInvoice and an ITxSigningMetadata. Note that when the arguments are not instances of TxInvoice or TxSigningMetadata, this constructor creates new instances of TxInvoice and TxSigningMetadata by copying.

Declaration
public UnsignedTx(ITxInvoice invoice, ITxSigningMetadata signingMetadata)
Parameters
Type Name Description
ITxInvoice invoice

The invoice to combine with signingMetadata.

ITxSigningMetadata signingMetadata

The signing metadata to combine with invoice.

See Also
IUnsignedTx
TxInvoice
TxSigningMetadata
Transaction
| Improve this Doc View Source

UnsignedTx(IUnsignedTx)

Creates a new UnsignedTx instance by copying everything from another unsignedTx.

Declaration
public UnsignedTx(IUnsignedTx unsignedTx)
Parameters
Type Name Description
IUnsignedTx unsignedTx

The IUnsignedTx instance to copy.

See Also
IUnsignedTx
TxInvoice
TxSigningMetadata
Transaction
| Improve this Doc View Source

UnsignedTx(TxInvoice, TxSigningMetadata)

Creates a new UnsignedTx instance by combining an TxInvoice and an TxSigningMetadata.

Declaration
public UnsignedTx(TxInvoice invoice, TxSigningMetadata signingMetadata)
Parameters
Type Name Description
TxInvoice invoice

The invoice to combine with signingMetadata.

TxSigningMetadata signingMetadata

The signing metadata to combine with invoice.

See Also
IUnsignedTx
TxInvoice
TxSigningMetadata
Transaction

Properties

| Improve this Doc View Source

Actions

A list of actions in this transaction.

Declaration
[JsonConverter(typeof(TxActionListJsonConverter))]
public TxActionList Actions { get; }
Property Value
Type Description
TxActionList
See Also
IUnsignedTx
TxInvoice
TxSigningMetadata
Transaction
| Improve this Doc View Source

GasLimit

The limit of the total amount of gas that the transaction will use. This can be null if align the handling of that transaction with the .

Declaration
public long? GasLimit { get; }
Property Value
Type Description
Nullable<Int64>
See Also
IUnsignedTx
TxInvoice
TxSigningMetadata
Transaction
| 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; }
Property Value
Type Description
Nullable<BlockHash>
See Also
IUnsignedTx
TxInvoice
TxSigningMetadata
Transaction
| Improve this Doc View Source

MaxGasPrice

The maximum amount of FungibleAssetValue that the transaction author is willing to pay for the transaction. This can be null if align the handling of that transaction with the .

Declaration
public FungibleAssetValue? MaxGasPrice { get; }
Property Value
Type Description
Nullable<FungibleAssetValue>
See Also
IUnsignedTx
TxInvoice
TxSigningMetadata
Transaction
| 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; }
Property Value
Type Description
Int64
See Also
IUnsignedTx
TxInvoice
TxSigningMetadata
Transaction
| 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
See Also
IUnsignedTx
TxInvoice
TxSigningMetadata
Transaction
| Improve this Doc View Source

Signer

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

Declaration
public Address Signer { get; }
Property Value
Type Description
Address
See Also
IUnsignedTx
TxInvoice
TxSigningMetadata
Transaction
| Improve this Doc View Source

Timestamp

The time this transaction is created and signed.

Declaration
public DateTimeOffset Timestamp { get; }
Property Value
Type Description
DateTimeOffset
See Also
IUnsignedTx
TxInvoice
TxSigningMetadata
Transaction
| 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; }
Property Value
Type Description
IImmutableSet<Address>
See Also
IUnsignedTx
TxInvoice
TxSigningMetadata
Transaction

Methods

| Improve this Doc View Source

CreateSignature(PrivateKey)

Creates a signature for this transaction with the given privateKey.

Declaration
[Pure]
public ImmutableArray<byte> CreateSignature(PrivateKey privateKey)
Parameters
Type Name Description
PrivateKey privateKey

The private key to sign this transaction.

Returns
Type Description
ImmutableArray<Byte>

A signature for this transaction.

Exceptions
Type Condition
ArgumentException

Thrown when the given privateKey does not correspond to the PublicKey of this transaction.

See Also
IUnsignedTx
TxInvoice
TxSigningMetadata
Transaction
| Improve this Doc View Source

Equals(UnsignedTx)

A concrete implementation of IUnsignedTx.

Declaration
[Pure]
public bool Equals(UnsignedTx other)
Parameters
Type Name Description
UnsignedTx other
Returns
Type Description
Boolean
See Also
IUnsignedTx
TxInvoice
TxSigningMetadata
Transaction
| Improve this Doc View Source

Equals(Object)

A concrete implementation of IUnsignedTx.

Declaration
[Pure]
public override bool Equals(object obj)
Parameters
Type Name Description
Object obj
Returns
Type Description
Boolean
Overrides
Object.Equals(Object)
See Also
IUnsignedTx
TxInvoice
TxSigningMetadata
Transaction
| Improve this Doc View Source

GetHashCode()

A concrete implementation of IUnsignedTx.

Declaration
[Pure]
public override int GetHashCode()
Returns
Type Description
Int32
Overrides
Object.GetHashCode()
See Also
IUnsignedTx
TxInvoice
TxSigningMetadata
Transaction
| Improve this Doc View Source

ToString()

A concrete implementation of IUnsignedTx.

Declaration
[Pure]
public override string ToString()
Returns
Type Description
String
Overrides
Object.ToString()
See Also
IUnsignedTx
TxInvoice
TxSigningMetadata
Transaction
| Improve this Doc View Source

VerifySignature(ImmutableArray<Byte>)

Verifies the given signature for this transaction.

Declaration
[Pure]
public bool VerifySignature(ImmutableArray<byte> signature)
Parameters
Type Name Description
ImmutableArray<Byte> signature

The signature to verify.

Returns
Type Description
Boolean

true if the given signature is valid for this transaction, otherwise false.

See Also
IUnsignedTx
TxInvoice
TxSigningMetadata
Transaction

Explicit Interface Implementations

| Improve this Doc View Source

IEquatable<ITxInvoice>.Equals(ITxInvoice)

A concrete implementation of IUnsignedTx.

Declaration
[Pure]
bool IEquatable<ITxInvoice>.Equals(ITxInvoice other)
Parameters
Type Name Description
ITxInvoice other
Returns
Type Description
Boolean
See Also
IUnsignedTx
TxInvoice
TxSigningMetadata
Transaction
| Improve this Doc View Source

IEquatable<ITxSigningMetadata>.Equals(ITxSigningMetadata)

A concrete implementation of IUnsignedTx.

Declaration
[Pure]
bool IEquatable<ITxSigningMetadata>.Equals(ITxSigningMetadata other)
Parameters
Type Name Description
ITxSigningMetadata other
Returns
Type Description
Boolean
See Also
IUnsignedTx
TxInvoice
TxSigningMetadata
Transaction
| Improve this Doc View Source

IEquatable<IUnsignedTx>.Equals(IUnsignedTx)

A concrete implementation of IUnsignedTx.

Declaration
[Pure]
bool IEquatable<IUnsignedTx>.Equals(IUnsignedTx other)
Parameters
Type Name Description
IUnsignedTx other
Returns
Type Description
Boolean
See Also
IUnsignedTx
TxInvoice
TxSigningMetadata
Transaction

Implements

IUnsignedTx
ITxInvoice
System.IEquatable<T>
ITxSigningMetadata
System.IEquatable<T>
System.IEquatable<T>
System.IEquatable<T>

Extension Methods

TransactionExtensions.Combine(ITxInvoice, ITxSigningMetadata)
TransactionExtensions.Sign(ITxInvoice, PrivateKey, Int64)
TxMarshaler.MarshalTxInvoice(ITxInvoice)
TxMarshaler.MarshalTxSigningMetadata(ITxSigningMetadata)
TransactionExtensions.Sign(IUnsignedTx, PrivateKey)
TransactionExtensions.Verify(IUnsignedTx, ImmutableArray<Byte>)
TxMarshaler.MarshalUnsignedTx(IUnsignedTx)
TxMarshaler.SerializeUnsignedTx(IUnsignedTx)

See Also

IUnsignedTx
TxInvoice
TxSigningMetadata
Transaction
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2018–2023 Planetarium