lightningapi

package
v0.0.41 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: MIT Imports: 29 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"
)

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, 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 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 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 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 {
	LightningAPI
	Client  *rpc.Client
	Timeout time.Duration
}

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) 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) 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) GetNodeInfo

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

GetNodeInfo - GetNodeInfo API call

func (*ClnSocketLightningAPI) GetNodeInfoFull

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

GetNodeInfoFull - GetNodeInfoFull 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 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 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) HTTPGetChanInfo

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

HTTPGetChanInfo - invokes GetChanInfo method

func (*HTTPAPI) HTTPGetChannels

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

HTTPGetChannels - invokes GetChannels method

func (*HTTPAPI) HTTPGetGraph

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

HTTPGetGraph - invokes GetGraph method

func (*HTTPAPI) HTTPGetInfo

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

HTTPGetInfo - invokes GetInfo method

func (*HTTPAPI) HTTPGetNodeInfo

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

HTTPGetNodeInfo - invokes GetNodeInfo method

func (*HTTPAPI) SetTransport

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

SetTransport - sets HTTP transport

type HtlcAPI

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

HtlcAPI 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 LightingAPICalls

type LightingAPICalls interface {
	Cleanup()
	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)
}

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 LightningAPI

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

LightningAPI - generic API settings

type LndGrpcLightningAPI

type LndGrpcLightningAPI struct {
	Client      lnrpc.LightningClient
	CleanupFunc func()
	LightningAPI
}

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) 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) GetInfo

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

GetInfo 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)

type LndRestLightningAPI

type LndRestLightningAPI struct {
	Request   *http.Request
	Transport *http.Transport
	HTTPAPI   *HTTPAPI
	LightningAPI
}

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) 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) GetInfo

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

GetInfo - GetInfo API

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)

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 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