Esempio n. 1
0
 def btc_xpub(
     self,
     keypath: Sequence[int],
     coin: btc.BTCCoin = btc.BTC,
     xpub_type: btc.BTCPubRequest.XPubType = btc.BTCPubRequest.XPUB,
     display: bool = True,
 ) -> str:
     """
     keypath is a list of child derivation numbers.
     e.g. m/44'/0'/1' corresponds to [44+HARDENED, 0+HARDENED, 1+HARDENED].
     """
     # pylint: disable=no-member,too-many-arguments
     request = hww.Request()
     request.btc_pub.CopyFrom(
         btc.BTCPubRequest(coin=coin, keypath=keypath, xpub_type=xpub_type, display=display)
     )
     return self._msg_query(request).pub.pub
Esempio n. 2
0
 def btc_address(
     self,
     keypath: Sequence[int],
     coin: btc.BTCCoin = btc.BTC,
     script_config: btc.BTCScriptConfig = btc.BTCScriptConfig(
         simple_type=btc.BTCScriptConfig.P2WPKH),
     display: bool = True,
 ) -> str:
     """
     keypath is a list of child derivation numbers.
     e.g. m/44'/0'/1'/5/10 corresponds to [44+HARDENED, 0+HARDENED, 1+HARDENED, 5, 10].
     """
     # pylint: disable=no-member,too-many-arguments
     request = hww.Request()
     request.btc_pub.CopyFrom(
         btc.BTCPubRequest(coin=coin,
                           keypath=keypath,
                           script_config=script_config,
                           display=display))
     return self._msg_query(request).pub.pub