示例#1
0
 def serialize(self):
     assert (len(self.regTxHash) == 32
             and len(self.hashPrevSubTx) == 32
             and len(self.payloadSig) == 96)
     return (
         pack_le_uint16(self.version) +              # version
         self.regTxHash +                            # regTxHash
         self.hashPrevSubTx +                        # hashPrevSubTx
         pack_le_int64(self.creditFee) +             # creditFee
         self.payloadSig                             # payloadSig
     )
示例#2
0
 def serialize(self):
     return b''.join((
         pack_le_int64(self.value),
         pack_varbytes(self.pk_script),
     ))