Simple API to verify messages, files, or filehashes with Verus. WIP.
- Python 3
- requests
- Flask
- Flask-API
- flask_sslify
- ast
All configuration is handled in the rpc_api.conf file. There are two sections for configuring both the RPC information and the specifications for the API. The configuration options are as follows:
rpchostSpecifies the hostname for the RPC serverrpcconfSpecifies the configuration information for the RPC server, namely the port, username and password. This can either be given as the path to a configuration file, like VRSC.conf, or as a dictionary formatted like so:
confdict = { "rpcuser" : "$rpcuser", "rpcpassword" : "$rpcpassword", "rpcport" : $port }
apiportspecifies the port you want the API to run on, defaults to 5000.apihostSpecifies the host for the API, defaults to localhost. Set to 0.0.0.0 to be accessible from a network without a proxy/server.SSLToggles native ssl via yes|no, if yes, then you need to also specify the key and sertificatesSSL_KEYandSSL_CRTspecify the path/name for the SSL key and certificate respectively.
After setup, just run ./verusverifyapi.py
http://localhost:5000/verifymessage/?message=This%20is%20a%20test%20message&signer=jbsci@&signature=Af+4EQABQSA1qs5h3yc553W8ulMVU+cVhJgXnkXHeZyEvP7oX9Iiizq3LIY1kWCyrWromhRv7CO1mdViKffFd6jGku0SiCSM
In: /verifymessage/?message=<message>&signer=<signer>&signature=<signature>
out: { valid : true|false }
In: /verifyhash/?hash=<filehash>&signer=<signer>&signature=<signature>
out: { valid : true|false }
In: /getid/?id=<identity>
out: Identity information
- Messsages need to be properly URL encoded before being passed to API.