Coder Social home page Coder Social logo

vokracko / stocra-sidecar Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 59 KB

API to interact with blockchain nodes

Home Page: https://github.com/vokracko/stocra

Dockerfile 1.47% Shell 0.73% Python 97.79%
api aptos bitcoin blockchain blockchain-api cardano cryptocurrency dogecoin ethereum litecoin erc20 crypto

stocra-sidecar's Introduction

Sidecar

Application exposing a REST API to access block and transaction data from blockchain nodes and caching responses. Uses genesis to communicate with blockchain nodes.

The application exposes public endpoints on :8000:

  • /v1.0/status - returns the status of the application
  • /v1.0/tokens - returns known tokens (ethereum, aptos)
  • /v1.0/blocks/lastest - returns the last block number
  • /v1.0/blocks/<block_number> - returns block data for the given block number
  • /v1.0/blocks/<block_hash> - returns block data for the given block hash
  • /v1.0/transactions/<transaction_hash> - returns transaction data for the given transaction hash

How to run locally

Define the following variables in .env file:

NODE_BLOCKCHAIN=<blockchain name>
NODE_URL=<blockchain node url>
NODE_TOKEN=<blockchain node token>
REDIS_HOST=<redis host>
ENVIRONMENT=<environment name>

# the following are necessary only you are running multiple deployments
# using different redises to synchronize limits
SIDECAR_TOKEN=<sidecar token> 
SIDECAR_URLS='[<http://another-sidecar-url.com/>]'

Terminal

./scripts/entrypoint --reload

Docker compose

docker-compose up -d

stocra-sidecar's People

Contributors

vokracko avatar

Watchers

 avatar

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.