application

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2025 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildInfo

type BuildInfo struct {
	Version string
	Commit  string
	Date    string
}

type Notification

type Notification struct {
	Address    string
	NewVtxos   []client.Vtxo
	SpentVtxos []client.Vtxo
}

type Service

type Service struct {
	BuildInfo BuildInfo

	arksdk.ArkClient
	// contains filtered or unexported fields
}

func NewService

func NewService(
	buildInfo BuildInfo,
	storeCfg store.Config,
	storeSvc types.Store,
	dbSvc ports.RepoManager,
	schedulerSvc ports.SchedulerService,
	lnSvc ports.LnService,
	esploraUrl string,
) (*Service, error)

func (*Service) AddDefaultSettings

func (s *Service) AddDefaultSettings(ctx context.Context) error

func (*Service) ClaimVHTLC

func (s *Service) ClaimVHTLC(ctx context.Context, preimage []byte) (string, error)

func (*Service) ConnectLN

func (s *Service) ConnectLN(ctx context.Context, connectUrl string) error

func (*Service) DisconnectLN

func (s *Service) DisconnectLN()

func (*Service) GetAddress

func (s *Service) GetAddress(ctx context.Context, sats uint64) (string, string, string, string, error)

func (*Service) GetBalanceLN

func (s *Service) GetBalanceLN(ctx context.Context) (msats uint64, err error)

func (*Service) GetDelegatePublicKey

func (s *Service) GetDelegatePublicKey(ctx context.Context) (string, error)

func (*Service) GetInvoice

func (s *Service) GetInvoice(ctx context.Context, amount uint64, memo, preimage string) (string, string, error)

func (*Service) GetRound

func (s *Service) GetRound(ctx context.Context, roundId string) (*client.Round, error)

func (*Service) GetSettings

func (s *Service) GetSettings(ctx context.Context) (*domain.Settings, error)

func (*Service) GetTotalBalance

func (s *Service) GetTotalBalance(ctx context.Context) (uint64, error)

func (*Service) GetVHTLC

func (s *Service) GetVHTLC(
	ctx context.Context,
	receiverPubkey, senderPubkey *secp256k1.PublicKey,
	preimageHash []byte,
	refundLocktimeParam *common.AbsoluteLocktime,
	unilateralClaimDelayParam *common.RelativeLocktime,
	unilateralRefundDelayParam *common.RelativeLocktime,
	unilateralRefundWithoutReceiverDelayParam *common.RelativeLocktime,
) (string, *vhtlc.VHTLCScript, error)

func (*Service) GetVtxoNotifications

func (s *Service) GetVtxoNotifications(ctx context.Context) <-chan Notification

func (*Service) IncreaseInboundCapacity

func (s *Service) IncreaseInboundCapacity(ctx context.Context, amount uint64) (string, error)

ln -> ark (reverse submarine swap)

func (*Service) IncreaseOutboundCapacity

func (s *Service) IncreaseOutboundCapacity(ctx context.Context, amount uint64) (string, error)

ark -> ln (submarine swap)

func (*Service) IsConnectedLN

func (s *Service) IsConnectedLN() bool

func (*Service) IsInvoiceSettled

func (s *Service) IsInvoiceSettled(ctx context.Context, invoice string) (bool, error)

func (*Service) IsLocked added in v0.1.8

func (s *Service) IsLocked(ctx context.Context) bool

func (*Service) IsReady

func (s *Service) IsReady() bool

func (*Service) ListVHTLC

func (s *Service) ListVHTLC(ctx context.Context, preimageHashFilter string) ([]client.Vtxo, []vhtlc.Opts, error)

func (*Service) ListWatchedAddresses

func (s *Service) ListWatchedAddresses(ctx context.Context) ([]domain.VtxoRolloverTarget, error)

func (*Service) LockNode

func (s *Service) LockNode(ctx context.Context) error

func (*Service) NewSettings

func (s *Service) NewSettings(ctx context.Context, settings domain.Settings) error

func (*Service) PayInvoice

func (s *Service) PayInvoice(ctx context.Context, invoice string) (string, error)

func (*Service) RefundVHTLC added in v0.1.4

func (s *Service) RefundVHTLC(ctx context.Context, swapId, preimageHash string, withReceiver bool) (string, error)

func (*Service) ResetWallet added in v0.1.8

func (s *Service) ResetWallet(ctx context.Context) error

func (*Service) Settle added in v0.1.6

func (s *Service) Settle(ctx context.Context) (string, error)

func (*Service) Setup

func (s *Service) Setup(ctx context.Context, serverUrl, password, privateKey string) (err error)

func (*Service) SetupFromMnemonic

func (s *Service) SetupFromMnemonic(ctx context.Context, serverUrl, password, mnemonic string) error

func (*Service) SubscribeForAddresses

func (s *Service) SubscribeForAddresses(ctx context.Context, addresses []string) error

func (*Service) UnlockNode

func (s *Service) UnlockNode(ctx context.Context, password string) error

func (*Service) UnsubscribeForAddresses

func (s *Service) UnsubscribeForAddresses(ctx context.Context, addresses []string) error

func (*Service) UnwatchAddress

func (s *Service) UnwatchAddress(ctx context.Context, address string) error

func (*Service) UpdateSettings

func (s *Service) UpdateSettings(ctx context.Context, settings domain.Settings) error

func (*Service) WatchAddressForRollover

func (s *Service) WatchAddressForRollover(ctx context.Context, address, destinationAddress string, taprootTree []string) error

func (*Service) WhenNextSettlement added in v0.1.8

func (s *Service) WhenNextSettlement(ctx context.Context) time.Time

Jump to

Keyboard shortcuts

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