channels

package
v0.8.19 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: MIT Imports: 21 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(wChan chan interface{}, db *sqlx.DB, c *gin.Context, ccReq CloseChannelRequest, reqId string) (err error)

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(db *sqlx.DB, wChan chan interface{}, req OpenChannelRequest, reqId string) (err error)

func RegisterChannelRoutes

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

Types

type BatchOpenRequest added in v0.7.3

type BatchOpenRequest struct {
	NodeId      int                `json:"nodeId"`
	Channels    []batchOpenChannel `json:"channels"`
	TargetConf  *int32             `json:"targetConf"`
	SatPerVbyte *int64             `json:"satPerVbyte"`
}

type BatchOpenResponse added in v0.7.3

type BatchOpenResponse struct {
	PendingChannels []pendingChannel `json:"pendingChannels"`
}

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 CloseChannelRequest added in v0.7.3

type CloseChannelRequest struct {
	NodeId          int     `json:"nodeId"`
	ChannelPoint    string  `json:"channelPoint"`
	Force           *bool   `json:"force"`
	TargetConf      *int32  `json:"targetConf"`
	DeliveryAddress *string `json:"deliveryAddress"`
	SatPerVbyte     *uint64 `json:"satPerVbyte"`
}

type CloseChannelResponse added in v0.7.3

type CloseChannelResponse struct {
	ReqId        string             `json:"reqId"`
	Status       string             `json:"status"`
	ClosePending pendingUpdate      `json:"closePending"`
	ChanClose    channelCloseUpdate `json:"chanClose"`
}

type OpenChannelRequest added in v0.7.3

type OpenChannelRequest struct {
	NodeId             int     `json:"nodeId"`
	SatPerVbyte        *uint64 `json:"satPerVbyte"`
	NodePubKey         string  `json:"nodePubKey"`
	LocalFundingAmount int64   `json:"localFundingAmount"`
	PushSat            *int64  `json:"pushSat"`
	TargetConf         *int32  `json:"targetConf"`
	Private            *bool   `json:"private"`
	MinHtlcMsat        *int64  `json:"minHtlcMsat"`
	RemoteCsvDelay     *uint32 `json:"remoteCsvDelay"`
	MinConfs           *int32  `json:"minConfs"`
	SpendUnconfirmed   *bool   `json:"spendUnconfirmed"`
	CloseAddress       *string `json:"closeAddress"`
}

type OpenChannelResponse added in v0.7.3

type OpenChannelResponse struct {
	ReqId               string `json:"reqId"`
	Status              string `json:"status"`
	ChannelPoint        string `json:"channelPoint,omitempty"`
	PendingChannelPoint string `json:"pendingChannelPoint,omitempty"`
}

type PsbtDetails added in v0.7.3

type PsbtDetails struct {
	FundingAddress string `json:"funding_address,omitempty"`
	FundingAmount  int64  `json:"funding_amount,omitempty"`
	Psbt           []byte `json:"psbt,omitempty"`
}

Jump to

Keyboard shortcuts

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