ports

package
v0.3.21 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LnService

type LnService interface {
	Connect(ctx context.Context, opts *domain.LnConnectionOpts, network string) error
	IsConnected() bool
	GetInfo(ctx context.Context) (version string, pubkey string, err error)
	GetLnConnectUrl() string
	GetInvoice(ctx context.Context, value uint64, note, preimage string) (invoice string, preimageHash string, err error)
	DecodeInvoice(ctx context.Context, invoice string) (value uint64, preimageHash []byte, err error)
	IsInvoiceSettled(ctx context.Context, invoice string) (ok bool, err error)
	PayInvoice(ctx context.Context, invoice string) (preimage string, err error)
	Disconnect()
	GetBalance(ctx context.Context) (balance uint64, err error)
}

type RepoManager added in v0.1.8

type RepoManager interface {
	Settings() domain.SettingsRepository
	VHTLC() domain.VHTLCRepository
	Delegate() domain.DelegateRepository
	Swap() domain.SwapRepository
	SubscribedScript() domain.SubscribedScriptRepository
	ChainSwaps() domain.ChainSwapRepository
	Close()
}

type SchedulerService

type SchedulerService interface {
	Start()
	Stop()
	ScheduleNextSettlement(at time.Time, settleFunc func()) error
	ScheduleTaskAtTime(at time.Time, taskFunc func()) error
	ScheduleTaskAtHeight(target uint32, taskFunc func()) error
	CancelNextSettlement()
	WhenNextSettlement() time.Time
}

type Unlocker added in v0.1.8

type Unlocker interface {
	// GetPassword retrieves a password to unlock a service
	GetPassword(ctx context.Context) (string, error)
}

Unlocker is an interface that provides a way to retrieve passwords automatically

Jump to

Keyboard shortcuts

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