Merge pull request #9 from armatusmiles/master

update create address for ETH
This commit is contained in:
Ran Aroussi 2018-02-07 14:59:53 +02:00 committed by GitHub
commit bcf569759c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,13 +30,14 @@ def create_address(network='btctest', xpub=None, child=None, path=0):
if network == 'ethereum' or network.upper() == 'ETH':
acct_pub_key = HDKey.from_b58check(xpub)
keys = HDKey.from_path(
acct_pub_key, '{change}/{index}'.format(change=path, index=child))
res = {
"path": "m/" + str(acct_pub_key.index) + "/" + str(keys[-1].index),
"path": "m/" + str(acct_pub_key.index) + "/" + str(keys[1].index),
"bip32_path": "m/44'/60'/0'/" + str(acct_pub_key.index) + "/" + str(keys[-1].index),
"address": keys[-1].address()
"address": keys[1].address()
}
if inspect.stack()[1][3] == "create_wallet":