This is a fork of github.com/btcsuite/btcd aimed at eliminating the tangle and complexity of its structure and make it more amenable to reuse as a part of another application, as well as easier reuse of its parts.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Loki Verloren 5dc89b0b7f moved out log and median 6 months ago
..
CONTRIBUTORS Import btcjson repo into btcjson directory. 5 years ago
README.md migrated 7 months ago
btcdextcmds.go Port `getheaders` JSON-RPC command from dcrd 3 years ago
btcdextcmds_test.go because long error prone change 6 months ago
btcdextresults.go Port `getheaders` JSON-RPC command from dcrd 3 years ago
btcdextresults_test.go because long error prone change 6 months ago
btcwalletextcmds.go fix NewImportAddressCmd rescan wrong parameters 1 year ago
btcwalletextcmds_test.go because long error prone change 6 months ago
chainsvrcmds.go msg now fully separated 6 months ago
chainsvrcmds_test.go lots of test fixes 6 months ago
chainsvrresults.go moved out log and median 6 months ago
chainsvrresults_test.go because long error prone change 6 months ago
chainsvrwscmds.go btcjson/docs: add `rescanblocks` command backported from dcrd 3 years ago
chainsvrwscmds_test.go because long error prone change 6 months ago
chainsvrwsntfns.go btcjson/docs: add `rescanblocks` command backported from dcrd 3 years ago
chainsvrwsntfns_test.go because long error prone change 6 months ago
chainsvrwsresults.go btcjson/docs: add `rescanblocks` command backported from dcrd 3 years ago
chainsvrwsresults_test.go because long error prone change 6 months ago
cmdinfo.go multi: Fix several misspellings in the comments. 3 years ago
cmdinfo_test.go because long error prone change 6 months ago
cmdparse.go btcd/multi: fix a number of typos in comments. 2 years ago
cmdparse_test.go because long error prone change 6 months ago
doc.go Relicense to the btcsuite developers. 4 years ago
error.go Relicense to the btcsuite developers. 4 years ago
error_test.go because long error prone change 6 months ago
example_test.go because long error prone change 6 months ago
export_test.go Relicense to the btcsuite developers. 4 years ago
help.go Fix a ton of typos accumulated over time 2 years ago
help_test.go because long error prone change 6 months ago
helpers.go Fix listtransactions/gettransaction result structs. 4 years ago
helpers_test.go because long error prone change 6 months ago
jsonrpc.go Relicense to the btcsuite developers. 4 years ago
jsonrpc_test.go because long error prone change 6 months ago
jsonrpcerr.go btcjson+rpc: match bitcoind's RPC error codes for rejected transactions 8 months ago
register.go Relicense to the btcsuite developers. 4 years ago
register_test.go because long error prone change 6 months ago
walletsvrcmds.go btcjson: Implement addwitnessaddress functionality. 2 years ago
walletsvrcmds_test.go because long error prone change 6 months ago
walletsvrresults.go btcjson: Add more fields to ListTransactionsResult 3 years ago
walletsvrwscmds.go Relicense to the btcsuite developers. 4 years ago
walletsvrwscmds_test.go because long error prone change 6 months ago
walletsvrwsntfns.go btcd/multi: fix a number of typos in comments. 2 years ago
walletsvrwsntfns_test.go because long error prone change 6 months ago

README.md

btcjson

Build Status ISC License GoDoc

Package btcjson implements concrete types for marshalling to and from the bitcoin JSON-RPC API. A comprehensive suite of tests is provided to ensure proper functionality.

Although this package was primarily written for the btcsuite, it has intentionally been designed so it can be used as a standalone package for any projects needing to marshal to and from bitcoin JSON-RPC requests and responses.

Note that although it’s possible to use this package directly to implement an RPC client, it is not recommended since it is only intended as an infrastructure package. Instead, RPC clients should use the btcrpcclient package which provides a full blown RPC client with many features such as automatic connection management, websocket support, automatic notification re-registration on reconnect, and conversion from the raw underlying RPC types (strings, floats, ints, etc) to higher-level types with many nice and useful properties.

Installation and Updating

$ go get -u git.parallelcoin.io/dev/btcd/btcjson

Examples

  • Marshal Command
    Demonstrates how to create and marshal a command into a JSON-RPC request.

  • Unmarshal Command
    Demonstrates how to unmarshal a JSON-RPC request and then unmarshal the concrete request into a concrete command.

  • Marshal Response
    Demonstrates how to marshal a JSON-RPC response.

  • Unmarshal Response
    Demonstrates how to unmarshal a JSON-RPC response and then unmarshal the result field in the response to a concrete type.

GPG Verification Key

All official release tags are signed by Conformal so users can ensure the code has not been tampered with and is coming from the btcsuite developers. To verify the signature perform the following:

  • Download the public key from the Conformal website at https://opensource.conformal.com/GIT-GPG-KEY-conformal.txt

  • Import the public key into your GPG keyring:

    gpg --import GIT-GPG-KEY-conformal.txt
    
  • Verify the release tag with the following command where TAG_NAME is a placeholder for the specific tag:

    git tag -v TAG_NAME
    

License

Package btcjson is licensed under the copyfree ISC License.