lightning

package
v0.0.42 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 32 Imported by: 2

README

LightningAPI

LightningAPI is a thin wrapper around lightning APIs that are used for the agents (currently it just supports the minimal that is needed for channelchecker) We have LND gRPC, LND REST and CLN (over local UNIX domain socket) support for the time being.

Documentation

Index

Constants

View Source
const (
	LISTCHANNELS = "listchannels"
	LISTNODES    = "listnodes"
	LISTFUNDS    = "listfunds"
	GETINFO      = "getinfo"
	LISTFORWARDS = "listforwards"
	LISTINVOICES = "listinvoices"
	LISTPAYMENTS = "listsendpays"
)

Method names

Variables

View Source
var (
	// ErrNoNode means node was not found
	ErrNoNode = errors.New("node not found")
	// ErrNoChan means channel was not found
	ErrNoChan = errors.New("channel not found")
	// ErrInvalidResponse indicates invaid response
	ErrInvalidResponse = errors.New("invalid response")
)

Functions

func ConvertAmount

func ConvertAmount(s string) uint64

ConvertAmount - converts string amount to satoshis

func ConvertFeatures

func ConvertFeatures(features string) map[string]NodeFeatureAPI

ConvertFeatures - convert bitmask to LND like feature map

func FromLndChanID

func FromLndChanID(chanID uint64) string

FromLndChanID - converts from LND to CLN channel id

func GetClient

func GetClient(getData GetDataCall) (lnrpc.LightningClient, routerrpc.RouterClient, func(), error)

GetClient - get a lightning API client

func GetConnection

func GetConnection(getData GetDataCall) (*grpc.ClientConn, error)

GetConnection - returns a GRPC client connection

func IsMacaroonValid

func IsMacaroonValid(mac *macaroon.Macaroon) (bool, time.Duration)

IsMacaroonValid - verify whether macaroon is valid

func SumCapacityExtended

func SumCapacityExtended(channels []NodeChannelAPIExtended) uint64

SumCapacityExtended - get sum of channel capacity

func SumCapacitySimple

func SumCapacitySimple(channels []NodeChannelAPI) uint64

SumCapacitySimple - get sum of channel capacity

func ToLndChanID

func ToLndChanID(id string) (uint64, error)

ToLndChanID - converts from CLN to LND channel id

Types

type API added in v0.0.42

type API struct {
	GetNodeInfoFullThreshUseDescribeGraph int // If node has more than that number of channels use DescribeGraph else do GetChanInfo for each one
}

API - generic API settings

func (*API) GetDefaultBatchSize added in v0.0.42

func (a *API) GetDefaultBatchSize() uint16

GetDefaultBatchSize returns the default batch size

type APIType

type APIType int

APIType enum

const (
	LndGrpc APIType = iota
	LndRest
	ClnSocket
)

ApiTypes

func GetAPIType

func GetAPIType(t *int) (*APIType, error)

GetAPIType from integer

type CertificateVerification

type CertificateVerification int

CertificateVerification enum

const (
	PublicCAorCert CertificateVerification = iota
	PublicCA
	AllowWhenPubKeySame
	Strict
	Insecure
	SkipHostVerification
)

Verification types

type ChannelAPI

type ChannelAPI struct {
	Private               bool
	Active                bool
	RemotePubkey          string
	Initiator             bool
	CommitFee             uint64
	ChanID                uint64
	RemoteBalance         uint64
	LocalBalance          uint64
	Capacity              uint64
	PendingHtlcs          []HtlcAPI
	TotalSatoshisSent     uint64
	TotalSatoshisReceived uint64
	NumUpdates            uint64
}

ChannelAPI struct

type ChannelConstraintsOverride

type ChannelConstraintsOverride struct {
	ChanReserveSat    string `json:"chan_reserve_sat,omitempty"`
	DustLimitSat      string `json:"dust_limit_sat,omitempty"`
	MaxPendingAmtMsat string `json:"max_pending_amt_msat,omitempty"`
	MinHtlcMsat       string `json:"min_htlc_msat,omitempty"`

	lnrpc.ChannelConstraints
}

ChannelConstraintsOverride struct

type ChannelOverride

type ChannelOverride struct {
	ChanID                string `json:"chan_id,omitempty"`
	Capacity              string `json:"capacity,omitempty"`
	LocalBalance          string `json:"local_balance,omitempty"`
	RemoteBalance         string `json:"remote_balance,omitempty"`
	CommitFee             string `json:"commit_fee,omitempty"`
	CommitWeight          string `json:"commit_weight,omitempty"`
	FeePerKw              string `json:"fee_per_kw,omitempty"`
	UnsettledBalance      string `json:"unsettled_balance,omitempty"`
	TotalSatoshisSent     string `json:"total_satoshis_sent,omitempty"`
	TotalSatoshisReceived string `json:"total_satoshis_received,omitempty"`
	NumUpdates            string `json:"num_updates,omitempty"`
	// Deprecated
	LocalChanReserveSat string `json:"local_chan_reserve_sat,omitempty"`
	// Deprecated
	RemoteChanReserveSat string                      `json:"remote_chan_reserve_sat,omitempty"`
	CommitmentType       string                      `json:"commitment_type,omitempty"`
	PendingHtlcs         []*HtlcOverride             `json:"pending_htlcs,omitempty"`
	Lifetime             string                      `json:"lifetime,omitempty"`
	Uptime               string                      `json:"uptime,omitempty"`
	PushAmountSat        string                      `json:"push_amount_sat,omitempty"`
	LocalConstraints     *ChannelConstraintsOverride `json:"local_constraints,omitempty"`
	RemoteConstraints    *ChannelConstraintsOverride `json:"remote_constraints,omitempty"`

	AliasScids            []string `json:"alias_scids,omitempty"`
	ZeroConfConfirmedScid string   `json:"zero_conf_confirmed_scid,omitempty"`

	lnrpc.Channel
}

ChannelOverride struct

type Channels

type Channels struct {
	Channels []*ChannelOverride `json:"channels"`
}

Channels struct

type ChannelsAPI

type ChannelsAPI struct {
	Channels []ChannelAPI
}

ChannelsAPI struct

type ClnFeatures

type ClnFeatures struct {
	Init    string `json:"init"`
	Node    string `json:"node"`
	Channel string `json:"channe"`
	Invoice string `json:"invoice"`
}

ClnFeatures struct

type ClnForwardEntries added in v0.0.42

