Class TransactionAssetTransfer
Fields for an asset transfer transaction. Definition: data/transactions/asset.go : AssetTransferTxnFields
Inheritance
Implements
Inherited Members
Namespace: Algorand.V2.Model
Assembly: Algorand.dll
Syntax
[DataContract]
public class TransactionAssetTransfer : IEquatable<TransactionAssetTransfer>, IValidatableObject
Constructors
| Improve this Doc View SourceTransactionAssetTransfer(Nullable<UInt64>, Nullable<Int64>, Nullable<UInt64>, String, String, String)
Initializes a new instance of the TransactionAssetTransfer class.
Declaration
public TransactionAssetTransfer(ulong? amount = default(ulong? ), long? assetId = default(long? ), ulong? closeAmount = default(ulong? ), string closeTo = null, string receiver = null, string sender = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Nullable<System.UInt64> | amount | \[aamt\] Amount of asset to transfer. A zero amount transferred to self allocates that asset in the account's Assets map. (required). |
| System.Nullable<System.Int64> | assetId | \[xaid\] ID of the asset being transferred. (required). |
| System.Nullable<System.UInt64> | closeAmount | Number of assets transfered to the close-to account as part of the transaction.. |
| System.String | closeTo | \[aclose\] Indicates that the asset should be removed from the account's Assets map, and specifies where the remaining asset holdings should be transferred. It's always valid to transfer remaining asset holdings to the creator account.. |
| System.String | receiver | \[arcv\] Recipient address of the transfer. (required). |
| System.String | sender | \[asnd\] The effective sender during a clawback transactions. If this is not a zero value, the real transaction sender must be the Clawback address from the AssetParams.. |
Properties
| Improve this Doc View SourceAmount
\[aamt\] Amount of asset to transfer. A zero amount transferred to self allocates that asset in the account's Assets map.
Declaration
[DataMember(Name = "amount", EmitDefaultValue = false)]
public ulong? Amount { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.UInt64> | \[aamt\] Amount of asset to transfer. A zero amount transferred to self allocates that asset in the account's Assets map. |
AssetId
\[xaid\] ID of the asset being transferred.
Declaration
[DataMember(Name = "asset-id", EmitDefaultValue = false)]
public long? AssetId { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Int64> | \[xaid\] ID of the asset being transferred. |
CloseAmount
Number of assets transfered to the close-to account as part of the transaction.
Declaration
[DataMember(Name = "close-amount", EmitDefaultValue = false)]
public ulong? CloseAmount { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.UInt64> | Number of assets transfered to the close-to account as part of the transaction. |
CloseTo
\[aclose\] Indicates that the asset should be removed from the account's Assets map, and specifies where the remaining asset holdings should be transferred. It's always valid to transfer remaining asset holdings to the creator account.
Declaration
[DataMember(Name = "close-to", EmitDefaultValue = false)]
public string CloseTo { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | \[aclose\] Indicates that the asset should be removed from the account's Assets map, and specifies where the remaining asset holdings should be transferred. It's always valid to transfer remaining asset holdings to the creator account. |
Receiver
\[arcv\] Recipient address of the transfer.
Declaration
[DataMember(Name = "receiver", EmitDefaultValue = false)]
public string Receiver { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | \[arcv\] Recipient address of the transfer. |
Sender
\[asnd\] The effective sender during a clawback transactions. If this is not a zero value, the real transaction sender must be the Clawback address from the AssetParams.
Declaration
[DataMember(Name = "sender", EmitDefaultValue = false)]
public string Sender { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | \[asnd\] The effective sender during a clawback transactions. If this is not a zero value, the real transaction sender must be the Clawback address from the AssetParams. |
Methods
| Improve this Doc View SourceEquals(TransactionAssetTransfer)
Returns true if TransactionAssetTransfer instances are equal
Declaration
public bool Equals(TransactionAssetTransfer input)
Parameters
| Type | Name | Description |
|---|---|---|
| TransactionAssetTransfer | input | Instance of TransactionAssetTransfer 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 |