22 eth_addr_file: Optional[str],
23 eth_private_key_file: Optional[str],
24 use_private_key: Optional[str]) ->
None:
26 Locally generate a new Ethereum private key and address file, and write
27 them to the current directory.
30 "*** WARNING: this address should not be used in production ***\n")
32 eth_addr_file = eth_addr_file
or ETH_ADDRESS_DEFAULT
33 eth_private_key_file = eth_private_key_file
or ETH_PRIVATE_KEY_FILE_DEFAULT
36 eth_private_key = bytes.fromhex(use_private_key)
40 if len(eth_private_key) != 32:
41 raise ClickException(
"invalid private key length")
47 f
"{eth_address}: written to {eth_addr_file}, "
48 f
"private key to {eth_private_key_file}")