4 [![Build Status](https://travis-ci.org/btcsuite/btcd.png?branch=master)](https://travis-ci.org/btcsuite/btcd)
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)](http://godoc.org/github.com/btcsuite/btcd/btcjson)
8 Package btcjson implements concrete types for marshalling to and from the
9 bitcoin JSON-RPC API. A comprehensive suite of tests is provided to ensure
12 Although this package was primarily written for the btcsuite, it has
13 intentionally been designed so it can be used as a standalone package for any
14 projects needing to marshal to and from bitcoin JSON-RPC requests and responses.
16 Note that although it's possible to use this package directly to implement an
17 RPC client, it is not recommended since it is only intended as an infrastructure
18 package. Instead, RPC clients should use the
19 [btcrpcclient](https://github.com/btcsuite/btcrpcclient) package which provides
20 a full blown RPC client with many features such as automatic connection
21 management, websocket support, automatic notification re-registration on
22 reconnect, and conversion from the raw underlying RPC types (strings, floats,
23 ints, etc) to higher-level types with many nice and useful properties.
25 ## Installation and Updating
28 $ go get -u github.com/btcsuite/btcd/btcjson
33 * [Marshal Command](http://godoc.org/github.com/btcsuite/btcd/btcjson#example-MarshalCmd)
34 Demonstrates how to create and marshal a command into a JSON-RPC request.
36 * [Unmarshal Command](http://godoc.org/github.com/btcsuite/btcd/btcjson#example-UnmarshalCmd)
37 Demonstrates how to unmarshal a JSON-RPC request and then unmarshal the
38 concrete request into a concrete command.
40 * [Marshal Response](http://godoc.org/github.com/btcsuite/btcd/btcjson#example-MarshalResponse)
41 Demonstrates how to marshal a JSON-RPC response.
43 * [Unmarshal Response](http://godoc.org/github.com/btcsuite/btcd/btcjson#example-package--UnmarshalResponse)
44 Demonstrates how to unmarshal a JSON-RPC response and then unmarshal the
45 result field in the response to a concrete type.
47 ## GPG Verification Key
49 All official release tags are signed by Conformal so users can ensure the code
50 has not been tampered with and is coming from the btcsuite developers. To
51 verify the signature perform the following:
53 - Download the public key from the Conformal website at
54 https://opensource.conformal.com/GIT-GPG-KEY-conformal.txt
56 - Import the public key into your GPG keyring:
58 gpg --import GIT-GPG-KEY-conformal.txt
61 - Verify the release tag with the following command where `TAG_NAME` is a
62 placeholder for the specific tag:
69 Package btcjson is licensed under the [copyfree](http://copyfree.org) ISC