Documentation
¶
Index ¶
- func CreateMusig2Session(ctx context.Context, signer lndclient.SignerClient, ...) (*input.MuSig2SessionInfo, error)
- func CreateMusig2Sessions(ctx context.Context, signer lndclient.SignerClient, ...) ([]*input.MuSig2SessionInfo, [][]byte, error)
- func CreateMusig2SessionsPerDeposit(ctx context.Context, signer lndclient.SignerClient, ...) (map[string]*input.MuSig2SessionInfo, map[string][]byte, map[string]int, error)
- func GetPrevoutInfo(prevOuts map[wire.OutPoint]*wire.TxOut) []*swapserverrpc.PrevoutInfo
- func SelectDeposits(deposits []*deposit.Deposit, amount int64) ([]*deposit.Deposit, error)
- func ToPrevOuts(deposits []*deposit.Deposit, pkScript []byte) (map[wire.OutPoint]*wire.TxOut, error)
- func ToWireOutpoints(outpoints []*lnrpc.OutPoint) ([]wire.OutPoint, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateMusig2Session ¶
func CreateMusig2Session(ctx context.Context, signer lndclient.SignerClient, addrParams *address.Parameters, staticAddress *script.StaticAddress) (*input.MuSig2SessionInfo, error)
CreateMusig2Session creates a musig2 session for the deposit.
func CreateMusig2Sessions ¶
func CreateMusig2Sessions(ctx context.Context, signer lndclient.SignerClient, deposits []*deposit.Deposit, addrParams *address.Parameters, staticAddress *script.StaticAddress) ([]*input.MuSig2SessionInfo, [][]byte, error)
CreateMusig2Sessions creates a musig2 session for a number of deposits.
func CreateMusig2SessionsPerDeposit ¶
func CreateMusig2SessionsPerDeposit(ctx context.Context, signer lndclient.SignerClient, deposits []*deposit.Deposit, addrParams *address.Parameters, staticAddress *script.StaticAddress) ( map[string]*input.MuSig2SessionInfo, map[string][]byte, map[string]int, error)
CreateMusig2SessionsPerDeposit creates a musig2 session for a number of deposits.
func GetPrevoutInfo ¶
func GetPrevoutInfo(prevOuts map[wire.OutPoint]*wire.TxOut, ) []*swapserverrpc.PrevoutInfo
GetPrevoutInfo converts a map of prevOuts to protobuf.
func SelectDeposits ¶
SelectDeposits sorts the deposits by amount in descending order. It then selects the deposits that are needed to cover the amount requested without leaving a dust change. It returns an error if the sum of deposits minus dust is less than the requested amount.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.