utils

package
v0.31.1-beta Latest Latest
Warning

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

Go to latest
Published: May 5, 2025 License: MIT Imports: 9 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHtlc

func GetHtlc(hash lntypes.Hash, contract *loopdb.SwapContract,
	chainParams *chaincfg.Params) (*swap.Htlc, error)

GetHtlc composes and returns the on-chain swap script.

func GetHtlcScriptVersion

func GetHtlcScriptVersion(
	protocolVersion loopdb.ProtocolVersion) swap.ScriptVersion

GetHtlcScriptVersion returns the correct HTLC script version for the passed protocol version.

func MuSig2Sign

func MuSig2Sign(version input.MuSig2Version, privKeys []*btcec.PrivateKey,
	pubKeys []*btcec.PublicKey, tweaks *input.MuSig2Tweaks,
	msg [32]byte) ([]byte, error)

MuSig2Sign will create a MuSig2 signature for the passed message using the passed private keys.

func ObtainSwapPaymentAddr

func ObtainSwapPaymentAddr(swapInvoice string, chainParams *chaincfg.Params) (
	*[32]byte, error)

ObtainSwapPaymentAddr will retrieve the payment addr from the passed invoice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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