alice.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:CoinSwapCS 作者: AdamISZ 项目源码 文件源码
def send_tx4_sig(self):
        """Send partial signature on TX4 (out of TX0)
        to Carol for her to complete sign and broadcast.
        """
        utxo_in = self.tx0.txid + ":" + str(self.tx0.pay_out_index)
        self.tx4 = CoinSwapTX45.from_params(self.coinswap_parameters.pubkeys["key_2_2_AC_0"],
                                        self.coinswap_parameters.pubkeys["key_2_2_AC_1"],
                                        utxo_in=utxo_in,
                                        destination_address=self.coinswap_parameters.output_addresses["tx4_address"],
                                        destination_amount=self.coinswap_parameters.tx4_amounts["carol"],
                                        carol_change_address=None,
                                        carol_change_amount=None)
        self.tx4.sign_at_index(self.keyset["key_2_2_AC_0"][0], 0)
        sig = self.tx4.signatures[0][0]
        self.send(sig, self.tx5.txid)
        self.tx4broadcast_counter = 0
        self.loop_tx4 = task.LoopingCall(self.wait_for_tx4_confirmation)
        self.loop_tx4.start(3.0)
        return (True, "TX4 signature sent.")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号