Commit graph

18 commits

Author SHA1 Message Date
bitromortac
e13c5bda9b frdrpcserver: implement ForwardingAbility RPC handler 2026-06-11 12:40:32 +02:00
bitromortac
dc9b6388af frdrpcserver: implement GetChannelEvents
Implements the handler against the chanevents store. A zero end_time
defaults to the server's current wall clock so callers can omit it for
"up to now" queries. max_events is clamped to a 10000-row hard cap that
also serves as the implicit default when the caller leaves the field at
zero. An unknown chan_point maps to NotFound; negative time bounds and
start_time after end_time map to InvalidArgument. The response sets
has_more whenever the page filled to the requested limit so the client
knows to keep paginating.

Also registers the new endpoint in the macaroon permissions table
under the channels:read entitlement.
2026-05-08 20:13:58 +02:00
bitromortac
44bb23186a faraday+frdrpcserver: pass in chan events store
Threads the chanevents.Store the daemon already constructs into the
frdrpcserver.Config so the upcoming GetChannelEvents handler has a
read path. Both standalone and subserver startup wire the same store
instance.
2026-05-08 20:13:58 +02:00
bitromortac
d98e8ef59e
faraday+frdrpcserver: move server infrastructure to faraday package
Move the gRPC/REST server lifecycle, macaroon service management, and
TLS setup from frdrpcserver.RPCServer to a new Faraday struct in the
faraday package. This leaves RPCServer as a pure RPC request handler
with only business logic methods.

The Faraday struct embeds *frdrpcserver.RPCServer and takes ownership
of all infrastructure concerns: gRPC/REST server creation, macaroon
service setup, TLS configuration, and start/stop lifecycle. The
frdrpcserver.Config is slimmed down to just Lnd and BitcoinClient.

The macaroons.go file is also moved from frdrpcserver to the faraday
package, as the macaroon constants are now used by the Faraday struct
directly.
2026-03-24 09:43:39 +01:00
Boris Nagaev
0c931adaf1
frdrpcserver: fix granularity parsing from RPC
priceCfgFromRPC only set granularity for CoinCap, leaving Coinbase and Bitfinex
with nil granularity. That caused backend validation to fail.

Set granularity via granularityFromRPC for Coinbase and Bitfinex too, and add
a regression test.
2026-03-03 13:40:18 -05:00
Boris Nagaev
21b4254810
frcli, frdrpcserver: expose bitfinex fiat backend 2026-02-28 18:43:20 -05:00
Elle Mouton
617c793ec3
multi: update LND, lndclient and btclog deps 2025-03-05 11:51:45 +02:00
nordbjorn
771d1ae381
Only fetch onchain transactions from LND within start_time and end_time range 2025-01-20 11:05:10 +01:00
Andras Banki-Horvath
3a3c8caab0
build: fix linter issues 2024-09-26 21:05:13 +02:00
Ron Ballesteros
2f8f33941d
update rpcserver-max-recv-size 2024-08-22 05:48:51 -10:00
Oliver Gugger
2f17d0d2ae
frdrpcserver: bump REST connection gRPC max recv size 2024-01-29 10:15:04 +02:00
Oliver Gugger
c80a59758c
multi: bump lnd+lndclient compile time dependency 2023-02-24 19:18:54 +01:00
Oliver Gugger
71bb06f6f7
multi: fix linter issues, run imports 2022-11-21 17:12:17 +01:00
Oliver Gugger
42329df815
frdrpcserver: also create macaroon service in subserver mode
This fixes a small oversight in #140 where we forgot to also _create_
the macaroon service in the StartAsSubserver() method.
2022-06-24 13:28:03 +02:00
Elle Mouton
00a8a39aa8
frdrpc/rpcserver: rename createDefaultMacaroonFile
Rename createDefaultMacaroonFile to withMacaroonService since this is
now a more appropriate name.
2022-06-23 17:26:41 +02:00
Elle Mouton
8a59081473
multi: use lndclient MacaroonService
Since the code for creating and using a macaroon service is the same for
multiple projects (pool, loop, faraday & litd), the code has been
unified in lndclient. So this commit removes the macaroon service code
and instead uses the lndclient code.

Since the default key for the macaroon db is now a shared secret with
LND, faraday requires LND's admin macaroon so that this secret can be
derived. So this commit also updates all references of LND's `readme`
macaroon to the `admin` macaroon.
2022-06-23 17:26:41 +02:00
Elle Mouton
21cc003ce1
frdrpcserver: move RequiredPermissions to dedicated dir
This commit moves the RequiredPermissions map to its own directory so
that projects importing the permissions list dont need to import all the
dependencies of the frdrpcserver package.
2022-06-14 15:48:02 +02:00
Oliver Gugger
6f4c01d0f6
frdrpc+frdrpcserver: move RPC server into own package
To avoid the frdrpc package having dependencies to other libraries and
making using the JSON/WASM stubs hard, we extract all the business logic
and RPC server code into its own package called frdrpcserver.
2022-05-02 12:24:44 +02:00