swaps

package
v1.23.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AlbySwapServiceFee = 1.0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Swap added in v1.18.0

type Swap = db.Swap

type SwapInfo added in v1.19.0

type SwapInfo struct {
	AlbyServiceFee     float64
	BoltzServiceFee    float64
	BoltzNetworkFeeSat uint64
	MinAmountSat       uint64
	MaxAmountSat       uint64
}

type SwapResponse added in v1.18.0

type SwapResponse struct {
	SwapId      string `json:"swapId"`
	PaymentHash string `json:"paymentHash"`
}

type SwapsService

type SwapsService interface {
	StopAutoSwapOut()
	EnableAutoSwapOut(encryptionKey string) error
	SwapOut(amountSat uint64, destination string, autoSwap, usedXpubDerivation bool) (*SwapResponse, error)
	SwapIn(amountSat uint64, autoSwap bool) (*SwapResponse, error)
	GetSwapOutInfo() (*SwapInfo, error)
	GetSwapInInfo() (*SwapInfo, error)
	RefundSwap(swapId, address string, enableRetries bool) error
	GetSwap(swapId string) (*Swap, error)
	ListSwaps() ([]Swap, error)
	GetDecryptedAutoSwapXpub() string
	ValidateAddress(address string) error
	ValidateXpub(xpub string) error
}

func NewSwapsService

func NewSwapsService(ctx context.Context, db *gorm.DB, cfg config.Config, keys keys.Keys, eventPublisher events.EventPublisher,
	lnClient lnclient.LNClient, transactionsService transactions.TransactionsService, encryptionKey string) SwapsService

Jump to

Keyboard shortcuts

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