Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
78cadd2
Add STPF support.
raymens Apr 26, 2023
613ed12
Use bigint for indexer props
raymens Apr 26, 2023
ea1457e
Update version
raymens May 1, 2023
778befa
Disable state delta on TX due to overflow issues
raymens May 4, 2023
8ac96ab
Push beta version
raymens May 8, 2023
0f35c59
Remove Creator from AssetHolding
PJvGrol Oct 31, 2023
e1f95ad
Merge pull request #2 from PJvGrol/manual-improvements
raymens Nov 1, 2023
7fad863
Update AssetParams total to be BigInteger
PJvGrol Jan 8, 2024
0489079
Merge pull request #3 from QuantozTechnology/update-asset-total
raymens Jan 8, 2024
7827213
Use bigint instead of ulong
raymens Jan 9, 2024
8f6f2e7
Increase usage of biginteger
raymens Apr 29, 2024
7f8478b
Bump version to beta13
raymens Apr 29, 2024
9b42ca1
Update Asset Index to be BigInt
PJvGrol Jul 12, 2024
6a55e7a
Refactor code and optimize asset total type
raymens Jul 12, 2024
e28d30f
Merge branch 'manual-improvements' into asset-index-bigint
raymens Jul 12, 2024
f09e192
Update Algorand .NET SDK to 0.2.2.0-beta15
raymens Jul 12, 2024
7117e4a
Update Algorand .NET SDK to 0.2.2.0-beta16
raymens Jul 12, 2024
02f8283
Update asset_id param type to ulong in SearchApi
raymens Jul 15, 2024
d20b6a0
Update Algorand .NET SDK to 0.2.2.0-beta17
raymens Jul 15, 2024
6322583
Refine MetadataHash validation in Utils.cs
raymens Jul 18, 2024
650e939
Update Algorand .NET SDK to 0.2.2.0-beta18
raymens Jul 18, 2024
07e83b1
Update AssetTotal to be BigInteger
PJvGrol Oct 8, 2024
07d76fb
Update to beta 19
PJvGrol Oct 8, 2024
2e69ccc
Change all assetIds to be ulong
PJvGrol Oct 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dotnet-algorand-sdk/Account.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ public class Account
/// <returns>the rebuilded account</returns>
public static Account AccountFromPrivateKey(byte[] privateKey)
{
if(privateKey.Length != SK_SIZE)
if(privateKey.Length != SK_SIZE)
throw new ArgumentException("Incorrect private key length");

var privateKeyRebuild = new Ed25519PrivateKeyParameters(privateKey, 0);
var publicKeyRebuild = privateKeyRebuild.GeneratePublicKey();
var act = new Account
Expand Down
28 changes: 14 additions & 14 deletions dotnet-algorand-sdk/Algod/Model/AssetParams.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* Algod REST API.
*
* API Endpoint for AlgoD Operations.
Expand Down Expand Up @@ -73,7 +73,7 @@ public partial class AssetParams : IEquatable<AssetParams>, IValidatableObject
this.Unitname = unitname;
this.Url = url;
}

/// <summary>
/// AssetName specifies the name of this asset, as supplied by the creator.
/// </summary>
Expand Down Expand Up @@ -173,7 +173,7 @@ public override string ToString()
sb.Append("}\n");
return sb.ToString();
}

/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
Expand Down Expand Up @@ -203,57 +203,57 @@ public bool Equals(AssetParams input)
if (input == null)
return false;

return
return
(
this.Assetname == input.Assetname ||
(this.Assetname != null &&
this.Assetname.Equals(input.Assetname))
) &&
) &&
(
this.Clawbackaddr == input.Clawbackaddr ||
(this.Clawbackaddr != null &&
this.Clawbackaddr.Equals(input.Clawbackaddr))
) &&
) &&
(
this.Creator == input.Creator ||
(this.Creator != null &&
this.Creator.Equals(input.Creator))
) &&
) &&
(
this.Defaultfrozen == input.Defaultfrozen ||
(this.Defaultfrozen != null &&
this.Defaultfrozen.Equals(input.Defaultfrozen))
) &&
) &&
(
this.Freezeaddr == input.Freezeaddr ||
(this.Freezeaddr != null &&
this.Freezeaddr.Equals(input.Freezeaddr))
) &&
) &&
(
this.Managerkey == input.Managerkey ||
(this.Managerkey != null &&
this.Managerkey.Equals(input.Managerkey))
) &&
) &&
(
this.Metadatahash == input.Metadatahash ||
(this.Metadatahash != null &&
this.Metadatahash.Equals(input.Metadatahash))
) &&
) &&
(
this.Reserveaddr == input.Reserveaddr ||
(this.Reserveaddr != null &&
this.Reserveaddr.Equals(input.Reserveaddr))
) &&
) &&
(
this.Total == input.Total ||
(this.Total != null &&
this.Total.Equals(input.Total))
) &&
) &&
(
this.Unitname == input.Unitname ||
(this.Unitname != null &&
this.Unitname.Equals(input.Unitname))
) &&
) &&
(
this.Url == input.Url ||
(this.Url != null &&
Expand Down
18 changes: 9 additions & 9 deletions dotnet-algorand-sdk/Algod/Model/TransactionParams.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* Algod REST API.
*
* API Endpoint for AlgoD Operations.
Expand Down Expand Up @@ -87,7 +87,7 @@ public partial class TransactionParams : IEquatable<TransactionParams>, IValida
}
this.MinFee = minFee;
}

