Skip to main content

A Python library for transection signing using AWS Key Management Service.

Project description

eth-signer

A Python library for transection signing using AWS Key Management Service.

Dependencies

  • Python 3.5+

QuickStart

This Package is available on PyPI. Install via pip as:

  pip install eth-signer

Usage

  1. Instantiate eth signer client
import boto3
from eth_signer import AWSKMSKey
from web3 import Web3


kms_client = boto3.client('kms', 'us-east-1')
key_id = "XX0000XX-00XX-00XX-00XX-XXXX0000XXXX"
kms_signer = AWSKMSKey(kms_client, key_id)

web3 = Web3(Web3.HTTPProvider(node_url))
contract = web3.eth.contract(address=address, abi=abi)

tx_obj = contract.functions.function_name().buildTransaction(
     {
          "nonce": nonce,
          "from": address,
     }
)

signed_tx = AWSKMSKey.sign_transaction(tx_obj)
tx_hash = signed_tx.hash
web3.eth.send_raw_transaction(signed_tx.rawTransaction)

Features

  • Support for EIP-2718 (Typed Transaction) and EIP-2939 (Access List Transaction)
  • Support for EIP-1559 (Dynamic Fee Transaction)

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-signer-0.1.1.tar.gz (6.5 kB view details)

Uploaded Source

File details

Details for the file eth-signer-0.1.1.tar.gz.

File metadata

  • Download URL: eth-signer-0.1.1.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.21.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.3

File hashes

Hashes for eth-signer-0.1.1.tar.gz
Algorithm Hash digest
SHA256 37490d30d98e33f5503113e658138bcc01e186c82f6643d257479edfed331c9a
MD5 934230ed3b0d5c7b56d91329eb1efa61
BLAKE2b-256 afc7b904603c000a7901e6f3b36fe61dbec16a3aec775556b0479d78513a65b7

See more details on using hashes here.

Supported by

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