mock

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 29, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func New

func New(c *config.Network) *Backend

func (*Backend) CreateInvoice

func (b *Backend) CreateInvoice(ctx context.Context, amt int64, desc string) (*models.Invoice, error)

func (*Backend) DecodePayReq

func (b *Backend) DecodePayReq(ctx context.Context, payreq string) (*models.PayReq, error)

func (*Backend) GetChannelInfo

func (b *Backend) GetChannelInfo(ctx context.Context, channel *models.Channel) error

func (*Backend) GetChannelsBalance

func (b *Backend) GetChannelsBalance(ctx context.Context) (*models.ChannelsBalance, error)

func (*Backend) GetForwardingHistory added in v0.4.0

func (b *Backend) GetForwardingHistory(ctx context.Context, startTime string, maxNumEvents uint32) ([]*models.ForwardingEvent, error)

func (*Backend) GetInvoice

func (b *Backend) GetInvoice(ctx context.Context, hash string) (*models.Invoice, error)

func (*Backend) GetNode

func (b *Backend) GetNode(ctx context.Context, pubkey string, includeChannels bool) (*models.Node, error)

func (*Backend) GetTransactions added in v0.1.0

func (b *Backend) GetTransactions(ctx context.Context) ([]*models.Transaction, error)

func (*Backend) GetWalletBalance

func (b *Backend) GetWalletBalance(ctx context.Context) (*models.WalletBalance, error)

func (*Backend) Info

func (b *Backend) Info(ctx context.Context) (*models.Info, error)

func (*Backend) ListChannels

func (b *Backend) ListChannels(ctx context.Context, opt ...options.Channel) ([]*models.Channel, error)

func (*Backend) NodeName

func (b *Backend) NodeName() string

func (*Backend) Ping

func (b *Backend) Ping() error

func (*Backend) SendPayment

func (l *Backend) SendPayment(ctx context.Context, payreq *models.PayReq) (*models.Payment, error)

func (*Backend) SubscribeChannels

func (b *Backend) SubscribeChannels(context.Context, chan *models.ChannelUpdate) error

func (*Backend) SubscribeGraphEvents added in v0.4.0

func (b *Backend) SubscribeGraphEvents(ctx context.Context, channel chan *models.ChannelEdgeUpdate) error

func (*Backend) SubscribeInvoice

func (b *Backend) SubscribeInvoice(ctx context.Context, ChannelInvoice chan *models.Invoice) error

func (*Backend) SubscribeRoutingEvents added in v0.2.0

func (b *Backend) SubscribeRoutingEvents(ctx context.Context, channel chan *models.RoutingEvent) error

func (*Backend) SubscribeTransactions added in v0.1.0

func (b *Backend) SubscribeTransactions(ctx context.Context, channel chan *models.Transaction) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL