Commit Graph

44 Commits

Author SHA1 Message Date
Wilmer Paulino
f91e7cde59
lnwallet: expose optional account filter for several WalletController methods 2021-04-05 15:41:06 -07:00
Wilmer Paulino
f38bf4d7fa
lnwallet: expose required account parameter for WalletController methods 2021-04-05 15:41:05 -07:00
yyforyongyu
9d0d88ac21
lnrpc+lncli: deprecate sat_per_byte and add sat_per_vbyte
This commit deprecates/replaces the old field `sat_per_byte` with
`sat_per_vbyte`. While the old field suggests sat per byte, it’s
actually using sat per virtual byte. We use the Hidden param to hide all
the deprecated flags. These flags won't show up in help menu onwards,
while stay valid that can be passed from cli. Thus bash scripts
referencing these fields won't be broken.
2021-03-26 17:16:40 +08:00
Joost Jager
9398220568 walletrpc: add ListLeases 2021-03-13 08:45:52 +01:00
Joost Jager
b8e54fffbf walletrpc: extract leases marshall function 2021-03-13 08:45:52 +01:00
Joost Jager
37331a5ab2 walletrpc: use locked utxo struct from wtxmgr 2021-03-13 08:45:52 +01:00
Joost Jager
927f17be32 walletrpc: parameterize output lease duration 2021-03-13 08:45:52 +01:00
Joost Jager
5ba0f8e355 lnwallet: bump btcwallet 2021-03-13 08:45:52 +01:00
Johan T. Halseth
4ea494e8c5
lnrpc: wrap subservers in GrpcHandler
In order to be able to register the subservers with the root grpc server
before we have all dependencies available, we wrap them in an
GrpcHandler struct. This struct will initially hold an empty reference
to the subservers, which allows us to register with the GRPC server, and
later populate and create the subserver instance.
2021-03-11 13:05:23 +01:00
carla
887ff442db
multi: fix verbose output for listsweeps and check all against wallet
Previously, the verbose output of listsweeps would fail if we did not
find some sweeps in our wallet's listtransactions output. This could be
the case for sweeps that were rbf-ed, so the endpoint would fail. This
commit also updates the listsweeps endpoint to always check against the
wallet, so that we do not return these discarded sweeps that never
confirmed.
2020-11-13 13:59:52 +02:00
Graham Krizek
5aa0d26251
lnrpc+macaroon: skip subserver macaroons on stateless_init
This will prevent the subservers from writing macaroons to disk
when the stateless_init flag is set to true. It accomplishes
this by storing the StatelessInit value in the Macaroon Service.
2020-11-07 11:24:35 +01:00
Oliver Gugger
843efc324b
walletrpc: serialize TXID not outpoint
The txid_str field of a locked UTXO's outpoint shouldn't contain the
output index but only the reverse order hex serialized transaction ID.
2020-10-06 10:59:51 +02:00
Oliver Gugger
9a063355e2
walletrpc: disallow locking with internal ID
The internal lock ID that the wallet kit subserver uses to lock inputs
for itself shouldn't be allowed to be used when locking inputs manually
over the RPC.
2020-10-03 10:34:55 +02:00
Oliver Gugger
6229609be7
lnrpc+walletrpc: add RPCs for new PSBT methods 2020-10-03 10:34:53 +02:00
Tom Kirkpatrick
73a5f325b6
lnrpc: ability to spend unconfirmed coins 2020-10-01 13:27:03 +01:00
yyforyongyu
c0e2513350
lnrpc+rpcserver: support list/delete on marcaroon IDs 2020-08-14 12:33:13 +08:00
Matheus Degiovani
0e73d2d243 itest: assert unspent before performing CPFP
This reduces the flakiness of the CPFP test by asserting the wallet has
seen the unspent output before attempting to perform the walletkit's
BumpFee method.

Previously the attempt to bump the fee of the target transaction could
be made before the wallet had had a chance to fully process the
transaction, causing a flaky error.
2020-07-13 13:24:22 -03:00
Wilmer Paulino
c2f1fe26c1
rpc: acquire global coin select lock in related RPCs
This ensures proper coin selection synchronization between lnd and users
of the RPC to avoid potential double spend errors.
2020-06-12 11:22:29 -07:00
Oliver Gugger
558d63718b
rpcserver+lnrpc: register REST subservers with root server 2020-06-04 08:50:44 +02:00
Wilmer Paulino
acfd432602
walletrpc: add ListUnspent RPC 2020-06-03 19:03:04 -07:00
Wilmer Paulino
9dcaf4fbc6
walletrpc: add output leases RPCs 2020-06-03 18:50:09 -07:00
carla
97a843f3cd
walletrpc: add LabelTransaction rpc 2020-05-25 11:33:33 +02:00
carla
93a1b61218
walletrpc: add transaction label to PublishTransaction 2020-05-19 13:31:51 +02:00
carla
099161ed0b
multi: add label to WalletController SendOutputs and dependent rpcs
Add a label parameter to the WalletController SendOutputs endpoint and
update rpcs that use it to allow optional provision of labels.
2020-05-19 13:31:51 +02:00
carla
75370ce6b4
multi: update WalletController PublishTransaction to include label
Add label parameter to PublishTransaction in WalletController
interface. A labels package is added to store generic labels that are
used for the different types of transactions that are published by lnd.

