Giter VIP home page Giter VIP logo

exports-api's Introduction

exports-api

An easy API to get historical data without an archive node.

https://exports.reece.sh

Pairs with https://github.com/Reecepbcups/cosmos-state-exporter

Setup

git clone [email protected]:Reecepbcups/exports-api.git && cd exports-api

cp custom-types.example.json custom-types.json # and modify as needed

# install node if you have not already
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
nvm install v20.5.0

# install nodemon
npm install -g nodemon

# enter into a screen / tmux session (or created a systemd service)
screen -S exports-api -dm bash -c "npm i && npm run dev && exec bash"

# schedule: clear decompressed exports to save space
# (( match the path to .env DECOMPRESSED_ROOT_PATH ))
sudo crontab -e
# 0 0 * * * rm -rf /home/user/path/decompressed_exports/*

View

{
  "chains": {
    "Available": "/chains"
  },
  "routes": {
    "All Heights": "/:chain/heights",
    "Valid Types": "/:chain/types",
    "Download Archive": "/:chain/download/:height"
  },
  "general": {
    "Account Info": "/:chain/:height/auth",
    "All Stakers": "/:chain/:height/staking",
    "Balances": "/:chain/:height/bank",
    "Supply": "/:chain/:height/supply"
  },
  "specific": {
    "Validators Shares": "/:chain/:height/validators",
    "Specific Delegations": "/:chain/:height/delegations/:valoper_address",
    "User Specific": "/:chain/:height/:type/:address"
  }
}

NOTE :height can be any numerical value within the /heights endpoint OR "latest" for the latest height

exports-api's People

Contributors

reecepbcups avatar

Stargazers

 avatar

Watchers

 avatar

exports-api's Issues

query all bank balances for select tokens

ex: find any tokens in all accounts which have ibc/8CF857987F8095F66F7F47C776789FD64585AB47017E42B864B89B5E414D4728 (joe token)

and return an array of accounts with said coins

refactor

Could use a big overhaul to not duplicate so much code. Do not like the design

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.