Commit graph

60 commits

Author SHA1 Message Date
Olaoluwa Osuntokun 8b130ec4ea btcjson: update RPC calls to return segwit related data 2017-08-13 23:17:40 -05:00
Ricardo Velhote 948d80b198
New RPC command to display the uptime of the server
Version 0.15.0 of Bitcoin Core will include a new RPC command that will
allow us to obtain the amount of time (in seconds) that the server has
been running.
2017-07-03 00:07:27 +01:00
Dave Collins 01cb59c67d
multi: Simplify code per gosimple linter.
This simplifies the code based on the recommendations of the gosimple
lint tool.
2017-07-01 02:25:10 -05:00
Steven Roose 3d0dfed40b Fix a ton of typos accumulated over time 2017-05-30 16:59:51 +02:00
Dave Collins 9918e2a561
multi: Update markdown files for GFM changes.
The github markdown interpreter has been changed such that it no longer
allows spaces in between the brackets and parenthesis of links and now
requires a newline in between anchors and other formatting.  This
updates all of the markdown files accordingly.

While here, it also corrects a couple of inconsistencies in some of the
README.md files.
2017-05-25 12:06:16 -05:00
Dave Collins 1fee394e08
btcjson: Update GetNetworkInfoResult.
This updates the GetNetworkInfoResult structure to include the latest
fields added to Core for compatibility purposes.

While here, also move the definitions of the subtypes for the result
before their use for consistency.
2017-05-18 09:12:05 -05:00
David Hill d9241e91a9 btcjson: Add getmempoolentry API 2017-02-01 11:54:51 -06:00
Alex 03a8bf2eb4 btcjson/docs: add rescanblocks command backported from dcrd 2017-01-27 15:32:15 -07:00
Alex 5c689c8b77 btcjson/docs: add loadtxfilter command backported from dcrd 2017-01-27 15:32:15 -07:00
David Hill e8b9147ba2 btcjson: Add more fields to ListTransactionsResult
These include Abandoned, BIP125Replaceable, and Trusted.
2017-01-23 15:56:45 -05:00
Alex 7c44b6472f Port getheaders JSON-RPC command from dcrd 2017-01-10 19:11:18 -07:00
Alex 9f962b60d6 Add version command to JSON-RPC API for API versioning 2016-12-22 14:48:53 -05:00
Olaoluwa Osuntokun ec1c93ecc0
btcjson: update the fields of GetBlockChainInfoResult
This commit updates the fields of GetBlockChainInfoResult to reflect
the current state of the RPC as widely implemented by other full-node
implementations.
2016-12-06 16:24:43 -08:00
David Hill 2e93ea6ca6 btcjson: Add versionHex to getblock[header] results
rpcserver:  Set versionHex in responses.
2016-12-02 12:49:02 -05:00
David Hill d9a674e1b7 btcjson: add ErrRPCClientNodeNotAdded 2016-11-14 18:44:38 -05:00
David Hill 2510baac35 btcd: support feefilter requests.
This only adds support for handling remote peer requests.
2016-11-03 14:47:30 -04:00
Dave Collins 915fa6639b
multi: Simplify code per gosimple linter.
This simplifies the code based on the recommendations of the gosimple
lint tool.
2016-11-03 13:00:35 -05:00
David Hill 07e1e308f1 rpc: Add localaddr and relaytxes to getpeerinfo 2016-10-19 19:58:50 -04:00
David Hill 3b5bb9fd43 btcjson: Add preciousblock 2016-10-19 14:08:32 -05:00
David Hill 403aaf5cf3 rpcserver: avoid nested decodescript p2sh addrs 2016-10-19 13:59:50 -05:00
Dave Collins eb882f39f8 multi: Fix several misspellings in the comments.
This commit corrects several typos in the comments found by misspell.
2016-02-25 11:17:12 -06:00
Dave Collins 3c2c858888 btcjson: Specify constant size in tests.
This modifies the test for createrawtransaction to specify the constant
size passed as an int64.  This is necessary because the NewCmd function
accepts the parameters as interfaces in order to support varargs and a
raw numeric constant is treated as an integer.  Since the constant value
is larger than an int32, this causes certain platforms like ARM which
treat a raw integer as a 32-bit integer to fail to compile.

This is work towards #600.
2016-02-03 13:13:11 -06:00
danda c7eaee6020 adds filteraddrs param to searchrawtransactions API 2015-11-15 15:30:13 -08:00
David Hill 4b7206b54f btcjson: Add optional locktime to createrawtransaction
rpcserver:
If the locktime is given, the transaction inputs will be set to a
non-max value, activating the locktime.  The locktime for the
new transaction will be set to the given value.

This mimics Bitcoin Core commit 212bcca92089f406d9313dbe6d0e1d25143d61ff
2015-10-30 17:16:50 -04:00
Dave Collins 3942a116e4 docs: Make various README.md files consistent.
First, it removes the documentation section from all the README.md files
and instead puts a web-based godoc badge and link at the top with the
other badges.  This is being done since the local godoc tool no longer
ships with Go by default, so the instructions no longer work without
first installing godoc. Due to this, pretty much everyone uses the
web-based godoc these days anyways.  Anyone who has manually installed
godoc won't need instructions.

Second, it makes sure the ISC license badge is at the top with the other
badges and removes the textual reference in the overview section.

