Commit graph

49 commits

Author SHA1 Message Date
Anirudha Bose c693bd8bc5 rpcclient: add deriveaddresses RPC command 2020-09-14 10:30:47 -04:00
Andrew Tugarinov 5ae1f21cd9 Added ListSinceBlockMinConfWatchOnly method. 2020-09-14 09:48:40 -04:00
Federico Bond 6f49f1f194 btcjson,rpcclient: add support for PSBT commands to rpcclient 2020-09-14 09:37:27 -04:00
Mikael Lindlof fff96610aa rpc: Add getnodeaddresses JSON-RPC support
Add NodeAddresses function to rpcserverConnManager
interface for fetching known node addresses.
2020-09-14 09:36:05 -04:00
Anirudha Bose ba3fe57507
rpcclient: support listtransactions RPC with watchonly argument
Co-authored-by: Gert-Jaap Glasbergen <gertjaap@decoscrypto.com>
2020-09-08 09:43:02 -04:00
Anirudha Bose fffe4a909b rpcclient: Implement importmulti JSON-RPC client command 2020-08-31 15:28:48 -04:00
Mikael Lindlof b68c50e33c Add getblockfilter JSON-RPC client command
Add type for second getblockfilter param
2020-08-31 10:02:54 -04:00
Anirudha Bose efae8e9967 Add rpclient implementation of getdescriptorinfo RPC 2020-08-31 09:41:49 -04:00
Anirudha Bose e2d9cf4b55 rpcclient: Add GetTransactionWatchOnly method 2020-06-29 10:15:10 -04:00
Federico Bond 7b2ff5d180 Add getbalances RPC client command 2020-06-29 10:14:04 -04:00
Torkel Rogstad e4f59022a3 Add fundrawtransaction RPC call 2020-06-15 09:44:04 -04:00
Mikael Lindlof 73d69f09d0 Add getchaintxstats JSON-RPC client command 2020-06-15 09:42:37 -04:00
Torkel Rogstad 714de3f3c7 rpcclient: serialize nil inputs to empty list 2020-06-08 09:52:46 -04:00
JeremyRand 6d521ff8cd rpcclient: Read first line of cookie instead of trimming space 2020-06-08 09:51:09 -04:00
JeremyRand e6f163e61e rpcclient: Try user+pass auth before cookie auth 2020-06-08 09:51:09 -04:00
JeremyRand 915788b8e6 rpcclient: Refactor cookie caching 2020-06-08 09:51:09 -04:00
JeremyRand 280845a8a4 rpcclient: Add cookie auth
Based on Hugo Landau's cookie auth implementation for Namecoin's ncdns.

Fixes https://github.com/btcsuite/btcd/issues/1054
2020-06-08 09:51:09 -04:00
Wilmer Paulino 742935e3a9
rpcclient: send legacy GetBlock request for backwards compatibility
Without this, users of this library wouldn't be able to issue GetBlock
requests to nodes which haven't updated to support the latest request
format, namely the use of a single `int` parameter to denote verbosity
instead of two `bool`s.
2020-05-14 18:05:46 -07:00
Henry d38279ee74
btcjson: change getblock default verbosity to 1
This change makes btcd's getblock command match bitcoind's. Previously
the default verbosity was 0, which caused errors when using the
rpcclient library to connect to a bitcoind node - getblock would
unmarshall incorrectly since it didn't expect a verbosity=1 result when
it did not specify verbosity.
2020-05-14 17:27:59 -07:00
Torkel Rogstad 57d44d022e Try both TX serialization formats 2020-03-27 16:59:23 -04:00
Ivan Kuznetsov cfcf4fb762 Implement 'getblockstats' JSON-RPC command 2020-03-25 05:51:42 -04:00
Torkel Rogstad 8b1be46463 Add generatetoaddress and estimatesmartfee RPCs 2020-03-17 09:29:41 -04:00
Iskander Sharipov d9ce6b037f btcjson,rpcclient: use proper Deprecated comment format
This makes godoc and other Go tools understand deprecation notice.

