Class Utils
Convenience methods for algorand sdk.
Inheritance
object
Utils
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Algorand.Utils
Assembly: Algorand.dll
Syntax
public class Utils
Methods
| Improve this Doc View SourceAlgosToMicroalgos(double)
Declaration
public static ulong AlgosToMicroalgos(double algos)
Parameters
Type | Name | Description |
---|---|---|
double | algos |
Returns
Type | Description |
---|---|
ulong |
GetDryrunResponse(DefaultApi, SignedTransaction, byte[])
Declaration
public static Task<DryrunResponse> GetDryrunResponse(DefaultApi client, SignedTransaction stxn, byte[] source = null)
Parameters
Type | Name | Description |
---|---|---|
DefaultApi | client | |
SignedTransaction | stxn | |
byte[] | source |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TResult><DryrunResponse> |
GetRandomAssetMetaHash()
Generate a 32 bytes string for asset metadata hash
Declaration
public static string GetRandomAssetMetaHash()
Returns
Type | Description |
---|---|
string | a 32 bytes string |
MicroalgosToAlgos(ulong)
Declaration
public static double MicroalgosToAlgos(ulong microAlgos)
Parameters
Type | Name | Description |
---|---|---|
ulong | microAlgos |
Returns
Type | Description |
---|---|
double |
SubmitTransaction(DefaultApi, SignedTransaction)
encode and submit signed transaction using algod v2 api
Declaration
public static Task<PostTransactionsResponse> SubmitTransaction(DefaultApi instance, SignedTransaction signedTx)
Parameters
Type | Name | Description |
---|---|---|
DefaultApi | instance | |
SignedTransaction | signedTx |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TResult><PostTransactionsResponse> |
WaitTransactionToComplete(DefaultApi, string, ulong)
utility function to wait on a transaction to be confirmed using algod v2 API
Declaration
public static Task<Transaction> WaitTransactionToComplete(DefaultApi instance, string txID, ulong timeout = 3)
Parameters
Type | Name | Description |
---|---|---|
DefaultApi | instance | The algod api instance using algod v2 API |
string | txID | transaction ID |
ulong | timeout | how many rounds do you wish to check pending transactions for |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TResult><Transaction> | The pending transaction response |