Struct Account
A local, in-memory account.
Implements
Namespace: Algorand.Unity
Assembly: cs.temp.dll.dll
Syntax
public struct Account : IAccountSigner, ISigner, IAsyncAccountSigner, IAsyncAccountSignerWithProgress, IAccount, IAsyncSignerWithProgress, IAsyncSigner
  Constructors
Account(PrivateKey)
Instantiate an in-memory account.
Declaration
public Account(PrivateKey privateKey)
  Parameters
| Type | Name | Description | 
|---|---|---|
| PrivateKey | privateKey | The private key of the account.  | 
      
Account(PrivateKey, Address)
Instantiate an in-memory account that is rekeyed.
Declaration
public Account(PrivateKey privateKey, Address address)
  Parameters
| Type | Name | Description | 
|---|---|---|
| PrivateKey | privateKey | The private key of the account.  | 
      
| Address | address | The address of this account.  | 
      
Properties
Address
Address of this account
Declaration
public Address Address { get; }
  Property Value
| Type | Description | 
|---|---|
| Address | 
IsRekeyed
Declaration
public bool IsRekeyed { get; }
  Property Value
| Type | Description | 
|---|---|
| Boolean | 
Methods
Deconstruct(out PrivateKey, out Address)
Declaration
public void Deconstruct(out PrivateKey privateKey, out Address address)
  Parameters
| Type | Name | Description | 
|---|---|---|
| PrivateKey | privateKey | |
| Address | address | 
GenerateAccount()
Generate a random, fresh account
Declaration
public static Account GenerateAccount()
  Returns
| Type | Description | 
|---|---|
| Account | 
SignTxn<T>(T)
Declaration
public SignedTxn<T> SignTxn<T>(T txn)
    where T : ITransaction, IEquatable<T>
  Parameters
| Type | Name | Description | 
|---|---|---|
| T | txn | 
Returns
| Type | Description | 
|---|---|
| SignedTxn<T> | 
Type Parameters
| Name | Description | 
|---|---|
| T | 
SignTxns<T>(T[], TxnIndices)
Sign a group of transactions.
Declaration
public SignedTxn<T>[] SignTxns<T>(T[] txns, TxnIndices txnsToSign)
    where T : ITransaction, IEquatable<T>
  Parameters
| Type | Name | Description | 
|---|---|---|
| T[] | txns | The transactions to sign.  | 
      
| TxnIndices | txnsToSign | Indexes of the transactions this signer should sign.  | 
      
Returns
| Type | Description | 
|---|---|
| SignedTxn<T>[] | An array of transactions with signatures. If the transaction at a given index was not signed, that signed transaction will have no signature.  | 
      
Type Parameters
| Name | Description | 
|---|---|
| T | The type of the transactions.  | 
      
Remarks
Each transaction is expected to have a valid group id already set.
SignTxnsAsync<T>(T[], TxnIndices, CancellationToken)
Sign a group of transactions.
Declaration
public UniTask<SignedTxn<T>[]> SignTxnsAsync<T>(T[] txns, TxnIndices txnsToSign, CancellationToken cancellationToken = null)
    where T : ITransaction, IEquatable<T>
  Parameters
| Type | Name | Description | 
|---|---|---|
| T[] | txns | The transactions to sign.  | 
      
| TxnIndices | txnsToSign | Indexes of the transactions this signer should sign.  | 
      
| CancellationToken | cancellationToken | Provide an optional cancellation token to interrupt signing.  | 
      
Returns
| Type | Description | 
|---|---|
| UniTask<SignedTxn<T>[]> | An array of transactions with signatures. If the transaction at a given index was not signed, that signed transaction will have no signature.  | 
      
Type Parameters
| Name | Description | 
|---|---|
| T | The type of the transactions.  | 
      
Remarks
Each transaction is expected to have a valid group id already set.
SignTxnsAsync<T, TProgress>(T[], TxnIndices, TProgress, CancellationToken)
Sign a group of transactions.
Declaration
public UniTask<SignedTxn<T>[]> SignTxnsAsync<T, TProgress>(T[] txns, TxnIndices txnsToSign, TProgress progress, CancellationToken cancellationToken = null)
    where T : ITransaction, IEquatable<T> where TProgress : IProgress<float>
  Parameters
| Type | Name | Description | 
|---|---|---|
| T[] | txns | The transactions to sign.  | 
      
| TxnIndices | txnsToSign | Indexes of the transactions this signer should sign.  | 
      
| TProgress | progress | A progress token that can be used to periodically check the progress.  | 
      
| CancellationToken | cancellationToken | Provide an optional cancellation token to interrupt signing.  | 
      
Returns
| Type | Description | 
|---|---|
| UniTask<SignedTxn<T>[]> | An array of transactions with signatures. If the transaction at a given index was not signed, that signed transaction will have no signature.  | 
      
Type Parameters
| Name | Description | 
|---|---|
| T | The type of the transactions.  | 
      
| TProgress | 
Remarks
Each transaction is expected to have a valid group id already set.