Commit Graph

124 Commits

Author SHA1 Message Date
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
Oliver Gugger
1670000fd8
walletrpc: add debug log statement for invalid PSBT
To help debug remote signing issues, it's helpful to get the raw PSBT
that failed to be parsed. This is necessary since serializing an invalid
PSBT is allowed and the checks only fail when trying to de-serialize
such an invalid packet.
2022-03-24 09:28:27 +01:00
Bjarne Magnussen
188b39268d
lnrpc: add DestOutput to the protobuf 2022-03-23 11:29:09 +01:00
Olaoluwa Osuntokun
f13399bc49
Merge pull request #6190 from ErikEk/listunspent-deafult-values
walletrpc: add default values to listunspent
2022-03-16 16:16:45 -07:00
Oliver Gugger
95c270d1f8
Merge pull request #6217 from liviu-ln/psbt-finalize-check
walletrpc: return an error when finalizing an already complete PSBT
2022-03-14 10:45:24 +01: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
ErikEk
74db83bbfb walletrpc: add default values to listunspent 2022-02-17 10:05:16 +01:00
Oliver Gugger
13f187046b
multi: fix issues reported by whitespace linter 2022-02-15 16:26:08 +01:00
Oliver Gugger
895a2e497b
multi: formatting and comment fixes 2022-02-10 11:02:02 +01:00
Liviu
e11c41ba8f walletrpc: return an error when finalizing an already complete PSBT
Return an error to the client if attempting to finalize a PSBS with no missing signatures.
2022-01-30 21:37:32 -08:00
Dimitris Apostolou
530a2059e5
multi: Fix typos [skip ci] 2022-01-24 12:19:02 +02:00
Oliver Gugger
8994d86a1d
walletrpc+itest: add SignPsbt RPC 2022-01-06 14:35:07 +01:00
Michael Rhee
7c18fb64ae lnrpc: add public key detail to signrpc KeyDescriptor [skip ci]
Clarification that KeyDescriptor describes the public key in
raw_key_bytes and the key_loc identifies the private key. Helps
clarify responses from calls like DeriveKey and DeriveNextKey from
WalletKit.

Fixes #5899
2021-11-02 07:57:12 -05:00
Oliver Gugger
78b700387c
cmd/lncli+walletrpc: add createwatchonly command 2021-10-14 15:42:58 +02:00
Oliver Gugger
1541b2ef1b
multi: create and list all default internal accounts 2021-10-14 15:42:56 +02:00
Oliver Gugger
a3addcc927
multi: forward SendCoins call over RPC 2021-10-14 15:42:52 +02:00
Oliver Gugger
19db382e24
multi: forward address and import calls over RPC
In order to support the full range of on-chain functionality, including
importing watch-only accounts in the watch-only instance, we need to
forward some calls like creating new addresses or importing accounts to
the remote signing instance.
2021-10-14 15:42:51 +02:00
Oliver Gugger
0b4e03f5fc
multi: add golang 1.17 compatible build tags
With go 1.17 a change to the build flags was implemented:
https://go.googlesource.com/proposal/+/master/design/draft-gobuild.md

The formatter now automatically adds the forward-compatible build tag
format and the linter checks for them, so we need to include them in our
code.
2021-09-29 17:31:37 -07:00