本文整理汇总了Python中electrum.wallet.BIP32_Wallet.make_unsigned_transaction方法的典型用法代码示例。如果您正苦于以下问题:Python BIP32_Wallet.make_unsigned_transaction方法的具体用法?Python BIP32_Wallet.make_unsigned_transaction怎么用?Python BIP32_Wallet.make_unsigned_transaction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类electrum.wallet.BIP32_Wallet
的用法示例。
在下文中一共展示了BIP32_Wallet.make_unsigned_transaction方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: make_unsigned_transaction
# 需要导入模块: from electrum.wallet import BIP32_Wallet [as 别名]
# 或者: from electrum.wallet.BIP32_Wallet import make_unsigned_transaction [as 别名]
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
示例2: make_unsigned_transaction
# 需要导入模块: from electrum.wallet import BIP32_Wallet [as 别名]
# 或者: from electrum.wallet.BIP32_Wallet import make_unsigned_transaction [as 别名]
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
示例3: make_unsigned_transaction
# 需要导入模块: from electrum.wallet import BIP32_Wallet [as 别名]
# 或者: from electrum.wallet.BIP32_Wallet import make_unsigned_transaction [as 别名]
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