ldk

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetVssNodeIdentifier added in v1.11.0

func GetVssNodeIdentifier(keys keys.Keys) (string, error)

func NewLDKService

func NewLDKService(ctx context.Context, cfg config.Config, eventPublisher events.EventPublisher, mnemonic, workDir string, network string, staticChannelsBackup *events.StaticChannelsBackupEvent, restoredFromSeed bool, vssToken string) (result lnclient.LNClient, err error)

TODO: remove staticChannelsBackup *events.StaticChannelsBackupEvent, restoredFromSeed bool (we have a dedicated SCB recovery tool)

Types

type LDKEventBroadcaster

type LDKEventBroadcaster interface {
	Subscribe() chan *ldk_node.Event
	CancelSubscription(chan *ldk_node.Event)
}

func NewLDKEventBroadcaster

func NewLDKEventBroadcaster(ctx context.Context, source <-chan *ldk_node.Event) LDKEventBroadcaster

type LDKService

type LDKService struct {
	// contains filtered or unexported fields
}

func (*LDKService) CloseChannel

func (ls *LDKService) CloseChannel(ctx context.Context, closeChannelRequest *lnclient.CloseChannelRequest) (*lnclient.CloseChannelResponse, error)

func (*LDKService) ConnectPeer

func (ls *LDKService) ConnectPeer(ctx context.Context, connectPeerRequest *lnclient.ConnectPeerRequest) error

func (*LDKService) DisconnectPeer

func (ls *LDKService) DisconnectPeer(ctx context.Context, peerId string) error

func (*LDKService) GetBalances

func (ls *LDKService) GetBalances(ctx context.Context) (*lnclient.BalancesResponse, error)

func (*LDKService) GetInfo

func (ls *LDKService) GetInfo(ctx context.Context) (info *lnclient.NodeInfo, err error)

func (*LDKService) GetLogOutput

func (ls *LDKService) GetLogOutput(ctx context.Context, maxLen int) ([]byte, error)

func (*LDKService) GetNetworkGraph

func (ls *LDKService) GetNetworkGraph(ctx context.Context, nodeIds []string) (lnclient.NetworkGraphResponse, error)

func (*LDKService) GetNewOnchainAddress

func (ls *LDKService) GetNewOnchainAddress(ctx context.Context) (string, error)

func (*LDKService) GetNodeConnectionInfo

func (ls *LDKService) GetNodeConnectionInfo(ctx context.Context) (nodeConnectionInfo *lnclient.NodeConnectionInfo, err error)

func (*LDKService) GetNodeStatus

func (ls *LDKService) GetNodeStatus(ctx context.Context) (nodeStatus *lnclient.NodeStatus, err error)

func (*LDKService) GetOnchainBalance

func (ls *LDKService) GetOnchainBalance(ctx context.Context) (*lnclient.OnchainBalanceResponse, error)

func (*LDKService) GetPubkey added in v1.2.0

func (ls *LDKService) GetPubkey() string

func (*LDKService) GetStorageDir

func (ls *LDKService) GetStorageDir() (string, error)

func (*LDKService) GetSupportedNIP47Methods

func (ls *LDKService) GetSupportedNIP47Methods() []string

func (*LDKService) GetSupportedNIP47NotificationTypes

func (ls *LDKService) GetSupportedNIP47NotificationTypes() []string

func (*LDKService) ListChannels

func (ls *LDKService) ListChannels(ctx context.Context) ([]lnclient.Channel, error)

func (*LDKService) ListPeers

func (ls *LDKService) ListPeers(ctx context.Context) ([]lnclient.PeerDetails, error)

func (*LDKService) ListTransactions

func (ls *LDKService) ListTransactions(ctx context.Context, from, until, limit, offset uint64, unpaid bool, invoiceType string) (transactions []lnclient.Transaction, err error)

func (*LDKService) LookupInvoice

func (ls *LDKService) LookupInvoice(ctx context.Context, paymentHash string) (transaction *lnclient.Transaction, err error)

func (*LDKService) MakeInvoice

func (ls *LDKService) MakeInvoice(ctx context.Context, amount int64, description string, descriptionHash string, expiry int64) (transaction *lnclient.Transaction, err error)

func (*LDKService) OpenChannel

func (ls *LDKService) OpenChannel(ctx context.Context, openChannelRequest *lnclient.OpenChannelRequest) (*lnclient.OpenChannelResponse, error)

func (*LDKService) RedeemOnchainFunds

func (ls *LDKService) RedeemOnchainFunds(ctx context.Context, toAddress string, amount uint64, sendAll bool) (string, error)

func (*LDKService) ResetRouter

func (ls *LDKService) ResetRouter(key string) error

func (*LDKService) SendKeysend

func (ls *LDKService) SendKeysend(ctx context.Context, amount uint64, destination string, custom_records []lnclient.TLVRecord, preimage string) (*lnclient.PayKeysendResponse, error)

func (*LDKService) SendPaymentProbes

func (ls *LDKService) SendPaymentProbes(ctx context.Context, invoice string) error

func (*LDKService) SendPaymentSync

func (ls *LDKService) SendPaymentSync(ctx context.Context, invoice string) (*lnclient.PayInvoiceResponse, error)

func (*LDKService) SendSpontaneousPaymentProbes

func (ls *LDKService) SendSpontaneousPaymentProbes(ctx context.Context, amountMsat uint64, nodeId string) error

func (*LDKService) Shutdown

func (ls *LDKService) Shutdown() error

func (*LDKService) SignMessage

func (ls *LDKService) SignMessage(ctx context.Context, message string) (string, error)

func (*LDKService) UpdateChannel

func (ls *LDKService) UpdateChannel(ctx context.Context, updateChannelRequest *lnclient.UpdateChannelRequest) error

func (*LDKService) UpdateLastWalletSyncRequest

func (ls *LDKService) UpdateLastWalletSyncRequest()

Jump to

Keyboard shortcuts

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