diff --git a/dotnet-algorand-sdk/Transaction.cs b/dotnet-algorand-sdk/Transaction.cs
index 92e582df..6b709dcc 100644
--- a/dotnet-algorand-sdk/Transaction.cs
+++ b/dotnet-algorand-sdk/Transaction.cs
@@ -4,6 +4,7 @@
using System.Text;
using System.Linq;
using System.Collections.Generic;
+using System.Numerics;
namespace Algorand
{
@@ -311,7 +312,7 @@ public Transaction(Address sender, ulong? fee, ulong? firstValid, ulong? lastVal
/// account which can freeze or unfreeze holder accounts
/// account which can issue clawbacks against holder accounts
private Transaction(Address sender, ulong? fee, ulong? firstValid, ulong? lastValid, byte[] note,
- string genesisID, Digest genesisHash, ulong? assetTotal, int assetDecimals, bool defaultFrozen,
+ string genesisID, Digest genesisHash, BigInteger? assetTotal, int assetDecimals, bool defaultFrozen,
string assetUnitName, string assetName, string url, byte[] metadataHash,
Address manager, Address reserve, Address freeze, Address clawback)
{
@@ -578,7 +579,7 @@ private Transaction(Type type,
/// account which can issue clawbacks against holder accounts
///
public static Transaction CreateAssetCreateTransaction(Address sender, ulong? fee, ulong? firstValid, ulong? lastValid, byte[] note,
- string genesisID, Digest genesisHash, ulong? assetTotal, int assetDecimals, bool defaultFrozen,
+ string genesisID, Digest genesisHash, BigInteger? assetTotal, int assetDecimals, bool defaultFrozen,
string assetUnitName, string assetName, string url, byte[] metadataHash,
Address manager, Address reserve, Address freeze, Address clawback)
{
@@ -1059,7 +1060,7 @@ public class AssetParams
///
[JsonProperty(PropertyName = "t")]
[DefaultValue(0)]
- public ulong? assetTotal = 0;
+ public BigInteger? assetTotal = 0;
///
/// Decimals specifies the number of digits to display after the decimal
@@ -1131,7 +1132,7 @@ public class AssetParams
public Address assetClawback = new Address();
public AssetParams(
- ulong? assetTotal,
+ BigInteger? assetTotal,
int assetDecimals,
bool defaultFrozen,
string assetUnitName,
diff --git a/dotnet-algorand-sdk/Util/Utils.cs b/dotnet-algorand-sdk/Util/Utils.cs
index bfa3e577..f02ce139 100644
--- a/dotnet-algorand-sdk/Util/Utils.cs
+++ b/dotnet-algorand-sdk/Util/Utils.cs
@@ -635,9 +635,7 @@ private static void ValidateAsset(V2.Algod.Model.AssetParams asset)
if (asset.Clawback is null) asset.Clawback = asset.Manager;
else if (asset.Clawback != "" && !Address.IsValid(asset.Clawback)) throw new ArgumentException("The clawback address is not valid.");
- if (asset.MetadataHash is null || asset.MetadataHash.Length == 0)
- asset.MetadataHash = Encoding.UTF8.GetBytes(GetRandomAssetMetaHash());//auto generate metahash by sdk
- else if (asset.MetadataHash.Length != 32)
+ if (asset.MetadataHash is not null && asset.MetadataHash.Length != 32)
throw new ArgumentException("The metadata hash should be 32 bytes.");
if (asset.DefaultFrozen is null) asset.DefaultFrozen = false;
diff --git a/dotnet-algorand-sdk/V2/Algod/Model/Model.cs b/dotnet-algorand-sdk/V2/Algod/Model/Model.cs
index f7c420cd..00919820 100644
--- a/dotnet-algorand-sdk/V2/Algod/Model/Model.cs
+++ b/dotnet-algorand-sdk/V2/Algod/Model/Model.cs
@@ -149,7 +149,7 @@ public partial class Asset
{
/// unique asset identifier
[Newtonsoft.Json.JsonProperty("index", Required = Newtonsoft.Json.Required.Always)]
- public BigInteger Index { get; set; }
+ public ulong Index { get; set; }
[Newtonsoft.Json.JsonProperty("params", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
@@ -171,7 +171,7 @@ public partial class AssetHolding
/// Asset ID of the holding.
[Newtonsoft.Json.JsonProperty("asset-id", Required = Newtonsoft.Json.Required.Always)]
- public BigInteger AssetId { get; set; }
+ public ulong AssetId { get; set; }
/// \[f\] whether or not the holding is frozen.
[Newtonsoft.Json.JsonProperty("is-frozen", Required = Newtonsoft.Json.Required.Always)]
@@ -233,7 +233,7 @@ public partial class AssetParams
/// \[t\] The total number of units of this asset.
[Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Always)]
- public ulong? Total { get; set; }
+ public BigInteger? Total { get; set; }
/// \[un\] Name of a unit of this asset, as supplied by the creator. Included only when the name of a unit of this asset is composed of printable utf-8 characters.
[Newtonsoft.Json.JsonProperty("unit-name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
diff --git a/dotnet-algorand-sdk/V2/Indexer/LookupApi.cs b/dotnet-algorand-sdk/V2/Indexer/LookupApi.cs
index f504a0fe..df7e5db9 100644
--- a/dotnet-algorand-sdk/V2/Indexer/LookupApi.cs
+++ b/dotnet-algorand-sdk/V2/Indexer/LookupApi.cs
@@ -16,7 +16,7 @@ namespace Algorand.V2.Indexer
{
using System = global::System;
using Algorand.V2.Indexer.Model;
-
+ using System.Numerics;
[System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.5.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v12.0.0.0))")]
public partial interface ILookupApi
@@ -116,13 +116,13 @@ public partial interface ILookupApi
/// Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates.
/// (empty)
/// A server side error occurred.
- System.Threading.Tasks.Task AssetsAsync(int asset_id, bool? include_all);
+ System.Threading.Tasks.Task AssetsAsync(ulong asset_id, bool? include_all);
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates.
/// (empty)
/// A server side error occurred.
- System.Threading.Tasks.Task AssetsAsync(int asset_id, bool? include_all, System.Threading.CancellationToken cancellationToken);
+ System.Threading.Tasks.Task AssetsAsync(ulong asset_id, bool? include_all, System.Threading.CancellationToken cancellationToken);
/// Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates.
/// Maximum number of results to return. There could be additional pages even if the limit is not reached.
@@ -786,7 +786,7 @@ public async System.Threading.Tasks.Task LogsAsync(int application_id
/// Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates.
/// (empty)
/// A server side error occurred.
- public System.Threading.Tasks.Task AssetsAsync(int asset_id, bool? include_all)
+ public System.Threading.Tasks.Task AssetsAsync(ulong asset_id, bool? include_all)
{
return AssetsAsync(asset_id, include_all, System.Threading.CancellationToken.None);
}
@@ -795,7 +795,7 @@ public System.Threading.Tasks.Task AssetsAsync(int asset_id, bool? in
/// Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates.
/// (empty)
/// A server side error occurred.
- public async System.Threading.Tasks.Task AssetsAsync(int asset_id, bool? include_all, System.Threading.CancellationToken cancellationToken)
+ public async System.Threading.Tasks.Task AssetsAsync(ulong asset_id, bool? include_all, System.Threading.CancellationToken cancellationToken)
{
if (asset_id == null)
throw new System.ArgumentNullException("asset_id");
diff --git a/dotnet-algorand-sdk/V2/Indexer/Model/Model.cs b/dotnet-algorand-sdk/V2/Indexer/Model/Model.cs
index e8e8c2a7..6fad0675 100644
--- a/dotnet-algorand-sdk/V2/Indexer/Model/Model.cs
+++ b/dotnet-algorand-sdk/V2/Indexer/Model/Model.cs
@@ -342,7 +342,7 @@ public partial class Asset
{
/// unique asset identifier
[Newtonsoft.Json.JsonProperty("index")] //, Required = Newtonsoft.Json.Required.Always)]
- public int Index { get; set; }
+ public ulong Index { get; set; }
/// Whether or not this asset is currently deleted.
[Newtonsoft.Json.JsonProperty("deleted", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
@@ -1132,7 +1132,7 @@ public partial class TransactionAssetTransfer
/// \[xaid\] ID of the asset being transferred.
[Newtonsoft.Json.JsonProperty("asset-id")] //, Required = Newtonsoft.Json.Required.Always)]
- public BigInteger AssetId { get; set; }
+ public ulong AssetId { get; set; }
/// Number of assets transfered to the close-to account as part of the transaction.
[Newtonsoft.Json.JsonProperty("close-amount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
diff --git a/dotnet-algorand-sdk/V2/Indexer/SearchApi.cs b/dotnet-algorand-sdk/V2/Indexer/SearchApi.cs
index af0e6adf..26f5018b 100644
--- a/dotnet-algorand-sdk/V2/Indexer/SearchApi.cs
+++ b/dotnet-algorand-sdk/V2/Indexer/SearchApi.cs
@@ -16,7 +16,7 @@ namespace Algorand.V2.Indexer
{
using System = global::System;
using Algorand.V2.Indexer.Model;
-
+ using System.Numerics;
[System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.5.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v12.0.0.0))")]
public partial interface ISearchApi
@@ -32,7 +32,7 @@ public partial interface ISearchApi
/// Application ID
/// (empty)
/// A server side error occurred.
- System.Threading.Tasks.Task AccountsAsync(int? asset_id, int? limit, string next, ulong? currency_greater_than, bool? include_all, ulong? currency_less_than, string auth_addr, ulong? round, int? application_id);
+ System.Threading.Tasks.Task AccountsAsync(ulong? asset_id, int? limit, string next, ulong? currency_greater_than, bool? include_all, ulong? currency_less_than, string auth_addr, ulong? round, int? application_id);
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// Asset ID
@@ -46,7 +46,7 @@ public partial interface ISearchApi
/// Application ID
/// (empty)
/// A server side error occurred.
- System.Threading.Tasks.Task AccountsAsync(int? asset_id, int? limit, string next, ulong? currency_greater_than, bool? include_all, ulong? currency_less_than, string auth_addr, ulong? round, int? application_id, System.Threading.CancellationToken cancellationToken);
+ System.Threading.Tasks.Task AccountsAsync(ulong? asset_id, int? limit, string next, ulong? currency_greater_than, bool? include_all, ulong? currency_less_than, string auth_addr, ulong? round, int? application_id, System.Threading.CancellationToken cancellationToken);
/// Application ID
/// Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates.
@@ -74,7 +74,7 @@ public partial interface ISearchApi
/// Asset ID
/// (empty)
/// A server side error occurred.
- System.Threading.Tasks.Task AssetsAsync(bool? include_all, int? limit, string next, string creator, string name, string unit, int? asset_id);
+ System.Threading.Tasks.Task AssetsAsync(bool? include_all, int? limit, string next, string creator, string name, string unit, BigInteger? asset_id);
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates.
@@ -86,7 +86,7 @@ public partial interface ISearchApi
/// Asset ID
/// (empty)
/// A server side error occurred.
- System.Threading.Tasks.Task AssetsAsync(bool? include_all, int? limit, string next, string creator, string name, string unit, int? asset_id, System.Threading.CancellationToken cancellationToken);
+ System.Threading.Tasks.Task AssetsAsync(bool? include_all, int? limit, string next, string creator, string name, string unit, BigInteger? asset_id, System.Threading.CancellationToken cancellationToken);
/// Maximum number of results to return. There could be additional pages even if the limit is not reached.
/// The next page of results. Use the next token provided by the previous results.
@@ -111,7 +111,7 @@ public partial interface ISearchApi
/// Application ID
/// (empty)
/// A server side error occurred.
- System.Threading.Tasks.Task TransactionsAsync(int? limit, string next, string note_prefix, TxType? tx_type, SigType? sig_type, string txid, ulong? round, ulong? min_round, ulong? max_round, int? asset_id, System.DateTimeOffset? before_time, System.DateTimeOffset? after_time, ulong? currency_greater_than, ulong? currency_less_than, string address, AddressRole? address_role, bool? exclude_close_to, bool? rekey_to, int? application_id);
+ System.Threading.Tasks.Task TransactionsAsync(int? limit, string next, string note_prefix, TxType? tx_type, SigType? sig_type, string txid, ulong? round, ulong? min_round, ulong? max_round, ulong? asset_id, System.DateTimeOffset? before_time, System.DateTimeOffset? after_time, ulong? currency_greater_than, ulong? currency_less_than, string address, AddressRole? address_role, bool? exclude_close_to, bool? rekey_to, int? application_id);
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// Maximum number of results to return. There could be additional pages even if the limit is not reached.
@@ -137,7 +137,7 @@ public partial interface ISearchApi
/// Application ID
/// (empty)
/// A server side error occurred.
- System.Threading.Tasks.Task TransactionsAsync(int? limit, string next, string note_prefix, TxType? tx_type, SigType? sig_type, string txid, ulong? round, ulong? min_round, ulong? max_round, int? asset_id, System.DateTimeOffset? before_time, System.DateTimeOffset? after_time, ulong? currency_greater_than, ulong? currency_less_than, string address, AddressRole? address_role, bool? exclude_close_to, bool? rekey_to, int? application_id, System.Threading.CancellationToken cancellationToken);
+ System.Threading.Tasks.Task TransactionsAsync(int? limit, string next, string note_prefix, TxType? tx_type, SigType? sig_type, string txid, ulong? round, ulong? min_round, ulong? max_round, ulong? asset_id, System.DateTimeOffset? before_time, System.DateTimeOffset? after_time, ulong? currency_greater_than, ulong? currency_less_than, string address, AddressRole? address_role, bool? exclude_close_to, bool? rekey_to, int? application_id, System.Threading.CancellationToken cancellationToken);
}
@@ -186,7 +186,7 @@ public string BaseUrl
/// Application ID
/// (empty)
/// A server side error occurred.
- public System.Threading.Tasks.Task AccountsAsync(int? asset_id, int? limit, string next, ulong? currency_greater_than, bool? include_all, ulong? currency_less_than, string auth_addr, ulong? round, int? application_id)
+ public System.Threading.Tasks.Task AccountsAsync(ulong? asset_id, int? limit, string next, ulong? currency_greater_than, bool? include_all, ulong? currency_less_than, string auth_addr, ulong? round, int? application_id)
{
return AccountsAsync(asset_id, limit, next, currency_greater_than, include_all, currency_less_than, auth_addr, round, application_id, System.Threading.CancellationToken.None);
}
@@ -203,7 +203,7 @@ public System.Threading.Tasks.Task AccountsAsync(int? asset_id, int? l
/// Application ID
/// (empty)
/// A server side error occurred.
- public async System.Threading.Tasks.Task AccountsAsync(int? asset_id, int? limit, string next, ulong? currency_greater_than, bool? include_all, ulong? currency_less_than, string auth_addr, ulong? round, int? application_id, System.Threading.CancellationToken cancellationToken)
+ public async System.Threading.Tasks.Task AccountsAsync(ulong? asset_id, int? limit, string next, ulong? currency_greater_than, bool? include_all, ulong? currency_less_than, string auth_addr, ulong? round, int? application_id, System.Threading.CancellationToken cancellationToken)
{
var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v2/accounts?");
@@ -442,7 +442,7 @@ public async System.Threading.Tasks.Task ApplicationsAsync(int? appli
/// Asset ID
/// (empty)
/// A server side error occurred.
- public System.Threading.Tasks.Task AssetsAsync(bool? include_all, int? limit, string next, string creator, string name, string unit, int? asset_id)
+ public System.Threading.Tasks.Task AssetsAsync(bool? include_all, int? limit, string next, string creator, string name, string unit, BigInteger? asset_id)
{
return AssetsAsync(include_all, limit, next, creator, name, unit, asset_id, System.Threading.CancellationToken.None);
}
@@ -457,7 +457,7 @@ public System.Threading.Tasks.Task AssetsAsync(bool? include_all, int
/// Asset ID
/// (empty)
/// A server side error occurred.
- public async System.Threading.Tasks.Task AssetsAsync(bool? include_all, int? limit, string next, string creator, string name, string unit, int? asset_id, System.Threading.CancellationToken cancellationToken)
+ public async System.Threading.Tasks.Task AssetsAsync(bool? include_all, int? limit, string next, string creator, string name, string unit, BigInteger? asset_id, System.Threading.CancellationToken cancellationToken)
{
var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v2/assets?");
@@ -593,7 +593,7 @@ public async System.Threading.Tasks.Task AssetsAsync(bool? include_al
/// Application ID
/// (empty)
/// A server side error occurred.
- public System.Threading.Tasks.Task TransactionsAsync(int? limit, string next, string note_prefix, TxType? tx_type, SigType? sig_type, string txid, ulong? round, ulong? min_round, ulong? max_round, int? asset_id, System.DateTimeOffset? before_time, System.DateTimeOffset? after_time, ulong? currency_greater_than, ulong? currency_less_than, string address, AddressRole? address_role, bool? exclude_close_to, bool? rekey_to, int? application_id)
+ public System.Threading.Tasks.Task TransactionsAsync(int? limit, string next, string note_prefix, TxType? tx_type, SigType? sig_type, string txid, ulong? round, ulong? min_round, ulong? max_round, ulong? asset_id, System.DateTimeOffset? before_time, System.DateTimeOffset? after_time, ulong? currency_greater_than, ulong? currency_less_than, string address, AddressRole? address_role, bool? exclude_close_to, bool? rekey_to, int? application_id)
{
return TransactionsAsync(limit, next, note_prefix, tx_type, sig_type, txid, round, min_round, max_round, asset_id, before_time, after_time, currency_greater_than, currency_less_than, address, address_role, exclude_close_to, rekey_to, application_id, System.Threading.CancellationToken.None);
}
@@ -622,7 +622,7 @@ public System.Threading.Tasks.Task TransactionsAsync(int? limit, stri
/// Application ID
/// (empty)
/// A server side error occurred.
- public async System.Threading.Tasks.Task TransactionsAsync(int? limit, string next, string note_prefix, TxType? tx_type, SigType? sig_type, string txid, ulong? round, ulong? min_round, ulong? max_round, int? asset_id, System.DateTimeOffset? before_time, System.DateTimeOffset? after_time, ulong? currency_greater_than, ulong? currency_less_than, string address, AddressRole? address_role, bool? exclude_close_to, bool? rekey_to, int? application_id, System.Threading.CancellationToken cancellationToken)
+ public async System.Threading.Tasks.Task TransactionsAsync(int? limit, string next, string note_prefix, TxType? tx_type, SigType? sig_type, string txid, ulong? round, ulong? min_round, ulong? max_round, ulong? asset_id, System.DateTimeOffset? before_time, System.DateTimeOffset? after_time, ulong? currency_greater_than, ulong? currency_less_than, string address, AddressRole? address_role, bool? exclude_close_to, bool? rekey_to, int? application_id, System.Threading.CancellationToken cancellationToken)
{
var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v2/transactions?");
diff --git a/dotnet-algorand-sdk/dotnet-algorand-sdk.csproj b/dotnet-algorand-sdk/dotnet-algorand-sdk.csproj
index 4a72c335..90ee523a 100644
--- a/dotnet-algorand-sdk/dotnet-algorand-sdk.csproj
+++ b/dotnet-algorand-sdk/dotnet-algorand-sdk.csproj
@@ -6,7 +6,7 @@
Algorand
true
true
- 0.2.2.0-beta13
+ 0.2.2.0-beta19
Riley Ge
Tson Tec
Algorand .NET SDK