type ClnForwardEntries struct {
	Entries []ClnForwardEntry `json:"forwards,omitempty"`
}

ClnForwardEntries struct

type ClnForwardEntry added in v0.0.42

type ClnForwardEntry struct {
	InChannel    string            `json:"in_channel"`
	InMsat       string            `json:"in_msat"`
	Status       string            `json:"status"` // one of "offered", "settled", "local_failed", "failed"
	ReceivedTime entities.JsonTime `json:"received_time"`

	OutChannel string `json:"out_channel,omitempty"`
	OutMsat    string `json:"out_msat,omitempty"`
	FeeMsat    string `json:"fee_msat,omitempty"`
	FailCode   uint32 `json:"fail_code,omitempty"`
	FailReason string `json:"fail_reason,omitempty"`
}

ClnForwardEntry struct

type ClnFundsChan

type ClnFundsChan struct {
	PeerID         string `json:"peer_id"`
	Connected      bool   `json:"connected,omitempty"`
	ShortChannelID string `json:"short_channel_id"`
	State          string `json:"state"`
	Capacity       uint64 `json:"channel_total_sat"`
	OurAmount      uint64 `json:"channel_sat"`
	FundingTxID    string `json:"funding_tx_id"`
	FundingOutput  int    `json:"funding_output"`
}

ClnFundsChan struct

type ClnFundsChanResp

type ClnFundsChanResp struct {
	Channels []ClnFundsChan `json:"channels,omitempty"`
}

ClnFundsChanResp struct

type ClnInfo

type ClnInfo struct {
	PubKey                string            `json:"id"`
	Alias                 string            `json:"alias"`
	Color                 string            `json:"color"`
	Network               string            `json:"network"`
	Addresses             []ClnListNodeAddr `json:"address,omitempty"`
	Features              ClnFeatures       `json:"our_features"`
	Version               string            `json:"version"`
	WarningBitcoindSync   string            `json:"warning_bitcoind_sync,omitempty"`
	WarningLightningdSync string            `json:"warning_lightningd_sync,omitempty"`
}

ClnInfo struct

type ClnListChan

type ClnListChan struct {
	Source         string            `json:"source"`
	Destination    string            `json:"destination"`
	Public         bool              `json:"public"`
	Capacity       uint64            `json:"satoshis"`
	Active         bool              `json:"active"`
	LastUpdate     entities.JsonTime `json:"last_update"`
	FeeBase        uint64            `json:"base_fee_millisatoshi"`
	FeePpm         uint64            `json:"fee_per_millionth"`
	MinHtlc        string            `json:"htlc_minimum_msat"`
	MaxHtlc        string            `json:"htlc_maximum_msat"`
	ShortChannelID string            `json:"short_channel_id,omitempty"`
	Delay          uint64            `json:"delay"`
}

ClnListChan struct

type ClnListChanResp

type ClnListChanResp struct {
	Channels []ClnListChan `json:"channels,omitempty"`
}

ClnListChanResp struct

type ClnListNode

type ClnListNode struct {
	PubKey     string             `json:"nodeid"`
	Alias      string             `json:"alias,omitempty"`
	Color      string             `json:"color,omitempty"`
	Features   string             `json:"features,omitempty"`
	Addresses  []ClnListNodeAddr  `json:"addresses,omitempty"`
	LastUpdate *entities.JsonTime `json:"last_update,omitempty"`
}

ClnListNode struct

type ClnListNodeAddr

type ClnListNodeAddr struct {
	Type    string `json:"type"`
	Address string `json:"address"`
	Port    int    `json:"port"`
}

ClnListNodeAddr struct

type ClnListNodeResp

type ClnListNodeResp struct {
	Nodes []ClnListNode `json:"nodes,omitempty"`
}

ClnListNodeResp struct

type ClnRawForwardEntries added in v0.0.42

type ClnRawForwardEntries struct {
	Entries []json.RawMessage `json:"forwards,omitempty"`
}

ClnRawForwardEntries struct

func (ClnRawForwardEntries) GetEntries added in v0.0.42

func (r ClnRawForwardEntries) GetEntries() []json.RawMessage

GetEntries to comply with ClnRawMessageItf

type ClnRawForwardsTime added in v0.0.42

type ClnRawForwardsTime struct {
	Time uint64 `json:"received_time,omitempty"`
}

ClnRawForwardsTime struct

func (ClnRawForwardsTime) GetTime added in v0.0.42

func (r ClnRawForwardsTime) GetTime() uint64

GetTime to comply with ClnRawTimeItf

type ClnRawInvoiceTime added in v0.0.42

type ClnRawInvoiceTime struct {
	Time uint64 `json:"expires_at,omitempty"`
}

ClnRawInvoiceTime struct

func (ClnRawInvoiceTime) GetTime added in v0.0.42

func (r ClnRawInvoiceTime) GetTime() uint64

GetTime to comply with ClnRawTimeItf

type ClnRawInvoices added in v0.0.42

type ClnRawInvoices struct {
	Entries []json.RawMessage `json:"invoices,omitempty"`
}

ClnRawInvoices struct

func (ClnRawInvoices) GetEntries added in v0.0.42

func (r ClnRawInvoices) GetEntries() []json.RawMessage

GetEntries to comply with ClnRawMessageItf

type ClnRawMessageItf added in v0.0.42

type ClnRawMessageItf interface {
	GetEntries() []json.RawMessage
}

ClnRawMessageItf interface

type ClnRawPayTime added in v0.0.42

type ClnRawPayTime struct {
	Time uint64 `json:"created_at,omitempty"`
}

ClnRawPayTime struct

func (ClnRawPayTime) GetTime added in v0.0.42

func (r ClnRawPayTime) GetTime() uint64

GetTime to comply with ClnRawTimeItf

type ClnRawPayments added in v0.0.42

type ClnRawPayments struct {
	Entries []json.RawMessage `json:"payments,omitempty"`
}

ClnRawPayments struct

func (ClnRawPayments) GetEntries added in v0.0.42

func (r ClnRawPayments) GetEntries() []json.RawMessage

GetEntries to comply with ClnRawMessageItf

type ClnRawTimeItf added in v0.0.42

type ClnRawTimeItf interface {
	GetTime() uint64
}

ClnRawTimeItf interface

type ClnSetChan

type ClnSetChan struct {
	PeerID         string `json:"peer_id"`
	LongChanID     string `json:"channel_id"`
	FeeBase        string `json:"fee_base_msat"`
	FeePpm         string `json:"fee_proportional_milli"`
	MiHtlc         string `json:"minimum_htlc_out_msat"`
	MaxHtlc        string `json:"maximum_htlc_out_msat"`
	ShortChannelID string `json:"short_channel_id,omitempty"`
}

