mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00

* [NOD-816] Remove TxIndex. * [NOD-816] Remove AddrIndex. * [NOD-816] Remove mentions of TxIndex and AddrIndex. * [NOD-816] Remove mentions of getrawtransaction. * [NOD-816] Remove mentions of searchrawtransaction. * [NOD-816] Remove cmd/addsubnetwork. * [NOD-816] Fix a comment. * [NOD-816] Fix a comment. * [NOD-816] Implement BlockDAG.TxConfirmations. * [NOD-816] Return confirmations in getTxOut. * [NOD-816] Rename TxConfirmations to UTXOConfirmations. * [NOD-816] Rename txConfirmations to utxoConfirmations. * [NOD-816] Fix capitalization in variable names. * [NOD-816] Add acceptance index to addblock. * [NOD-816] Get rid of txrawresult-confirmations. * [NOD-816] Fix config flag.
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