Finally, it's modifies the Installation section to Installation and
Updating and adds a '-u' to the 'go get' command since it works for both
and thus is simpler.
2015-10-23 14:51:36 -05:00
David Hill f862536929 btcjson: Add errors to InfoChainResult
The getinfo RPC will now include the errors attribute in the
result.
2015-10-09 14:32:53 -04:00
Dario Nieuwenhuis 0190c349aa Add reverse order option to searchrawtransactions rpc 2015-10-08 16:31:39 +02:00
Josh Rickmar 3c9d18d641 Add a websocket session RPC. 2015-09-17 12:18:15 -04:00
danda 43774fe6bb adds optional prevOut section to vin for searchrawtransactions api. See https://github.com/btcsuite/btcd/issues/485 2015-08-23 09:58:03 -07:00
drazisil b1606447b5 added getwalletinfo cmd 2015-07-24 13:56:24 -04:00
David Hill a6c79c7a91 Implement getblockheader RPC.
This mimics Bitcoin Core commit 076badb60f33f0c32b035de220ca14c52a423a2a
2015-07-23 15:22:17 -04:00
Josh Rickmar 6f1272e767 btcjson: Add spendable to listunspent result. 2015-07-21 13:45:42 -04:00
David Hill 7cfa843832 Support getmempoolinfo. 2015-06-24 20:34:56 -04:00
Josh Rickmar 09ce6f94d3 Add timestamps to block(dis)connected notifications. 2015-06-18 13:02:13 -04:00
David Hill 6d15b04128 Add gettxoutproof and verifytxoutproof JSON-RPC infrastructure.
From Bitcoin Core commit 59ed61b3895b022f61970ea7aac0c20e8ba38886
2015-05-27 10:01:22 -04:00
David Hill 7e50b843d8 Rename hex to scriptSig in SignRawTransactionError.
Fixes a 'read and type the wrong thing'.
2015-05-07 13:30:21 -04:00
David Hill 31a959d921 Run gofmt on btcjson/ 2015-05-07 12:42:16 -04:00
David Hill 92c241c64b Fix typo in previous: Result->Error 2015-05-07 12:34:50 -04:00
David Hill 1555124c85 Add additional fields to the SignRawTransaction RPC result.
This mimics Bitcoin Core commit 8ac2a4e1788426329b842eea7121b8eac7875c76
2015-05-07 09:27:50 -04:00
Dave Collins a40058cd0e rpcserver: Omit empty getrawtransaction->confirmations.
This commit omits the confirmations field from the getrawtransactions
RPC result when it's 0.

Closes #420.
2015-05-06 13:33:42 -05:00
Josh Rickmar 788c316879 Fix listtransactions/gettransaction result structs.
The following changes were made to ListTransactionsResult (which
models the long result format used by listtransactions,
listsinceblock, etc.):

  - Fee made optional (float64 -> *float64 + omitempty)
  - BlockIndex made optional (int64 + omitempty -> *int64 + omitempty)
  - InvolvesWatchOnly added (bool + omitempty)
  - Vout added (uint32)

The following changes were made to GetTransactionDetailsResult (which
models the short result format of listtransactions):

  - InvolvesWatchOnly added (bool + omitempty)
  - Fee added (*float64 + omitempty)
  - Vout added (uint32)

The combination of pointer types and the omitempty struct tag allow
excluding the field from the JSON object, or including it with the
zero value.  This is useful in particular for the fee fields, which
should be included whenever the category is "send" even if the fee is
zero.  Other optional fields which are only added to the result object
with non-zero values (such as includeswatchonly) can be reduced to
simply an omitempty tag without the pointer type.
2015-05-06 14:12:10 -04:00
Olaoluwa Osuntokun 6801c0000a Fix #122 by allowing clients to cancel websockets notifications.
This commit adds 4 new websockets JSON-RPC methods for canceling
notifications:
  * stopnotifyspent
  * stopnotifyreceived
  * stopnotifyblocks
  * stopnotifynewtransactions
2015-05-05 08:54:27 -07:00
Alex Akselrod d26aaffb2b Create generate RPC command to close #362
Create GenerateCmd in btcjson v2. Update tests to check GenerateCmd.

Update chaincfg/params.go with a new bool in Params, GenerateSupported,
with true values in SimNetParams and RegressionNetParams and false in
the others.

Create new flag, discreteMining, in CPUMiner struct.

Add GenerateNBlocks function to cpuminer.go and handleGenerate
function to rpcserver.go.

Update documentation for the RPC calls.
2015-05-04 21:04:25 -04:00
Dave Collins 9a658c2689 rpcserver: Omit empty getblock->nextblockhash.
This commit omits the nextblockhash field from the getblock RPC result
when there isn't one (i.e for current the tip).

Closes #416.
2015-05-04 10:38:40 -05:00
Dave Collins 6e402deb35 Relicense to the btcsuite developers.
This commit relicenses all code in this repository to the btcsuite
developers.
2015-05-01 12:00:56 -05:00
Dave Collins d8a4423b90 btcjson: Replace btcjson with version 2.
This commit removes the old and deprecated btcjsonv1 package, moves the
new version 2 package into its place, and updates all imports accordingly.
2015-05-01 00:43:09 -05:00
Josh Rickmar 1e98e23d1f Remove account defaults for wallet requests.
btcwallet will need to check whether these requests were unset, so
defaults cannot be automatically filled in by btcjson.
2015-05-01 01:27:04 -04:00
Dave Collins 99ac1f5667 btcjson: Remove NewOutPointFromWire and wire dep.
This commit removes the NewOutPointFromWire function from the btcjson
version 2 package so it can be used without needing the wire package as a
dependency.  It also updates the test accordingly.

This results in the package only depending on core Go packages.

Closes #401.
2015-04-23 14:14:07 -05:00
Josh Rickmar de12e101e1 Fix typo and clean up comments for godoc. 2015-04-17 18:10:15 -04:00
Josh Rickmar 5131b5e390 Fix a typo. 2015-04-17 11:14:00 -04:00