Esempio n. 1
0
 def TimeDeliveryTransaction(self):
     z = float(self.mydata[5])
     pka = self.mydata[14]
     timeoutdeliverytx, self.txidtimeoutdeliverytx, self.timeoutdeliverytx_1, self.timeoutdeliverytx_2 = tx.createone2onetx(
         self.txidtimeoutcommmitmenttx, 1, z, pka)
     jsontxt = common.raw2json(timeoutdeliverytx)
     k = json.dumps(jsontxt)
     self.textEdit.setText('Hex= ' + timeoutdeliverytx)
Esempio n. 2
0
 def TimeCommitmentTransaction(self):
     z = float(self.mydata[5])
     pkb = self.mydata[15]
     timeoutcommmitmenttx, self.txidtimeoutcommmitmenttx, self.timeoutcommmitmenttx_1, self.timeoutcommmitmenttx_2 = tx.createone2onetx(
         self.txidfundingtx, 0, z, pkb)
     jsontxt = common.raw2json(timeoutcommmitmenttx)
     k = json.dumps(jsontxt)
     self.textEdit.setText('Hex= ' + timeoutcommmitmenttx)
Esempio n. 3
0
 def CommitmentTransaction(self):
     z = float(self.mydata[5])
     pka = self.mydata[14]
     pkb = self.mydata[15]
     h = self.mydata[9]
     pkam = self.mydata[3]
     pkbm = self.mydata[18]
     nsequence = 'ffffffff'
     commitmenttx, self.txidcommitmenttx, self.redeemscriptb, self.commitmenttx_1, self.commitmenttx_2 = tx.createcommitmenttx(
         self.txidfundingtx, 0, z, pkam, h, pka, pkb, nsequence)
     jsontxt = common.raw2json(commitmenttx)
     k = json.dumps(jsontxt)
     self.textEdit.setText('Hex= ' + commitmenttx)
Esempio n. 4
0
 def TimeCommitmentTransaction(self):
     one2onetx_1 = self.tct[1]
     one2onetx_2 = self.tct[2]
     skb = self.mydata[16]
     redeemscripta = self.ft[1]
     ha1 = '6' + self.mydata[9][1:]
     sign_timeoutcommitmenttransaction, sigb2, self.txid3 = tx.sign_timeoutcommitmenttransaction(
         one2onetx_1, one2onetx_2, skb, redeemscripta, ha1)
     self.tx3 = sign_timeoutcommitmenttransaction
     self.sb3 = sigb2
     jsontxt = common.raw2json(sign_timeoutcommitmenttransaction)
     k = json.dumps(jsontxt)
     self.textEdit.setText('Txid= ' + self.txid3 + '\n' + 'Hex= ' +
                           sign_timeoutcommitmenttransaction + '\n' +
                           'Sigb2= ' + sigb2)
Esempio n. 5
0
    def TimeDeliveryTransaction(self):
        one2onetx_1 = self.tdt[1]
        one2onetx_2 = self.tdt[2]
        ska = self.mydata[13]
        skb = self.mydata[16]
        redeemscriptb = self.ct[1]
        hb1 = '6' + self.mydata[22][1:]
        sign_timeoutdeliverytransaction, siga2, self.txid5 = tx.sign_timeoutdeliverytransaction(
            one2onetx_1, one2onetx_2, ska, redeemscriptb, hb1)
        self.tx5 = sign_timeoutdeliverytransaction
        self.sa5 = siga2

        jsontxt = common.raw2json(sign_timeoutdeliverytransaction)
        k = json.dumps(jsontxt)
        self.textEdit.setText('Txid= ' + self.txid5 + '\n' + 'Hex= ' +
                              sign_timeoutdeliverytransaction + '\n' +
                              'Siga2= ' + siga2)
Esempio n. 6
0
 def DeliveryTransaction(self):
     one2onetx_1 = self.dt[1]
     one2onetx_2 = self.dt[2]
     ska = self.mydata[13]
     skb = self.mydata[16]
     redeemscriptb = self.ct[1]
     hb = self.mydata[22]
     sign_deliverytransaction, siga1, sigbm, self.txid4 = tx.sign_deliverytransaction(
         one2onetx_1, one2onetx_2, ska, skb, redeemscriptb, hb)
     self.tx4 = sign_deliverytransaction
     self.sa4 = siga1
     self.sb4 = sigbm
     jsontxt = common.raw2json(sign_deliverytransaction)
     k = json.dumps(jsontxt)
     self.textEdit.setText('Txid= ' + self.txid4 + '\n' + 'Hex= ' +
                           sign_deliverytransaction + '\n' + 'Siga1= ' +
                           siga1)
Esempio n. 7
0
 def CommitmentTransaction(self):
     commitmenttx_1 = self.ct[2]
     commitmenttx_2 = self.ct[3]
     ska = self.mydata[13]
     skb = self.mydata[16]
     redeemscripta = self.ft[1]
     ha = self.mydata[9]
     sign_commitmenttransaction, sigam, sigb1, self.txid2 = tx.sign_commitmenttransaction(
         commitmenttx_1, commitmenttx_2, ska, skb, redeemscripta, ha)
     self.tx2 = sign_commitmenttransaction
     self.sa2 = sigam
     self.sb2 = sigb1
     jsontxt = common.raw2json(sign_commitmenttransaction)
     k = json.dumps(jsontxt)
     self.textEdit.setText('Txid= ' + self.txid2 + '\n' + 'Hex= ' +
                           sign_commitmenttransaction + '\n' + 'Sigb1= ' +
                           sigb1)
Esempio n. 8
0
 def FundingTransaction(self):
     fundingtx_1 = self.ft[2]
     fundingtx_2 = self.ft[3]
     fundingtx_3 = self.ft[4]
     pka = self.mydata[14]
     ska = self.mydata[13]
     pkb = self.mydata[15]
     skb = self.mydata[16]
     #print fundingtx_1, fundingtx_2,fundingtx_3, pka,ska, pkb, skb
     sign_fundingtransaction, siga, sigb, self.txid1 = tx.sign_fundingtransaction(
         fundingtx_1, fundingtx_2, fundingtx_3, pka, ska, pkb, skb)
     self.tx1 = sign_fundingtransaction
     self.sa1 = siga
     self.sb1 = sigb
     jsontxt = common.raw2json(sign_fundingtransaction)
     k = json.dumps(jsontxt)
     self.textEdit.setText('Txid= ' + self.txid1 + '\n' + 'Hex= ' +
                           sign_fundingtransaction + '\n' + 'Siga= ' +
                           siga + '\n' + 'Sigb= ' + sigb)
Esempio n. 9
0
 def FundingTransaction(self):
     data = self.showDialog()
     if data[0]:
         pre_txid1 = data[1]
         voutx1 = int(data[2])
         pre_txid2 = data[3]
         voutx2 = int(data[4])
         #print voutx1,voutx2
         z = float(self.mydata[5])
         ha = self.mydata[9]
         pkb = self.mydata[15]
         pkam = self.mydata[3]
         pka = self.mydata[14]
         nsequence = 'ffffffff'
         fundingtx, self.txidfundingtx, self.redeemscripta, self.fundingtx_1, self.fundingtx_2, self.fundingtx_3 = tx.createfundingtx(
             pre_txid1, voutx1, pre_txid2, voutx2, z, ha, pkb, pka,
             nsequence)
         jsontxt = common.raw2json(fundingtx)
         k = json.dumps(jsontxt)
         self.textEdit.setText('Hex= ' + fundingtx)