
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
github.com/uCibar/ethminer-api-http-proxy
HTTP Proxy For ethminer TCP json-rpc 2.0 API
Since Ethminer does not have a HTTP API, this small go app allows you to consume the Ethminer API as HTTP.
Build the project and run from console:
go build .
ethminer-api-http-proxy --help
Only required flag is -miner
, this your ethminer API address. Eg:
ethminer-api-http-proxy -miner 127.0.0.1:3333
If you want to change HTTP server address, use -serve
flag. Eg:
ethminer-api-http-proxy -miner 127.0.0.1:3333 -serve :8085
ethminer-api-http-proxy -miner 127.0.0.1:3333 -serve 192.168.1.36:8085
And you can consume ethminer API as HTTP:
curl--request POST '127.0.0.1:8085' --header 'Content-Type: application/json' --data-raw '{"id":0,"jsonrpc":"2.0","method":"miner_getstatdetail"}'
There is no endpoints except /
. Just Send POST
requests to /
with ethminer JSON request body.
You can find all ethminer requests from ethminer API Docs.
Since ethminer API using json-rpc 2.0 and TCP connection, API requests must have id
field for request-response mapping. But you don't have to worry about it when you using this proxy. Because, this is HTTP.
So, just set id:0
when sending requests and ignore the id
in responses, Eg:
//Request Body
{
"id": 0, //doesn't matter what you send, just send integer
"jsonrpc": "2.0",
"method": "miner_ping"
}
//Response Body
{
"id": 1241, //just ignore it
"jsonrpc": "2.0",
"result": "pong"
}
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.