Found using https://go-critic.github.io/overview#deprecatedComment-ref
2020-03-10 11:00:24 -04:00
Jake Sylvestre c4f39996ac
Refactor GetBlockVerboseTx to reflect correct getblock RPC call… (#1529)
Refactor GetBlockVerboseResult into two separate types: one type for getblock "hash" verbosity=1,
and a second type for getblock "hash" verbosity=2. This is necessary due to how getblock returns
a block's transaction data based on the provided verbosity parameter.

If verbosity=1, then getblock.Tx is an array of a block's transaction ids (txids) as strings.
If verbosity=2, then getblock.Tx is an array of raw transaction data.

Due to differences in how getblock returns data based on the provided verbosity parameter, it's necessary
to have two separate return types based on verbosity. This necessitates a separate unmarshalling function
(represented throughout rpcclient/chain.go as Result.Receive()) to ensure that data is correctly unmarshalled
and returned to the user.
2020-03-09 14:47:11 -04:00
John C. Vernaleo e9f15eda7e
rpcclient: Add net params to Client (#1467)
* rpcclient: replace futures mainnet with params

Adds a chaincfg.Params to the Client

rpcclient: parse config to assign params

* rpcclient: change address commands to Address

 * Change address future struct to contain a network field, so futures
   can return the correct type for Receive
2020-03-05 16:46:29 -05:00
jalavosus 57cb8e4b11 Refactor FutureGetBlockVerboseResult into two types: FutureGetBlockVerboseResult, and FutureGetBlockVerboseTxResult.
Due to differences in how getblock returns data based on the provided verbosity parameter, it's necessary
to have two separate return types based on verbosity. This necessitates a separate unmarshalling function
(represented throughout rpcclient/chain.go as Result.Receive()) to ensure that data is correctly unmarshalled
and returned to the user.
2020-03-05 06:48:19 -05:00
shuai.qi 46461dc84a btcjson, rpclient: Fix typo 2020-03-04 09:23:11 -05:00
Wilmer Paulino e2e5cc694d
btcjson+rpcclient: support new bitcoind sendrawtransaction request 2019-11-08 17:53:46 -08:00
Wilmer Paulino 266851e329
btcjson+rpcclient: support new unified softfork bitcoind format 2019-11-05 16:28:33 -08:00
Wilmer Paulino e89d4fca24
rpcclient: allow retrieval of backend version 2019-11-04 17:44:29 -08:00
Wilmer Paulino a46f7b45ab
rpcclient: add GetNetworkInfo method 2019-10-29 18:49:37 -07:00
Olaoluwa Osuntokun d2b1a06d93
Merge pull request #1129 from gracenoah/fix-rescan
fix NewImportAddressCmd rescan wrong parameters
2018-10-12 17:34:25 -07:00
Johan T. Halseth 085a2b96e9
rpcclient: expose the Node command for RPC API. 2018-09-04 09:40:08 +02:00
Tzu-Jung Lee 98769ddbdf docs: Update example links in README 2018-07-06 14:41:20 -05:00
Olaoluwa Osuntokun b72e16f0d6 multi: correct all import paths 2018-05-23 16:46:15 -07:00
Jim Posen 7b67f61fa6 rpcclient: Put CFHeader in PrevFilterHeader field in RPC response. 2018-05-23 16:46:15 -07:00
Daniel Krawisz 4fd446028f Enable estimatefee rpc command. 2018-05-23 16:46:15 -07:00
Alex c7e7acc7fd multi: use hidden varint for cftypes count; make filter type enum, not uint8 2018-05-23 16:46:15 -07:00
Alex 5c93ca639a rpcclient: change "bool" to "uint8" for cfilter/cfheader type 2018-05-23 16:46:15 -07:00
Olaoluwa Osuntokun c8fdf8bf59 rpcclient: add GetCFilterHeader and GetCFilter 2018-05-23 16:46:15 -07:00
Olaoluwa Osuntokun 3d1caa2f83 multi: update to point to roasbeef forks 2018-05-23 16:46:15 -07:00
Grace Noah ea82dfdee1 fix NewImportAddressCmd rescan wrong parameters
fix #1126
2018-03-05 19:25:40 +00:00
Dave Collins 2be2f12b35 rpcclient: Update for go1.10 breaking changes.
Go 1.10 made some changes such that json.Unmarshal can no longer
unmarshal into exported fields that are themselves embedded via an
uninitialized unexported pointer.

Since rpcclient previously relied on this behavior, this updates the
client to create the pointers before unmarshalling into the struct.
2018-02-19 18:56:35 -06:00
Jeremiah Goyette fe786c93b6 rpcclient: implement addwitnessaddress 2018-01-26 01:20:40 -06:00
nakagawa e4a6228752 rpcclient: Add decodescript support. 2018-01-26 00:20:33 -06:00
Nicola 'tekNico' Larosa 11fcd83963 btcd/multi: fix a number of typos in comments. 2018-01-25 23:23:59 -06:00
Alok Menghrajani 3cb87afa2f rpcclient: fix links in README.md 2017-08-28 01:50:25 -07:00
Janus Troelsen 45ea940039 docs: Correct rpcclient link. 2017-08-21 15:56:57 -05:00
Dave Collins 074b2374b8
Import btcrpcclient repo into rpcclient directory.
This commit contains the entire btcrpcclient repository along with
several changes needed to move all of the files into the rpcclient
directory in order to prepare it for merging.  This does NOT update btcd
or any of the other packages to use the new location as that will be
done separately.

- All import paths in the old btcrpcclient files have been changed to
  the new location
- All references to btcrpcclient as the package name have been changed to
  rpcclient
2017-08-15 19:51:58 -05:00