Skip to content

Commit

Permalink
chia show keys --show-mnemonic-seed: Also show farmer private key (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
xearl4 authored Dec 1, 2023
1 parent 7d81440 commit fde036c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions chia/cmds/keys_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ def process_key_data(key_data: KeyData) -> Dict[str, Any]:

if show_mnemonic:
key["master_sk"] = bytes(sk).hex()
key["farmer_sk"] = bytes(master_sk_to_farmer_sk(sk)).hex()
key["wallet_sk"] = bytes(master_sk_to_wallet_sk(sk, uint32(0))).hex()
key["mnemonic"] = bytes_to_mnemonic(key_data.entropy)
return key
Expand All @@ -194,6 +195,7 @@ def process_key_data(key_data: KeyData) -> Dict[str, Any]:
print(f"First wallet address{' (non-observer)' if key['non_observer'] else ''}: {key['wallet_address']}")
if show_mnemonic:
print("Master private key (m):", key["master_sk"])
print("Farmer private key (m/12381/8444/0/0):", key["farmer_sk"])
print("First wallet secret key (m/12381/8444/2/0):", key["wallet_sk"])
print(" Mnemonic seed (24 secret words):")
print(key["mnemonic"])
Expand Down

0 comments on commit fde036c

Please sign in to comment.