当前位置: 首页>>代码示例>>Python>>正文


Python wallet.BIP32_Wallet类代码示例

本文整理汇总了Python中electrum.wallet.BIP32_Wallet的典型用法代码示例。如果您正苦于以下问题:Python BIP32_Wallet类的具体用法?Python BIP32_Wallet怎么用?Python BIP32_Wallet使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了BIP32_Wallet类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

 def __init__(self, storage):
     BIP32_Wallet.__init__(self, storage)
     self.wallet_type = '2fa'
     self.m = 2
     self.n = 3
     self.is_billing = False
     self.billing_info = None
开发者ID:phamthaithinh,项目名称:electrum,代码行数:7,代码来源:trustedcoin.py

示例2: sign_transaction

 def sign_transaction(self, tx, password):
     BIP32_Wallet.sign_transaction(self, tx, password)
     if tx.is_complete():
         return
     if not self.auth_code:
         self.print_error("sign_transaction: no auth code")
         return
     long_user_id, short_id = self.get_user_id()
     tx_dict = tx.as_dict()
     raw_tx = tx_dict["hex"]
     r = server.sign(short_id, raw_tx, self.auth_code)
     if r:
         raw_tx = r.get('transaction')
         tx.update(raw_tx)
     self.print_error("twofactor: is complete", tx.is_complete())
开发者ID:phamthaithinh,项目名称:electrum,代码行数:15,代码来源:trustedcoin.py

示例3: make_unsigned_transaction

 def make_unsigned_transaction(self, *args):
     tx = BIP32_Wallet.make_unsigned_transaction(self, *args)
     fee = self.extra_fee(tx)
     if fee:
         address = self.billing_info["billing_address"]
         tx.outputs.append(("address", address, fee))
     return tx
开发者ID:nmarley,项目名称:electrum,代码行数:7,代码来源:trustedcoin.py

示例4: make_unsigned_transaction

 def make_unsigned_transaction(self, coins, outputs, config,
                               fixed_fee=None, change_addr=None):
     tx = BIP32_Wallet.make_unsigned_transaction(
         self, coins, outputs, config, fixed_fee, change_addr)
     # Plain TX was good.  Now add trustedcoin fee.
     fee = self.extra_fee()
     if fee:
         address = self.billing_info['billing_address']
         outputs = outputs + [(TYPE_ADDRESS, address, fee)]
         try:
             return BIP32_Wallet.make_unsigned_transaction(
                 self, coins, outputs, config, fixed_fee, change_addr)
         except NotEnoughFunds:
             # trustedcoin won't charge if the total inputs is
             # lower than their fee
             if tx.input_value() >= fee:
                 raise
     return tx
开发者ID:bontaq,项目名称:electrum,代码行数:18,代码来源:trustedcoin.py

示例5: create

 def create(self):
     from electrum.wallet import BIP32_Wallet
     seed = BIP32_Wallet.make_seed()
     msg = _("If you forget your PIN or lose your device, your seed phrase will be the "
             "only way to recover your funds.")
     def on_ok(_dlg, _btn):
         _dlg.close()
         if _btn == _dlg.ids.confirm:
             self.run('confirm_seed', (seed,))
         else:
             self.run('new')
     ShowSeedDialog(message=msg, seed_text=seed, on_release=on_ok).open()
开发者ID:ChainEXS,项目名称:electrum,代码行数:12,代码来源:installwizard.py

示例6: make_unsigned_transaction

 def make_unsigned_transaction(self, coins, outputs, config,
                               fixed_fee=None, change_addr=None):
     mk_tx = lambda o: BIP32_Wallet.make_unsigned_transaction(
         self, coins, o, config, fixed_fee, change_addr)
     fee = self.extra_fee()
     if fee:
         address = self.billing_info['billing_address']
         fee_output = (TYPE_ADDRESS, address, fee)
         try:
             tx = mk_tx(outputs + [fee_output])
         except NotEnoughFunds:
             # trustedcoin won't charge if the total inputs is
             # lower than their fee
             tx = mk_tx(outputs)
             if tx.input_value() >= fee:
                 raise
             self.print_error("not charging for this tx")
     else:
         tx = mk_tx(outputs)
     return tx
开发者ID:phamthaithinh,项目名称:electrum,代码行数:20,代码来源:trustedcoin.py

示例7: synchronize

 def synchronize(self):
     # synchronize existing accounts
     BIP32_Wallet.synchronize(self)
开发者ID:edb1rd,项目名称:BTC,代码行数:3,代码来源:btchipwallet.py

示例8: __init__

 def __init__(self, storage):
     BIP32_Wallet.__init__(self, storage)
     self.wallet_type = '2fa'
     self.m = 2
     self.n = 3
开发者ID:keepkey,项目名称:electrum,代码行数:5,代码来源:trustedcoin.py

示例9: create_seed

 def create_seed(self):
     from electrum.wallet import BIP32_Wallet
     seed = BIP32_Wallet.make_seed()
     self.show_seed_dialog(run_next=self.confirm_seed, seed_text=seed)
开发者ID:CeeCeeCee,项目名称:electrum,代码行数:4,代码来源:base_wizard.py

示例10: create_seed

 def create_seed(self):
     from electrum.wallet import BIP32_Wallet
     seed = BIP32_Wallet.make_seed()
     msg = _("If you forget your PIN or lose your device, your seed phrase will be the "
             "only way to recover your funds.")
     self.show_seed_dialog(run_prev=self.new, run_next=self.confirm_seed, message=msg, seed_text=seed)
开发者ID:maksverver,项目名称:electrum,代码行数:6,代码来源:base_wizard.py


注:本文中的electrum.wallet.BIP32_Wallet类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。