Documentation ¶
Index ¶
- func AddChannelOrUpdateChannelStatus(db *sqlx.DB, channel Channel) (int, error)
- func CloseChannel(eventChannel chan interface{}, db *sqlx.DB, c *gin.Context, ...) (err error)
- func GetClosureStatus(lndClosureType lnrpc.ChannelCloseSummary_ClosureType) commons.ChannelStatus
- func GetNodePeerAlias(nodeId int, eventNodeId int, db *sqlx.DB) (string, error)
- func InitializeManagedChannelCache(db *sqlx.DB) error
- func OpenChannel(eventChannel chan interface{}, db *sqlx.DB, req commons.OpenChannelRequest, ...) (err error)
- func RegisterChannelRoutes(r *gin.RouterGroup, db *sqlx.DB, eventChannel chan interface{})
- func UpdateChannelStatus(db *sqlx.DB, channelId int, status commons.ChannelStatus) error
- type Channel
- func GetAllChannels(db *sqlx.DB) (channels []Channel, err error)
- func GetChannel(db *sqlx.DB, channelId int) (Channel, error)
- func GetChannels(db *sqlx.DB, nodeIds []int, all bool, channelIds []int) ([]*Channel, error)
- func GetOpenChannelsForNodeId(db *sqlx.DB, nodeId int) (channels []Channel, err error)
- type ChannelForTag
- type ChannelPolicy
- type ChannelsNodes
- type NodeForTag
- type PendingHtlcs
- type PsbtDetails
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddChannelOrUpdateChannelStatus ¶ added in v0.10.0
func CloseChannel ¶ added in v0.7.0
func GetClosureStatus ¶ added in v0.10.0
func GetClosureStatus(lndClosureType lnrpc.ChannelCloseSummary_ClosureType) commons.ChannelStatus
GetClosureStatus returns Closing when our API is outdated and a new lnrpc.ChannelCloseSummary_ClosureType is added
func GetNodePeerAlias ¶ added in v0.12.0
func InitializeManagedChannelCache ¶ added in v0.10.0
func OpenChannel ¶ added in v0.7.0
func RegisterChannelRoutes ¶
func RegisterChannelRoutes(r *gin.RouterGroup, db *sqlx.DB, eventChannel chan interface{})
func UpdateChannelStatus ¶ added in v0.10.0
Types ¶
type Channel ¶
type Channel struct { // ChannelID A database primary key. NOT a channel_id as specified in BOLT 2 ChannelID int `json:"channelId" db:"channel_id"` // ShortChannelID In the c-lighting and BOLT format e.g. 505580:1917:1 ShortChannelID *string `json:"shortChannelId" db:"short_channel_id"` FundingTransactionHash string `json:"fundingTransactionHash" db:"funding_transaction_hash"` FundingOutputIndex int `json:"fundingOutputIndex" db:"funding_output_index"` ClosingTransactionHash *string `json:"closingTransactionHash" db:"closing_transaction_hash"` LNDShortChannelID *uint64 `json:"lndShortChannelId" db:"lnd_short_channel_id"` Capacity int64 `json:"capacity" db:"capacity"` Private bool `json:"private" db:"private"` FirstNodeId int `json:"firstNodeId" db:"first_node_id"` SecondNodeId int `json:"secondNodeId" db:"second_node_id"` InitiatingNodeId *int `json:"initiatingNodeId" db:"initiating_node_id"` AcceptingNodeId *int `json:"acceptingNodeId" db:"accepting_node_id"` ClosingNodeId *int `json:"closingNodeId" db:"closing_node_id"` Status commons.ChannelStatus `json:"status" db:"status_id"` CreatedOn time.Time `json:"createdOn" db:"created_on"` UpdateOn *time.Time `json:"updatedOn" db:"updated_on"` }
func GetAllChannels ¶ added in v0.10.0
func GetChannels ¶ added in v0.13.0
type ChannelForTag ¶ added in v0.16.0
type ChannelForTag struct { ShortChannelId *string `json:"shortChannelId" db:"short_channel_id"` ChannelId int `json:"channelId" db:"channel_id"` NodeId int `json:"nodeId" db:"node_id"` Alias *string `json:"alias" db:"alias"` Type string `json:"type" db:"type"` }
func GetChannelsForTag ¶ added in v0.16.0
func GetChannelsForTag(db *sqlx.DB) (channels []ChannelForTag, err error)
type ChannelPolicy ¶ added in v0.12.0
type ChannelPolicy struct { Disabled bool `json:"disabled" db:"disabled"` TimeLockDelta uint32 `json:"timeLockDelta" db:"time_lock_delta"` MinHtlcMsat uint64 `json:"minHtlcMsat" db:"min_htlc"` MaxHtlcMsat uint64 `json:"maxHtlcMsat" db:"max_htlc_msat"` FeeRateMillMsat uint64 `json:"feeRateMillMsat" db:"fee_rate_mill_msat"` ShortChannelId string `json:"shortChannelId" db:"short_channel_id"` FeeBaseMsat uint64 `json:"feeBaseMsat" db:"fee_base_msat"` NodeId int `json:"nodeId" db:"node_id"` RemoteNodeId int `json:"RemoteodeId" db:"remote_node_id"` }
func GetLocalRoutingPolicy ¶ added in v0.12.1
func GetLocalRoutingPolicy(channelId, nodeId int, db *sqlx.DB) (ChannelPolicy, error)
func GetRemoteRoutingPolicy ¶ added in v0.12.1
func GetRemoteRoutingPolicy(channelId, nodeId int, db *sqlx.DB) (ChannelPolicy, error)
type ChannelsNodes ¶ added in v0.16.0
type ChannelsNodes struct { Channels []ChannelForTag `json:"channels"` Nodes []NodeForTag `json:"nodes"` }
type NodeForTag ¶ added in v0.16.0
type NodeForTag struct { NodeId int `json:"nodeId" db:"node_id"` Alias string `json:"alias" db:"alias"` Type string `json:"type" db:"type"` }
func GetNodesForTag ¶ added in v0.16.0
func GetNodesForTag(db *sqlx.DB) (nodes []NodeForTag, err error)
type PendingHtlcs ¶ added in v0.9.0
type PsbtDetails ¶ added in v0.7.3
Click to show internal directories.
Click to hide internal directories.