def from_drkv(drkv): xtype, depth, fingerprint, child_number, c, k = deserialize_drkv(drkv) xprv = serialize_xprv(xtype, c, k, depth, fingerprint, child_number) xpub = bitcoin.xpub_from_xprv(xprv) k = BIP32_KeyStore({}) k.xprv = xprv k.xpub = xpub return k
def from_xprv(xprv): xpub = bitcoin.xpub_from_xprv(xprv) k = BIP32_KeyStore({}) k.xprv = xprv k.xpub = xpub return k
def add_xprv(self, xprv): self.xprv = xprv self.xpub = bitcoin.xpub_from_xprv(xprv)
def from_xprv(xprv, password): xpub = bitcoin.xpub_from_xprv(xprv) keystore = BIP32_KeyStore() keystore.add_master_private_key(xprv, password) keystore.add_master_public_key(xpub) return keystore
def add_xprv(self, xprv, password): xpub = bitcoin.xpub_from_xprv(xprv) self.add_master_private_key(xprv, password) self.add_master_public_key(xpub)