Commit graph

71 commits

Author SHA1 Message Date
Roy Lee
49e78d88cb [lbry] rpc: support --skipverify on TLS connection to lbcd 2022-05-24 10:48:28 -07:00
Roy Lee
09ae692b44 [lbry] rpc: update help docs 2022-05-24 10:48:28 -07:00
Brannon King
1d0ef1da6d [lbry] added staked value to balance call 2022-05-24 10:48:28 -07:00
Brannon King
d5328e1834 [lbry] coin selection and balance no longer include stakes 2022-05-24 10:48:28 -07:00
Brannon King
4c6e495f86 [lbry] use address type parameter in getnewaddress 2022-05-24 10:48:20 -07:00
Roy Lee
f52bea1e37 [lbry] rpc: getaddressinfo
Co-authored-by: Brannon King <countprimes@gmail.com>
2022-05-24 10:31:06 -07:00
Roy Lee
36554814e8 [lbry] align port settings between lbcd, lbcctl, and lbcwallet 2022-05-24 10:31:06 -07:00
Roy Lee
202374ebd8 [lbry] fork from btcsuite to lbryio
1. btcd -> lbcd
2. btcwallet -> lbcallet
3. btcutil -> lbcutil
2022-05-24 10:31:06 -07:00
Joost Jager
4d2665ee3a
wallet: add random coin selection 2021-05-19 08:34:55 +02:00
Wilmer Paulino
e3523abe7b
build: update btcd dependency
This exposes the new AllowSelfConns config option allowing external
testing of peer.Peer.
2021-04-02 17:28:03 -07:00
Wilmer Paulino
a180b0fcaa
wallet: allow filtering of transactions by account 2021-03-29 16:00:50 -07:00
Wilmer Paulino
2301069644
wallet: require key scope of account for transaction creation methods
Now that we're able to fund transactions from multiple accounts within
different key scopes, we extend our transaction creation methods to
accept a key scope parameter as well, to determine the correct account
to select inputs from.
2021-03-29 16:00:48 -07:00
Oliver Gugger
3a5d9f84b0
multi: fix linter issues 2021-03-24 14:44:32 +01:00
Oliver Gugger
40414fde37
rpc: run make fmt to format all code 2021-03-24 13:45:11 +01:00
Wilmer Paulino
0492cb4507
waddrmgr: use correct DerivationPath for watch-only accounts
Previously, addresses that belong to a watch-only account would have a
derivation path using the internal account number used to identify
accounts within the databse, rather than the actual account number based
on the account's master public key child index. This wasn't an issue
before as only one account would exist within the wallet, the 0 account,
which is also the default. To ensure users of the DerivationPath struct
can arrive at addresses correctly, we introduce a new field
InternalAccount to denote the internal account number and repurpose the
existing Account field to its actual meaning.
2021-03-15 19:27:04 -07:00
Wilmer Paulino
742d879352
multi: fix linter 2021-03-15 19:27:00 -07:00
carla
9e2f2ce157
wallet: add label parameter to SendOutputs 2020-05-11 15:17:55 +02:00
carla
d2f9185f6a
wallet: add label to PublishTransaction
All label parameter to PublishTransaction. Pass in an empty string
in rpc call as a placeholder for follow up PR which will add a label
parameter to the PublishTransaction request.
2020-05-11 15:16:22 +02:00
Joost Jager
b718296188
wallet: return full tx from SendOutputs 2018-11-06 10:40:37 +01:00
Olaoluwa Osuntokun
b0b64d3bbd multi: update due to latest API changes 2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun
7770cac383 multi: switch import paths back to upstream 2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun
115d7d17f2 rpc: update rpc servers to default to waddrmgr.KeyScopeBIP0044 2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun
aa42e17e2f rpc/legacyrpc: update method to use default fee rate 2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun
a0abd3632c multi: update to new upstream btcsuite/btcd API's 2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun
3dc7a8529c multi: switch all imports to roasbeef's forks 2018-05-23 19:38:56 -07:00
Alex
b5873a5b2c Finish integration of Neutrino; still untested. 2018-05-23 19:38:56 -07:00
Alex
32adc3c43f Make rescan a struct, add spending tx to GetUtxo, start integration. 2018-05-23 19:38:56 -07:00
Alex
e273e178dd Repoint repo to btcsuite on btcwalletln, and a few rebase fixes. 2018-05-23 19:38:56 -07:00
Josh Rickmar
4656a00705 Improve wallet atomicity.
This changes the database access APIs and each of the "manager"
packages (waddrmgr/wstakemgr) so that transactions are opened (only)
by the wallet package and the namespace buckets that each manager
expects to operate on are passed in as parameters.

This helps improve the atomicity situation as it means that many
calls to these APIs can be grouped together into a single
database transaction.

This change does not attempt to completely fix the "half-processed"
block problem.  Mined transactions are still added to the wallet
database under their own database transaction as this is how they are
notified by the consensus JSON-RPC server (as loose transactions,
without the rest of the block that contains them). It will make
updating to a fixed notification model significantly easier, as the
same "manager" APIs can still be used, but grouped into a single
atomic transaction.
2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun
2fb155724f rpc/legacy: update to latest btcrpcclient API 2018-05-23 19:38:56 -07:00
Josh Rickmar
61e96a69e4 Cleanup TransactionDetails RPC messages.
Remove the addresses field from TransactionDetails.Output.  It is
assumed that the caller is able to deserialize the transaction and
encode the output scripts to addresses, so this is unnecessary server
overhead and conflicts with the current API philosophy of not
duplicating data already included in another field.

