Documentation ¶
Index ¶
- type Service
- func (s *Service) AddFundsInit(notificationToken, lspID string, params *data.OpeningFeeParams) (*data.AddFundInitReply, error)
- func (s *Service) ClaimFeeEstimates(claimAddress string) (map[int32]int64, error)
- func (s *Service) FetchReverseSwap(hash string) (*data.ReverseSwap, error)
- func (s *Service) GetFundStatus(notificationToken string) (*data.FundStatusReply, error)
- func (s *Service) NewReverseSwap(amt int64, feesHash, claimAddress string) (string, error)
- func (s *Service) PayReverseSwap(hash, deviceID, title, body string, fee int64) error
- func (s *Service) Refund(address, refundAddress string, targetConf int32, satPerByte int64) (string, error)
- func (s *Service) RefundFees(address, refundAddress string, targetConf int32, satPerByte int64) (int64, error)
- func (s *Service) ResetUnconfirmedReverseSwapClaimTransaction() error
- func (s *Service) ReverseRoutingNode() []byte
- func (s *Service) ReverseSwapPayments() (*data.ReverseSwapPaymentStatuses, error)
- func (s *Service) SetNonBlockingUnconfirmed() error
- func (s *Service) SetReverseSwapClaimFee(hash string, fee int64) error
- func (s *Service) SettlePendingTransfers()
- func (s *Service) Start() error
- func (s *Service) Stop() error
- func (s *Service) UnconfirmedReverseSwapClaimTransaction() (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService( cfg *config.Config, breezDB *db.DB, breezAPI services.API, daemonAPI lnnode.API, sendPayment func(payreq string, amount int64, lastHopPubkey []byte, fee int64) (string, error), addInvoice func(invoiceRequest *data.AddInvoiceRequest) (paymentRequest string, lspFee int64, err error), lspList func() (*data.LSPList, error), getGlobalReceiveLimit func() (maxReceive int64, err error), onServiceEvent func(data.NotificationEvent)) (*Service, error)
func (*Service) AddFundsInit ¶
func (s *Service) AddFundsInit(notificationToken, lspID string, params *data.OpeningFeeParams) (*data.AddFundInitReply, error)
AddFundsInit is responsible for topping up an existing channel
func (*Service) ClaimFeeEstimates ¶
func (*Service) FetchReverseSwap ¶
func (s *Service) FetchReverseSwap(hash string) (*data.ReverseSwap, error)
func (*Service) GetFundStatus ¶
func (s *Service) GetFundStatus(notificationToken string) (*data.FundStatusReply, error)
GetFundStatus gets a notification token and does two things: 1. Register for notifications on all saved addresses 2. Fetch the current status for the saved addresses from the server
func (*Service) NewReverseSwap ¶
func (*Service) PayReverseSwap ¶
func (*Service) Refund ¶
func (s *Service) Refund(address, refundAddress string, targetConf int32, satPerByte int64) (string, error)
Refund broadcast a refund transaction for a sub swap address.
func (*Service) RefundFees ¶
func (s *Service) RefundFees(address, refundAddress string, targetConf int32, satPerByte int64) (int64, error)
RefundFees return the fees of a refund transaction for a sub swap address.
func (*Service) ResetUnconfirmedReverseSwapClaimTransaction ¶
func (*Service) ReverseRoutingNode ¶
func (*Service) ReverseSwapPayments ¶
func (s *Service) ReverseSwapPayments() (*data.ReverseSwapPaymentStatuses, error)
func (*Service) SetNonBlockingUnconfirmed ¶
func (*Service) SetReverseSwapClaimFee ¶
func (*Service) SettlePendingTransfers ¶
func (s *Service) SettlePendingTransfers()
SettlePendingTransfers watch for routing peer connection and once connected it does two things:
- Ask the breez server to pay in lightning for addresses that the user has sent funds to and that the funds are confirmred
- Ask the breez server to pay on-chain for funds were sent to him in lightning as part of the remove funds flow
func (*Service) UnconfirmedReverseSwapClaimTransaction ¶
Click to show internal directories.
Click to hide internal directories.