npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@axerunners/dapi

v0.0.1

Published

A Decentralized API for AXE Masternodes

Downloads

4

Readme

DAPI

Build Status NPM version API stability

A Decentralized API for Axe Masternodes

Table of Contents

Install

Since this module contains private dependencies, please ensure you have access via GitHub and that your SSH keys are set appropriately.

npm install

Dependencies

DAPI 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).

  1. Install core. You can use the docker image (axecore:evo) or clone code from the repository, switch to the evo branch, and build it by yourself. Note: you need to build image with ZMQ and wallet support. You can follow the build instructions located here
  2. Configure core. DAPI needs axecore's ZMQ interface to be exposed and all indexes enabled. You can find the example config for axecore here. To start axecore process with this config, copy it somewhere to your system, and then run ./src/axed -conf=/path/to/your/config.
  3. Install Insight-API. You can use docker image (evoinsight:latest) or install it manually.
    1. To install it manually, clone the axecore-node repo. cd to that repo, run npm i
    2. Copy config file to the repo directory
    3. Install Insight-API service. Run ./bin/axecore-node install https://github.com/axerunners/insight-api/ from the repo directory
    4. Run ./bin/axecore-node start

Usage

After you've installed all the dependencies, you can start DAPI by running the npm start command inside the DAPI repo directory.

npm start

Configuration

DAPI 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.

Making basic requests

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.

API Reference

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.

Contributing

Feel free to dive in! Open an issue or submit PRs.

License

MIT © Axe Core Group, Inc.