ClnSetChan struct

type ClnSetChanResp

type ClnSetChanResp struct {
	Settings []ClnSetChan `json:"channels,omitempty"`
}

ClnSetChanResp struct

type ClnSocketLightningAPI

type ClnSocketLightningAPI struct {
	API
	Client  *rpc.Client
	Timeout time.Duration
	Name    string
}

ClnSocketLightningAPI struct

func (*ClnSocketLightningAPI) CallWithTimeout

func (l *ClnSocketLightningAPI) CallWithTimeout(serviceMethod string, args any, reply any) error

CallWithTimeout - helper to call rpc method with a timeout

func (*ClnSocketLightningAPI) Cleanup

func (l *ClnSocketLightningAPI) Cleanup()

Cleanup - clean up API

func (*ClnSocketLightningAPI) DescribeGraph

func (l *ClnSocketLightningAPI) DescribeGraph(ctx context.Context, unannounced bool) (*DescribeGraphAPI, error)

DescribeGraph - DescribeGraph API call

func (*ClnSocketLightningAPI) GetAPIType added in v0.0.42

func (l *ClnSocketLightningAPI) GetAPIType() APIType

GetAPIType - API call

func (*ClnSocketLightningAPI) GetChanInfo

func (l *ClnSocketLightningAPI) GetChanInfo(ctx context.Context, chanID uint64) (*NodeChannelAPI, error)

GetChanInfo - GetChanInfo API call

func (*ClnSocketLightningAPI) GetChannels

func (l *ClnSocketLightningAPI) GetChannels(ctx context.Context) (*ChannelsAPI, error)

GetChannels - GetChannels API call

func (*ClnSocketLightningAPI) GetForwardsRaw added in v0.0.42

func (l *ClnSocketLightningAPI) GetForwardsRaw(ctx context.Context, pagination RawPagination) ([]RawMessage, *ResponseRawPagination, error)

GetForwardsRaw - API call

func (*ClnSocketLightningAPI) GetInfo

func (l *ClnSocketLightningAPI) GetInfo(ctx context.Context) (*InfoAPI, error)

GetInfo - GetInfo API call

func (*ClnSocketLightningAPI) GetInternalChannels

func (l *ClnSocketLightningAPI) GetInternalChannels(pubKey string) (map[string][]ClnListChan, error)

GetInternalChannels - internal method to get channels

func (*ClnSocketLightningAPI) GetInternalChannelsAll

func (l *ClnSocketLightningAPI) GetInternalChannelsAll() (map[string][]ClnListChan, error)

GetInternalChannelsAll - internal method to get all channels

func (*ClnSocketLightningAPI) GetInvoices added in v0.0.42

func (l *ClnSocketLightningAPI) GetInvoices(ctx context.Context, pendingOnly bool, pagination Pagination) (*InvoicesResponse, error)

GetInvoices - API call

func (*ClnSocketLightningAPI) GetInvoicesRaw added in v0.0.42

func (l *ClnSocketLightningAPI) GetInvoicesRaw(ctx context.Context, pendingOnly bool, pagination RawPagination) ([]RawMessage, *ResponseRawPagination, error)

GetInvoicesRaw - API call

func (*ClnSocketLightningAPI) GetNodeInfo

func (l *ClnSocketLightningAPI) GetNodeInfo(ctx context.Context, pubKey string, channels bool) (*NodeInfoAPI, error)

GetNodeInfo - API call

func (*ClnSocketLightningAPI) GetNodeInfoFull

func (l *ClnSocketLightningAPI) GetNodeInfoFull(ctx context.Context, channels bool, unannounced bool) (*NodeInfoAPIExtended, error)

GetNodeInfoFull - API call

func (*ClnSocketLightningAPI) GetPayments added in v0.0.42

func (l *ClnSocketLightningAPI) GetPayments(ctx context.Context, includeIncomplete bool, pagination Pagination) (*PaymentsResponse, error)

GetPayments - API call

func (*ClnSocketLightningAPI) GetPaymentsRaw added in v0.0.42

func (l *ClnSocketLightningAPI) GetPaymentsRaw(ctx context.Context, includeIncomplete bool, pagination RawPagination) ([]RawMessage, *ResponseRawPagination, error)

GetPaymentsRaw - API call

func (*ClnSocketLightningAPI) SubscribeForwards added in v0.0.42

func (l *ClnSocketLightningAPI) SubscribeForwards(ctx context.Context, since time.Time, batchSize uint16, maxErrors uint16) (<-chan []ForwardingEvent, <-chan ErrorData)

SubscribeForwards - API call

type DescribeGraphAPI

type DescribeGraphAPI struct {
	Nodes    []DescribeGraphNodeAPI
	Channels []NodeChannelAPI
}

DescribeGraphAPI struct

type DescribeGraphNodeAPI

type DescribeGraphNodeAPI struct {
	PubKey     string                    `json:"pub_key,omitempty"`
	Alias      string                    `json:"alias,omitempty"`
	Color      string                    `json:"color,omitempty"`
	Addresses  []NodeAddressAPI          `json:"addresses,omitempty"`
	Features   map[string]NodeFeatureAPI `json:"features,omitempty"`
	LastUpdate entities.JsonTime         `json:"last_update,omitempty"`
}

DescribeGraphNodeAPI struct

func ConvertNodeInfo

func ConvertNodeInfo(node ClnListNode) *DescribeGraphNodeAPI

ConvertNodeInfo - convert CLN to internal node representation

type ErrorData added in v0.0.42

type ErrorData struct {
	Error          error
	IsStillRunning bool
}

ErrorData struct

type ForwardingEvent added in v0.0.42

type ForwardingEvent struct {
	Timestamp     time.Time
	ChanIDIn      uint64
	ChanIDOut     uint64
	AmountInMsat  uint64
	AmountOutMsat uint64
	FeeMsat       uint64
	IsSuccess     bool
	FailureString string
}

ForwardingEvent struct

type ForwardingEventOverride added in v0.0.42

