Table of Contents

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

credentialIndex AccountCredentialIndex

The credential index of the credential to which the key belongs.

keyIndex AccountKeyIndex

The key index of the key, relative to the credential index.

signer ISigner

The sign key implementation.

GetSignatureCount()

Gets the number of signatures that will be produced when signing a transaction using this signer. This number is based on the signer count.

public byte GetSignatureCount()

Returns

byte

GetSignerEntries()

Gets a dictionary mapping pairs of credential and key indices to their corresponding sign key implementations.

public ImmutableDictionary<AccountCredentialIndex, ImmutableDictionary<AccountKeyIndex, ISigner>> GetSignerEntries()

Returns

ImmutableDictionary<AccountCredentialIndex, ImmutableDictionary<AccountKeyIndex, ISigner>>

A dictionary mapping pairs of credential and key indices to the sign key implementation.

Sign(byte[])

Sign the provided transaction hash using all added sign key implementations.

public AccountTransactionSignature Sign(byte[] data)

Parameters

data byte[]

The transaction hash to sign.

Returns

AccountTransactionSignature

Exceptions

ArgumentException

No signatures were produced.

ArgumentException

A signature produced by signing is not 64 bytes.