/// <summary>
/// ConsensusVersion indicates the consensus protocol version as of LastRound.
/// </summary>
Expand Down Expand Up @@ -147,7 +147,7 @@ public override string ToString()
sb.Append("}\n");
return sb.ToString();
}

/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
Expand Down Expand Up @@ -177,32 +177,32 @@ public bool Equals(TransactionParams input)
if (input == null)
return false;

return
return
(
this.ConsensusVersion == input.ConsensusVersion ||
(this.ConsensusVersion != null &&
this.ConsensusVersion.Equals(input.ConsensusVersion))
) &&
) &&
(
this.Fee == input.Fee ||
(this.Fee != null &&
this.Fee.Equals(input.Fee))
) &&
) &&
(
this.GenesisID == input.GenesisID ||
(this.GenesisID != null &&
this.GenesisID.Equals(input.GenesisID))
) &&
) &&
(
this.Genesishashb64 == input.Genesishashb64 ||
(this.Genesishashb64 != null &&
this.Genesishashb64.Equals(input.Genesishashb64))
) &&
) &&
(
this.LastRound == input.LastRound ||
(this.LastRound != null &&
this.LastRound.Equals(input.LastRound))
) &&
) &&
(
this.MinFee == input.MinFee ||
(this.MinFee != null &&
Expand Down
16 changes: 8 additions & 8 deletions dotnet-algorand-sdk/Transaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
using System.Text;
using System.Linq;
using System.Collections.Generic;
using System.Threading;
using Algorand.V2.Algod.Model;
using System.Numerics;

namespace Algorand
{
Expand Down Expand Up @@ -313,7 +312,7 @@ public Transaction(Address sender, ulong? fee, ulong? firstValid, ulong? lastVal
/// <param name="freeze">account which can freeze or unfreeze holder accounts</param>
/// <param name="clawback">account which can issue clawbacks against holder accounts</param>
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)
{
Expand Down Expand Up @@ -580,7 +579,7 @@ private Transaction(Type type,
/// <param name="clawback">account which can issue clawbacks against holder accounts</param>
/// <returns></returns>
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)
{
Expand Down Expand Up @@ -799,7 +798,7 @@ public static Transaction CreateAssetRevokeTransaction(// AssetTransaction
genesisHash)
{
assetReceiver = assetReceiver, //arcv
assetSender = assetRevokedFrom, //asnd
assetSender = assetRevokedFrom, //asnd
assetAmount = assetAmount, // aamt
sender = transactionSender // snd
}; // gh
Expand Down Expand Up @@ -919,10 +918,11 @@ public class Type
public static readonly Type AssetTransfer = new Type(4);
public static readonly Type AssetFreeze = new Type(5);
public static readonly Type ApplicationCall = new Type(6);
public static readonly Type StateProof = new Type(7);

private static Dictionary<string, int> namesMap = new Dictionary<string, int> {
{"", 0 }, {"pay", 1}, {"keyreg", 2},
{ "acfg", 3}, {"axfer", 4}, { "afrz", 5}, { "appl", 6}
{ "acfg", 3}, {"axfer", 4}, { "afrz", 5}, { "appl", 6}, { "sptf", 7}
};
/// <summary>
/// Return the enumeration for the given string value. Required for JSON serialization.
Expand Down Expand Up @@ -1060,7 +1060,7 @@ public class AssetParams
/// </summary>
[JsonProperty(PropertyName = "t")]
[DefaultValue(0)]
public ulong? assetTotal = 0;
public BigInteger? assetTotal = 0;

/// <summary>
/// Decimals specifies the number of digits to display after the decimal
Expand Down Expand Up @@ -1132,7 +1132,7 @@ public class AssetParams
public Address assetClawback = new Address();

public AssetParams(
ulong? assetTotal,
BigInteger? assetTotal,
int assetDecimals,
bool defaultFrozen,
string assetUnitName,
Expand Down
Loading