Back to Linera Protocol

Interface Signer

web/@linera/client/docs/interfaces/Signer.html

0.15.171.4 KB
Original Source
  • Signer

Interface Signer

Interface for signing and key management compatible with Ethereum (EVM) addresses.

interface Signer {
containsKey(owner: string): Promise<boolean>;
sign(owner: string, value: Uint8Array): Promise<string>;
}

Implemented by

Index

Methods

containsKeysign

Methods

containsKey

containsKey(owner: string): Promise<boolean>

Checks whether the instance holds a key whose associated address matches the given EVM address.

Parameters

  • owner: string

The EVM address to check for.

Returns Promise<boolean>

A promise that resolves to true if the key exists and matches the given address, otherwise false.

sign

sign(owner: string, value: Uint8Array): Promise<string>

Signs a given value using the private key associated with the specified EVM address. The signing process must follow the EIP-191 standard.

Parameters

  • owner: string

The EVM address whose private key will be used to sign the value.

  • value: Uint8Array

The data to be signed, as a Uint8Array.

Returns Promise<string>

A promise that resolves to the EIP-191-compatible signature in hexadecimal string format.

Settings

Member Visibility

  • Protected
  • Inherited
  • External

ThemeOSLightDark

On This Page

Methods containsKeysign