Since there is no additional data included for outputs not controlled
by the wallet, remove the `mine` specifier from the Output message and
replace it with an output index.  Only include messages for controlled
outputs, rather than creating messages for both controlled and
uncontrolled outputs.  Rename the repeated field from `outputs` to
`credits` to be consistent with the `debits` field.

Bump major API version as this is a breaking change.

Closes #408.
2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun
422c0d6c93 rpc: update address generation to new API 2018-05-23 19:38:56 -07:00
Olaoluwa Osuntokun
77b756c651 multi: point all imports towards roasbeef's forks 2018-05-23 19:38:56 -07:00
Josh Rickmar
8e723ea454 Update deps to pull in latest gRPC release.
While here, pull in latest btcsuite and logrotate changes.  Update for
logrotate API changes.
2017-07-19 11:39:25 -04:00
Josh Rickmar
4222c0464a Update project dependencies.
One change of note is that this pulls in the new btclog-based logger
and removes the seelog dependency.
2017-06-20 09:34:45 -04:00
David Hill
15635025c4 Drop fastsha256 in favor of crypto/sha256 (#468) 2017-01-12 09:47:46 -05:00
Dave Collins
cc240cafc5 Update for wire.NewMsgTx API change. (#458)
Also, bump glide.lock to ensure the appropriate deps are pulled in.
2016-10-27 16:39:23 -04:00
Josh Rickmar
1cb3b8b29a Update project dependencies. (#456)
This updates both btcsuite and external dependencies to their latest
versions.  In particular, gRPC was updated to version 1.0.3 and bolt
to 1.3.0.

The walletrpc package needed to be regenerated for the gRPC update.

While here, update the Travis-CI script so this can be tested there.
2016-10-27 12:27:58 -04:00
Dave Collins
d76627e6d5 Update for recent chaincfg API changes. (#451)
Since the coinbase maturity is now allowed to be defined per chain and
the old blockchain.CoinbaseMaturity constant has been removed, this
updates the code accordingly.

Also, update glide.lock to use the required version of btcd.
2016-08-12 19:27:51 -05:00
Dave Collins
e92f94dcd1 Update for recent chainhash-related API changes. (#450)
This updates all code to make use of the new chainhash package since the
old wire.ShaHash type and related functions have been removed in favor
of the abstracted package.

Also, while here, rename all variables that included sha in their name
to include hash instead.

Finally, update glide.lock to use the required version of btcd, btcutil,
and btcrpcclient.
2016-08-08 14:49:09 -05:00
Josh Rickmar
ce3bd39238 Unexport private methods from legacyrpc package.
This unexports every RPC handler function, as well as the
Server.PostClientRPC method which was only called by this package.

Fixes #435.
2016-05-05 11:28:18 -04:00
Josh Rickmar
146e92edc1 Fix credit slice indexing for transaction notifications.
Previously, this would always check a transaction output index against
the 0th credit's index.
2016-05-04 15:13:28 -04:00
Josh Rickmar
fb06a6bd04 Cleanup TransactionDetails RPC messages.
Remove the addresses field from TransactionDetails.Output.  It is
assumed that the caller is able to deserialize the transaction and
encode the output scripts to addresses, so this is unnecessary server
overhead and conflicts with the current API philosophy of not
duplicating data already included in another field.

Since there is no additional data included for outputs not controlled
by the wallet, remove the `mine` specifier from the Output message and
replace it with an output index.  Only include messages for controlled
outputs, rather than creating messages for both controlled and
uncontrolled outputs.  Rename the repeated field from `outputs` to
`credits` to be consistent with the `debits` field.

Bump major API version as this is a breaking change.

Closes #408.
2016-04-28 11:53:03 -04:00
Josh Rickmar
1e8c735294 Fix example node.js client after breaking API change.
Fixes #426.
2016-04-28 09:36:58 -04:00
Josh Rickmar
2009ee0230 Set gRPC cipher suites sooner in node.js example.
While here, also rename OpenSSL to BoringSSL since gRPC Core has
switched to that.

Fixes #429.
2016-04-27 16:36:05 -04:00
Josh Rickmar
a549b6908a Avoid calling getrawtransaction from signrawtransaction.
Replace all calls to getrawtransaction with gettxout.

As btcd no longer enables the transaction index by default,
getrawtransaction can no longer be depended on.  gettxout is safe to
use since it queries the utxo set.  This also means that it will
continue to work even when pruning is enabled.

This should be further improved in the future to not look up previous
output scripts over btcd rpc when they are already saved by the
wallet.

Fixes #410.
2016-04-22 12:00:48 -04:00
Josh Rickmar
86420c4890 Regenerate walletrpc package. (#418)
Fixes build when using newer versions of the grpc packages.
2016-04-19 09:12:17 -04:00
Josh Rickmar
3d7b8c6f40 Resurrect rpchelp_test.go
This file was accidentally removed when the gRPC server was introduced
and the legacy JSON-RPC server was moved to the legacyrpc package.
2016-04-13 10:44:43 -04:00
John C. Vernaleo
c2ed8ffc2b Add goclean.sh script from btcd.
This commit corrects various things found by the static checkers
(comments, unkeyed fields, return after some if/else).

Add generated files and legacy files to the whitelist to be ignored.

Catch .travis.yml up with btcd so goclean can be run.
2016-03-31 11:43:54 -04:00
Josh Rickmar
5d6392b65d Fix race in TestThrottle test.
Closes #355.
2016-03-16 11:55:27 -04:00