boltz

package module
v0.0.0-...-f934a24 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2023 License: GPL-3.0 Imports: 18 Imported by: 3

README

boltz

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSwapNotFound = errors.New("transaction not in mempool or settled/canceled")

Functions

func CheckTransaction

func CheckTransaction(transactionHex, lockupAddress string, amt int64) (string, error)

CheckTransaction checks that the transaction corresponds to the adresss and amount

func ClaimFee

func ClaimFee(claimAddress string, feePerKw int64) (int64, error)

ClaimFees return the fees needed for the claimed transaction for a feePerKw

func ClaimTransaction

func ClaimTransaction(
	redeemScript, transactionHex string,
	claimAddress string,
	preimage, key string,
	fees int64,
) (string, error)

ClaimTransaction returns the claim transaction to broadcast after sending it also to boltz

func GetNodePubkey

func GetNodePubkey() (string, error)

func GetTransaction

func GetTransaction(id, lockupAddress string, amt int64) (status, txid, tx string, eta int, err error)

GetTransaction return the transaction after paying the ln invoice

Types

type BadRequestError

type BadRequestError string

func (*BadRequestError) Error

func (e *BadRequestError) Error() string

type ReverseSwap

type ReverseSwap struct {
	Preimage string
	Key      string
	// contains filtered or unexported fields
}

func NewReverseSwap

func NewReverseSwap(amt btcutil.Amount, feesHash string, routingNode []byte) (*ReverseSwap, error)

NewReverseSwap begins the reverse submarine process.

type ReverseSwapInfo

type ReverseSwapInfo struct {
	FeesHash string
	Max      int64
	Min      int64
	Fees     struct {
		Percentage float64
		Lockup     int64
		Claim      int64
	}
}

func GetReverseSwapInfo

func GetReverseSwapInfo() (*ReverseSwapInfo, error)

type RoutingHint

type RoutingHint struct {
	HopHintsList []struct {
		NodeID                    string `json:"nodeId"`
		ChanID                    string `json:"chanId"`
		FeeBaseMsat               uint32 `json:"feeBaseMsat"`
		FeeProportionalMillionths uint32 `json:"feeProportionalMillionths"`
		CltvExpiryDelta           uint32 `json:"cltvExpiryDelta"`
	} `json:"hopHintsList"`
}

func GetRoutingHints

func GetRoutingHints(routingNode []byte) ([]RoutingHint, error)

Jump to

Keyboard shortcuts

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