| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A Decentralized API for Axe Masternodes
Since this module contains private dependencies, please ensure you have access via GitHub and that your SSH keys are set appropriately.
npm installDAPI targets the latest LTS release of Node.js. Currently, this is Node v10.13.
DAPI requires Insight-API and the latest version of axecore with evolution features (special branch repo).
After you've installed all the dependencies, you can start DAPI by running the npm start command inside the DAPI repo directory.
npm startDAPI is configured via environment variables either explicitly passed or present in the .env dotfile. For example, to change the DAPI port, execute DAPI with the following arguments: RPC_SERVER_PORT=3010 npm start. Consult the sample environment file. You can see the full list of available options here.
DAPI uses JSON-RPC 2.0 as the main interface. If you want to confirm that DAPI is functioning and synced, you can request the best block height.
Send the following json to your DAPI instance:
{"jsonrpc": "2.0","method": "getBestBlockHeight", "id": 1}Note that you always need to specify an id, otherwise the server will respond with an empty body, as mentioned in the spec.
A list of all available RPC commands, along with their various arguments and expected responses can be found here
Implementation of these commands can be viewed here.
Feel free to dive in! Open an issue or submit PRs.
MIT © Axe Core Group, Inc.
| Back | FazBrowse Home | New Git URL |