Skip to main content

Flexible Ethereum key management and signing library supporting local and external backends.

Project description

eth-hub - Ethereum Key Management Toolkit

CI/CD pre-commit

PyPI Version PyPI - Status

Python Versions License

A secure abstraction layer for managing Ethereum keys across different storage backends.

Key Features

🔐 Secure Key Management

  • Unified interface for multiple key storage providers
  • Never exposes private keys outside secure environments
  • Will support both software and hardware security modules

📜 Complete Signing Capabilities

  • Transaction signing
  • Message signing (EIP-191 compatible)
  • Hash signing
  • Consistent signature output format

Core Architecture

from eth_hub import (
    BaseKeyStore,  # Abstract base class
    AwsKeyStore,  # AWS KMS implementation
    LocalKeyStore  # In-memory implementation
)

BaseKeyStore (ABC)

The abstract base class defining all key operations:

class BaseKeyStore(ABC):
    @abstractmethod
    def import_key(self, private_key: bytes) -> BaseKey: ...

    @abstractmethod
    def create_key(self) -> BaseKey: ...

    @abstractmethod
    def get_key(self, key_id: UUID) -> BaseKey: ...

    @abstractmethod
    def list_keys(self) -> Sequence[BaseKey]: ...

    @abstractmethod
    def remove_key(self, key_id: UUID) -> None: ...

    @abstractmethod
    def sign_hash(self, key_id: UUID, hash_: bytes) -> SignatureInfo: ...

    @abstractmethod
    def sign_message(self, key_id: UUID, message: SignableMessage) -> SignatureInfo: ...

    @abstractmethod
    def sign_transaction(self, key_id: UUID, transaction_data: dict[str, Any]) -> SignatureInfo: ...

Current Implementations

1. AWS KMS KeyStore

  • Keys never leave AWS KMS
  • All signing operations performed within KMS
  • Supports both imported and KMS-generated keys

2. LocalKeyStore (Memory)

  • In-memory key storage for development/testing
  • Simulates same interface as other stores
  • Useful for CI/CD pipelines and local testing

3. HashiCorp Vaul - WiP

Planned Features:

  • Integration with HashiCorp Vault's

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eth_hub-0.1.2.tar.gz (59.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eth_hub-0.1.2-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file eth_hub-0.1.2.tar.gz.

File metadata

  • Download URL: eth_hub-0.1.2.tar.gz
  • Upload date:
  • Size: 59.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.2

File hashes

Hashes for eth_hub-0.1.2.tar.gz
Algorithm Hash digest
SHA256 0e24425ee8dd6ddd451c8be1274d46a1abf50598043ac8a797c15e08c534852b
MD5 8d53737134a8bea40ff61b48e3daf589
BLAKE2b-256 d8175b54b3ef5c23dc0f0f391ef1c0c6a9871d7af9efb3e3337b721aa4e9b5e8

See more details on using hashes here.

File details

Details for the file eth_hub-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: eth_hub-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.2

File hashes

Hashes for eth_hub-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1444f14842539f25b2daf7d32eedfea79c08d1caa58d471c6cf078ce5c0ecd0d
MD5 787b7c388ba1dde3667243aff271295a
BLAKE2b-256 f652100990801d9cf5673a3a89b7de1c068239e8a6a3aa96fd7c0f4bb867f601

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page