Commit Graph

141 Commits

Author SHA1 Message Date
ffranr
cd566eb097
multi: fix fmt.Errorf error wrapping
Refactor fmt.Errorf usage to correctly wrap errors instead of using
non-wrapping format verbs.
2024-02-27 11:13:40 +00:00
Oliver Gugger
54fa5805c2
lnwallet+lnrpc: add address index to ListAddresses
For the itest in the next commit we'll need to be able to fetch the
input information for an address over RPC. The only piece missing is the
address' index, which we add in this commit. Everything else should be
derivable from the ListAddresses and ListAccounts calls.
2024-02-26 11:05:19 +01:00
Oliver Gugger
fb20cd598e
lnwallet+lnrpc: add derivation info for P2TR change addrs
In some situations (for example in Taproot Assets), we need to be able
to prove that an address is a bare BIP-0086 address that doesn't commit
to any script. We can do that by providing the BIP-0032 derivation info
and internal key.
2024-02-26 11:05:18 +01:00
Oliver Gugger
094fdbfa72
walletrpc: implement third PSBT funding option
And now we finally implement the new funding option: Allowing coin
selection with pre-defined inputs and outputs.
2024-02-23 08:58:10 +01:00
Oliver Gugger
0f6c25a773
walletrpc: add PsbtCoinSelect option to FundPsbt 2024-02-23 08:58:10 +01:00
Oliver Gugger
446152e1a5
walletrpc: refactor to prepare for third funding option
In the following commits we'll add a new, third, funding option for
funding PSBTs: It will allow users to specify pre-selected inputs but
still request the wallet to perform coin selection up to the total
output sum amount.
2024-02-23 08:58:10 +01:00
Oliver Gugger
f7198c4105
walletrpc+subserver_config: add coin selection strategy
With this commit we also add the config-level coin selection strategy to
the wallet RPC server.
2024-02-23 08:58:09 +01:00
Keagan McClelland
bc3feba267 contractcourt+lnrpc+lnd: s/BreachArbiter/BreachArbitrator
Since we have two other examples of XArbitrator, we rename
BreachArbiter to BreachArbitrator to keep things consistent.
The aim is to reduce the amount of lore you need to know to
intuit where things are or what they do.
2024-02-06 13:32:47 -07:00
Andras Banki-Horvath
7725a57055
walletkit: add startheight parameter to ListSweeps
By default ListSweeps will list all sweeps known to the wallet. Over
time this may become expensive to call and callers may not be interested
in the full history. This commit adds a `startheight` parameter to the
`ListSweeps` RPC call. This parameter can be used to fetch sweeps only
from a specified start block height or only unconfirmed ones if it is
set to -1.
2024-02-01 21:02:24 +01:00
ziggie
4f77758419
walletrpc: Add Taproot witness types to rpc. 2024-01-29 15:09:22 +00:00
Mohamed Awnallah
1402ffd17b
protolint: configure protolint and fix the protolinting issues
This PR addresses the following:
- Install and Configure protolint to enforce the protobuf style guide rules in the CI.
- Fix the protolinting issues (package and import ordering) while maintaining the comaptibility.
2024-01-22 22:00:00 +02:00
ziggie
81dd631935
walletrpc: add status to BumpFeeResponse type.
BumpFee now returns a status signaling the success of the operation.
2024-01-09 01:15:42 +01:00
ziggie
227ac770af
walletrpc: add new RemoveTransaction endpoint.
The RemoveTransaction endpoint removes the transaction with the
provided txid including all its descendants from the internal wallet.