To keep commit size down, the two endpoints that require a label
parameter be passed down have a todo added, which will be removed in
subsequent commits.
2020-05-19 13:30:00 +02:00
carla
f3212057dd
walletrpc: add list sweeps to rpc and cli 2020-05-06 09:25:44 +02:00
Joost Jager
c376cdb733
input: add anchor witness type 2020-03-17 16:25:35 +01:00
Joost Jager
29e1489179
sweep: leave exclusive group unchanged on parameter update
Exclusive group is a static property that doesn't need to be updated.
Requiring the exclusive group to be passed into UpdateParams creates a
burden for the caller to make sure they supply the existing group.

This change will be beneficial for users that bump anchor sweeps that
have exclusive groups set.
2020-03-17 14:19:39 +01:00
Joost Jager
b0aae13d70
sweep: allow force sweeps 2020-01-15 16:56:44 +01:00
Joost Jager
16832cefa3
sweep: allow updating all sweep parameters
This is a preparation for adding additional parameters besides the fee
preference.
2020-01-15 16:56:40 +01:00
Joost Jager
280611ab6e
sweep+walletrpc+lncli: report requested fee preference for pending sweeps
Previously only the fee rate used for the last sweep (the sweep bucket
average) was reported. This commit adds the request fee preference to
the report, which is used to select a bucket and the sweep tx fee rate.
2020-01-09 14:56:08 +01:00
Joost Jager
38adfd7ecc
sweep: create sweep parameters struct
Prepares for adding more input-specific sweep parameters.
2019-12-13 12:02:42 +01:00
Olaoluwa Osuntokun
777ed104a3
chainfee: create new chainfee package extracting fees from lnwallet
In this commit, we create a new chainfee package, that houses all fee
related functionality used within the codebase. The creation of this new
package furthers our long-term goal of extracting functionality from the
bloated `lnwallet` package into new distinct packages. Additionally,
this new packages resolves a class of import cycle that could arise if a
new package that was imported by something in `lnwallet` wanted to use
the existing fee related functions in the prior `lnwallet` package.
2019-10-31 16:41:57 -07:00
Lars Lehtonen
8194d260ff
lnrpc: stdlib context 2019-09-28 16:06:34 -07:00
Wilmer Paulino
2cc5891c8c
lnrpc/walletrpc: use current height as height hint for cpfp
In this commit, we address an issue that would cause us to scan from the
genesis block for the spend of an output that we wish to use to raise
the fee of a transaction through CPFP. This was due to setting a 0
height hint when constructing the input required by the sweeper and was
discovered due to the recently added validation checks at the chain
notifier level. We'll now use the current height as the height hint
instead as the sweeper will end up creating a new transaction that
spends the input.
2019-08-22 13:49:42 -07:00
Wilmer Paulino
9e8a1707cc
lnwallet: modify FetchInputInfo to return additional information for utxos 2019-08-22 13:49:41 -07:00
Olaoluwa Osuntokun
94a20e30e1
lnrpc/walletrpc: reject nil outpoints as args
In this commit, we modify the parsing of user provided outpoints to
ensure that we catch a nil (empty) output early. Otherwise, passing a
set of incorrect arguments would cause `lnd` to crash.
2019-06-17 16:56:16 -07:00
Wilmer Paulino
a4675063b7
lnrpc/walletrpc: expose bumping fee of inputs/transactions over RPC
This RPC exposes the recently added BumpFee functionality to the
UtxoSweeper in order to allow users of the RPC to manually bump fees of
low fee inputs/transactions.
2019-06-11 15:06:40 -07:00
Wilmer Paulino
d01f88ecdc
lnrpc/walletrpc: expose pending input sweeps within UtxoSweeper over RPC 2019-06-05 12:10:33 -07:00
Johan T. Halseth
3daaa8cf74
lndrpc/invoicesrpc+walletrpc: clean up imports 2019-02-02 15:48:22 +01:00
Joost Jager
8996a1490d
lnrpc: reuse common FileExists function 2019-02-01 09:47:31 +01:00
Alex Bosworth
d432ee6f13
trivial: typo fix
Correct log name of WalletKit
2019-01-26 16:57:09 -08:00
Olaoluwa Osuntokun
273dee607b
lnrpc: remove oneof from signrpc.KeyDescriptor 2018-12-06 16:25:38 -08:00
Olaoluwa Osuntokun
406fd2a37e
lnrpc/walletrpc: implement the WalletKitServer gRPC service
In this commit, we implement the newly defiend WalletKitServer gRPC
service. We use the same template w.r.t build tags as the existing
signrpc service.
2018-12-06 16:25:34 -08:00