Example #1
0
 def __init__(self, d):
     Hardware_KeyStore.__init__(self, d)
     # Errors and other user interaction is done through the wallet's
     # handler.  The handler is per-window and preserved across
     # device reconnects
     self.force_watching_only = False
     self.signing = False
     self.cfg = d.get('cfg', {'mode': 0, 'pair': ''})
Example #2
0
    def dump(self):
        # our additions to the stored data about keystore -- only during creation?
        d = Hardware_KeyStore.dump(self)

        d['ckcc_xfp'] = self.ckcc_xfp
        d['ckcc_xpub'] = self.ckcc_xpub

        return d
Example #3
0
    def __init__(self, d):
        Hardware_KeyStore.__init__(self, d)
        # Errors and other user interaction is done through the wallet's
        # handler.  The handler is per-window and preserved across
        # device reconnects
        self.force_watching_only = False
        self.ux_busy = False

        # Seems like only the derivation path and resulting **derived** xpub is stored in
        # the wallet file... however, we need to know at least the fingerprint of the master
        # xpub to verify against MiTM, and also so we can put the right value into the subkey paths
        # of PSBT files that might be generated offline. 
        # - save the fingerprint of the master xpub, as "xfp"
        # - it's a LE32 int, but hex more natural way to see it
        # - device reports these value during encryption setup process
        lab = d['label']
        if hasattr(lab, 'xfp'):
            # initial setup
            self.ckcc_xfp = lab.xfp
            self.ckcc_xpub = lab.xpub
        else:
            # wallet load: fatal if missing, we need them!
            self.ckcc_xfp = d['ckcc_xfp']
            self.ckcc_xpub = d['ckcc_xpub']
Example #4
0
 def __init__(self, d):
     Hardware_KeyStore.__init__(self, d)
     self.force_watching_only = False
     self.maxInputs = 14  # maximum inputs per single sign command
Example #5
0
 def dump(self):
     obj = Hardware_KeyStore.dump(self)
     obj['cfg'] = self.cfg
     return obj