We still keep watching for the address of the transation in case
the transcation is confirmed nonetheless. This command is particular
useful for neutrino backends because new bitcoind versions do not
reply with an invalid transaction error code when the tx published
fails to be included into the mempool (fullnodes do).
2023-12-12 14:18:16 +01:00
ErikEk
f0bc6d804c rpc: add gettransaction endpoint to walletrpc sub-server 2023-12-10 22:14:12 +01:00
Keagan McClelland
c0da9ca1b0 lnrpc: add walletrpc doc tags to enable lncli api doc generation 2023-11-20 14:40:37 -07:00
yyforyongyu
0532b82dd5
multi: add new method FeePerVByte to avoid manual conversion 2023-10-13 17:00:53 +08:00
positiveblue
49e099f0a0
lnrpc: run make rpc
The docker image have been updated so we are using another protobuf
version to generate the files. The generate files include the version of
the compiler used to creating them, so we need this commit to pass the
`rpc-check` step in our CI.
2023-09-05 10:11:51 -07:00
ffranr
51e2da6fbc
walletrpc: allow both txid fields populated during OutPoint unmarshall 2023-06-14 14:07:46 +01:00
ffranr
72a89520d4
walletrpc: export unmarshall lnrpc.OutPoint functionality 2023-06-14 14:07:46 +01:00
Torkel Rogstad
681e3ceede
rpc: verify address is for correct net
Verify that the addresses we're decoding when sending coins onchain are
for the correct network. Without this check we'll convert the users
addresses to their equivalent on other networks, which is a gross
violation of the principle of least astonishment.
2023-06-13 11:58:34 +02:00
Oliver Gugger
31330f1ffc
walletrpc: add note to poorly named field
Fixes #2986.
2023-06-13 11:58:33 +02:00
Oliver Gugger
56dba2df03
multi: update linter, fix new issues 2023-06-13 11:58:33 +02:00
Oliver Gugger
ea8fe6f3f3
mod+lnrpc: bump google.golang.org/protobuf to v1.30.0 2023-05-11 22:52:00 +02:00
Oliver Gugger
8df4edef1b
Merge pull request #7624 from ellemouton/marshalBytesAndStringTxid
multi: populate both string and byte TXID in lnrpc.Outpoint
2023-05-08 17:32:54 +02:00
Slyghtning
8f5910bf91 rpc: fix code style 2023-04-29 22:44:26 +02:00
Slyghtning
903b5dde89 rpc: SendOutputs considers anchor reserve 2023-04-29 22:44:23 +02:00
Elle Mouton
7b186716a1
multi: populate both string and byte TXID in lnrpc.Outpoint
This commit adds a a new `MarshalOutPoint` helper in the `lnrpc` package
that can be used to convert a `wire.Outpoint` to an `lnrpc.Outpoint`.
By using this helper, we are less likely to forget to populate both the
string and byte form of the TXID.
2023-04-24 16:19:26 +02:00
Olaoluwa Osuntokun
66a85bf9db
Merge pull request #7473 from emilioziniades/realign-witness-types
input+lnrpc: realign witness types
2023-04-13 16:09:01 -07:00
Emilio Ziniades
ea341bddd5
lnrpc: test witness type mapping 2023-04-12 21:58:17 +02:00
Emilio Ziniades
396a138fb7
lnrpc: add allWitnessTypes map
Refactor `PendingSweeps` to use `allWitnessTypes` map, and
return an error from `PendingSweeps` if an unknown witness
type is used, instead of logging a warning.
2023-04-12 21:58:00 +02:00
Emilio Ziniades
e9547daae2
lnrpc: update and regenerate witness type proto 2023-04-12 21:57:35 +02:00
CRex15
fd49640256 Add note to LabelTransaction TXID field
The description for TXID in Label Transaction should include a note
that, in the case of GRPC, the TXID needs to be passed in little-endian
(reverse) byte order. A user passing the bytes in big-endian order is
met with an error message stating that the transaction is not found in
the wallet and no other information with which to troubleshoot.
2023-02-28 10:39:47 -05:00
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
Elle Mouton
2fd4f3f180
go.mod+lnrpc+github: point to latest kvdb changes
Use kvdb package v1.4.1. This update also forced the protobuf version to
be bumped which required `make rpc` to be run to update the generated
files. This also required a bump in the github pinned dependencies
config for the grpc and protobuf libs.
2023-01-25 14:03:00 +02:00
ziggie
7b68289a7a
walletrpc: add sign/verify methods
Adding the grpc functionality to sign and verify messages with
single addresses
2023-01-24 09:22:05 +01:00
Evan Kaloudis
981f8969b4
lnrpc/gen_protos.sh: remove js build tag 2022-09-07 18:32:05 -04:00
Oliver Gugger
2dac7ef35a
lnrpc: add wallet output type for Taproot 2022-08-25 09:21:52 +02:00
Oliver Gugger
74fbd61d5f
walletrpc: add ImportTapscript RPC 2022-08-25 09:21:50 +02:00
Oliver Gugger
97dfc04117
lnrpc: allow importing Taproot pubkeys 2022-08-25 09:20:23 +02:00
Olaoluwa Osuntokun
b3998ddb5c
lnrpc: re-compile protos w/ Go 1.19 2022-08-24 11:43:00 -05:00
priyanshiiit
dba77edf2a lnrpc: adds list addresses rpc 2022-08-18 08:09:16 +05:30
Slyghtning
b2e624cd52 psbt: Indicate which psbt inputs were signed 2022-08-16 19:31:06 -04:00
priyanshiiit
3befeadaf3 lnrpc+lncli: adds required reserve rpc & cli 2022-06-28 23:31:51 +05:30
priyanshiiit
983d917d4a lnrpc: add previous_outpoints to listchaintxns 2022-06-27 15:57:57 +05:30
Oliver Gugger
36d6656d0d
walletrpc: add p2tr to NextAddr and BumpFee RPCs 2022-06-10 14:03:46 +02:00
Olaoluwa Osuntokun
2298ef81ab
lnrpc/walletrpc: reject PSBT packets w/o any UTXO input info
Fixes https://github.com/lightningnetwork/lnd/issues/6567
2022-06-02 13:05:58 -07:00
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
a25d5255fb
walletrpc: add pkScript and value to UTXO lease 2022-05-12 10:24:39 +02:00
positiveblue
d4021c5aca
lnrpc: fix log.go files
The `log.go` file of each subserver is a copy and paste of the others.
All of them have the same typo, an extra space in a comment, and the
the definition of a function not used anywhere.
2022-04-01 18:12:59 -07:00
Oliver Gugger
c73cf03a55
multi: add p2tr keyspend wallet support 2022-03-24 18:02:38 +01:00