Commit graph

61 commits

Author SHA1 Message Date
Roy Lee
5a0c010688 multi-account: update sendPairs to take keyscope pointer 2022-09-28 11:48:23 -07:00
Roy Lee
00c29c3936 multi-account: add forEachKeyScope uitility iterator 2022-09-28 11:48:23 -07:00
Roy Lee
de408d4133 consolidate: remove watch-only address/account support 2022-09-20 00:29:47 -07:00
Roy Lee
e0cb7b7a91 multi-scope: use BIP0049 instead of BIP0049Plus 2022-09-17 14:39:05 -07:00
Roy Lee
f27ea6094e rpc: remove all address type alias in lookupKeyScope
Use the same address type name as bitcoind getnewaddress()
2022-09-17 14:15:12 -07:00
Roy Lee
610ec20ea8 ci: run "make fmt" 2022-08-08 01:26:02 -07:00
Roy Lee
fd92031e27 rpc: handle "input not found" case in signrawtransaction 2022-08-04 21:55:39 -07:00
Roy Lee
d1700f2658 rpc: allow listtransaction take "default" as account
This is also another quirks that lbcwallet mixes account with label.
2022-07-27 10:32:52 -07:00
Roy Lee
be9df55a7c rpc: remove deprecated rpc "move" and "setaccount" 2022-07-27 10:29:35 -07:00
Roy Lee
e5f7fefaac [lbry] rpc: update getaddressinfo help messages 2022-07-05 21:06:53 -07:00
Roy Lee
444fc83aad [lbry] fee: update getinfo.paytxfee to 0
This is a hack fix to unblock lbrypool.net.

The paytxfee in lbcwallet is actually not being used anywhere, and is
hardcoded to DefaultRelayFee, which is 1000. Lbrycrd sets default to 0.

Also, since the paytxfee is not actually used/implemented, the
'settxfee' RPC is also
2022-06-14 17:03:16 -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
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
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
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
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
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
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
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
Josh Rickmar
5d6392b65d Fix race in TestThrottle test.
Closes #355.
2016-03-16 11:55:27 -04:00
Josh Rickmar
6cf22b7944 Remove legacy JSON-RPC notifications.
These notifications were added to support real time updates for
btcgui.  As the btcgui project is no longer being developed, there are
no more consumers of this API, and it makes sense to remove them given
their various issues (the largest being that notifiations are sent
unsubscribed to clients that may never be interrested in them).

A new notification server has already been added to the wallet package
to handle notifications in a RPC-server agnostic way.  This server is
the means by which the wallet notifies changes for gRPC clients.  If
per-client registered notifications are to be re-added for the
JSON-RPC server, they should be integrated with the new notification
server rather than using this legacy code.
2016-03-11 14:14:33 -05:00