URI: 
       toffline signing with seed_v4 - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 67d185d7f0878e9862b845a2cdd85a86524c3975
   DIR parent cf38e1e47c80cbaff0d63edfc83276c072523cb5
  HTML Author: ThomasV <thomasv@gitorious>
       Date:   Fri,  1 Nov 2013 13:31:13 +0100
       
       offline signing with seed_v4
       
       Diffstat:
         M lib/wallet.py                       |      22 +++++++++++++++++++++-
       
       1 file changed, 21 insertions(+), 1 deletion(-)
       ---
   DIR diff --git a/lib/wallet.py b/lib/wallet.py
       t@@ -650,7 +650,9 @@ class Wallet:
        
            def get_keyID(self, account, sequence):
                if account == 0:
       -            return 'old'
       +            a, b = sequence
       +            mpk = self.storage.get('master_public_key')
       +            return 'old(%s,%d,%d)'%(mpk,a,b)
        
                rs = self.rebase_sequence(account, sequence)
                dd = []
       t@@ -720,6 +722,24 @@ class Wallet:
                for txin in tx.inputs:
                    keyid = txin.get('KeyID')
                    if keyid:
       +
       +                if self.seed_version==4:
       +                    m = re.match("old\(([0-9a-f]+),(\d+),(\d+)", keyid)
       +                    if not m: continue
       +                    mpk = m.group(1)
       +                    if mpk != self.storage.get('master_public_key'): continue 
       +                    index = int(m.group(2))
       +                    num = int(m.group(3))
       +                    account = self.accounts[0]
       +                    addr = account.get_address(index, num)
       +                    txin['address'] = addr # fixme: side effect
       +                    pk = self.get_private_key(addr, password)
       +                    for sec in pk:
       +                        pubkey = public_key_from_private_key(sec)
       +                        keypairs[pubkey] = sec
       +                    continue
       +
       +
                        roots = []
                        for s in keyid.split('&'):
                            m = re.match("bip32\(([0-9a-f]+),([0-9a-f]+),(/\d+/\d+/\d+)", s)