handlers

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LiquidSwapCli = "liquidswap-cli"

	SwapCommandInfo     = SwapCommand("info")
	SwapCommandPropose  = SwapCommand("propose")
	SwapCommandFinalize = SwapCommand("finalize")
	SwapCommandAccept   = SwapCommand("accept")

	FeeRatePrecision       = 9 // BTC/Kb = 1000 / 100000000 sat/B
	FeeRatePrecisionFormat = "%.9f"
)

Variables

View Source
var ShellExecLock sync.Mutex

Functions

func AcceptSwapProposal

func AcceptSwapProposal(ctx context.Context, swapID uint64, address common.ConfidentialAddress, payload common.Payload, feeRate float64) (common.SwapProposal, error)

func CreateSwapProposal

func CreateSwapProposal(ctx context.Context, swapID uint64, address common.ConfidentialAddress, proposal common.ProposalInfo, feeRate float64) (common.SwapProposal, error)

func FinalizeSwapProposal

func FinalizeSwapProposal(ctx context.Context, swapID uint64, payload common.Payload) (common.SwapProposal, error)

func InfoSwapProposal

func InfoSwapProposal(ctx context.Context, swapID uint64, payload common.Payload) (common.SwapProposal, error)

func LiquidSwapAccept

func LiquidSwapAccept(address common.ConfidentialAddress, payload common.Payload, feeRate float64) shellexec.Options

func LiquidSwapFinalize

func LiquidSwapFinalize(payload common.Payload) shellexec.Options

func LiquidSwapInfo

func LiquidSwapInfo(payload common.Payload) shellexec.Options

func LiquidSwapPropose

func LiquidSwapPropose(address common.ConfidentialAddress, proposal common.ProposalInfo, feeRate float64) shellexec.Options

func OnAcceptSwapProposal

func OnAcceptSwapProposal(ctx context.Context, subject string, message *bank.Message) (*bank.Message, error)

func OnCreateSwapProposal

func OnCreateSwapProposal(ctx context.Context, subject string, message *bank.Message) (*bank.Message, error)

func OnFinalizeSwapProposal

func OnFinalizeSwapProposal(ctx context.Context, subject string, message *bank.Message) (*bank.Message, error)

func OnInfoSwapProposal

func OnInfoSwapProposal(ctx context.Context, subject string, message *bank.Message) (*bank.Message, error)

func SetElementsConf

func SetElementsConf(elementsConf string)

Types

type SwapCommand

type SwapCommand string

Jump to

Keyboard shortcuts

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