fees

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BestRouteFees

type BestRouteFees struct {
	MaxCapacity              btcutil.Amount
	FeeProportionalMillionth uint64
	FeeBase                  btcutil.Amount
}

func (*BestRouteFees) ForAmount

func (f *BestRouteFees) ForAmount(amount btcutil.Amount) btcutil.Amount

type DebtType

type DebtType string
const (
	DebtTypeNone    DebtType = "NONE"
	DebtTypeCollect DebtType = "COLLECT"
	DebtTypeLend    DebtType = "LEND"
)

type FundingOutputPolicies

type FundingOutputPolicies struct {
	MaximumDebt       btcutil.Amount
	PotentialCollect  btcutil.Amount
	MaxAmountFor0Conf btcutil.Amount
}

func (*FundingOutputPolicies) DebtAmount

func (p *FundingOutputPolicies) DebtAmount(paymentAmount, lightningFee btcutil.Amount) btcutil.Amount

func (*FundingOutputPolicies) DebtType

func (p *FundingOutputPolicies) DebtType(paymentAmount, lightningFee btcutil.Amount) DebtType

func (*FundingOutputPolicies) FundingConfirmations

func (p *FundingOutputPolicies) FundingConfirmations(paymentAmount, lightningFee btcutil.Amount) uint

func (*FundingOutputPolicies) FundingOutputAmount

func (p *FundingOutputPolicies) FundingOutputAmount(paymentAmount, lightningFee btcutil.Amount) btcutil.Amount

func (*FundingOutputPolicies) FundingOutputPadding

func (p *FundingOutputPolicies) FundingOutputPadding(paymentAmount, lightningFee btcutil.Amount) btcutil.Amount

func (*FundingOutputPolicies) MinFundingAmount

func (p *FundingOutputPolicies) MinFundingAmount(paymentAmount, lightningFee btcutil.Amount) btcutil.Amount

type SwapFees

type SwapFees struct {
	RoutingFee          btcutil.Amount
	DebtType            DebtType
	DebtAmount          btcutil.Amount
	OutputAmount        btcutil.Amount
	OutputPadding       btcutil.Amount
	ConfirmationsNeeded uint
}

func ComputeSwapFees

func ComputeSwapFees(amount btcutil.Amount, bestRouteFees []BestRouteFees, policies *FundingOutputPolicies, takeFeeFromAmount bool) *SwapFees

Jump to

Keyboard shortcuts

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