Class IAlgodClientExtensions
Namespace: Algorand.Unity
Assembly: cs.temp.dll.dll
Syntax
public static class IAlgodClientExtensions
Methods
SendTransaction<TClient, TTxn>(TClient, SignedTxn<TTxn>)
Send a signed transaction struct
Declaration
public static AlgoApiRequest.Sent<PostTransactionsResponse> SendTransaction<TClient, TTxn>(this TClient client, SignedTxn<TTxn> txn)
where TClient : IAlgodClient where TTxn : struct, ITransaction, IEquatable<TTxn>
Parameters
Type | Name | Description |
---|---|---|
TClient | client | The type of the client. |
SignedTxn<TTxn> | txn | The signed transaction struct to send |
Returns
Type | Description |
---|---|
AlgoApiRequest.Sent<PostTransactionsResponse> | A response from the algod service. |
Type Parameters
Name | Description |
---|---|
TClient | The type of the client sending the transaction |
TTxn | The type of the signed transaction. |
WaitForConfirmation<TClient>(TClient, String, UInt32, CancellationToken)
Utility method to wait for a transaction to be confirmed given a transaction id.
Declaration
public static UniTask<AlgoApiResponse<PendingTransactionResponse>> WaitForConfirmation<TClient>(this TClient client, string txid, uint maxWaitRounds = 0U, CancellationToken cancellationToken = null)
where TClient : IAlgodClient
Parameters
Type | Name | Description |
---|---|---|
TClient | client | The type of the client. |
String | txid | The transaction id to wait for. |
UInt32 | maxWaitRounds | How many rounds should this method wait for confirmation before cancelling early? |
CancellationToken | cancellationToken | An optional token for cancelling this task early. |
Returns
Type | Description |
---|---|
UniTask<AlgoApiResponse<PendingTransactionResponse>> | The algod response that either caused an error or showed a confirmed round. |
Type Parameters
Name | Description |
---|---|
TClient | The type of the client sending the transaction |