type ForwardingEventOverride struct {
	Timestamp   string `json:"timestamp,omitempty"`
	ChanIDIn    string `json:"chan_id_in,omitempty"`
	ChanIDOut   string `json:"chan_id_out,omitempty"`
	AmtIn       string `json:"amt_in,omitempty"`
	AmtOut      string `json:"amt_out,omitempty"`
	Fee         string `json:"fee,omitempty"`
	FeeMsat     string `json:"fee_msat,omitempty"`
	AmtInMsat   string `json:"amt_in_msat,omitempty"`
	AmtOutMsat  string `json:"amt_out_msat,omitempty"`
	TimestampNs string `json:"timestamp_ns,omitempty"`

	lnrpc.ForwardingEvent
}

ForwardingEventOverride struct

type ForwardingHistoryRequestOverride added in v0.0.42

type ForwardingHistoryRequestOverride struct {
	StartTime string `json:"start_time,omitempty"`
	EndTime   string `json:"end_time,omitempty"`

	lnrpc.ForwardingHistoryRequest
}

ForwardingHistoryRequestOverride struct

type ForwardingHistoryResponseOverride added in v0.0.42

type ForwardingHistoryResponseOverride struct {
	ForwardingEvents []*ForwardingEventOverride `json:"forwarding_events,omitempty"`
	lnrpc.ForwardingHistoryResponse
}

ForwardingHistoryResponseOverride struct

type GetDataCall

type GetDataCall func() (*entities.Data, error)

GetDataCall - signature of function for retrieving data

type GetDoFunc

type GetDoFunc func(req *http.Request) (*http.Response, error)

GetDoFunc = signature for Do function

type GetInfoResponseOverride

type GetInfoResponseOverride struct {
	BestHeaderTimestamp string `json:"best_header_timestamp,omitempty"`
	lnrpc.GetInfoResponse
}

GetInfoResponseOverride struct

type GetNodeInfoOverride

type GetNodeInfoOverride struct {
	Node          *GraphNodeOverride   `json:"node,omitempty"`
	NumChannels   int64                `json:"num_channels,omitempty"`
	TotalCapacity string               `json:"total_capacity,omitempty"`
	Channels      []*GraphEdgeOverride `json:"channels"`

	lnrpc.NodeInfo
}

GetNodeInfoOverride struct

type Graph

type Graph struct {
	GraphNodeOverride  []*GraphNodeOverride `json:"nodes,omitempty"`
	GraphEdgesOverride []*GraphEdgeOverride `json:"edges,omitempty"`
}

Graph struct

type GraphEdgeOverride

type GraphEdgeOverride struct {
	ChannelID   string                 `json:"channel_id,omitempty"`
	Capacity    string                 `json:"capacity,omitempty"`
	Node1Policy *RoutingPolicyOverride `json:"node1_policy,omitempty"`
	Node2Policy *RoutingPolicyOverride `json:"node2_policy,omitempty"`

	lnrpc.ChannelEdge
}

GraphEdgeOverride struct

type GraphNodeOverride

type GraphNodeOverride struct {
	lnrpc.LightningNode
}

GraphNodeOverride struct

type HTLCAttempt added in v0.0.42

type HTLCAttempt struct {
	ID      uint64
	Status  HTLCStatus
	Attempt time.Time
	Resolve time.Time

	Route Route
}

HTLCAttempt struct

type HTLCAttemptOverride added in v0.0.42

type HTLCAttemptOverride struct {
	AttemptID     string          `json:"attempt_id,omitempty"`
	Status        string          `json:"status,omitempty"`
	Route         *RouteOverride  `json:"route,omitempty"`
	AttemptTimeNs string          `json:"attempt_time_ns,omitempty"`
	ResolveTimeNs string          `json:"resolve_time_ns,omitempty"`
	Failure       json.RawMessage `json:"failure,omitempty"` // ignore
	Preimage      string          `protobuf:"bytes,6,opt,name=preimage,proto3" json:"preimage,omitempty"`

	lnrpc.HTLCAttempt
}

HTLCAttemptOverride struct

type HTLCStatus added in v0.0.42

type HTLCStatus int

HTLCStatus enum

const (
	HTLCInFlight HTLCStatus = 0
	HTLCSucceeded
	HTLCFailed
)

HTLCStatus values

type HTTPAPI

type HTTPAPI struct {
	DoFunc GetDoFunc
	// contains filtered or unexported fields
}

HTTPAPI struct

func NewHTTPAPI

func NewHTTPAPI() *HTTPAPI

NewHTTPAPI returns a new HTTPAPI

func (*HTTPAPI) Do

func (h *HTTPAPI) Do(req *http.Request) (*http.Response, error)

Do - invokes HTTP request

func (*HTTPAPI) GetHTTPRequest

func (h *HTTPAPI) GetHTTPRequest(getData GetDataCall) (*http.Request, *http.Transport, error)

GetHTTPRequest - generic method for doing HTTP requests

func (*HTTPAPI) HTTPForwardEvents added in v0.0.42

HTTPForwardEvents - invokes ForwardEvents method

func (*HTTPAPI) HTTPGetChanInfo

func (h *HTTPAPI) HTTPGetChanInfo(ctx context.Context, req *http.Request, chanID uint64) (*GraphEdgeOverride, error)

HTTPGetChanInfo - invokes GetChanInfo method

func (*HTTPAPI) HTTPGetChannels

func (h *HTTPAPI) HTTPGetChannels(ctx context.Context, req *http.Request) (*Channels, error)

HTTPGetChannels - invokes GetChannels method

func (*HTTPAPI) HTTPGetGraph

func (h *HTTPAPI) HTTPGetGraph(ctx context.Context, req *http.Request, unannounced bool) (*Graph, error)

HTTPGetGraph - invokes GetGraph method

func (*HTTPAPI) HTTPGetInfo

func (h *HTTPAPI) HTTPGetInfo(ctx context.Context, req *http.Request) (*GetInfoResponseOverride, error)

HTTPGetInfo - invokes GetInfo method

func (*HTTPAPI) HTTPGetNodeInfo

func (h *HTTPAPI) HTTPGetNodeInfo(ctx context.Context, req *http.Request, pubKey string, channels bool) (*GetNodeInfoOverride, error)

HTTPGetNodeInfo - invokes GetNodeInfo method

func (*HTTPAPI) HTTPListInvoices added in v0.0.42

HTTPListInvoices - invokes ListInvoices method

func (*HTTPAPI) HTTPListPayments added in v0.0.42

HTTPListPayments - invokes ListPayments method

func (*HTTPAPI) HTTPSubscribeHtlcEvents added in v0.0.42

func (h *HTTPAPI) HTTPSubscribeHtlcEvents(ctx context.Context, req *http.Request) (<-chan *HtlcEventOverride, error)

