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, feeRate chainfee.SatPerKWeight, ...) ([]*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 ¶
func SelectDeposits(deposits []*deposit.Deposit, amount int64, feeRate chainfee.SatPerKWeight, commitmentType lnrpc.CommitmentType) ([]*deposit.Deposit, error)
SelectDeposits sorts the deposits by amount in descending order. It then selects the deposits that are needed to cover the requested amount plus transaction fees and dust. The fee rate and commitment type are used to estimate the transaction fee for the current selection, since each additional input increases the fee.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.