Expand description
§alloy-signer-local
Local signer implementations:
- K256 private key
- Secp256k1 private key (feature-gated)
- Mnemonic phrase
- YubiHSM2
§Features
keystore: enables Ethereum keystore functionality on thePrivateKeySignerandSecp256k1Signertypes.mnemonic: enables BIP-39 mnemonic functionality for buildingPrivateKeySigners.secp256k1: enables theSecp256k1Signertype, an alternative signer implementation using thesecp256k1crate instead ofk256.yubihsm: enablesLocalSigners with YubiHSM2 support.
§Secp256k1 vs K256
This crate provides two ECDSA implementations:
PrivateKeySigner(default): Uses thek256crate, a pure Rust implementation.Secp256k1Signer(feature-gated): Uses thesecp256k1crate, 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;yubihsmpub use coins_bip39;mnemonic
Structs§
- Local
Signer - An Ethereum private-public key pair which can be used for signing messages.
- Mnemonic
Builder mnemonic - Represents a structure that can resolve into a
PrivateKeySigner. - Mnemonic
Signer Iter mnemonic - Iterator that generates signers from a mnemonic phrase by incrementing the derivation index.
- Secp256k1
Credential secp256k1 - A wrapper around
secp256k1::SecretKeythat implementsPrehashSigner.
Enums§
- Local
Signer Error - Error thrown by
LocalSigner. - Mnemonic
Builder Error mnemonic - Error produced by the mnemonic signer module.
Type Aliases§
- Private
KeySigner - A signer instantiated with a locally stored private key.
- Secp256k1
Signer secp256k1 - A signer instantiated with a locally stored private key, using the
secp256k1crate. - Yubi
Signer yubihsm - A signer instantiated with a YubiHSM.