HTTPSubscribeHtlcEvents - invokes SubscribeHtlcEvents method

func (*HTTPAPI) SetTransport

func (h *HTTPAPI) SetTransport(transport *http.Transport)

SetTransport - sets HTTP transport

type Hop added in v0.0.42

type Hop struct {
	ChanID           uint64
	Expiry           uint32
	AmtToForwardMsat int64
	FeeMsat          int64
}

Hop struct

type HopHintOverride added in v0.0.42

type HopHintOverride struct {
	ChanID string `json:"chan_id,omitempty"`

	lnrpc.HopHint
}

HopHintOverride struct

type HopOverride added in v0.0.42

type HopOverride struct {
	ChanID           string          `json:"chan_id,omitempty"`
	ChanCapacity     string          `json:"chan_capacity,omitempty"`
	AmtToForward     string          `json:"amt_to_forward,omitempty"`
	Fee              string          `json:"fee,omitempty"`
	AmtToForwardMsat string          `json:"amt_to_forward_msat,omitempty"`
	FeeMsat          string          `json:"fee_msat,omitempty"`
	MppRecord        json.RawMessage `json:"mpp_record,omitempty"`     // ignore
	AmpRecord        json.RawMessage `json:"amp_record,omitempty"`     // ignore
	CustomRecords    json.RawMessage `json:"custom_records,omitempty"` // ignore
	Metadata         string          `json:"metadata,omitempty"`

	lnrpc.Hop
}

HopOverride struct

type HtlcAPI

type HtlcAPI struct {
	Amount              uint64
	Incoming            bool
	ForwardingChannel   uint64
	ForwardingHtlcIndex uint64
}

HtlcAPI struct

type HtlcEventComposite added in v0.0.42

type HtlcEventComposite struct {
	Info          *HtlcInfoOverride `json:"info,omitempty"`
	Preimage      string            `json:"preimage,omitempty"`
	WireFailure   string            `json:"wire_failure,omitempty"`
	FailureDetail string            `json:"failure_detail,omitempty"`
	FailureString string            `json:"failure_string,omitempty"`
}

HtlcEventComposite struct (our abstraction over that mess with inheritance)

type HtlcEventOverride added in v0.0.42

type HtlcEventOverride struct {
	IncomingChannelID string             `json:"incoming_channel_id,omitempty"`
	OutgoingChannelID string             `json:"outgoing_channel_id,omitempty"`
	IncomingHtlcID    string             `json:"incoming_htlc_id,omitempty"`
	OutgoingHtlcID    string             `json:"outgoing_htlc_id,omitempty"`
	TimestampNs       string             `json:"timestamp_ns,omitempty"`
	EventType         string             `json:"event_type,omitempty"`
	Event             HtlcEventComposite `json:"event,omitempty"`

	routerrpc.HtlcEvent
}

HtlcEventOverride struct

type HtlcInfoOverride added in v0.0.42

type HtlcInfoOverride struct {
	IncomingAmtMsat string `json:"incoming_amt_msat,omitempty"`
	OutgoingAmtMsat string `json:"outgoing_amt_msat,omitempty"`
}

HtlcInfoOverride struct

type HtlcOverride

type HtlcOverride struct {
	Amount              string `json:"amount,omitempty"`
	HashLock            string `json:"hash_lock,omitempty"`
	HtlcIndex           string `json:"htlc_index,omitempty"`
	ForwardingChannel   string `json:"forwarding_channel,omitempty"`
	ForwardingHtlcIndex string `json:"forwarding_htlc_index,omitempty"`
	lnrpc.HTLC
}

HtlcOverride struct

type InfoAPI

type InfoAPI struct {
	IdentityPubkey  string
	Alias           string
	Chain           string
	Network         string
	Version         string
	IsSyncedToGraph bool
	IsSyncedToChain bool
}

InfoAPI struct

type Invoice added in v0.0.42

type Invoice struct {
	Memo            string
	ValueMsat       int64
	PaidMsat        int64
	CreationDate    time.Time
	SettleDate      time.Time
	PaymentRequest  string
	DescriptionHash string
	Expiry          int64
	FallbackAddr    string
	CltvExpiry      uint64
	Private         bool
	IsKeySend       bool
	IsAmp           bool
	State           InvoiceHTLCState
	AddIndex        uint64
	SettleIndex     uint64
}

Invoice struct

type InvoiceHTLCState added in v0.0.42

type InvoiceHTLCState int

InvoiceHTLCState enum

const (
	InvoiceAccepted InvoiceHTLCState = 0
	InvoiceSettled
	InvoiceCancelled
)

InvoiceHTLCState values

func StringToInvoiceHTLCState added in v0.0.42

func StringToInvoiceHTLCState(in string) InvoiceHTLCState

StringToInvoiceHTLCState creates InvoiceHTLCState based on a string

type InvoiceOverride added in v0.0.42

type InvoiceOverride struct {
	Value        string `json:"value,omitempty"`
	ValueMsat    string `json:"value_msat,omitempty"`
	RPreimage    string `json:"r_preimage,omitempty"`
	RHash        string `json:"r_hash,omitempty"`
	CreationDate string `json:"creation_date,omitempty"`
	SettleDate   string `json:"settle_date,omitempty"`
	Expiry       string `json:"expiry,omitempty"`
	CltvExpiry   string `json:"cltv_expiry,omitempty"`

	AddIndex    string `json:"add_index,omitempty"`
	SettleIndex string `json:"settle_index,omitempty"`
	AmtPaid     string `json:"amt_paid,omitempty"`
	AmtPaidSat  string `json:"amt_paid_sat,omitempty"`
	AmtPaidMsat string `json:"amt_paid_msat,omitempty"`

	DescriptionHash string               `json:"description_hash,omitempty"`
	RouteHints      []*RouteHintOverride `json:"route_hints,omitempty"`
	State           string               `json:"state,omitempty"`

	// Ignore this stuff
	Features        json.RawMessage `json:"features,omitempty"`
	Htlcs           json.RawMessage `json:"htlcs,omitempty"`
	AmpInvoiceState json.RawMessage `json:"amp_invoice_state,omitempty"`

	lnrpc.Invoice
}

InvoiceOverride struct

type InvoicesResponse added in v0.0.42

type InvoicesResponse struct {
	Invoices []Invoice
	ResponsePagination
}

InvoicesResponse struct

type LightingAPICalls

