2
0
mirror of https://github.com/edouardparis/lntop synced 2024-11-17 21:26:12 +00:00
lntop/network/backend/backend.go

49 lines
1.3 KiB
Go
Raw Normal View History

2019-03-15 16:02:16 +00:00
package backend
import (
"context"
"github.com/edouardparis/lntop/network/models"
"github.com/edouardparis/lntop/network/options"
)
type Backend interface {
2019-04-05 15:00:25 +00:00
Ping() error
2019-03-15 16:02:16 +00:00
SubscribeInvoice(context.Context, chan *models.Invoice) error
2019-03-27 12:32:23 +00:00
SubscribeChannels(context.Context, chan *models.ChannelUpdate) error
2019-03-15 16:02:16 +00:00
NodeName() string
2019-04-04 11:06:38 +00:00
Info(context.Context) (*models.Info, error)
2022-09-07 17:30:21 +00:00
GetNode(context.Context, string, bool) (*models.Node, error)
2019-03-22 16:20:41 +00:00
2019-03-15 16:02:16 +00:00
GetWalletBalance(context.Context) (*models.WalletBalance, error)
2019-03-29 11:38:09 +00:00
GetChannelsBalance(context.Context) (*models.ChannelsBalance, error)
2019-03-15 16:02:16 +00:00
ListChannels(context.Context, ...options.Channel) ([]*models.Channel, error)
2019-04-04 08:09:58 +00:00
GetChannelInfo(context.Context, *models.Channel) error
2019-03-15 16:02:16 +00:00
CreateInvoice(context.Context, int64, string) (*models.Invoice, error)
GetInvoice(context.Context, string) (*models.Invoice, error)
DecodePayReq(context.Context, string) (*models.PayReq, error)
SendPayment(context.Context, *models.PayReq) (*models.Payment, error)
GetTransactions(context.Context) ([]*models.Transaction, error)
SubscribeTransactions(context.Context, chan *models.Transaction) error
2021-05-09 21:37:01 +00:00
SubscribeRoutingEvents(context.Context, chan *models.RoutingEvent) error
2022-09-02 20:14:05 +00:00
SubscribeGraphEvents(context.Context, chan *models.ChannelEdgeUpdate) error
2022-11-08 23:52:31 +00:00
GetForwardingHistory(context.Context, string, uint32) ([]*models.ForwardingEvent, error)
2019-03-15 16:02:16 +00:00
}