Class WalletAccount
- Namespace
- Concordium.Sdk.Wallets
- Assembly
- Concordium.Sdk.dll
Represents an account imported from one of the supported wallet export formats.
In particular it supports import of the browser and genesis wallet key export formats. The class implements ITransactionSigner so it may be used for signing transactions.
This structure does not have the encryption key for sending encrypted transfers, it only contains keys for signing transactions.
public class WalletAccount : ITransactionSigner
- Inheritance
-
WalletAccount
- Implements
- Inherited Members
Properties
AccountAddress
The address of the imported account.
public AccountAddress AccountAddress { get; init; }
Property Value
Methods
From(IWalletDataSource)
Try to create a new instance from a wallet data source.
public static WalletAccount From(IWalletDataSource walletDataSource)
Parameters
walletDataSource
IWalletDataSourceData source from which to import the wallet.
Returns
Exceptions
FromWalletKeyExportFormat(string)
Create a new instance from a string in the browser or genesis wallet key export format.
public static WalletAccount FromWalletKeyExportFormat(string json)
Parameters
json
stringJSON string in the browser or genesis wallet key export format.
Returns
Exceptions
- JsonException
The specified input is not valid JSON.
- WalletDataSourceException
Either a field is missing or an index or sign key could not be parsed.
GetSignatureCount()
Get the number of signatures included in the AccountSignature when signing using this account.
public byte GetSignatureCount()
Returns
GetSignerEntries()
Get credential-key-map of the account.
public ImmutableDictionary<AccountCredentialIndex, ImmutableDictionary<AccountKeyIndex, ISigner>> GetSignerEntries()
Returns
Sign(byte[])
Produce an AccountTransactionSignature using this account.
public AccountTransactionSignature Sign(byte[] data)
Parameters
data
byte[]