diff options
author | Determinant <[email protected]> | 2021-05-17 13:24:47 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2021-05-17 13:24:47 -0400 |
commit | 0471b3731fd24ef4e5d4c6d7a6a19e942b27dfa4 (patch) | |
tree | 79cae3a238eabdd648cafbb9fee9e69c73769635 | |
parent | b60df988b3d456b73a90a59e8b5cfe78e66f4002 (diff) |
...
-rw-r--r-- | README.rst | 6 | ||||
-rwxr-xr-x | keytree.py | 6 |
2 files changed, 6 insertions, 6 deletions
@@ -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 ------ @@ -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: |