swapper

package
v0.0.0-...-084831f Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: AGPL-3.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const MinConfirmations = 6
View Source
const SwapLockTime = 288

Variables

This section is empty.

Functions

This section is empty.

Types

type InProgressRedeem

type InProgressRedeem struct {
	PaymentHash        string
	Preimage           *string
	LockHeight         int32
	ConfirmationHeight int32
	Utxos              []string
	RedeemTxids        []string
}

type Redeemer

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

func NewRedeemer

func NewRedeemer(
	ssClient lnrpc.LightningClient,
	ssRouterClient routerrpc.RouterClient,
	subswapClient submarineswaprpc.SubmarineSwapperClient,
	updateSubswapTxid func(paymentHash, txid string) error,
	updateSubswapPreimage func(paymentHash, paymentPreimage string) error,
	getInProgressRedeems func(blockheight int32) ([]*InProgressRedeem, error),
	setSubswapConfirmed func(paymentHash string) error,
) *Redeemer

func (*Redeemer) RedeemWithFees

func (r *Redeemer) RedeemWithFees(preimage []byte, targetConf int32, satPerVbyte int64) (string, error)

func (*Redeemer) RedeemWithinBlocks

func (r *Redeemer) RedeemWithinBlocks(preimage []byte, blocks int32) (string, error)

func (*Redeemer) Start

func (r *Redeemer) Start(ctx context.Context)

type Server

type Server struct {
	breez.UnimplementedSwapperServer
	// contains filtered or unexported fields
}

Server implements lsp grpc functions

func NewServer

func NewServer(
	network *chaincfg.Params,
	redisPool *redis.Pool,
	client, ssClient lnrpc.LightningClient,
	subswapClient submarineswaprpc.SubmarineSwapperClient,
	redeemer *Redeemer,
	walletKitClient walletrpc.WalletKitClient,
	ssRouterClient routerrpc.RouterClient,
	insertSubswapPayment func(paymentHash, paymentRequest string, lockheight, confirmationheight int32, utxos []string) error,
	updateSubswapPreimage func(paymentHash, paymentPreimage string) error,
	hasFilteredAddress func(addrs []string) (bool, error),
) *Server

func (*Server) AddFundInit

func (*Server) AddFundInitLegacy

func (s *Server) AddFundInitLegacy(ctx context.Context, in *breez.AddFundInitRequest) (*breez.AddFundInitReply, error)

func (*Server) AddFundStatus

func (*Server) GetSwapPayment

func (*Server) GetSwapPaymentLegacy

func (s *Server) GetSwapPaymentLegacy(ctx context.Context, in *breez.GetSwapPaymentRequest) (*breez.GetSwapPaymentReply, error)

func (*Server) RedeemSwapPayment

func (*Server) RedeemSwapPayments

func (s *Server) RedeemSwapPayments()

Jump to

Keyboard shortcuts

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