Kit
Type aliases

MessagePartialSigner

MessagePartialSigner<TAddress> = Readonly<{ address: Address<TAddress>; signMessages: Promise<readonly Readonly<Record<Address, SignatureBytes>>[]>; }>

A signer interface that signs an array of SignableMessages without modifying their content.

It defines a MessagePartialSigner#signMessages | signMessages function that returns a SignatureDictionary for each provided message. Such signature dictionaries are expected to be merged with the existing ones if any.

Type Parameters

Type ParameterDefault typeDescription
TAddress extends stringstringSupply a string literal to define a signer having a particular address.

Example

const signer: MessagePartialSigner<'1234..5678'> = {
    address: address('1234..5678'),
    signMessages: async (
        messages: SignableMessage[]
    ): Promise<SignatureDictionary[]> => {
        // My custom signing logic.
    },
};

Remarks

Here are the main characteristics of this signer interface:

  • Parallel. When multiple signers sign the same message, we can perform this operation in parallel to obtain all their signatures.
  • Flexible order. The order in which we use these signers for a given message doesn’t matter.

See

On this page