github.com/dashpay/godash@v0.0.0-20160726055534-e038a21e0e3d/btcjson/README.md (about) 1 btcjson 2 ======= 3 4 [![Build Status](https://travis-ci.org/dashpay/godash.png?branch=master)] 5 (https://travis-ci.org/dashpay/godash) [![ISC License] 6 (http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org) 7 [![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)] 8 (http://godoc.org/github.com/dashpay/godash/btcjson) 9 10 Package btcjson implements concrete types for marshalling to and from the 11 bitcoin JSON-RPC API. A comprehensive suite of tests is provided to ensure 12 proper functionality. 13 14 Although this package was primarily written for the btcsuite, it has 15 intentionally been designed so it can be used as a standalone package for any 16 projects needing to marshal to and from bitcoin JSON-RPC requests and responses. 17 18 Note that although it's possible to use this package directly to implement an 19 RPC client, it is not recommended since it is only intended as an infrastructure 20 package. Instead, RPC clients should use the 21 [btcrpcclient](https://github.com/btcsuite/btcrpcclient) package which provides 22 a full blown RPC client with many features such as automatic connection 23 management, websocket support, automatic notification re-registration on 24 reconnect, and conversion from the raw underlying RPC types (strings, floats, 25 ints, etc) to higher-level types with many nice and useful properties. 26 27 ## Installation and Updating 28 29 ```bash 30 $ go get -u github.com/dashpay/godash/btcjson 31 ``` 32 33 ## Examples 34 35 * [Marshal Command] 36 (http://godoc.org/github.com/dashpay/godash/btcjson#example-MarshalCmd) 37 Demonstrates how to create and marshal a command into a JSON-RPC request. 38 39 * [Unmarshal Command] 40 (http://godoc.org/github.com/dashpay/godash/btcjson#example-UnmarshalCmd) 41 Demonstrates how to unmarshal a JSON-RPC request and then unmarshal the 42 concrete request into a concrete command. 43 44 * [Marshal Response] 45 (http://godoc.org/github.com/dashpay/godash/btcjson#example-MarshalResponse) 46 Demonstrates how to marshal a JSON-RPC response. 47 48 * [Unmarshal Response] 49 (http://godoc.org/github.com/dashpay/godash/btcjson#example-package--UnmarshalResponse) 50 Demonstrates how to unmarshal a JSON-RPC response and then unmarshal the 51 result field in the response to a concrete type. 52 53 ## GPG Verification Key 54 55 All official release tags are signed by Conformal so users can ensure the code 56 has not been tampered with and is coming from the btcsuite developers. To 57 verify the signature perform the following: 58 59 - Download the public key from the Conformal website at 60 https://opensource.conformal.com/GIT-GPG-KEY-conformal.txt 61 62 - Import the public key into your GPG keyring: 63 ```bash 64 gpg --import GIT-GPG-KEY-conformal.txt 65 ``` 66 67 - Verify the release tag with the following command where `TAG_NAME` is a 68 placeholder for the specific tag: 69 ```bash 70 git tag -v TAG_NAME 71 ``` 72 73 ## License 74 75 Package btcjson is licensed under the [copyfree](http://copyfree.org) ISC 76 License.