mirror of
https://github.com/kaspanet/kaspad.git
synced 2026-02-26 21:23:15 +00:00
* [NOD-650] Add kaspaminer * [NOD-650] Remove CPU miner * [NOD-650] Fix comments and error messages * [NOD-650] Remove redundant check for closing foundBlock * [NOD-650] Submit block synchronically * [NOD-650] Use ParseUint instead of ParseInt * [NOD-650] Rearrange functions order in mineloop.go * [NOD-650] Add block delay CLI argument to kaspaminer * [NOD-650] Remove redundant spawn * [NOD-650] Add Dockerfile for kaspaminer * [NOD-650] Remove redundant comments * [NOD-650] Remove tests from kaspaminer Dockerfile * [NOD-650] Remove redundant argument on OnFilteredBlockAdded
rpcclient
rpcclient implements a Websocket-enabled Kaspa JSON-RPC client package written in Go. It provides a robust and easy to use client for interfacing with a Kaspa RPC server that uses a kaspad compatible Kaspa JSON-RPC API.
Status
This package is currently under active development. It is already stable and the infrastructure is complete. However, there are still several RPCs left to implement and the API is not stable yet.
Documentation
- API Reference
- Websockets Example Connects to a kaspad RPC server using TLS-secured websockets, registers for block connected and block disconnected notifications, and gets the current block count
- HTTP POST Example Connects to a kaspad RPC server using HTTP POST mode with TLS disabled and gets the current block count
Major Features
- Supports Websockets and HTTP POST mode
- Provides callback and registration functions for kaspad notifications
- Translates to and from higher-level and easier to use Go types
- Offers a synchronous (blocking) and asynchronous API
- When running in Websockets mode (the default):
- Automatic reconnect handling (can be disabled)
- Outstanding commands are automatically reissued
- Registered notifications are automatically reregistered
- Back-off support on reconnect attempts