github.com/palcoin-project/palcd@v1.0.0/rpcclient/README.md (about) 1 rpcclient 2 ========= 3 4 [![Build Status](https://github.com/btcsuite/btcd/workflows/Build%20and%20Test/badge.svg)](https://github.com/btcsuite/btcd/actions) 5 [![ISC License](http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org) 6 [![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](https://pkg.go.dev/github.com/btcsuite/btcd/rpcclient) 7 8 rpcclient implements a Websocket-enabled Bitcoin JSON-RPC client package written 9 in [Go](http://golang.org/). It provides a robust and easy to use client for 10 interfacing with a Bitcoin RPC server that uses a btcd/bitcoin core compatible 11 Bitcoin JSON-RPC API. 12 13 ## Status 14 15 This package is currently under active development. It is already stable and 16 the infrastructure is complete. However, there are still several RPCs left to 17 implement and the API is not stable yet. 18 19 ## Documentation 20 21 * [API Reference](https://pkg.go.dev/github.com/btcsuite/btcd/rpcclient) 22 * [btcd Websockets Example](https://github.com/btcsuite/btcd/tree/master/rpcclient/examples/btcdwebsockets) 23 Connects to a btcd RPC server using TLS-secured websockets, registers for 24 block connected and block disconnected notifications, and gets the current 25 block count 26 * [btcwallet Websockets Example](https://github.com/btcsuite/btcd/tree/master/rpcclient/examples/btcwalletwebsockets) 27 Connects to a btcwallet RPC server using TLS-secured websockets, registers for 28 notifications about changes to account balances, and gets a list of unspent 29 transaction outputs (utxos) the wallet can sign 30 * [Bitcoin Core HTTP POST Example](https://github.com/btcsuite/btcd/tree/master/rpcclient/examples/bitcoincorehttp) 31 Connects to a bitcoin core RPC server using HTTP POST mode with TLS disabled 32 and gets the current block count 33 34 ## Major Features 35 36 * Supports Websockets (btcd/btcwallet) and HTTP POST mode (bitcoin core) 37 * Provides callback and registration functions for btcd/btcwallet notifications 38 * Supports btcd extensions 39 * Translates to and from higher-level and easier to use Go types 40 * Offers a synchronous (blocking) and asynchronous API 41 * When running in Websockets mode (the default): 42 * Automatic reconnect handling (can be disabled) 43 * Outstanding commands are automatically reissued 44 * Registered notifications are automatically reregistered 45 * Back-off support on reconnect attempts 46 47 ## Installation 48 49 ```bash 50 $ go get -u github.com/btcsuite/btcd/rpcclient 51 ``` 52 53 ## License 54 55 Package rpcclient is licensed under the [copyfree](http://copyfree.org) ISC 56 License.