From 9663600d5dd6529d19006777a97b5c9c3dd8ac12 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Mon, 31 Mar 2014 12:16:15 +0200 Subject: [PATCH] update bip32 derivations, using xpriv and xpub serialization format --- lib/bitcoin.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/bitcoin.py b/lib/bitcoin.py index 9945b82b..e22c1e7a 100644 --- a/lib/bitcoin.py +++ b/lib/bitcoin.py @@ -581,13 +581,12 @@ def CKD_pub(cK, c, n): def deserialize_xkey(xkey): xkey = DecodeBase58Check(xkey) assert len(xkey) == 78 - assert xkey[0:4].encode('hex') in ["0488ADE4", "0488B21E"] - assert sequence.startswith(branch) + assert xkey[0:4].encode('hex') in ["0488ade4", "0488b21e"] depth = ord(xkey[4]) fingerprint = xkey[5:9] child_number = xkey[9:13] c = xkey[13:13+32] - if xkey[0:4].encode('hex') == "0488ADE4": + if xkey[0:4].encode('hex') == "0488ade4": K_or_k = xkey[13+33:] else: K_or_k = xkey[13+32:]