Class TransactionSigner
- Namespace
- Concordium.Sdk.Transactions
- Assembly
- Concordium.Sdk.dll
Dictionary based implementation of ITransactionSigner.
Maintains a dictionary mapping pairs of AccountCredentialIndex and AccountKeyIndex to ISigners corresponding to the sign keys of an account.
public sealed class TransactionSigner : ITransactionSigner
- Inheritance
-
TransactionSigner
- Implements
- Inherited Members
Constructors
TransactionSigner()
Initializes a new instance of the TransactionSigner class.
public TransactionSigner()
Methods
AddSignerEntry(AccountCredentialIndex, AccountKeyIndex, ISigner)
Adds a sign key implementation to the TransactionSigner.
public void AddSignerEntry(AccountCredentialIndex credentialIndex, AccountKeyIndex keyIndex, ISigner signer)
Parameters
credentialIndexAccountCredentialIndexThe credential index of the credential to which the key belongs.
keyIndexAccountKeyIndexThe key index of the key, relative to the credential index.
signerISignerThe sign key implementation.
GetSignatureCount()
Get the number of signatures this signer can produce.
public byte GetSignatureCount()
Returns
GetSignerEntries()
Get credential-key-map of the signer.
public ImmutableDictionary<AccountCredentialIndex, ImmutableDictionary<AccountKeyIndex, ISigner>> GetSignerEntries()
Returns
Sign(byte[])
Sign the provided transaction hash using all added sign key implementations.
public AccountTransactionSignature Sign(byte[] data)
Parameters
databyte[]The transaction hash to sign.
Returns
Exceptions
- ArgumentException
No signatures were produced.
- ArgumentException
A signature produced by signing is not 64 bytes.