Commit Graph
102 Commits
Author SHA1 Message Date
Torakushi cdb015223b walletrpc+lnwallet: possibility to define an address type for changes in FundPsbt
By default, P2TR addresses are used for changes. However, some users
might encounter some problems with this change. We add the possibility
to define a custom address type in FundPsbt for default/imported accounts
(only P2TR for now). If no address type is specified for these accounts,
we will use P2WKH by default.
2023-02-08 12:35:44 +01:00
Oliver Gugger 0d6e791042 lntest+lnwallet: add ImportTaprootScript to wallet interface 2022-08-25 09:20:23 +02:00
priyanshiiit 99e4728eb7 lnwallet: adds list addresses method 2022-08-18 07:58:24 +05:30
Slyghtning b2e624cd52 psbt: Indicate which psbt inputs were signed 2022-08-16 19:31:06 -04:00
priyanshiiit 150c0b5de8 lnwallet: adds RequiredReserve method 2022-06-28 23:31:51 +05:30
priyanshiiit 61493a5f29 lnwallet: add previous_outpoints to ListTransactionDetails 2022-06-27 15:57:57 +05:30
Oliver Gugger 70103a1838 multi: return more information in list of leased outputs
With this commit we return the additional information the wallet now
provides about locked/leased outputs.
2022-05-12 10:24:40 +02:00
Oliver Gugger c73cf03a55 multi: add p2tr keyspend wallet support 2022-03-24 18:02:38 +01:00
Oliver Gugger efa36ce8f2 lntest+lnwallet: add AddressInfo to WalletController
We need to be able to query the watch-only wallet about a public key
when trying to sign with a key that we don't know the family or index
of. The easiest way to do that is to leverage the wallet's address index
to query the derivation path for a public key.
To give the RPC wallet access to that functionality, we need to expose
the method on the WalletController interface.
2022-03-24 14:13:05 +01:00
Bjarne Magnussen 052bb9d711 lnwallet: remove DestAddresses from lnwallet
With `OutputDetail` now containing the destination addresses, the `DestAddresses` field can be removed from the `lnwallet.TransactionDetail`. It is already populated when needed for backwards compatibility to `lnrpc.TransactionDetail` via `OutputDetail.Addresses`.
2022-03-23 11:29:09 +01:00
Bjarne Magnussen cbf6bd9aca lnwallet: add new DestOutputs field to TransactionDetail
A new `DestOutputs` field contains additional information on destinations of a transaction described with the `TransactionDetail` structure.

The additional information inside `DestOuputs` denote the output script and amount, as well as a flag `IsOurAddress` if the address is controlled by the node's wallet.
2022-03-23 11:28:18 +01:00
Olaoluwa Osuntokun e1e9de24df sweep: remove all unconfirmed descendant transactions when a sweep conflicts
Before this commit, we we were trying to sweep an anchor output, and
that output was spent by someone else (not the sweeper), then we would
report this back to the original resolver (allowing it to be cleaned
up), and also remove the set of inputs spent by that transaction from
the set we need to sweep.

However, it's possible that if a user is spending unconfirmed outputs,
then the wallet is holding onto an invalid transaction, as the outputs
that were used as inputs have been double spent elsewhere.

In this commit, we fix this issue by recursively removing all descendant
transactions of our past sweeps that have an intersecting input set as
the spending transaction. In cases where a user spent an unconfirmed
output to funding a channel, and that output was a descendant of the now
swept anchor output, the funds will now properly be marked as available.

Fixes #6241
2022-03-17 16:36:47 -07:00
Oliver Gugger 7dfe4018ce multi: use btcd's btcec/v2 and btcutil modules
This commit was previously split into the following parts to ease
review:
 - 2d746f68: replace imports
 - 4008f0fd: use ecdsa.Signature
 - 849e33d1: remove btcec.S256()
 - b8f6ebbd: use v2 library correctly
 - fa80bca9: bump go modules
