Struct AtomicTxn.AsyncSigning
Represents an Atomic Txn that is being signed with asynchronous signers.
Implements
Namespace: Algorand.Unity
Assembly: cs.temp.dll.dll
Syntax
public struct AsyncSigning : AtomicTxn.ISigning<AtomicTxn.AsyncSigning>
Remarks
Once all signatures have been added, serialize this transaction group to msgpack with FinishSigningAsync() or submit it to the network with Submit(AlgodClient, CancellationToken).
Constructors
AsyncSigning(Transaction[], TransactionSignature[], TxnIndices, (Int32, Method)[])
Create a new Atomic Txn group that contains some asynchronous signers.
Declaration
public AsyncSigning(Transaction[] txns, TransactionSignature[] sigs, TxnIndices signedIndices, (int, Method)[] methodIndices)
Parameters
| Type | Name | Description |
|---|---|---|
| Transaction[] | txns | Transactions that are part of this group. |
| TransactionSignature[] | sigs | Existing signatures. |
| TxnIndices | signedIndices | Indices of transactions with existing signatures. |
| ValueTuple<Int32, Method>[] | methodIndices |
Properties
SignedTxnIndices
Indices of the transactions that have already been signed.
Declaration
public TxnIndices SignedTxnIndices { get; set; }
Property Value
| Type | Description |
|---|---|
| TxnIndices |
Sigs
Signatures associated with each transaction.
Declaration
public TransactionSignature[] Sigs { get; }
Property Value
| Type | Description |
|---|---|
| TransactionSignature[] |
Txns
Transactions in this group.
Declaration
public Transaction[] Txns { get; }
Property Value
| Type | Description |
|---|---|
| Transaction[] |
Methods
AsAsync()
Represent this signing atomic txn group as an async signing group.
Declaration
public AtomicTxn.AsyncSigning AsAsync()
Returns
| Type | Description |
|---|---|
| AtomicTxn.AsyncSigning |
Remarks
Async signing groups will require waiting for signatures signing is finished.
FinishSigningAsync()
Finish signing this group and return the raw msgpack, ready to submit.
Declaration
public UniTask<byte[]> FinishSigningAsync()
Returns
| Type | Description |
|---|---|
| UniTask<Byte[]> | Msgpack encoding of the transaction group. |
FinishSigningAsync(Allocator)
Finish signing this group and return the msgpack of the group, ready to send to the network.
Declaration
public UniTask<NativeList<byte>> FinishSigningAsync(Allocator allocator)
Parameters
| Type | Name | Description |
|---|---|---|
| Allocator | allocator | Allocator to use in the returned NativeList (which must be disposed). |
Returns
| Type | Description |
|---|---|
| UniTask<NativeList<Byte>> | A natively-allocated, msgpack-encoded transaction group, ready to send to the network. |
SignWithAsync<T>(T, TxnIndices, CancellationToken)
Sign transactions in this group indicated by the given indices with the given signer.
Declaration
public AtomicTxn.AsyncSigning SignWithAsync<T>(T signer, TxnIndices txnsToSign, CancellationToken cancellationToken = null)
where T : IAsyncSigner
Parameters
| Type | Name | Description |
|---|---|---|
| T | signer | |
| TxnIndices | txnsToSign | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| AtomicTxn.AsyncSigning | An Async Signing Atomic Txn Group with new signatures awaiting to be added. |
Type Parameters
| Name | Description |
|---|---|
| T |
SignWithAsync<T, TProgress>(T, TxnIndices, TProgress, CancellationToken)
Sign transactions in this group indicated by the given indices with the given signer.
Declaration
public AtomicTxn.AsyncSigning SignWithAsync<T, TProgress>(T signer, TxnIndices txnsToSign, TProgress progress, CancellationToken cancellationToken = null)
where T : IAsyncSignerWithProgress where TProgress : IProgress<float>
Parameters
| Type | Name | Description |
|---|---|---|
| T | signer | |
| TxnIndices | txnsToSign | |
| TProgress | progress | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| AtomicTxn.AsyncSigning | An Async Signing Atomic Txn Group with new signatures awaiting to be added. |
Type Parameters
| Name | Description |
|---|---|
| T | |
| TProgress |
Submit(AlgodClient, CancellationToken)
Submit the atomic transaction to the network.
Declaration
public UniTask<AtomicTxn.Submitted> Submit(AlgodClient algod, CancellationToken cancellationToken = null)
Parameters
| Type | Name | Description |
|---|---|---|
| AlgodClient | algod | The algod client to use |
| CancellationToken | cancellationToken | An optional cancellationToken to cancel the request early. |
Returns
| Type | Description |
|---|---|
| UniTask<AtomicTxn.Submitted> | A AtomicTxn.Submitted atomic transaction, ready to be confirmed. |