How to use the tinyrpc.dispatch.public function in tinyrpc

To help you get started, we’ve selected a few tinyrpc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github MatrixAINetwork / go-matrix / run / clef / pythonsigner.py View on Github external
    @public
    def ApproveNewAccount(self, req):
        """
        Example request

        :return:
        """
        return {"approved": False,
                #"password": ""
github MatrixAINetwork / go-matrix / cmd / clef / pythonsigner.py View on Github external
    @public
    def ApproveTx(self,req):
        """
        Example request:
        {
            "jsonrpc": "2.0",
            "method": "ApproveTx",
            "params": [{
                "transaction": {
                    "to": "0xae967917c465db8578ca9024c205720b1a3651A9",
                    "gas": "0x333",
                    "gasPrice": "0x123",
                    "value": "0x10",
                    "data": "0xd7a5865800000000000000000000000000000000000000000000000000000000000000ff",
                    "nonce": "0x0"
                },
                "from": "0xAe967917c465db8578ca9024c205720b1a3651A9",
github MatrixAINetwork / go-matrix / run / clef / pythonsigner.py View on Github external
    @public
    def ApproveSignData(self, req):
        """ Example request

        """
        return {"approved": False, "password" : None}
github MatrixAINetwork / go-matrix / cmd / clef / pythonsigner.py View on Github external
    @public
    def ShowInfo(self,message = {}):
        """
        Example request
        {"jsonrpc":"2.0","method":"ShowInfo","params":{"message":"Testing 'ShowInfo'"},"id":0}

        :param message: to display
        :return:nothing
        """

        if 'text' in message.keys():
            sys.stdout.write("Error: {}\n".format( message['text']))
        return
github MatrixAINetwork / go-matrix / cmd / clef / pythonsigner.py View on Github external
    @public
    def ApproveNewAccount(self, req):
        """
        Example request

        :return:
        """
        return {"approved": False,
                #"password": ""
github MatrixAINetwork / go-matrix / run / clef / pythonsigner.py View on Github external
    @public
    def ShowError(self,message = {}):
        """
        Example request:

        {"jsonrpc":"2.0","method":"ShowInfo","params":{"message":"Testing 'ShowError'"},"id":1}

        :param message: to show
        :return: nothing
        """
        if 'text' in message.keys():
            sys.stderr.write("Error: {}\n".format( message['text']))
        return
github MatrixAINetwork / go-matrix / cmd / clef / pythonsigner.py View on Github external
    @public
    def ShowError(self,message = {}):
        """
        Example request:

        {"jsonrpc":"2.0","method":"ShowInfo","params":{"message":"Testing 'ShowError'"},"id":1}

        :param message: to show
        :return: nothing
        """
        if 'text' in message.keys():
            sys.stderr.write("Error: {}\n".format( message['text']))
        return
github MatrixAINetwork / go-matrix / run / clef / pythonsigner.py View on Github external
    @public
    def ApproveImport(self, req):
        """ Example request

        """
        return { "approved" : False, "old_password": "", "new_password": ""}
github MatrixAINetwork / go-matrix / cmd / clef / pythonsigner.py View on Github external
    @public
    def ApproveExport(self, req):
        """ Example request

        """
        return {"approved" : False}
github MatrixAINetwork / go-matrix / cmd / clef / pythonsigner.py View on Github external
    @public
    def ApproveListing(self, req):
        """ Example request

        """
        return {'accounts': []}