type LightingAPICalls interface {
	Cleanup()
	GetAPIType() APIType
	GetInfo(ctx context.Context) (*InfoAPI, error)
	GetChannels(ctx context.Context) (*ChannelsAPI, error)
	DescribeGraph(ctx context.Context, unannounced bool) (*DescribeGraphAPI, error)
	GetNodeInfoFull(ctx context.Context, channels, unannounced bool) (*NodeInfoAPIExtended, error)
	GetNodeInfo(ctx context.Context, pubKey string, channels bool) (*NodeInfoAPI, error)
	GetChanInfo(ctx context.Context, chanID uint64) (*NodeChannelAPI, error)

	GetInvoices(ctx context.Context, pendingOnly bool, pagination Pagination) (*InvoicesResponse, error)
	GetPayments(ctx context.Context, includeIncomplete bool, pagination Pagination) (*PaymentsResponse, error)

	SubscribeForwards(ctx context.Context, since time.Time, batchSize uint16, maxErrors uint16) (<-chan []ForwardingEvent, <-chan ErrorData)

	GetInvoicesRaw(ctx context.Context, pendingOnly bool, pagination RawPagination) ([]RawMessage, *ResponseRawPagination, error)
	GetPaymentsRaw(ctx context.Context, includeIncomplete bool, pagination RawPagination) ([]RawMessage, *ResponseRawPagination, error)
	GetForwardsRaw(ctx context.Context, pagination RawPagination) ([]RawMessage, *ResponseRawPagination, error)
}

LightingAPICalls is the interface for lightning API

func NewAPI

func NewAPI(apiType APIType, getData GetDataCall) LightingAPICalls

NewAPI - gets new lightning API

func NewClnSocketLightningAPI

func NewClnSocketLightningAPI(getData GetDataCall) LightingAPICalls

NewClnSocketLightningAPI return a new lightning API

func NewClnSocketLightningAPIRaw

func NewClnSocketLightningAPIRaw(socketType string, address string) LightingAPICalls

NewClnSocketLightningAPIRaw gets a new API - usage "unix", "/home/ubuntu/.lightning/bitcoin/lightning-rpc"

func NewLndGrpcLightningAPI

func NewLndGrpcLightningAPI(getData GetDataCall) LightingAPICalls

NewLndGrpcLightningAPI - creates new lightning API

func NewLndRestLightningAPI

func NewLndRestLightningAPI(getData GetDataCall) LightingAPICalls

NewLndRestLightningAPI constructs new lightning API

type ListInvoiceRequestOverride added in v0.0.42

type ListInvoiceRequestOverride struct {
	IndexOffset    string `json:"index_offset,omitempty"`
	NumMaxInvoices string `json:"num_max_invoices,omitempty"`

	lnrpc.ListInvoiceRequest
}

ListInvoiceRequestOverride struct

type ListInvoiceResponseOverride added in v0.0.42

type ListInvoiceResponseOverride struct {
	Invoices         []*InvoiceOverride `json:"invoices,omitempty"`
	LastIndexOffset  string             `json:"last_index_offset,omitempty"`
	FirstIndexOffset string             `json:"first_index_offset,omitempty"`

	lnrpc.ListInvoiceResponse
}

ListInvoiceResponseOverride struct

type ListPaymentsRequestOverride added in v0.0.42

type ListPaymentsRequestOverride struct {
	IndexOffset string `json:"index_offset,omitempty"`
	MaxPayments string `json:"max_payments,omitempty"`

	lnrpc.ListPaymentsRequest
}

ListPaymentsRequestOverride struct

type ListPaymentsResponseOverride added in v0.0.42

type ListPaymentsResponseOverride struct {
	Payments         []*PaymentOverride `json:"payments,omitempty"`
	LastIndexOffset  string             `json:"last_index_offset,omitempty"`
	FirstIndexOffset string             `json:"first_index_offset,omitempty"`
	TotalNumPayments string             `json:"total_num_payments,omitempty"`

	lnrpc.ListPaymentsResponse
}

ListPaymentsResponseOverride struct

type LndGrpcLightningAPI

type LndGrpcLightningAPI struct {
	Client       lnrpc.LightningClient
	RouterClient routerrpc.RouterClient
	CleanupFunc  func()
	Name         string

	API
}

LndGrpcLightningAPI struct

func (*LndGrpcLightningAPI) Cleanup

func (l *LndGrpcLightningAPI) Cleanup()

Cleanup API

func (*LndGrpcLightningAPI) DescribeGraph

func (l *LndGrpcLightningAPI) DescribeGraph(ctx context.Context, unannounced bool) (*DescribeGraphAPI, error)

DescribeGraph API

func (*LndGrpcLightningAPI) GetAPIType added in v0.0.42

func (l *LndGrpcLightningAPI) GetAPIType() APIType

GetAPIType API

func (*LndGrpcLightningAPI) GetChanInfo

func (l *LndGrpcLightningAPI) GetChanInfo(ctx context.Context, chanID uint64) (*NodeChannelAPI, error)

GetChanInfo API

func (*LndGrpcLightningAPI) GetChannels

func (l *LndGrpcLightningAPI) GetChannels(ctx context.Context) (*ChannelsAPI, error)

GetChannels API

func (*LndGrpcLightningAPI) GetForwardsRaw added in v0.0.42

func (l *LndGrpcLightningAPI) GetForwardsRaw(ctx context.Context, pagination RawPagination) ([]RawMessage, *ResponseRawPagination, error)

GetForwardsRaw API

func (*LndGrpcLightningAPI) GetInfo

func (l *LndGrpcLightningAPI) GetInfo(ctx context.Context) (*InfoAPI, error)

GetInfo API

func (*LndGrpcLightningAPI) GetInvoices added in v0.0.42

func (l *LndGrpcLightningAPI) GetInvoices(ctx context.Context, pendingOnly bool, pagination Pagination) (*InvoicesResponse, error)

GetInvoices API

func (*LndGrpcLightningAPI) GetInvoicesRaw added in v0.0.42

func (l *LndGrpcLightningAPI) GetInvoicesRaw(ctx context.Context, pendingOnly bool, pagination RawPagination) ([]RawMessage, *ResponseRawPagination, error)

GetInvoicesRaw API

func (*LndGrpcLightningAPI) GetNodeInfo

func (l *LndGrpcLightningAPI) GetNodeInfo(ctx context.Context, pubKey string, channels bool) (*NodeInfoAPI, error)

GetNodeInfo API

