aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.rst6
-rwxr-xr-xkeytree.py6
2 files changed, 6 insertions, 6 deletions
diff --git a/README.rst b/README.rst
index c9c4f4a..752b4fa 100644
--- a/README.rst
+++ b/README.rst
@@ -14,12 +14,6 @@ Examples
screen)
- Use arbitrary UTF-8 string as your mnemonic ``./keytree.py --custom --save mykeystore.json``
- Show Fuji testnet address format ``./keytree.py <your options> --hrp fuji``
-- Use Metamask's deriving algorithm: ``./keytree.py <your options>
- --path "44'/60'/0'/0"`` or ``./keytree.py <your options> --metamask``. By
- default, ETH addresses/keys use AVAX's deriving path (AVAX C-Chain
- keys/addresses) instead of Metamask's. To treat the mnemonic in Metamask's
- way, use ``--path``. Whatever deriving path is used, the generated
- individual key-address pair is always valid Ethereum format.
Caveat
------
diff --git a/keytree.py b/keytree.py
index 0f3166c..33c37ef 100755
--- a/keytree.py
+++ b/keytree.py
@@ -416,6 +416,12 @@ if __name__ == '__main__':
print("{}.priv(raw/ETH) 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)))
+
print("{}.addr(BTC) {}".format(i, get_btc_addr(pub)))
print("{}.addr(ETH) {}".format(i, get_eth_addr(pub)))
if args.export_mew: