Code Monkey home page Code Monkey logo

cgminer-rest's Introduction

Build Status Current Crates.io Version Coverage Status Dependabot Status

cgminer-rest: a RESTful HTTP wrapper for the cgminer API

Demo

This package provides a RESTful HTTP wrapper around the cgminer API. Cgminer has a somewhat esoteric API, which isn't easy to use with standard HTTP-based tooling. Using this tool, it's easy to interact with cgminer programmatically or using a UI, such as through a web browser.

Installing

The package can be installed from crates.io using the cargo tool:

$ cargo install cgminer-rest
...
$ cgminer-rest

See Rocket.toml for configuration details. Instructions on using Rocket.toml can be found here.

Note: currently you must be running nightly rust. It is recommended that you use rustup to manage your rust installation.

Example

API

Endpoints

๐Ÿ›ฐ  Mounting /:
    => GET /version (version)
    => GET /config (config)
    => GET /summary (summary)
    => GET /devs (devs)
    => GET /devdetails (devdetails)
    => GET /stats (stats)
    => GET /coin (coin)
    => GET /usbstats (usbstats)
    => GET /lcd (lcd)
    => GET /notify (notify)
    => GET /privileged (privileged)
    => PUT /restart (restart)
    => PUT /check/<command> (check)
    => PUT /debug (debug)
    => PUT /hotplug (hotplug)
    => GET /lockstats (lockstats)
    => PUT /zero (zero)
๐Ÿ›ฐ  Mounting /pools:
    => GET /pools (pools)
    => PUT /pools/<id>/switchto (switchpool)
    => PUT /pools/<id>/enable (enablepool)
    => PUT /pools/<id>/disable (disablepool)
    => POST /pools (addpool)
    => DELETE /pools/<id> (removepool)
    => PUT /pools/<id>/quota (poolquota)
๐Ÿ›ฐ  Mounting /pga:
    => GET /pga/<id> (pga)
    => GET /pga/count (pgacount)
    => PUT /pga/<id>/enable (pgaenable)
    => PUT /pga/<id>/disable (pgadisable)
    => GET /pga/<id>/identify (pgaidentify)
    => PUT /pga/<id> (pgaset)
๐Ÿ›ฐ  Mounting /asc:
    => GET /asc/<id> (asc)
    => GET /asc/count (asccount)
    => PUT /asc/<id>/enable (ascenable)
    => PUT /asc/<id>/disable (ascdisable)
    => GET /asc/<id>/identify (ascidentify)
    => PUT /asc/<id> (ascset)

Project Goals

The goal of this project is to create a high quality API for working with cgminer-based ASICs, in order to enable development of better tooling for Bitcoin mining (such as dragon-rest and mother-of-dragons).

If ASIC vendors adopt one canonical API for mining hardware, it will become much easier to build tooling that works well with many different types of mining hardware. Nearly all ASIC vendors already use cgminer underneath, however the cgminer API is esoteric and somewhat difficult to work with compared to HTTP.

cgminer-rest's People

Contributors

brndnmtthws avatar dependabot-preview[bot] avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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