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


Python Transaction.multisig_script方法代码示例

本文整理汇总了Python中transaction.Transaction.multisig_script方法的典型用法代码示例。如果您正苦于以下问题:Python Transaction.multisig_script方法的具体用法?Python Transaction.multisig_script怎么用?Python Transaction.multisig_script使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在transaction.Transaction的用法示例。


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

示例1: redeem_script

# 需要导入模块: from transaction import Transaction [as 别名]
# 或者: from transaction.Transaction import multisig_script [as 别名]
 def redeem_script(self, sequence):
     chain, i = sequence
     pubkey1 = self.get_pubkey(chain, i)
     pubkey2 = self.get_pubkey2(chain, i)
     pubkey3 = self.get_pubkey3(chain, i)
     keys = [pubkey1, pubkey2, pubkey3]
     keys.sort()
     return Transaction.multisig_script(keys, 2)
开发者ID:bpdavenport,项目名称:electrum,代码行数:10,代码来源:cryptocorp.py

示例2: createmultisig

# 需要导入模块: from transaction import Transaction [as 别名]
# 或者: from transaction.Transaction import multisig_script [as 别名]
 def createmultisig(self, num, pubkeys):
     assert isinstance(pubkeys, list)
     redeem_script = Transaction.multisig_script(pubkeys, num)
     address = hash_160_to_bc_address(hash_160(redeem_script.decode('hex')), 5)
     return {'address':address, 'redeemScript':redeem_script}
开发者ID:9cat,项目名称:electrum-tpc,代码行数:7,代码来源:commands.py

示例3: pubkeys_to_address

# 需要导入模块: from transaction import Transaction [as 别名]
# 或者: from transaction.Transaction import multisig_script [as 别名]
 def pubkeys_to_address(self, pubkeys):
     redeem_script = Transaction.multisig_script(sorted(pubkeys), self.m)
     address = hash_160_to_bc_address(hash_160(redeem_script.decode('hex')), 9)
     return address
开发者ID:MonetaryUnit,项目名称:electrum,代码行数:6,代码来源:account.py

示例4: redeem_script

# 需要导入模块: from transaction import Transaction [as 别名]
# 或者: from transaction.Transaction import multisig_script [as 别名]
 def redeem_script(self, for_change, n):
     pubkeys = self.get_pubkeys(for_change, n)
     return Transaction.multisig_script(sorted(pubkeys), self.m)
开发者ID:MonetaryUnit,项目名称:electrum,代码行数:5,代码来源:account.py

示例5: get_redeem_script

# 需要导入模块: from transaction import Transaction [as 别名]
# 或者: from transaction.Transaction import multisig_script [as 别名]
 def get_redeem_script(self, sequence):
     chain, i = sequence
     pubkey1 = self.get_pubkey(chain, i)
     pubkey2 = self.get_pubkey2(chain, i)
     pubkey3 = self.get_pubkey3(chain, i)
     return Transaction.multisig_script([pubkey1, pubkey2, pubkey3], 3)
开发者ID:moolah-io,项目名称:electrum,代码行数:8,代码来源:account.py

示例6: createmultisig

# 需要导入模块: from transaction import Transaction [as 别名]
# 或者: from transaction.Transaction import multisig_script [as 别名]
 def createmultisig(self, num, pubkeys):
     """Create multisig address"""
     assert isinstance(pubkeys, list), (type(num), type(pubkeys))
     redeem_script = Transaction.multisig_script(pubkeys, num)
     address = hash_160_to_bc_address(hash_160(redeem_script.decode("hex")), 5)
     return {"address": address, "redeemScript": redeem_script}
开发者ID:Gamecredits-Universe,项目名称:Gamecredits-electrum-client,代码行数:8,代码来源:commands.py

示例7: redeem_script

# 需要导入模块: from transaction import Transaction [as 别名]
# 或者: from transaction.Transaction import multisig_script [as 别名]
 def redeem_script(self, sequence):
     pubkeys = self.get_pubkeys(sequence)
     return Transaction.multisig_script(pubkeys, 2)
开发者ID:MrBitKoin,项目名称:electrum,代码行数:5,代码来源:account.py

示例8: pubkeys_to_address

# 需要导入模块: from transaction import Transaction [as 别名]
# 或者: from transaction.Transaction import multisig_script [as 别名]
 def pubkeys_to_address(self, pubkeys):
     redeem_script = Transaction.multisig_script(sorted(pubkeys), 2)
     address = hash_160_to_bc_address(hash_160(redeem_script.decode('hex')), self.active_chain.p2sh_version)
     return address
开发者ID:ELM4Ever,项目名称:encompass,代码行数:6,代码来源:account.py


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