channels

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddChannelRecordIfDoesntExist

func AddChannelRecordIfDoesntExist(db *sqlx.DB, channel Channel) error

func CloseChannel added in v0.7.0

func CloseChannel(client lndClientCloseChannel,
	fundingTxid *lnrpc.ChannelPoint_FundingTxidStr,
	outputIndex uint32,
	satPerVbyte *uint64) (r string, err error)

func CloseChannelHandler added in v0.7.0

func CloseChannelHandler(c *gin.Context, db *sqlx.DB)

func ConvertLNDShortChannelID

func ConvertLNDShortChannelID(LNDShortChannelID uint64) string

func ConvertShortChannelIDToLND added in v0.7.0

func ConvertShortChannelIDToLND(ShortChannelID string) (uint64, error)

func OpenChannel added in v0.7.0

func OpenChannel(client lndClientOpenChannel, pubkey []byte, amt int64, satPerVbyte *uint64) (r string, err error)

func OpenChannelHandler added in v0.7.0

func OpenChannelHandler(c *gin.Context, db *sqlx.DB)

func RegisterControlChannelRoutes added in v0.7.0

func RegisterControlChannelRoutes(r *gin.RouterGroup, db *sqlx.DB)

Types

type Channel

type Channel struct {
	// A database primary key. NOT a channel_id as specified in BOLT 2
	ChannelDBID int `json:"channelDBId" db:"channel_db_id"`
	// In the c-lighting and BOLT format e.g. 505580:1917:1
	ShortChannelID string `json:"shortChannelId" db:"short_channel_id"`
	// At the moment only used by LND. Format is "funding tx id : output id"
	LNDChannelPoint   null.String `json:"lndChannelPoint" db:"lnd_channel_point"`
	Alias             null.String `json:"alias" db:"alias"`
	DestinationPubKey null.String `json:"destinationPubKey" db:"destination_pub_key"`
	LocalNodeId       int         `json:"localNodeId" db:"local_node_id"`
	CreatedOn         time.Time   `json:"createdOn" db:"created_on"`
	UpdateOn          null.Time   `json:"updatedOn" db:"updated_on"`
	LNDShortChannelID uint64      `json:"lndShortChannelId" db:"lnd_short_channel_id"`
}

type OpenChanRequestBody added in v0.7.0

type OpenChanRequestBody struct {
	LndAddress  string
	Amount      int64
	SatPerVbyte *uint64
}

type Response added in v0.7.0

type Response struct {
	Response string
}

Jump to

Keyboard shortcuts

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