Class UnsignedTx
A concrete implementation of IUnsignedTx.
Inheritance
Implements
Namespace: Libplanet.Types.Tx
Assembly: Libplanet.Types.dll
Syntax
public sealed class UnsignedTx : object, IUnsignedTx, ITxInvoice, ITxSigningMetadata
Constructors
| Improve this Doc View SourceUnsignedTx(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 |
ITxSigningMetadata | signingMetadata | The signing metadata to combine with
|
See Also
| Improve this Doc View SourceUnsignedTx(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
| Improve this Doc View SourceUnsignedTx(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 |
TxSigningMetadata | signingMetadata | The signing metadata to combine with
|
See Also
Properties
| Improve this Doc View SourceActions
A list of actions in this transaction.
Declaration
public TxActionList Actions { get; }
Property Value
Type | Description |
---|---|
TxActionList |
See Also
| Improve this Doc View SourceGasLimit
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
| 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; }
Property Value
Type | Description |
---|---|
System.Nullable<BlockHash> |
See Also
| Improve this Doc View SourceMaxGasPrice
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
| Improve this Doc View SourceNonce
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
| Improve this Doc View SourcePublicKey
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
| Improve this Doc View SourceSigner
Declaration
public Address Signer { get; }
Property Value
Type | Description |
---|---|
Address |
See Also
| Improve this Doc View SourceTimestamp
The time this transaction is created and signed.
Declaration
public DateTimeOffset Timestamp { get; }
Property Value
Type | Description |
---|---|
DateTimeOffset |
See Also
| Improve this Doc View SourceUpdatedAddresses
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
Methods
| Improve this Doc View SourceCreateSignature(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
| Improve this Doc View SourceEquals(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
| Improve this Doc View SourceEquals(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
| Improve this Doc View SourceGetHashCode()
A concrete implementation of IUnsignedTx.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
See Also
| Improve this Doc View SourceToString()
A concrete implementation of IUnsignedTx.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceVerifySignature(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 |