lightning-terminal/litclient/jsoncallbacks.go
Elle Mouton 164ade0e8c
multi: expose Actions
This commit adds a Lit grpc service and uses it to expose a ListActions
method. Litcli is also updated to make use of this method.
2023-01-27 06:47:12 +02:00

49 lines
1.9 KiB
Go

package litclient
import (
"context"
"github.com/lightninglabs/faraday/frdrpc"
"github.com/lightninglabs/lightning-terminal/litrpc"
"github.com/lightninglabs/loop/looprpc"
"github.com/lightninglabs/pool/poolrpc"
"github.com/lightningnetwork/lnd/lnrpc"
"github.com/lightningnetwork/lnd/lnrpc/autopilotrpc"
"github.com/lightningnetwork/lnd/lnrpc/chainrpc"
"github.com/lightningnetwork/lnd/lnrpc/invoicesrpc"
"github.com/lightningnetwork/lnd/lnrpc/routerrpc"
"github.com/lightningnetwork/lnd/lnrpc/signrpc"
"github.com/lightningnetwork/lnd/lnrpc/verrpc"
"github.com/lightningnetwork/lnd/lnrpc/walletrpc"
"github.com/lightningnetwork/lnd/lnrpc/watchtowerrpc"
"github.com/lightningnetwork/lnd/lnrpc/wtclientrpc"
"google.golang.org/grpc"
)
// StubPackageRegistration defines the signature of a function that maps JSON
// method URIs to the function that should be called to handle the method.
type StubPackageRegistration func(map[string]func(context.Context,
*grpc.ClientConn, string, func(string, error)))
// Registrations defines a list of StubPackageRegistrations that a lit client
// will have access to when using Lit.
var Registrations = []StubPackageRegistration{
lnrpc.RegisterLightningJSONCallbacks,
lnrpc.RegisterStateJSONCallbacks,
autopilotrpc.RegisterAutopilotJSONCallbacks,
chainrpc.RegisterChainNotifierJSONCallbacks,
invoicesrpc.RegisterInvoicesJSONCallbacks,
routerrpc.RegisterRouterJSONCallbacks,
signrpc.RegisterSignerJSONCallbacks,
verrpc.RegisterVersionerJSONCallbacks,
walletrpc.RegisterWalletKitJSONCallbacks,
watchtowerrpc.RegisterWatchtowerJSONCallbacks,
wtclientrpc.RegisterWatchtowerClientJSONCallbacks,
looprpc.RegisterSwapClientJSONCallbacks,
poolrpc.RegisterTraderJSONCallbacks,
frdrpc.RegisterFaradayServerJSONCallbacks,
litrpc.RegisterSessionsJSONCallbacks,
litrpc.RegisterAccountsJSONCallbacks,
litrpc.RegisterAutopilotJSONCallbacks,
litrpc.RegisterFirewallJSONCallbacks,
}