2022-03-09 19:02:37 +01:00
Oliver Gugger d135b638f6 btcwallet: add SignPsbt 2022-01-06 13:24:32 +01:00
Oliver Gugger b54279dd87 lnwallet: add derivation and prev TX to UTXO 2022-01-06 13:24:31 +01:00
Oliver Gugger 8c77829c46 lnwallet+lntest+mod: bump btcwallet to export ScriptForOutput 2022-01-06 13:24:30 +01:00
Oliver Gugger 9da8333a6e multi: fix formatting 2022-01-06 13:24:30 +01:00
Oliver Gugger a3addcc927 multi: forward SendCoins call over RPC 2021-10-14 15:42:52 +02:00
Oliver Gugger 6093393e2f multi: refactor SignMessage to specify hashing 2021-10-14 15:42:44 +02:00
Oliver Gugger e79d59dd4c multi: use key locator for lnwallet.MessageSigner
To simplify the message signing API even further, we refactor the
lnwallet.MessageSigner interface to use a key locator instead of the
public key to identify which key should be signed with.
2021-10-08 12:06:52 +02:00
Wilmer Paulino 994405709a lnwallet: expose dry run support for ImportAccount 2021-05-06 19:04:21 -07:00
Tom Kirkpatrick 2f80283ec2 rpc: minConfs and spendUnconfirmed for EstimateFee 2021-04-22 20:35:51 +02:00
Tom Kirkpatrick 03b55446b5 refactor: use camel case for minConfs 2021-04-22 20:35:00 +02:00
Wilmer Paulino 2d163b788b lnwallet: expose wallet import related methods to WalletController 2021-04-05 15:41:09 -07:00
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
Joost Jager 9398220568 walletrpc: add ListLeases 2021-03-13 08:45:52 +01:00
Joost Jager 5ba0f8e355 lnwallet: bump btcwallet 2021-03-13 08:45:52 +01:00
Oliver Gugger f947576f33 lnwallet+mock: add new PSBT methods 2020-10-03 10:34:39 +02:00
Tom Kirkpatrick 73a5f325b6 lnrpc: ability to spend unconfirmed coins 2020-10-01 13:27:03 +01:00
yyforyongyu 987edc9d81 multi: add a rpc endpoint to track the recovery process 2020-06-25 15:49:54 +08:00
Wilmer Paulino 2a5b66ec00 lnwallet: note requirement of global coin selection lock 2020-06-12 11:22:30 -07:00
Wilmer Paulino ae7335ce3b lnwallet: expose output leases on WalletController interface 2020-06-03 18:49:39 -07:00
carla baeef63aab lnwallet: add label transaction to WalletController interface 2020-05-25 08:38:05 +02:00
carla e8ca306f12 lnrpc: display transaction label in transaction details 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 537dac3c62 multi: specify start and end height for ListTransactionDetails
Add start and end height parameters to the rpc and cli GetTransactions
endpoints. Default to returning all transactions from genesis to tip,
including unconfirmed transactions to maintain backwards compatibility.
2020-05-05 21:10:06 +02:00
Andras Banki-Horvath 556e3525ea misc: fix error formatting in multiple files 2020-04-24 19:15:08 +02:00
Conner Fromknecht 0f94b8dc62 multi: return input.Signature from SignOutputRaw 2020-04-10 14:27:35 -07: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
Wilmer Paulino 9e8a1707cc lnwallet: modify FetchInputInfo to return additional information for utxos 2019-08-22 13:49:41 -07:00
Wilmer Paulino a9efb61767 lnwallet: remove irrelevant fields in Utxo struct
These fields are only relevant for spent transaction outputs.
2019-08-22 13:49:38 -07:00
Johan T. Halseth 7df7449c47 Merge pull request #3187 from yaslama/UnknownAsDefaultAddressType
Use UnknownAddressType value as default in lnwallet.AddressType
2019-06-17 12:18:55 +02:00
Yaacov Akiba Slama a6d1d2435b Use UnknownAddressType value as default in lnwallet.AddressType 2019-06-11 10:16:43 +03:00
Olaoluwa Osuntokun eaf86cc4f9 lnwallet: add raw tx hex attribute to ListTransactionDetails 2019-06-07 07:36:32 -07:00
Joost Jager d55a8b7b29 channel+cnct: remove preimage from channel and resolution
Now that the success resolver preimage field is always populated by the
incoming contest resolver, preimage lookups earlier in the
process (channel and channel arbitrator) can mostly be removed.
2019-05-15 14:41:49 +02:00
Johan T. Halseth 10070ecab7 lnwallet: make BlockChainIO.GetUTXO take cancel chan
Use quit channels as cancel chan for call to GetUTXO.
2019-05-09 14:44:47 +02:00
Johan T. Halseth 306c0c8aab lnwallet: return ErrNoOutputs in case no outputs are sent to 2019-03-15 23:47:15 +01:00
Johan T. Halseth bb092bc61e lnwallet/interface: add CreateSimpleTx to wallet interface 2019-03-15 23:46:51 +01:00