Class UnsignedTx
A concrete implementation of IUnsignedTx.
Implements
Inherited Members
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 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
[JsonConverter(typeof(TxActionListJsonConverter))]
public TxActionList Actions { get; }
Property Value
Type | Description |
---|---|
TxActionList |
See Also
| Improve this Doc View SourceGasLimit
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
| 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 |
---|---|
Nullable<BlockHash> |
See Also
| Improve this Doc View SourceMaxGasPrice
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
| 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 |
---|---|
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
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
Methods
| Improve this Doc View SourceCreateSignature(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 |
See Also
| Improve this Doc View SourceEquals(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
| Improve this Doc View SourceEquals(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
See Also
| Improve this Doc View SourceGetHashCode()
A concrete implementation of IUnsignedTx.
Declaration
[Pure]
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
See Also
| Improve this Doc View SourceToString()
A concrete implementation of IUnsignedTx.
Declaration
[Pure]
public override string ToString()
Returns
Type | Description |
---|---|
String |
Overrides
See Also
| Improve this Doc View SourceVerifySignature(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 |
See Also
Explicit Interface Implementations
| Improve this Doc View SourceIEquatable<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
| Improve this Doc View SourceIEquatable<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
| Improve this Doc View SourceIEquatable<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 |