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()

Get the number of signatures this signer can produce.

public byte GetSignatureCount()

Returns

byte

GetSignerEntries()

Get credential-key-map of the signer.

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

Returns

ImmutableDictionary<AccountCredentialIndex, ImmutableDictionary<AccountKeyIndex, ISigner>>

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.