From aa2a362eaeb8631f6fa15513cfda531303131af7 Mon Sep 17 00:00:00 2001 From: Determinant Date: Tue, 15 Jun 2021 22:51:06 -0400 Subject: show C-Chain private keys (can be imported to metamask) --- keytree.py | 6 ++++-- 1 file 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))) -- cgit v1.2.3-70-g09d2