You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lntop/network/backend/backend.go

35 lines
915 B
Go

5 years ago
package backend
import (
"context"
"github.com/edouardparis/lntop/network/models"
"github.com/edouardparis/lntop/network/options"
)
type Backend interface {
SubscribeInvoice(context.Context, chan *models.Invoice) error
SubscribeChannels(context.Context, chan *models.ChannelUpdate) error
5 years ago
NodeName() string
5 years ago
Info(ctx context.Context) (*models.Info, error)
5 years ago
GetWalletBalance(context.Context) (*models.WalletBalance, error)
5 years ago
GetChannelsBalance(context.Context) (*models.ChannelsBalance, error)
5 years ago
ListChannels(context.Context, ...options.Channel) ([]*models.Channel, error)
GetChannelInfo(context.Context, *models.Channel) error
5 years ago
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)
}