Class AssetParams
AssetParams specifies the parameters for an asset. \[apar\] when part of an AssetConfig transaction. Definition: data/transactions/asset.go : AssetParams
Inheritance
Inherited Members
Namespace: Algorand.V2.Model
Assembly: Algorand.dll
Syntax
[DataContract]
public class AssetParams : IEquatable<AssetParams>, IValidatableObject
Constructors
| Improve this Doc View SourceAssetParams()
Initializes a new instance of the AssetParams class.
Declaration
[JsonConstructor]
protected AssetParams()
AssetParams(String, String, Nullable<Int64>, Nullable<Boolean>, String, String, Byte[], String, String, Nullable<UInt64>, String, String)
Initializes a new instance of the AssetParams class.
Declaration
public AssetParams(string clawback = null, string creator = null, long? decimals = default(long? ), bool? defaultFrozen = default(bool? ), string freeze = null, string manager = null, byte[] metadataHash = null, string name = null, string reserve = null, ulong? total = default(ulong? ), string unitName = null, string url = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | clawback | \[c\] Address of account used to clawback holdings of this asset. If empty, clawback is not permitted.. |
System.String | creator | The address that created this asset. This is the address where the parameters for this asset can be found, and also the address where unwanted asset units can be sent in the worst case. (required). |
System.Nullable<System.Int64> | decimals | \[dc\] The number of digits to use after the decimal point when displaying this asset. If 0, the asset is not divisible. If 1, the base unit of the asset is in tenths. If 2, the base unit of the asset is in hundredths, and so on. This value must be between 0 and 19 (inclusive). (required). |
System.Nullable<System.Boolean> | defaultFrozen | \[df\] Whether holdings of this asset are frozen by default.. |
System.String | freeze | \[f\] Address of account used to freeze holdings of this asset. If empty, freezing is not permitted.. |
System.String | manager | \[m\] Address of account used to manage the keys of this asset and to destroy it.. |
System.Byte[] | metadataHash | \[am\] A commitment to some unspecified asset metadata. The format of this metadata is up to the application.. |
System.String | name | \[an\] Name of this asset, as supplied by the creator.. |
System.String | reserve | \[r\] Address of account holding reserve (non-minted) units of this asset.. |
System.Nullable<System.UInt64> | total | \[t\] The total number of units of this asset. (required). |
System.String | unitName | \[un\] Name of a unit of this asset, as supplied by the creator.. |
System.String | url | \[au\] URL where more information about the asset can be retrieved.. |
Properties
| Improve this Doc View SourceClawback
\[c\] Address of account used to clawback holdings of this asset. If empty, clawback is not permitted.
Declaration
[DataMember(Name = "clawback", EmitDefaultValue = false)]
public string Clawback { get; set; }
Property Value
Type | Description |
---|---|
System.String | \[c\] Address of account used to clawback holdings of this asset. If empty, clawback is not permitted. |
Creator
The address that created this asset. This is the address where the parameters for this asset can be found, and also the address where unwanted asset units can be sent in the worst case.
Declaration
[DataMember(Name = "creator", EmitDefaultValue = false)]
public string Creator { get; set; }
Property Value
Type | Description |
---|---|
System.String | The address that created this asset. This is the address where the parameters for this asset can be found, and also the address where unwanted asset units can be sent in the worst case. |
Decimals
\[dc\] The number of digits to use after the decimal point when displaying this asset. If 0, the asset is not divisible. If 1, the base unit of the asset is in tenths. If 2, the base unit of the asset is in hundredths, and so on. This value must be between 0 and 19 (inclusive).
Declaration
[DataMember(Name = "decimals", EmitDefaultValue = false)]
public long? Decimals { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> | \[dc\] The number of digits to use after the decimal point when displaying this asset. If 0, the asset is not divisible. If 1, the base unit of the asset is in tenths. If 2, the base unit of the asset is in hundredths, and so on. This value must be between 0 and 19 (inclusive). |
DefaultFrozen
\[df\] Whether holdings of this asset are frozen by default.
Declaration
[DataMember(Name = "default-frozen", EmitDefaultValue = false)]
public bool? DefaultFrozen { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> | \[df\] Whether holdings of this asset are frozen by default. |
Freeze
\[f\] Address of account used to freeze holdings of this asset. If empty, freezing is not permitted.
Declaration
[DataMember(Name = "freeze", EmitDefaultValue = false)]
public string Freeze { get; set; }
Property Value
Type | Description |
---|---|
System.String | \[f\] Address of account used to freeze holdings of this asset. If empty, freezing is not permitted. |
Manager
\[m\] Address of account used to manage the keys of this asset and to destroy it.
Declaration
[DataMember(Name = "manager", EmitDefaultValue = false)]
public string Manager { get; set; }
Property Value
Type | Description |
---|---|
System.String | \[m\] Address of account used to manage the keys of this asset and to destroy it. |
MetadataHash
\[am\] A commitment to some unspecified asset metadata. The format of this metadata is up to the application.
Declaration
[DataMember(Name = "metadata-hash", EmitDefaultValue = false)]
public byte[] MetadataHash { get; set; }
Property Value
Type | Description |
---|---|
System.Byte[] | \[am\] A commitment to some unspecified asset metadata. The format of this metadata is up to the application. |
Name
\[an\] Name of this asset, as supplied by the creator.
Declaration
[DataMember(Name = "name", EmitDefaultValue = false)]
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String | \[an\] Name of this asset, as supplied by the creator. |
Reserve
\[r\] Address of account holding reserve (non-minted) units of this asset.
Declaration
[DataMember(Name = "reserve", EmitDefaultValue = false)]
public string Reserve { get; set; }
Property Value
Type | Description |
---|---|
System.String | \[r\] Address of account holding reserve (non-minted) units of this asset. |
Total
\[t\] The total number of units of this asset.
Declaration
[DataMember(Name = "total", EmitDefaultValue = false)]
public ulong? Total { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.UInt64> | \[t\] The total number of units of this asset. |
UnitName
\[un\] Name of a unit of this asset, as supplied by the creator.
Declaration
[DataMember(Name = "unit-name", EmitDefaultValue = false)]
public string UnitName { get; set; }
Property Value
Type | Description |
---|---|
System.String | \[un\] Name of a unit of this asset, as supplied by the creator. |
Url
\[au\] URL where more information about the asset can be retrieved.
Declaration
[DataMember(Name = "url", EmitDefaultValue = false)]
public string Url { get; set; }
Property Value
Type | Description |
---|---|
System.String | \[au\] URL where more information about the asset can be retrieved. |
Methods
| Improve this Doc View SourceEquals(AssetParams)
Returns true if AssetParams instances are equal
Declaration
public bool Equals(AssetParams input)
Parameters
Type | Name | Description |
---|---|---|
AssetParams | input | Instance of AssetParams 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 |