Show / Hide Table of Contents

Class UnsignedTx

A concrete implementation of IUnsignedTx.

Inheritance
System.Object
UnsignedTx
Implements
IUnsignedTx
ITxInvoice
IEquatable<ITxInvoice>
ITxSigningMetadata
IEquatable<ITxSigningMetadata>
IEquatable<IUnsignedTx>
IEquatable<UnsignedTx>
Namespace: Libplanet.Types.Tx
Assembly: Libplanet.Types.dll
Syntax
public sealed class UnsignedTx : object, IUnsignedTx, ITxInvoice, ITxSigningMetadata

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
public TxActionList Actions { get; }
Property Value
Type Description
TxActionList
See Also
IUnsignedTx
TxInvoice
TxSigningMetadata
Transaction
| Improve this Doc View Source

GasLimit

The limit on the total amount of gas that the Transaction can use.

If null, gas processing is entirely bypassed. The parity of null-ness is always the same as that of MaxGasPrice.

If not null, this value cannot be negative.

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

MaxGasPrice

The maximum amount of FungibleAssetValue that the Transaction's author is willing to pay per gas for the Transaction.

If null, gas processing is entirely bypassed. The parity of null-ness is always the same as that of GasLimit.

If not null, this value cannot be negative.

Declaration
public FungibleAssetValue? MaxGasPrice { get; }
Property Value
Type Description
System.Nullable<FungibleAssetValue>
See Also
GasLimit
| 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
System.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

A deprecated property which was used as an approximated list of addresses whose states would be affected by actions in this transaction.

This is no longer officially supported in the sense that a Transaction cannot be created with a non-empty set of Addresses through normal means (i.e. using intended APIs).

It is still possible to create a Transaction through other means, such as creating a payload directly by assigning appropriate values and signing an "unsigned transaction". This is not recommended.

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
public ImmutableArray<byte> CreateSignature(PrivateKey privateKey)
Parameters
Type Name Description
PrivateKey privateKey

The private key to sign this transaction.

Returns
Type Description
ImmutableArray<System.Byte>

A signature for this transaction.

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

Equals(UnsignedTx)

A concrete implementation of IUnsignedTx.

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

Equals(Nullable<Object>)

A concrete implementation of IUnsignedTx.

Declaration
public override bool Equals(object? obj)
Parameters
Type Name Description
System.Nullable<System.Object> obj
Returns
Type Description
System.Boolean
See Also
IUnsignedTx
TxInvoice
TxSigningMetadata
Transaction
| Improve this Doc View Source

GetHashCode()

A concrete implementation of IUnsignedTx.

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

ToString()

A concrete implementation of IUnsignedTx.

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

VerifySignature(ImmutableArray<Byte>)

Verifies the given signature for this transaction.

Declaration
public bool VerifySignature(ImmutableArray<byte> signature)
Parameters
Type Name Description
ImmutableArray<System.Byte> signature

The signature to verify.

Returns
Type Description
System.Boolean

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

See Also
IUnsignedTx
TxInvoice
TxSigningMetadata
Transaction

Implements

IUnsignedTx
ITxInvoice
IEquatable<>
ITxSigningMetadata
IEquatable<>
IEquatable<>
IEquatable<>

See Also

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