mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-05-25 16:26:48 +00:00

* [NOD-1223] Delete unused files/packages. * [NOD-1223] Move signal and limits to the os package. * [NOD-1223] Put database and dbaccess into the db package. * [NOD-1223] Fold the logs package into the logger package. * [NOD-1223] Rename domainmessage to appmessage. * [NOD-1223] Rename to/from DomainMessage to AppMessage. * [NOD-1223] Move appmessage to the app packge. * [NOD-1223] Move protocol to the app packge. * [NOD-1223] Move the network package to the infrastructure packge. * [NOD-1223] Rename cmd to executables. * [NOD-1223] Fix go.doc in the logger package.
1.7 KiB
1.7 KiB
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