Table of Contents

Interface ITransactionSigner

Namespace
Concordium.Sdk.Transactions
Assembly
Concordium.Sdk.dll

Implementers of ITransactionSigner provide functionality for signing data using account keys.

An account has one or more credentials with each such credential having up to 256 sign keys (and accompanying verification keys). Each credential is identified by its unique AccountCredentialIndex and each key by a unique pair of a AccountCredentialIndex corresponding to the credential to which it belongs, and a unique AccountKeyIndex relative to that credential index of the account. For each key, it is thus represented by some pair of a credential index and a key index.

The resulting AccountTransactionSignature from calling Sign(byte[]) should reflect this structure and correspond to a mapping from credential and key indices to the signatures produced by signing a transaction hash with the corresponding keys.

public interface ITransactionSigner

Methods

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.

byte GetSignatureCount()

Returns

byte

GetSignerEntries()

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

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 a transaction hash.

AccountTransactionSignature Sign(byte[] data)

Parameters

data byte[]

Returns

AccountTransactionSignature

A AccountTransactionSignature representing the transaction signature.

Exceptions

ArgumentException

Unexpected length of a signature returned by the signing.