aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2021-06-15 22:51:06 -0400
committerDeterminant <[email protected]>2021-06-15 22:51:06 -0400
commitaa2a362eaeb8631f6fa15513cfda531303131af7 (patch)
treee8a4c7a3c05e1c625ee824a5080d9799a1864396
parent479abc295aae0105f59d63efcbef36fbb3dd1094 (diff)
show C-Chain private keys (can be imported to metamask)
-rwxr-xr-xkeytree.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/keytree.py b/keytree.py
index 33c37ef..73c919f 100755
--- a/keytree.py
+++ b/keytree.py
@@ -413,14 +413,16 @@ if __name__ == '__main__':
pub = priv.get_verifying_key()
cpub = pub.to_string(encoding="compressed")
if args.show_private:
- print("{}.priv(raw/ETH) 0x{}".format(i, priv.to_string().hex()))
+ print("{}.priv(raw/ETH/X) 0x{}".format(i, priv.to_string().hex()))
print("{}.priv(BTC) {}".format(i, get_privkey_btc(priv)))
print("{}.addr(AVAX) (X/P)-{}".format(i, bech32.bech32_encode(args.hrp, bech32.convertbits(ripemd160(sha256(cpub)), 8, 5))))
path2 = "m/{}/{}".format(metamask_path, i)
priv2 = gen.derive(path2)
pub2 = priv2.get_verifying_key()
- print("{}.addr(AVAX) (C) {}".format(i, get_eth_addr(pub2)))
+ if args.show_private:
+ print("{}.priv(AVAX-C) 0x{}".format(i, priv2.to_string().hex()))
+ print("{}.addr(AVAX-C) {}".format(i, get_eth_addr(pub2)))
print("{}.addr(BTC) {}".format(i, get_btc_addr(pub)))
print("{}.addr(ETH) {}".format(i, get_eth_addr(pub)))