Crate alloy_signer_local

Crate alloy_signer_local 

Source
Expand description

§alloy-signer-local

Local signer implementations:

§Features

  • keystore: enables Ethereum keystore functionality on the PrivateKeySigner and Secp256k1Signer types.
  • mnemonic: enables BIP-39 mnemonic functionality for building PrivateKeySigners.
  • secp256k1: enables the Secp256k1Signer type, an alternative signer implementation using the secp256k1 crate instead of k256.
  • yubihsm: enables LocalSigners with YubiHSM2 support.

§Secp256k1 vs K256

This crate provides two ECDSA implementations:

  • PrivateKeySigner (default): Uses the k256 crate, a pure Rust implementation.
  • Secp256k1Signer (feature-gated): Uses the secp256k1 crate, Rust bindings to libsecp256k1.

Both implementations produce identical signatures and addresses for the same private key. The secp256k1 crate may offer better performance in some scenarios due to its optimized C implementation.

Re-exports§

pub use yubihsm;yubihsm
pub use coins_bip39;mnemonic

Structs§

LocalSigner
An Ethereum private-public key pair which can be used for signing messages.
MnemonicBuildermnemonic
Represents a structure that can resolve into a PrivateKeySigner.
MnemonicSignerItermnemonic
Iterator that generates signers from a mnemonic phrase by incrementing the derivation index.
Secp256k1Credentialsecp256k1
A wrapper around secp256k1::SecretKey that implements PrehashSigner.

Enums§

LocalSignerError
Error thrown by LocalSigner.
MnemonicBuilderErrormnemonic
Error produced by the mnemonic signer module.

Type Aliases§

PrivateKeySigner
A signer instantiated with a locally stored private key.
Secp256k1Signersecp256k1
A signer instantiated with a locally stored private key, using the secp256k1 crate.
YubiSigneryubihsm
A signer instantiated with a YubiHSM.