func (*LndGrpcLightningAPI) GetNodeInfoFull

func (l *LndGrpcLightningAPI) GetNodeInfoFull(ctx context.Context, channels, unnanounced bool) (*NodeInfoAPIExtended, error)

GetNodeInfoFull - GetNodeInfoFull API (GRPC interface)

func (*LndGrpcLightningAPI) GetPayments added in v0.0.42

func (l *LndGrpcLightningAPI) GetPayments(ctx context.Context, includeIncomplete bool, pagination Pagination) (*PaymentsResponse, error)

GetPayments API

func (*LndGrpcLightningAPI) GetPaymentsRaw added in v0.0.42

func (l *LndGrpcLightningAPI) GetPaymentsRaw(ctx context.Context, includeIncomplete bool, pagination RawPagination) ([]RawMessage, *ResponseRawPagination, error)

GetPaymentsRaw API

func (*LndGrpcLightningAPI) SubscribeForwards added in v0.0.42

func (l *LndGrpcLightningAPI) SubscribeForwards(ctx context.Context, since time.Time, batchSize uint16, maxErrors uint16) (<-chan []ForwardingEvent, <-chan ErrorData)

SubscribeForwards API

type LndRestLightningAPI

type LndRestLightningAPI struct {
	Request   *http.Request
	Transport *http.Transport
	HTTPAPI   *HTTPAPI
	Name      string
	API
}

LndRestLightningAPI struct

func (*LndRestLightningAPI) Cleanup

func (l *LndRestLightningAPI) Cleanup()

Cleanup - clean up

func (*LndRestLightningAPI) DescribeGraph

func (l *LndRestLightningAPI) DescribeGraph(ctx context.Context, unannounced bool) (*DescribeGraphAPI, error)

DescribeGraph - DescribeGraph API

func (*LndRestLightningAPI) GetAPIType added in v0.0.42

func (l *LndRestLightningAPI) GetAPIType() APIType

GetAPIType API

func (*LndRestLightningAPI) GetChanInfo

func (l *LndRestLightningAPI) GetChanInfo(ctx context.Context, chanID uint64) (*NodeChannelAPI, error)

GetChanInfo - GetChanInfo API

func (*LndRestLightningAPI) GetChannels

func (l *LndRestLightningAPI) GetChannels(ctx context.Context) (*ChannelsAPI, error)

GetChannels - GetChannels API

func (*LndRestLightningAPI) GetForwardsRaw added in v0.0.42

func (l *LndRestLightningAPI) GetForwardsRaw(ctx context.Context, pagination RawPagination) ([]RawMessage, *ResponseRawPagination, error)

GetForwardsRaw - API call

func (*LndRestLightningAPI) GetInfo

func (l *LndRestLightningAPI) GetInfo(ctx context.Context) (*InfoAPI, error)

GetInfo - GetInfo API

func (*LndRestLightningAPI) GetInvoices added in v0.0.42

func (l *LndRestLightningAPI) GetInvoices(ctx context.Context, pendingOnly bool, pagination Pagination) (*InvoicesResponse, error)

GetInvoices API

func (*LndRestLightningAPI) GetInvoicesRaw added in v0.0.42

func (l *LndRestLightningAPI) GetInvoicesRaw(ctx context.Context, pendingOnly bool, pagination RawPagination) ([]RawMessage, *ResponseRawPagination, error)

GetInvoicesRaw - API call

func (*LndRestLightningAPI) GetNodeInfo

func (l *LndRestLightningAPI) GetNodeInfo(ctx context.Context, pubKey string, channels bool) (*NodeInfoAPI, error)

GetNodeInfo - GetNodeInfo API

func (*LndRestLightningAPI) GetNodeInfoFull

func (l *LndRestLightningAPI) GetNodeInfoFull(ctx context.Context, channels, unnanounced bool) (*NodeInfoAPIExtended, error)

GetNodeInfoFull - GetNodeInfoFull API (REST interface)

func (*LndRestLightningAPI) GetPayments added in v0.0.42

func (l *LndRestLightningAPI) GetPayments(ctx context.Context, includeIncomplete bool, pagination Pagination) (*PaymentsResponse, error)

GetPayments API

func (*LndRestLightningAPI) GetPaymentsRaw added in v0.0.42

func (l *LndRestLightningAPI) GetPaymentsRaw(ctx context.Context, includeIncomplete bool, pagination RawPagination) ([]RawMessage, *ResponseRawPagination, error)

GetPaymentsRaw - API call

func (*LndRestLightningAPI) SubscribeForwards added in v0.0.42

func (l *LndRestLightningAPI) SubscribeForwards(ctx context.Context, since time.Time, batchSize uint16, maxErrors uint16) (<-chan []ForwardingEvent, <-chan ErrorData)

SubscribeForwards - API call

func (*LndRestLightningAPI) SubscribeHtlcEvents added in v0.0.42

func (l *LndRestLightningAPI) SubscribeHtlcEvents(ctx context.Context) (<-chan *HtlcEventOverride, error)

SubscribeHtlcEvents API

type NodeAddressAPI

type NodeAddressAPI struct {
	Network string `json:"network,omitempty"`
	Addr    string `json:"addr,omitempty"`
}

NodeAddressAPI struct

func ConvertAddresses

func ConvertAddresses(addr []ClnListNodeAddr) []NodeAddressAPI

ConvertAddresses converts CLN addresses to interanl format

type NodeChannelAPI

type NodeChannelAPI struct {
	ChannelID   uint64            `json:"channel_id,omitempty"`
	ChanPoint   string            `json:"chan_point"`
	Node1Pub    string            `json:"node1_pub,omitempty"`
	Node2Pub    string            `json:"node2_pub,omitempty"`
	Capacity    uint64            `json:"capacity,omitempty"`
	Node1Policy *RoutingPolicyAPI `json:"node1_policy,omitempty"`
	Node2Policy *RoutingPolicyAPI `json:"node2_policy,omitempty"`
	LastUpdate  entities.JsonTime `json:"last_update,omitempty"`
}

NodeChannelAPI struct

type NodeChannelAPIExtended

type NodeChannelAPIExtended struct {
	Private bool `json:"private,omitempty"`
	NodeChannelAPI
}

NodeChannelAPIExtended struct

func ConvertChannelInternal

func ConvertChannelInternal(chans []ClnListChan, id uint64) (*NodeChannelAPIExtended, error)

ConvertChannelInternal - convert CLN channel to internal format

type NodeFeatureAPI

