Class Transaction
Contains all fields common to all transactions and serves as an envelope to all transactions type. Definition: data/transactions/signedtxn.go : SignedTxn data/transactions/transaction.go : Transaction
Inheritance
Inherited Members
Namespace: Algorand.V2.Model
Assembly: Algorand.dll
Syntax
[DataContract]
public class Transaction : IEquatable<Transaction>, IValidatableObject
Constructors
| Improve this Doc View SourceTransaction(TransactionApplication, TransactionAssetConfig, TransactionAssetFreeze, TransactionAssetTransfer, String, Nullable<Int64>, Nullable<Int64>, Nullable<Int64>, Nullable<Int64>, Nullable<Int64>, Nullable<Int64>, Nullable<Int64>, Byte[], String, StateDelta, Byte[], String, Nullable<Int64>, TransactionKeyreg, Nullable<Int64>, Byte[], List<AccountStateDelta>, Byte[], TransactionPayment, Nullable<Int64>, String, Nullable<Int64>, String, Nullable<Int64>, TransactionSignature, Transaction.TxTypeEnum)
Initializes a new instance of the Transaction class.
Declaration
public Transaction(TransactionApplication applicationTransaction = null, TransactionAssetConfig assetConfigTransaction = null, TransactionAssetFreeze assetFreezeTransaction = null, TransactionAssetTransfer assetTransferTransaction = null, string authAddr = null, long? closeRewards = default(long? ), long? closingAmount = default(long? ), long? confirmedRound = default(long? ), long? createdApplicationIndex = default(long? ), long? createdAssetIndex = default(long? ), long? fee = default(long? ), long? firstValid = default(long? ), byte[] genesisHash = null, string genesisId = null, StateDelta globalStateDelta = null, byte[] group = null, string id = null, long? intraRoundOffset = default(long? ), TransactionKeyreg keyregTransaction = null, long? lastValid = default(long? ), byte[] lease = null, List<AccountStateDelta> localStateDelta = null, byte[] note = null, TransactionPayment paymentTransaction = null, long? receiverRewards = default(long? ), string rekeyTo = null, long? roundTime = default(long? ), string sender = null, long? senderRewards = default(long? ), TransactionSignature signature = null, Transaction.TxTypeEnum txType = (Transaction.TxTypeEnum)0)
Parameters
Type | Name | Description |
---|---|---|
TransactionApplication | applicationTransaction | applicationTransaction. |
TransactionAssetConfig | assetConfigTransaction | assetConfigTransaction. |
TransactionAssetFreeze | assetFreezeTransaction | assetFreezeTransaction. |
TransactionAssetTransfer | assetTransferTransaction | assetTransferTransaction. |
System.String | authAddr | \[sgnr\] The address used to sign the transaction. This is used for rekeyed accounts to indicate that the sender address did not sign the transaction.. |
System.Nullable<System.Int64> | closeRewards | \[rc\] rewards applied to close-remainder-to account.. |
System.Nullable<System.Int64> | closingAmount | \[ca\] closing amount for transaction.. |
System.Nullable<System.Int64> | confirmedRound | Round when the transaction was confirmed.. |
System.Nullable<System.Int64> | createdApplicationIndex | Specifies an application index (ID) if an application was created with this transaction.. |
System.Nullable<System.Int64> | createdAssetIndex | Specifies an asset index (ID) if an asset was created with this transaction.. |
System.Nullable<System.Int64> | fee | \[fee\] Transaction fee. (required). |
System.Nullable<System.Int64> | firstValid | \[fv\] First valid round for this transaction. (required). |
System.Byte[] | genesisHash | \[gh\] Hash of genesis block.. |
System.String | genesisId | \[gen\] genesis block ID.. |
StateDelta | globalStateDelta | globalStateDelta. |
System.Byte[] | group | \[grp\] Base64 encoded byte array of a sha512/256 digest. When present indicates that this transaction is part of a transaction group and the value is the sha512/256 hash of the transactions in that group.. |
System.String | id | Transaction ID (required). |
System.Nullable<System.Int64> | intraRoundOffset | Offset into the round where this transaction was confirmed.. |
TransactionKeyreg | keyregTransaction | keyregTransaction. |
System.Nullable<System.Int64> | lastValid | \[lv\] Last valid round for this transaction. (required). |
System.Byte[] | lease | \[lx\] Base64 encoded 32-byte array. Lease enforces mutual exclusion of transactions. If this field is nonzero, then once the transaction is confirmed, it acquires the lease identified by the (Sender, Lease) pair of the transaction until the LastValid round passes. While this transaction possesses the lease, no other transaction specifying this lease can be confirmed.. |
System.Collections.Generic.List<AccountStateDelta> | localStateDelta | \[ld\] Local state key/value changes for the application being executed by this transaction.. |
System.Byte[] | note | \[note\] Free form data.. |
TransactionPayment | paymentTransaction | paymentTransaction. |
System.Nullable<System.Int64> | receiverRewards | \[rr\] rewards applied to receiver account.. |
System.String | rekeyTo | \[rekey\] when included in a valid transaction, the accounts auth addr will be updated with this value and future signatures must be signed with the key represented by this address.. |
System.Nullable<System.Int64> | roundTime | Time when the block this transaction is in was confirmed.. |
System.String | sender | \[snd\] Sender's address. (required). |
System.Nullable<System.Int64> | senderRewards | \[rs\] rewards applied to sender account.. |
TransactionSignature | signature | signature (required). |
Transaction.TxTypeEnum | txType | \[type\] Indicates what type of transaction this is. Different types have different fields. Valid types, and where their fields are stored: * \[pay\] payment-transaction * \[keyreg\] keyreg-transaction * \[acfg\] asset-config-transaction * \[axfer\] asset-transfer-transaction * \[afrz\] asset-freeze-transaction * \[appl\] application-transaction (required). |
Properties
| Improve this Doc View SourceApplicationTransaction
Gets or Sets ApplicationTransaction
Declaration
[DataMember(Name = "application-transaction", EmitDefaultValue = false)]
public TransactionApplication ApplicationTransaction { get; set; }
Property Value
Type | Description |
---|---|
TransactionApplication |
AssetConfigTransaction
Gets or Sets AssetConfigTransaction
Declaration
[DataMember(Name = "asset-config-transaction", EmitDefaultValue = false)]
public TransactionAssetConfig AssetConfigTransaction { get; set; }
Property Value
Type | Description |
---|---|
TransactionAssetConfig |
AssetFreezeTransaction
Gets or Sets AssetFreezeTransaction
Declaration
[DataMember(Name = "asset-freeze-transaction", EmitDefaultValue = false)]
public TransactionAssetFreeze AssetFreezeTransaction { get; set; }
Property Value
Type | Description |
---|---|
TransactionAssetFreeze |
AssetTransferTransaction
Gets or Sets AssetTransferTransaction
Declaration
[DataMember(Name = "asset-transfer-transaction", EmitDefaultValue = false)]
public TransactionAssetTransfer AssetTransferTransaction { get; set; }
Property Value
Type | Description |
---|---|
TransactionAssetTransfer |
AuthAddr
\[sgnr\] The address used to sign the transaction. This is used for rekeyed accounts to indicate that the sender address did not sign the transaction.
Declaration
[DataMember(Name = "auth-addr", EmitDefaultValue = false)]
public string AuthAddr { get; set; }
Property Value
Type | Description |
---|---|
System.String | \[sgnr\] The address used to sign the transaction. This is used for rekeyed accounts to indicate that the sender address did not sign the transaction. |
CloseRewards
\[rc\] rewards applied to close-remainder-to account.
Declaration
[DataMember(Name = "close-rewards", EmitDefaultValue = false)]
public long? CloseRewards { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> | \[rc\] rewards applied to close-remainder-to account. |
ClosingAmount
\[ca\] closing amount for transaction.
Declaration
[DataMember(Name = "closing-amount", EmitDefaultValue = false)]
public long? ClosingAmount { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> | \[ca\] closing amount for transaction. |
ConfirmedRound
Round when the transaction was confirmed.
Declaration
[DataMember(Name = "confirmed-round", EmitDefaultValue = false)]
public long? ConfirmedRound { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> | Round when the transaction was confirmed. |
CreatedApplicationIndex
Specifies an application index (ID) if an application was created with this transaction.
Declaration
[DataMember(Name = "created-application-index", EmitDefaultValue = false)]
public long? CreatedApplicationIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> | Specifies an application index (ID) if an application was created with this transaction. |
CreatedAssetIndex
Specifies an asset index (ID) if an asset was created with this transaction.
Declaration
[DataMember(Name = "created-asset-index", EmitDefaultValue = false)]
public long? CreatedAssetIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> | Specifies an asset index (ID) if an asset was created with this transaction. |
Fee
\[fee\] Transaction fee.
Declaration
[DataMember(Name = "fee", EmitDefaultValue = false)]
public long? Fee { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> | \[fee\] Transaction fee. |
FirstValid
\[fv\] First valid round for this transaction.
Declaration
[DataMember(Name = "first-valid", EmitDefaultValue = false)]
public long? FirstValid { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> | \[fv\] First valid round for this transaction. |
GenesisHash
\[gh\] Hash of genesis block.
Declaration
[DataMember(Name = "genesis-hash", EmitDefaultValue = false)]
public byte[] GenesisHash { get; set; }
Property Value
Type | Description |
---|---|
System.Byte[] | \[gh\] Hash of genesis block. |
GenesisId
\[gen\] genesis block ID.
Declaration
[DataMember(Name = "genesis-id", EmitDefaultValue = false)]
public string GenesisId { get; set; }
Property Value
Type | Description |
---|---|
System.String | \[gen\] genesis block ID. |
GlobalStateDelta
Gets or Sets GlobalStateDelta
Declaration
[DataMember(Name = "global-state-delta", EmitDefaultValue = false)]
public StateDelta GlobalStateDelta { get; set; }
Property Value
Type | Description |
---|---|
StateDelta |
Group
\[grp\] Base64 encoded byte array of a sha512/256 digest. When present indicates that this transaction is part of a transaction group and the value is the sha512/256 hash of the transactions in that group.
Declaration
[DataMember(Name = "group", EmitDefaultValue = false)]
public byte[] Group { get; set; }
Property Value
Type | Description |
---|---|
System.Byte[] | \[grp\] Base64 encoded byte array of a sha512/256 digest. When present indicates that this transaction is part of a transaction group and the value is the sha512/256 hash of the transactions in that group. |
Id
Transaction ID
Declaration
[DataMember(Name = "id", EmitDefaultValue = false)]
public string Id { get; set; }
Property Value
Type | Description |
---|---|
System.String | Transaction ID |
IntraRoundOffset
Offset into the round where this transaction was confirmed.
Declaration
[DataMember(Name = "intra-round-offset", EmitDefaultValue = false)]
public long? IntraRoundOffset { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> | Offset into the round where this transaction was confirmed. |
KeyregTransaction
Gets or Sets KeyregTransaction
Declaration
[DataMember(Name = "keyreg-transaction", EmitDefaultValue = false)]
public TransactionKeyreg KeyregTransaction { get; set; }
Property Value
Type | Description |
---|---|
TransactionKeyreg |
LastValid
\[lv\] Last valid round for this transaction.
Declaration
[DataMember(Name = "last-valid", EmitDefaultValue = false)]
public long? LastValid { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> | \[lv\] Last valid round for this transaction. |
Lease
\[lx\] Base64 encoded 32-byte array. Lease enforces mutual exclusion of transactions. If this field is nonzero, then once the transaction is confirmed, it acquires the lease identified by the (Sender, Lease) pair of the transaction until the LastValid round passes. While this transaction possesses the lease, no other transaction specifying this lease can be confirmed.
Declaration
[DataMember(Name = "lease", EmitDefaultValue = false)]
public byte[] Lease { get; set; }
Property Value
Type | Description |
---|---|
System.Byte[] | \[lx\] Base64 encoded 32-byte array. Lease enforces mutual exclusion of transactions. If this field is nonzero, then once the transaction is confirmed, it acquires the lease identified by the (Sender, Lease) pair of the transaction until the LastValid round passes. While this transaction possesses the lease, no other transaction specifying this lease can be confirmed. |
LocalStateDelta
\[ld\] Local state key/value changes for the application being executed by this transaction.
Declaration
[DataMember(Name = "local-state-delta", EmitDefaultValue = false)]
public List<AccountStateDelta> LocalStateDelta { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<AccountStateDelta> | \[ld\] Local state key/value changes for the application being executed by this transaction. |
Note
\[note\] Free form data.
Declaration
[DataMember(Name = "note", EmitDefaultValue = false)]
public byte[] Note { get; set; }
Property Value
Type | Description |
---|---|
System.Byte[] | \[note\] Free form data. |
PaymentTransaction
Gets or Sets PaymentTransaction
Declaration
[DataMember(Name = "payment-transaction", EmitDefaultValue = false)]
public TransactionPayment PaymentTransaction { get; set; }
Property Value
Type | Description |
---|---|
TransactionPayment |
ReceiverRewards
\[rr\] rewards applied to receiver account.
Declaration
[DataMember(Name = "receiver-rewards", EmitDefaultValue = false)]
public long? ReceiverRewards { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> | \[rr\] rewards applied to receiver account. |
RekeyTo
\[rekey\] when included in a valid transaction, the accounts auth addr will be updated with this value and future signatures must be signed with the key represented by this address.
Declaration
[DataMember(Name = "rekey-to", EmitDefaultValue = false)]
public string RekeyTo { get; set; }
Property Value
Type | Description |
---|---|
System.String | \[rekey\] when included in a valid transaction, the accounts auth addr will be updated with this value and future signatures must be signed with the key represented by this address. |
RoundTime
Time when the block this transaction is in was confirmed.
Declaration
[DataMember(Name = "round-time", EmitDefaultValue = false)]
public long? RoundTime { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> | Time when the block this transaction is in was confirmed. |
Sender
\[snd\] Sender's address.
Declaration
[DataMember(Name = "sender", EmitDefaultValue = false)]
public string Sender { get; set; }
Property Value
Type | Description |
---|---|
System.String | \[snd\] Sender's address. |
SenderRewards
\[rs\] rewards applied to sender account.
Declaration
[DataMember(Name = "sender-rewards", EmitDefaultValue = false)]
public long? SenderRewards { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> | \[rs\] rewards applied to sender account. |
Signature
Gets or Sets Signature
Declaration
[DataMember(Name = "signature", EmitDefaultValue = false)]
public TransactionSignature Signature { get; set; }
Property Value
Type | Description |
---|---|
TransactionSignature |
TxType
\[type\] Indicates what type of transaction this is. Different types have different fields. Valid types, and where their fields are stored: * \[pay\] payment-transaction * \[keyreg\] keyreg-transaction * \[acfg\] asset-config-transaction * \[axfer\] asset-transfer-transaction * \[afrz\] asset-freeze-transaction * \[appl\] application-transaction
Declaration
[DataMember(Name = "tx-type", EmitDefaultValue = false)]
public Transaction.TxTypeEnum TxType { get; set; }
Property Value
Type | Description |
---|---|
Transaction.TxTypeEnum | \[type\] Indicates what type of transaction this is. Different types have different fields. Valid types, and where their fields are stored: * \[pay\] payment-transaction * \[keyreg\] keyreg-transaction * \[acfg\] asset-config-transaction * \[axfer\] asset-transfer-transaction * \[afrz\] asset-freeze-transaction * \[appl\] application-transaction |
Methods
| Improve this Doc View SourceEquals(Transaction)
Returns true if Transaction instances are equal
Declaration
public bool Equals(Transaction input)
Parameters
Type | Name | Description |
---|---|---|
Transaction | input | Instance of Transaction to be compared |
Returns
Type | Description |
---|---|
System.Boolean | Boolean |
Equals(Object)
Returns true if objects are equal
Declaration
public override bool Equals(object input)
Parameters
Type | Name | Description |
---|---|---|
System.Object | input | Object to be compared |
Returns
Type | Description |
---|---|
System.Boolean | Boolean |
Overrides
GetHashCode()
Gets the hash code
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | Hash code |
Overrides
ToJson()
Returns the JSON string presentation of the object
Declaration
public virtual string ToJson()
Returns
Type | Description |
---|---|
System.String | JSON string presentation of the object |
ToString()
Returns the string presentation of the object
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | String presentation of the object |
Overrides
Explicit Interface Implementations
| Improve this Doc View SourceIValidatableObject.Validate(ValidationContext)
To validate all properties of the instance
Declaration
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
Parameters
Type | Name | Description |
---|---|---|
System.ComponentModel.DataAnnotations.ValidationContext | validationContext | Validation context |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> | Validation Result |