Commit graph

137 commits

Author SHA1 Message Date
Gabriel Nasr
40fe74adb8 btcjson: Update WalletCreateFundedPsbtOpts.FeeRate from *int64 to *float64 2021-09-07 13:25:04 -07:00
Brannon King
ac1fdda8a0 sanitizing readmes for lbcd 2021-08-31 15:53:55 -04:00
Brannon King
1402e61807 [lbry] rpc: output segwit rule 2021-08-19 14:19:21 -04:00
Brannon King
983e4c6000 [lbry] rpc: support claim related methods 2021-08-19 14:19:21 -04:00
Roy Lee
8e059c14d7 [lbry] FIXME: remove the tests for now to pass CI.
Some test files failed to build as the go module "replace" doesn't work
with test and internal packages yet.

The other tests need updates to the testdata.
2021-08-19 14:19:21 -04:00
Roy Lee
c65dd82284 [lbry] add ClaimTrie to Block Header 2021-08-19 14:19:20 -04:00
Aurèle Oulès
2d7825cf70 btcjson: Updated TxRawResult.Version from int32 to uint32 2021-04-13 15:21:09 -04:00
Jake Sylvestre
d08785547a docs: update shields 2021-03-05 07:45:19 -05:00
Jake Sylvestre
2a1aa5129e Add Batch JSON-RPC support (rpc client & server) 2021-02-09 09:47:46 -05:00
Steven Kreuzer
7bbd9b0284 btcjson: Update fields in GetBlockChainInfoResult
Update the fields of GetBlockChainInfoResult to reflect the current state of
the RPC returned by other full-node implementations.

 * InitialBlockDownload - Node is in Initial Block Download mode if True.
 * SizeOnDisk - The estimated size of the block and undo files on disk.
2021-01-26 09:52:38 -05:00
Vinayak Borkar
c3ece697da Fixes btcsuite/btcd#1653 2021-01-18 13:51:45 -05:00
Oliver Gugger
9e8bb3eddb
btcjson+rpcserverhelp: restore bitcoind compatibility
The PR #1594 introduced a change that made the order of parameters
relevant, if one of them is nil. This makes it harder to be backward
compatible with the same JSON message if an existing parameter in
bitcoind was re-purposed to have a different meaning.
2020-11-12 15:47:51 +01:00
Anirudha Bose
535f25593d rpcclient: implement createwallet with functional options 2020-10-26 14:54:05 -04:00
Anirudha Bose
5e56ca05e1 btcjson: add new JSON-RPC errors and document them 2020-10-26 09:35:46 -04:00
Torkel Rogstad
1d75e0a885 rpcclient: add more wallet commands
Implement backupwallet, dumpwallet, loadwallet and unloadwallet.
2020-10-26 09:34:56 -04:00
David Mazary
6adfc07d1e Unmarshal hashes/second as float in GetMiningInfoResult 2020-10-26 09:33:28 -04:00
Anirudha Bose
6519c04a6f rpcclient: implement gettxoutsetinfo command 2020-10-05 10:03:47 -04:00
Henry Fisher
584c382334 rpc: add signrawtransactionwithwallet interface
Adds interface for issuing a signrawtransactionwithwallet command.
Note that this does not add functionality for the btcd rpc server
itself, it simply assumes that the RPC client has this ability and gives
an API for interacting with the RPC client.

rpc: add signrawtransactionwithwallet interface
2020-10-05 09:56:12 -04:00
Anirudha Bose
0bf42f4476 rpcserver: add txid to getblocktemplate response 2020-10-05 09:55:45 -04:00
Anirudha Bose
e9a51e8dcd rpcclient: implement getwalletinfo command 2020-09-25 12:18:06 -04:00
Anirudha Bose
ac3f235eb9 rpcclient: implement getaddressinfo command
Fields such as label, and labelspurpose are not included, since they
are deprecated, and will be removed in Bitcoin Core 0.21.
2020-09-21 09:47:58 -04:00
Elliott Minns
6daaf73544
GetBlockTemplate RPC client implementation (#1629)
* GetBlockTemplate RPC client implementation

* Txid added to the getblocktemplate result

* Omitempty for TxID and improved comment for GetBlockTemplate 'rules' field
2020-09-21 09:42:35 -04:00
Anirudha Bose
f4024160f3 btcjson: add test for null params in searchrawtransactions
Closes PR #1476.
2020-09-21 09:42:09 -04:00
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
Mikael Lindlof
eb05726dac Nullable optional JSON-RPC parameters
Fix command marshalling dropping params following params with nil value.

#1591 Allow specifying null parameter value from command line.
2020-09-08 10:01:44 -04:00
Anirudha Bose
3b926ef77b btcjson: update ListTransactionsResult for Bitcoin 0.20.0
This only adds new fields as optional, in order to make this change
backwards compatible with older versions of Bitcoin Core.
2020-09-08 09:51:20 -04:00
Federico Bond
35194e2dac btcjson,wire: fix invalid use of string(x) to convert byte value 2020-08-31 16:01:10 -04:00
Anirudha Bose
fffe4a909b rpcclient: Implement importmulti JSON-RPC client command 2020-08-31 15:28:48 -04:00
Mikael Lindlof
d2c0123bef Implement signmessagewithprivkey JSON-RPC command
Reuse the Bitcoin message signature header const
also in verifymessage.
2020-08-31 10:12:54 -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
7145eef75b rpcserver: add parity with bitcoind for validateaddress
Updated the rpcserver handler for validateaddress JSON-RPC command to
have parity with the bitcoind 0.20.0 interface.

The new fields included are - isscript, iswitness, witness_version, and
witness_program. The scriptPubKey field has been left out since it
requires wallet access.

This update has no impact on the rpcclient.ValidateAddress method,
which uses the btcjson.ValidateAddressWalletResult type for modelling
the response from bitcoind.
2020-08-31 09:58:27 -04:00
Anirudha Bose
efae8e9967 Add rpclient implementation of getdescriptorinfo RPC 2020-08-31 09:41:49 -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
Olaoluwa Osuntokun
9a88e1dd33
Merge pull request #1575 from dajohi/clean
build: multiple cleanups
2020-05-15 15:47:01 -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
David Hill
f7399e6157 build: clean linter warnings 2020-05-13 08:58:39 -04:00
David Hill
a505b99ba3 build: replace travis-ci with github actions.
test go 1.14
use golangci-lint
2020-05-13 08:52:05 -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
Jake Sylvestre
a8eadd2ce4 update GetMempoolEntryResult to v0.19.0
https://bitcoincore.org/en/doc/0.19.0/rpc/blockchain/getmempoolentry/
2020-03-16 10:26:15 -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
Daniel McNally
fd0921b9b4 btcjson: add RPC_IN_WARMUP error code
This adds an error code for the `RPC_IN_WARMUP` error code defined at
https://github.com/bitcoin/bitcoin/blob/master/src/rpc/protocol.h#L49
which is thrown when bitcoind has started but has not yet finished
verifying recent blocks and being ready for rpc calls.
2020-03-09 13:43:01 -04:00
jalavosus
a310aa6e74 All tests pass 2020-03-05 06:48:26 -05:00