type NodeFeatureAPI struct {
	Name       string `json:"name,omitempty"`
	IsRequired bool   `json:"is_required,omitempty"`
	IsKnown    bool   `json:"is_known,omitempty"`
}

NodeFeatureAPI struct

type NodeInfoAPI

type NodeInfoAPI struct {
	Node          DescribeGraphNodeAPI `json:"node,omitempty"`
	Channels      []NodeChannelAPI     `json:"channels"`
	NumChannels   uint32               `json:"num_channels"`
	TotalCapacity uint64               `json:"total_capacity"`
}

NodeInfoAPI struct

type NodeInfoAPIExtended

type NodeInfoAPIExtended struct {
	NodeInfoAPI
	Channels []NodeChannelAPIExtended `json:"channels"`
}

NodeInfoAPIExtended struct

type Pagination added in v0.0.42

type Pagination struct {
	Offset    uint64 // Exclusive thus 1 means start from 2 (0 will start from beginning)
	BatchSize uint64 // limit is 10k or so
	Reversed  bool
	From      *time.Time
	To        *time.Time
}

Pagination struct

type Payment added in v0.0.42

type Payment struct {
	PaymentHash     string
	ValueMsat       int64
	FeeMsat         int64
	PaymentPreimage string
	PaymentRequest  string
	PaymentStatus   PaymentStatus
	CreationTime    time.Time
	Index           uint64
	FailureReason   PaymentFailureReason
	HTLCAttempts    []HTLCAttempt
}

Payment struct

type PaymentFailureReason added in v0.0.42

type PaymentFailureReason int

PaymentFailureReason enum

const (
	FailureReasonNone PaymentFailureReason = 0
	FailureReasonTimeout
	FailureReasonNoRoute
	FailureReasonError
	FailureReasonIncorrectPaymentDetails
	FailureReasonInsufficientBalance
)

PaymentFailureReason values

type PaymentOverride added in v0.0.42

type PaymentOverride struct {
	Value          string                 `json:"value,omitempty"`
	CreationDate   string                 `json:"creation_date,omitempty"`
	Fee            string                 `json:"fee,omitempty"`
	ValueSat       string                 `json:"value_sat,omitempty"`
	ValueMsat      string                 `json:"value_msat,omitempty"`
	Status         string                 `json:"status,omitempty"`
	FeeSat         string                 `json:"fee_sat,omitempty"`
	FeeMsat        string                 `json:"fee_msat,omitempty"`
	CreationTimeNs string                 `json:"creation_time_ns,omitempty"`
	Htlcs          []*HTLCAttemptOverride `json:"htlcs,omitempty"`
	PaymentIndex   string                 `json:"payment_index,omitempty"`
	FailureReason  string                 `json:"failure_reason,omitempty"`

	lnrpc.Payment
}

PaymentOverride struct

type PaymentStatus added in v0.0.42

type PaymentStatus int

PaymentStatus enum

const (
	PaymentUnknown PaymentStatus = iota
	PaymentInFlight
	PaymentSucceeded
	PaymentFailed
)

PaymentStatus values

func StringToPaymentStatus added in v0.0.42

func StringToPaymentStatus(in string) PaymentStatus

StringToPaymentStatus creates PaymentStatus based on a string

type PaymentsResponse added in v0.0.42

type PaymentsResponse struct {
	Payments []Payment
	ResponsePagination
}

PaymentsResponse struct

type RawMessage added in v0.0.42

type RawMessage struct {
	Timestamp      time.Time       `json:"timestamp"`
	Implementation string          `json:"implementation,omitempty"`
	Message        json.RawMessage `json:"message,omitempty"`
}

RawMessage struct

type RawPagination added in v0.0.42

type RawPagination struct {
	UseTimestamp bool
	FirstTime    time.Time
	LastTime     time.Time
	Pagination
}

RawPagination struct

type ResponseForwardPagination added in v0.0.42

type ResponseForwardPagination struct {
	LastOffsetIndex uint64
}

ResponseForwardPagination struct

type ResponsePagination added in v0.0.42

type ResponsePagination struct {
	ResponseForwardPagination
	FirstOffsetIndex uint64
}

ResponsePagination struct

type ResponseRawPagination added in v0.0.42

type ResponseRawPagination struct {
	UseTimestamp bool
	FirstTime    time.Time
	LastTime     time.Time
	ResponsePagination
}

ResponseRawPagination struct

type Route added in v0.0.42

type Route struct {
	TotalTimeLock uint32
	TotalFeesMsat int64
	TotalAmtMsat  int64

	Hops []Hop
}

Route struct

type RouteHintOverride added in v0.0.42

type RouteHintOverride struct {
	HopHints []*HopHintOverride `json:"hop_hints,omitempty"`

	lnrpc.RouteHint
}

RouteHintOverride struct

type RouteOverride added in v0.0.42

type RouteOverride struct {
	TotalFees     string         `json:"total_fees,omitempty"`
	TotalAmt      string         `json:"total_amt,omitempty"`
	Hops          []*HopOverride `json:"hops,omitempty"`
	TotalFeesMsat string         `json:"total_fees_msat,omitempty"`
	TotalAmtMsat  string         `json:"total_amt_msat,omitempty"`

	lnrpc.Route
}

RouteOverride struct

type RoutingPolicyAPI

type RoutingPolicyAPI struct {
	TimeLockDelta uint32            `json:"time_lock_delta"`
	MinHtlc       uint64            `json:"min_htlc"`
	BaseFee       uint64            `json:"fee_base_msat"`
	FeeRate       uint64            `json:"fee_rate_milli_msat"`
	Disabled      bool              `json:"disabled,omitempty"`
	LastUpdate    entities.JsonTime `json:"last_update,omitempty"`
	MaxHtlc       uint64            `json:"max_htlc_msat"`
}

RoutingPolicyAPI struct

type RoutingPolicyOverride

type RoutingPolicyOverride struct {
	MinHtlc          string `json:"min_htlc,omitempty"`
	FeeBaseMsat      string `json:"fee_base_msat,omitempty"`
	FeeRateMilliMsat string `json:"fee_rate_milli_msat,omitempty"`
	MaxHtlcMsat      string `json:"max_htlc_msat,omitempty"`

	lnrpc.RoutingPolicy
}

RoutingPolicyOverride struct

Directories

Path Synopsis
Package mock_lnrpc is a generated GoMock package.
Package mock_lnrpc is a generated GoMock package.

Jump to

Keyboard shortcuts

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