Skip to content

Commit

Permalink
input extkey in hex
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Lee committed Aug 11, 2014
1 parent 038cfc3 commit 4f3ea69
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion kt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1410,7 +1410,12 @@ def outputExtKeysFromSeed(seed, chainStr, seedStringFormat, roundsToHash, option
traversePreorder(keyNodeSeed, treeChains, KeyTreeUtil.MASTER_NODE_LOWERCASE_M, optionsDict)

def outputExtKeysFromExtKey(extKey, chainStr, optionsDict, traverseType = DEFAULTTREETRAVERSALTYPE):
keyNode = KeyNode(extkey = DecodeBase58Check(extKey))
keyNode = None
try:
int(extKey, 16)
keyNode = KeyNode(extkey = extKey.decode('hex'))
except ValueError:
keyNode = KeyNode(extkey = DecodeBase58Check(extKey))

treeChains = KeyTreeUtil.parseChainString(chainStr)

Expand Down

0 comments on commit 4f3ea69

Please sign in to comment.