Ejemplo n.º 1
0
    def connectToIS(self, currency_description_document):
        """sets up the isMessageType and links the callbacks."""
        client = MessageStatuses.getBaseClient()
        self.isMessageType = MessageType(client)

        # Add handlers for all the messages using isMessages if it continues the conversation
        self.isMessageType.addMessageHandler(MintingKeyFetchKeyID())
        self.isMessageType.addMessageHandler(MintingKeyFetchDenomination())
        #self.isMessageType.addMessageHandler(self.isMessages.MKP)
        #self.isMessageType.addMessageHandler(self.isMessages.MKF)
        self.isMessageType.addMessageHandler(
            MintingKeyPass()
        )  # These normally would continue, but are folded into BlankAndMintingKey
        self.isMessageType.addMessageHandler(
            MintingKeyFailure()
        )  # These normally would continue, but are folded into BlankAndMintingKey
        self.isMessageType.addMessageHandler(MintRequest())
        self.isMessageType.addMessageHandler(self.isMessages.MA)
        self.isMessageType.addMessageHandler(self.isMessages.MR)
        self.isMessageType.addMessageHandler(FetchMintedRequest())
        self.isMessageType.addMessageHandler(self.isMessages.FMF)
        self.isMessageType.addMessageHandler(self.isMessages.FMW)
        self.isMessageType.addMessageHandler(self.isMessages.FMA)
        self.isMessageType.addMessageHandler(RedeemCoinsRequest())
        self.isMessageType.addMessageHandler(self.isMessages.RCR)
        self.isMessageType.addMessageHandler(self.isMessages.RCA)

        self.entity.connectToIS(self.isMessageType,
                                currency_description_document)
    def connectToIS(self, currency_description_document):
        """sets up the isMessageType and links the callbacks."""
        client = MessageStatuses.getBaseClient()
        self.isMessageType = MessageType(client)
        
        # Add handlers for all the messages, using isMessages if continues conversation
        self.isMessageType.addMessageHandler(DSDBKeyRequest())
        self.isMessageType.addMessageHandler(self.isMessages.DKP)

        self.entity.connectToIS(self.isMessageType, currency_description_document)

        #FIXME: This is one of many places we enforce the one currency at a time
        self.cdd = currency_description_document
Ejemplo n.º 3
0
    def connectToDSDB(self, dsdb_certificate):
        """sets up the dsdbMessageType and links the callbacks."""
        client = MessageStatuses.getBaseClient()
        self.dsdbMessageType = MessageType(client)

        # Add handlers for all the messages using dsdbMessages if it continues conversation
        self.dsdbMessageType.addMessageHandler(LockCoinsRequest())
        self.dsdbMessageType.addMessageHandler(self.dsdbMessages.LCF)
        self.dsdbMessageType.addMessageHandler(self.dsdbMessages.LCA)
        self.dsdbMessageType.addMessageHandler(UnlockCoinsRequest())
        self.dsdbMessageType.addMessageHandler(self.dsdbMessages.UCF)
        self.dsdbMessageType.addMessageHandler(self.dsdbMessages.UCP)

        self.entity.connectToDSDB(self.dsdbMessageType, dsdb_certificate)
    def connectToDSDB(self, dsdb_certificate):
        """sets up the dsdbMessageType and links the callbacks."""
        client = MessageStatuses.getBaseClient()
        self.dsdbMessageType = MessageType(client)

        # Add handlers for all the messages using dsdbMessages if it continues conversation
        self.dsdbMessageType.addMessageHandler(LockCoinsRequest())
        self.dsdbMessageType.addMessageHandler(self.dsdbMessages.LCF)
        self.dsdbMessageType.addMessageHandler(self.dsdbMessages.LCA)
        self.dsdbMessageType.addMessageHandler(UnlockCoinsRequest())
        self.dsdbMessageType.addMessageHandler(self.dsdbMessages.UCF)
        self.dsdbMessageType.addMessageHandler(self.dsdbMessages.UCP)        

        self.entity.connectToDSDB(self.dsdbMessageType, dsdb_certificate)
    def connectToIS(self, currency_description_document):
        """sets up the isMessageType and links the callbacks."""
        client = MessageStatuses.getBaseClient()
        self.isMessageType = MessageType(client)

        # Add handlers for all the messages, using isMessages if continues conversation
        self.isMessageType.addMessageHandler(DSDBKeyRequest())
        self.isMessageType.addMessageHandler(self.isMessages.DKP)

        self.entity.connectToIS(self.isMessageType,
                                currency_description_document)

        #FIXME: This is one of many places we enforce the one currency at a time
        self.cdd = currency_description_document
    def connectToIS(self, currency_description_document):
        """sets up the isMessageType and links the callbacks."""
        client = MessageStatuses.getBaseClient()
        self.isMessageType = MessageType(client)

        # Add handlers for all the messages using isMessages if it continues the conversation
        self.isMessageType.addMessageHandler(MintingKeyFetchKeyID())
        self.isMessageType.addMessageHandler(MintingKeyFetchDenomination())
        #self.isMessageType.addMessageHandler(self.isMessages.MKP)
        #self.isMessageType.addMessageHandler(self.isMessages.MKF)
        self.isMessageType.addMessageHandler(MintingKeyPass()) # These normally would continue, but are folded into BlankAndMintingKey
        self.isMessageType.addMessageHandler(MintingKeyFailure()) # These normally would continue, but are folded into BlankAndMintingKey
        self.isMessageType.addMessageHandler(MintRequest())
        self.isMessageType.addMessageHandler(self.isMessages.MA)
        self.isMessageType.addMessageHandler(self.isMessages.MR)
        self.isMessageType.addMessageHandler(FetchMintedRequest())
        self.isMessageType.addMessageHandler(self.isMessages.FMF)
        self.isMessageType.addMessageHandler(self.isMessages.FMW)
        self.isMessageType.addMessageHandler(self.isMessages.FMA)
        self.isMessageType.addMessageHandler(RedeemCoinsRequest())
        self.isMessageType.addMessageHandler(self.isMessages.RCR)
        self.isMessageType.addMessageHandler(self.isMessages.RCA)
    
        self.entity.connectToIS(self.isMessageType, currency_description_document)