コード例 #1
0
ファイル: cosigner_pool.py プロジェクト: 1gabo/electrum
 def do_send(self, tx):
     for xpub, K, _hash in self.cosigner_list:
         if not self.cosigner_can_sign(tx, xpub):
             continue
         message = bitcoin.encrypt_message(tx.raw, K)
         try:
             server.put(_hash, message)
         except Exception as e:
             self.win.show_message(str(e))
             return
     self.win.show_message("Your transaction was sent to the cosigning pool.\nOpen your cosigner wallet to retrieve it.")
コード例 #2
0
ファイル: cosigner_pool.py プロジェクト: venzen/electrum
 def do_send(self, tx):
     for xpub, K, _hash in self.cosigner_list:
         if not self.cosigner_can_sign(tx, xpub):
             continue
         message = bitcoin.encrypt_message(tx.raw, K)
         try:
             server.put(_hash, message)
         except Exception as e:
             self.win.show_message(str(e))
             return
     self.win.show_message("Your transaction was sent to the cosigning pool.\nOpen your cosigner wallet to retrieve it.")
コード例 #3
0
ファイル: qt.py プロジェクト: bygage/electrum
 def do_send(self, tx):
     for window, xpub, K, _hash in self.cosigner_list:
         if not self.cosigner_can_sign(tx, xpub):
             continue
         message = bitcoin.encrypt_message(bfh(tx.raw), bh2u(K)).decode('ascii')
         try:
             server.put(_hash, message)
         except Exception as e:
             traceback.print_exc(file=sys.stdout)
             window.show_message("Failed to send transaction to cosigning pool.")
             return
         window.show_message("Your transaction was sent to the cosigning pool.\nOpen your cosigner wallet to retrieve it.")
コード例 #4
0
 def do_send(self, tx):
     for window, xpub, K, _hash in self.cosigner_list:
         if not self.cosigner_can_sign(tx, xpub):
             continue
         message = bitcoin.encrypt_message(bfh(tx.raw), bh2u(K)).decode('ascii')
         try:
             server.put(_hash, message)
         except Exception as e:
             traceback.print_exc(file=sys.stdout)
             window.show_message("Failed to send transaction to cosigning pool.")
             return
         window.show_message("Your transaction was sent to the cosigning pool.\nOpen your cosigner wallet to retrieve it.")
コード例 #5
0
    def doEncrypt(self) -> None:
        message = self.topTvDel.text
        message = message.encode('utf-8')
        pubkey = self.tf.text.strip()
        encryptedTVDel = self.botTvDel

        if not pubkey:
            parent().show_message(
                _("Please provide a public key or select an address"))
            return

        try:
            encrypted = bitcoin.encrypt_message(message, pubkey)
            encryptedTVDel.text = str(encrypted.decode('ascii'))
        except BaseException as e:
            traceback.print_exc(file=sys.stdout)
            parent().show_error(str(e))
コード例 #6
0
ファイル: qt.py プロジェクト: wahidmounir/electrum
 def do_send(self, tx):
     for window, xpub, K, _hash in self.cosigner_list:
         if not self.cosigner_can_sign(tx, xpub):
             continue
         raw_tx_bytes = bfh(str(tx))
         message = bitcoin.encrypt_message(raw_tx_bytes,
                                           bh2u(K)).decode('ascii')
         try:
             server.put(_hash, message)
         except Exception as e:
             traceback.print_exc(file=sys.stdout)
             window.show_error(
                 _("Failed to send transaction to cosigning pool") + ':\n' +
                 str(e))
             return
         window.show_message(
             _("Your transaction was sent to the cosigning pool.") + '\n' +
             _("Open your cosigner wallet to retrieve it."))