Exemplo n.º 1
0
    def generateSerial(self):
        from crypto import _r as Random
        if self.serial:
            raise Exception(
                'Cannot generate a new serial when the serial is set.')

        self.serial = Random.getRandomString(128)
Exemplo n.º 2
0
    def __init__(self, target, blinds, coins, **kwargs):
        import base64
        from crypto import _r as Random
        self.transaction_id = Random.getRandomString(128)
        self.encoded_transaction_id = base64.b64encode(self.transaction_id)

        self.target = target
        self.blinds = blinds
        self.coins = [c.toPython() for c in coins]
        self.kwargs = kwargs

        Protocol.__init__(self)
        self.state = self.initiateHandshake
Exemplo n.º 3
0
    def __init__(self, target, blinds, coins, **kwargs):
        import base64
        from crypto import _r as Random
        self.transaction_id = Random.getRandomString(128)
        self.encoded_transaction_id = base64.b64encode(self.transaction_id)

        self.target = target
        self.blinds = blinds
        self.coins = [c.toPython() for c in coins]
        self.kwargs = kwargs

        Protocol.__init__(self)
        self.state = self.initiateHandshake
Exemplo n.º 4
0
    def __init__(self,coins,target):
        from containers import sumCurrencies

        self.coins = coins
        self.amount = sumCurrencies(coins)
        self.target = target
        
        import base64
        from crypto import _r as Random
        self.transaction_id = Random.getRandomString(128)
        self.encoded_transaction_id = base64.b64encode(self.transaction_id)

        Protocol.__init__(self)
        self.state = self.initiateHandshake
Exemplo n.º 5
0
    def __init__(self, coins, target):
        from containers import sumCurrencies

        self.coins = coins
        self.amount = sumCurrencies(coins)
        self.target = target

        import base64
        from crypto import _r as Random
        self.transaction_id = Random.getRandomString(128)
        self.encoded_transaction_id = base64.b64encode(self.transaction_id)

        Protocol.__init__(self)
        self.state = self.initiateHandshake
Exemplo n.º 6
0
 def generateSerial(self): 
     from crypto import _r as Random
     if self.serial:
         raise Exception('Cannot generate a new serial when the serial is set.')
     
     self.serial = Random.getRandomString(128)