web/@linera/client/docs/classes/PrivateKeySigner.html
A signer implementation that holds the private key in memory.
⚠️ WARNING: This class is intended only for testing or development purposes. It stores the private key directly in memory, which makes it unsuitable for production environments due to security risks.
The PrivateKey signer uses an in-memory ethers.Wallet to sign messages following the EIP-191 scheme. It verifies that the provided owner matches the wallet address before signing.
Supports key creation from both a raw private key and a mnemonic phrase.
containsKey(owner: string): Promise<boolean>
Checks whether the instance holds a key whose associated address matches the given EVM address.
The EVM address to check for.
A promise that resolves to true if the key exists and matches the given address, otherwise false.
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.
The EVM address whose private key will be used to sign the value.
The data to be signed, as a Uint8Array.
A promise that resolves to the EIP-191-compatible signature in hexadecimal string format.
Member Visibility
ThemeOSLightDark
Methods containsKeysign