Documentation ¶
Index ¶
- Constants
- Variables
- func AddRebalanceAndChannels(db *sqlx.DB, rebalancer *Rebalancer) error
- func AddRebalanceLog(db *sqlx.DB, rebalanceResult RebalanceResult) error
- func ConvertLNDShortChannelID(LNDShortChannelID uint64) string
- func ConvertShortChannelIDToLND(ShortChannelID string) (uint64, error)
- func CopyParameters(parameters map[string]string) map[string]string
- func CreateChannelPoint(fundingTransactionHash string, fundingOutputIndex int) string
- func GetActiveChannelIdByFundingTransaction(fundingTransactionHash string, fundingOutputIndex int) int
- func GetActiveChannelIdByShortChannelId(shortChannelId string) int
- func GetActiveNodeIdByPublicKey(publicKey string, chain Chain, network Network) int
- func GetAllActiveTorqNodeIds(chain *Chain, network *Network) []int
- func GetAllChannelPublicKeys(chain Chain, network Network) []string
- func GetAllTorqNodeIds(chain Chain, network Network) []int
- func GetAllTorqPublicKeys(chain Chain, network Network) []string
- func GetChannelIdByChannelPoint(channelPoint string) int
- func GetChannelIdByFundingTransaction(fundingTransactionHash string, fundingOutputIndex int) int
- func GetChannelIdByLndShortChannelId(lndShortChannelId uint64) int
- func GetChannelIdByShortChannelId(shortChannelId string) int
- func GetChannelIdsByNodeId(peerNodeId int) []int
- func GetChannelNodeIds(chain Chain, network Network) []int
- func GetChannelPublicKeys(chain Chain, network Network) []string
- func GetNodeIdByPublicKey(publicKey string, chain Chain, network Network) int
- func GetShortChannelIdFromVector(fundingTransactionHash string, fundingOutputIndex int, ...) string
- func GetWorkflowNodes() map[WorkflowNodeType]WorkflowNodeTypeParameters
- func InactivateChannelNode(publicKey string, chain Chain, network Network)
- func MaintenanceServiceStart(ctx context.Context, db *sqlx.DB, nodeId int, ...)
- func ManagedChannelCache(ch chan ManagedChannel, ctx context.Context)
- func ManagedChannelGroupCache(ch chan ManagedChannelGroup, ctx context.Context)
- func ManagedChannelStateCache(ch chan ManagedChannelState, ctx context.Context, ...)
- func ManagedNodeCache(ch chan ManagedNode, ctx context.Context)
- func ManagedRebalanceCache(ch chan ManagedRebalance, ctx context.Context)
- func ManagedSettingsCache(ch chan ManagedSettings, ctx context.Context)
- func ManagedTriggerCache(ch chan ManagedTrigger, ctx context.Context)
- func MutexLocked(m *sync.Mutex) bool
- func ParseChannelPoint(channelPoint string) (string, int)
- func RWMutexReadLocked(rw *sync.RWMutex) bool
- func RWMutexWriteLocked(rw *sync.RWMutex) bool
- func RebalanceServiceStart(ctx context.Context, conn *grpc.ClientConn, db *sqlx.DB, nodeId int, ...)
- func SendServiceEvent(nodeId int, eventChannel chan interface{}, previousStatus Status, ...)
- func SendToManagedBoolChannel(ch chan bool, result bool)
- func SendToManagedChannelBalanceStateSettingsChannel(ch chan *ManagedChannelBalanceStateSettings, ...)
- func SendToManagedChannelBalanceStatesSettingsChannel(ch chan []ManagedChannelBalanceStateSettings, ...)
- func SendToManagedChannelChannel(ch chan ManagedChannel, managedChannel ManagedChannel)
- func SendToManagedChannelGroupSettingsChannel(ch chan *ManagedChannelGroupSettings, ...)
- func SendToManagedChannelIdsChannel(ch chan []int, channelIds []int)
- func SendToManagedChannelSettingChannel(ch chan ManagedChannelSettings, channelSettings ManagedChannelSettings)
- func SendToManagedChannelSettingsChannel(ch chan []ManagedChannelSettings, channelSettings []ManagedChannelSettings)
- func SendToManagedChannelStateSettingsChannel(ch chan *ManagedChannelStateSettings, ...)
- func SendToManagedChannelStatesSettingsChannel(ch chan []ManagedChannelStateSettings, ...)
- func SendToManagedNodeChannel(ch chan ManagedNode, managedNode ManagedNode)
- func SendToManagedNodeIdsChannel(ch chan []int, nodeIds []int)
- func SendToManagedNodeSettingChannel(ch chan ManagedNodeSettings, nodeSetting ManagedNodeSettings)
- func SendToManagedNodeSettingsChannel(ch chan []ManagedNodeSettings, nodeSettings []ManagedNodeSettings)
- func SendToManagedPublicKeysChannel(ch chan []string, publicKeys []string)
- func SendToManagedRebalanceChannel(ch chan ManagedRebalance, managedRebalance ManagedRebalance)
- func SendToManagedRebalanceResultChannel(ch chan RebalanceResult, rebalanceResult RebalanceResult)
- func SendToManagedSettingsChannel(ch chan ManagedSettings, managedSettings ManagedSettings)
- func SendToManagedTriggerSettingsChannel(ch chan ManagedTriggerSettings, managedTriggerSettings ManagedTriggerSettings)
- func SendToRebalancersChannel(ch chan []*Rebalancer, rebalancers []*Rebalancer)
- func SetChannel(channelId int, shortChannelId *string, lndShortChannelId *uint64, ...)
- func SetChannelGroupsByChannelId(channelId int, channelGroups []ChannelGroup)
- func SetChannelNode(nodeId int, publicKey string, chain Chain, network Network, ...)
- func SetChannelStateBalanceHtlcEvent(htlcEvent HtlcEvent)
- func SetChannelStateBalanceUpdate(nodeId int, channelId int, increaseBalance bool, amount int64)
- func SetChannelStateBalanceUpdateMsat(nodeId int, channelId int, increaseBalance bool, amount uint64)
- func SetChannelStateChannelStatus(nodeId int, channelId int, status Status)
- func SetChannelStateNodeStatus(nodeId int, status Status)
- func SetChannelStateRoutingPolicy(nodeId int, channelId int, local bool, disabled bool, timeLockDelta uint32, ...)
- func SetChannelStates(nodeId int, channelStateSettings []ManagedChannelStateSettings)
- func SetChannelStatus(channelId int, status ChannelStatus)
- func SetInactiveChannelNode(nodeId int, publicKey string, chain Chain, network Network)
- func SetRebalanceAndChannels(db *sqlx.DB, rebalancer Rebalancer) error
- func SetSettings(defaultDateRange, defaultLanguage, weekStartsOn, preferredTimeZone string)
- func SetTorqNode(nodeId int, name string, status Status, publicKey string, chain Chain, ...)
- func SetTrigger(nodeId int, reference string, workflowVersionId int, ...)
- func SetTriggerVerificationTime(nodeId int, workflowVersionId int, verificationTime time.Time)
- type Attempt
- type BatchOpenChannel
- type BatchOpenRequest
- type BatchOpenResponse
- type BlockEvent
- type Chain
- type ChannelBalanceEvent
- type ChannelBalanceEventData
- type ChannelBalanceStateHtlcInclude
- type ChannelEvent
- type ChannelGraphEvent
- type ChannelGraphEventData
- type ChannelGroup
- type ChannelGroupInclude
- type ChannelPoint
- type ChannelStateInclude
- type ChannelStatus
- type ChannelStatusUpdateRequest
- type ChannelStatusUpdateResponse
- type CloseChannelRequest
- type CloseChannelResponse
- type CloseChannelStatus
- type CommunicationRequest
- type CommunicationResponse
- type EventData
- type FailedRequest
- type FailureDetails
- type ForwardEvent
- type GraphEventData
- type Hops
- type Htlc
- type HtlcEvent
- type Implementation
- type ImportRequest
- type ImportType
- type InvoiceEvent
- type ManagedChannel
- type ManagedChannelBalanceStateSettings
- type ManagedChannelCacheOperationType
- type ManagedChannelGroup
- type ManagedChannelGroupCacheOperationType
- type ManagedChannelGroupSettings
- type ManagedChannelSettings
- type ManagedChannelState
- type ManagedChannelStateCacheOperationType
- type ManagedChannelStateSettings
- type ManagedNode
- type ManagedNodeCacheOperationType
- type ManagedNodeSettings
- type ManagedRebalance
- type ManagedRebalanceCacheOperationType
- type ManagedSettings
- type ManagedSettingsCacheOperationType
- type ManagedTrigger
- type ManagedTriggerCacheOperationType
- type ManagedTriggerSettings
- type MppRecord
- type Network
- type NewAddressRequest
- type NewAddressResponse
- type NewPaymentRequest
- type NewPaymentResponse
- type NodeConnectionDetailCustomSettings
- type NodeGraphEvent
- type NodeGraphEventData
- type OpenChannelRequest
- type OpenChannelResponse
- type PayOnChainRequest
- type PayOnChainResponse
- type PaymentEvent
- type PeerEvent
- type PendingChannel
- type PingSystem
- type RebalanceRequest
- type RebalanceRequestOrigin
- type RebalanceResponse
- type RebalanceResult
- type RebalanceRunner
- type Rebalancer
- type Route
- type RoutingPolicyUpdateRequest
- type RoutingPolicyUpdateResponse
- type ServiceChannelMessage
- type ServiceCommand
- type ServiceEvent
- type ServiceType
- type Services
- func (rs *Services) AddSubscription(nodeId int, cancelFunc func()) Status
- func (rs *Services) Booted(nodeId int, bootLock *sync.Mutex) Status
- func (rs *Services) Cancel(nodeId int, enforcedServiceStatus *Status, noDelay bool) (Status, Status)
- func (rs *Services) GetActiveNodeIds() []int
- func (rs *Services) GetBootLock(nodeId int) *sync.Mutex
- func (rs *Services) GetBootTime(nodeId int) *time.Time
- func (rs *Services) GetChannelBalanceCacheStreamStatus(nodeId int) Status
- func (rs *Services) GetEnforcedServiceStatusCheck(nodeId int) *Status
- func (rs *Services) GetIncludeIncomplete(nodeId int) bool
- func (rs *Services) GetNodeIds() []int
- func (rs *Services) GetStatus(nodeId int) Status
- func (rs *Services) GetStreamBootTime(nodeId int, stream SubscriptionStream) *time.Time
- func (rs *Services) GetStreamInitializationPingTime(nodeId int, stream SubscriptionStream) *time.Time
- func (rs *Services) GetStreamStatus(nodeId int, stream SubscriptionStream) Status
- func (rs *Services) Initialising(nodeId int) Status
- func (rs *Services) IsNoDelay(nodeId int) bool
- func (rs *Services) RemoveSubscription(nodeId int) Status
- func (rs *Services) SetIncludeIncomplete(nodeId int, includeIncomplete bool)
- func (rs *Services) SetStreamStatus(nodeId int, stream SubscriptionStream, status Status) Status
- type ShortChannelIdHttpRequest
- type ShortChannelIdHttpResponse
- type ShortChannelIdRequest
- type ShortChannelIdResponse
- type SignMessageRequest
- type SignMessageResponse
- type SignatureVerificationRequest
- type SignatureVerificationResponse
- type Status
- type SubscriptionStream
- type TransactionDetailsHttpRequest
- type TransactionDetailsHttpResponse
- type TransactionEvent
- type WorkflowNodeType
- type WorkflowNodeTypeParameters
- type WorkflowParameter
- type WorkflowParameterType
- type WorkflowParameterWithLabel
- type WorkflowTriggerType
Constants ¶
const ( LndService = ServiceType(iota) VectorService AmbossService TorqService AutomationService LightningCommunicationService RebalanceService MaintenanceService )
When adding here also add to GetServiceTypes
const ( Boot = ServiceCommand(iota) // Kill requires Out return channel // status: Active => Service kill initiated // status: Pending => Service is booting and cannot be killed // status: Inactive => Service was not running and could not be killed Kill )
const ( Inactive = Status(iota) Active Pending Deleted Initializing Archived )
const ( LND = Implementation(iota) CLN )
const ( Bitcoin = Chain(iota) Litecoin )
const ( MainNet = Network(iota) TestNet RegTest SigNet SimNet )
const ( Opening = ChannelStatus(iota) Open Closing CooperativeClosed = 100 LocalForceClosed = 101 RemoteForceClosed = 102 BreachClosed = 103 FundingCancelledClosed = 104 AbandonedClosed = 105 )
const ( TransactionStream = SubscriptionStream(iota) HtlcEventStream ChannelEventStream GraphEventStream ForwardStream InvoiceStream PaymentStream InFlightPaymentStream PeerEventStream ChannelBalanceCacheStream )
const ( ImportChannelAndRoutingPolicies = ImportType(iota) ImportNodeInformation )
const ( MEMPOOL string = "https://mempool.space/lightning/channel/" AMBOSS string = "https://amboss.space/edge/" ONEML string = "https://1ml.com/channel/" )
const ( WorkflowNodeTimeTrigger = WorkflowNodeType(iota) WorkflowNodeChannelBalanceEventTrigger WorkflowNodeChannelFilter WorkflowNodeChannelPolicyConfigurator WorkflowNodeRebalanceParameters WorkflowNodeStageTrigger WorkflowNodeRebalanceRun WorkflowNodeChannelPolicyRun WorkflowNodeSetVariable WorkflowNodeFilterOnVariable WorkflowTrigger )
const ( WorkflowTriggerTimingService = WorkflowTriggerType(iota) WorkflowTriggerEventService )
const ( WorkflowParameterAny = WorkflowParameter("any") WorkflowParameterTriggered = WorkflowParameter("triggered") WorkflowParameterChannelIds = WorkflowParameter("channelIds") WorkflowParameterRoutingPolicySettings = WorkflowParameter("routingPolicySettings") WorkflowParameterRebalanceSettings = WorkflowParameter("rebalanceSettings") WorkflowParameterStatus = WorkflowParameter("status") )
const ( WorkflowParameterTimeInSeconds = WorkflowParameterType(iota) WorkflowParameterBalanceShifted WorkflowParameterVariableName WorkflowParameterVariableValueString WorkflowParameterVariableValueNumber )
const ( RebalanceRequestWorkflowNode = RebalanceRequestOrigin(iota) RebalanceRequestManual )
const AMBOSS_SLEEP_SECONDS = 25
const AVOID_CHANNEL_AND_POLICY_IMPORT_RERUN_TIME_SECONDS = 70
70 because a reconnection is attempted every 60 seconds
const BOOTSTRAPPING_TIME_MINUTES = 8 * 60
const CHANNELBALANCE_BOOTSTRAP_TICKER_SECONDS = 10
const CHANNELBALANCE_TICKER_SECONDS = 150
const GENERIC_BOOTSTRAPPING_TIME_SECONDS = 60
const MAINTENANCE_QUEUE_TICKER_SECONDS = 60 * 60
const MAINTENANCE_VECTOR_DELAY_MILLISECONDS = 500
const NodeConnectionDetailCustomSettingsMax = int(ImportFailedPayments)*2 - 1
const PingSystemMax = int(Vector)*2 - 1
const REBALANCE_MAXIMUM_CONCURRENCY = 10
const REBALANCE_MINIMUM_DELTA_SECONDS = 10 * 60
const REBALANCE_QUEUE_TICKER_SECONDS = 10
const REBALANCE_REBALANCE_DELAY_MILLISECONDS = 500
const REBALANCE_RESULTS_TIMEOUT_SECONDS = 5 * 60
const REBALANCE_ROUTES_TIMEOUT_SECONDS = 1 * 60
const REBALANCE_ROUTE_FAILED_HOP_ALLOWED_DELTA_PER_MILLE = 10
const REBALANCE_ROUTE_TIMEOUT_SECONDS = 10 * 60
const REBALANCE_RUNNER_TIMEOUT_SECONDS = 1 * 60 * 60
const REBALANCE_SUCCESS_TIMEOUT_SECONDS = 2 * 60
const REBALANCE_TIMEOUT_SECONDS = 2 * 60 * 60
const ROUTING_POLICY_UPDATE_LIMITER_SECONDS = 5 * 60
const SERVICES_ERROR_SLEEP_SECONDS = 60
const STREAM_BOOTED_CHECK_SECONDS = 5
const STREAM_ERROR_SLEEP_SECONDS = 60
const STREAM_FORWARDS_TICKER_SECONDS = 10
const STREAM_INFLIGHT_PAYMENTS_TICKER_SECONDS = 60
const STREAM_LND_INVOICES_DELTA_TIME_MILLISECONDS = 1000
const STREAM_LND_INVOICES_INTERVAL_SLEEP = 10
const STREAM_LND_INVOICES_SLEEP_MILLISECONDS = 1000
const STREAM_LND_MAX_FORWARDS = 50000
const STREAM_LND_MAX_INVOICES = 1000
const STREAM_PAYMENTS_TICKER_SECONDS = 10
const TOLERATED_SUBSCRIPTION_DOWNTIME_SECONDS = 15
const TorqDummyNodeId = -1337
const VECTOR_PING_URL = VECTOR_URL + "api/publicNodeEvents/ping"
const VECTOR_SHORTCHANNELID_URL = VECTOR_URL + "api/bitcoin/shortChannelId"
const VECTOR_SLEEP_SECONDS = 20
const VECTOR_TRANSACTIONDETAILS_URL = VECTOR_URL + "api/bitcoin/transactionDetails"
const VECTOR_URL = "https://vector.ln.capital/"
const WORKFLOW_LOG_COUNT = 100
const WORKFLOW_TICKER_SECONDS = 10
Variables ¶
var ManagedChannelChannel = make(chan ManagedChannel) //nolint:gochecknoglobals
var ManagedChannelGroupChannel = make(chan ManagedChannelGroup) //nolint:gochecknoglobals
var ManagedChannelStateChannel = make(chan ManagedChannelState) //nolint:gochecknoglobals
var ManagedNodeChannel = make(chan ManagedNode) //nolint:gochecknoglobals
var ManagedRebalanceChannel = make(chan ManagedRebalance) //nolint:gochecknoglobals
var ManagedSettingsChannel = make(chan ManagedSettings) //nolint:gochecknoglobals
var ManagedTriggerChannel = make(chan ManagedTrigger) //nolint:gochecknoglobals
var RunningServices map[ServiceType]*Services //nolint:gochecknoglobals
var SubscriptionStreams = []SubscriptionStream{ TransactionStream, HtlcEventStream, ChannelEventStream, GraphEventStream, ForwardStream, InvoiceStream, PaymentStream, InFlightPaymentStream, PeerEventStream, ChannelBalanceCacheStream, }
Functions ¶
func AddRebalanceAndChannels ¶ added in v0.16.0
func AddRebalanceAndChannels(db *sqlx.DB, rebalancer *Rebalancer) error
func AddRebalanceLog ¶ added in v0.16.0
func AddRebalanceLog(db *sqlx.DB, rebalanceResult RebalanceResult) error
func ConvertLNDShortChannelID ¶ added in v0.14.0
func ConvertShortChannelIDToLND ¶ added in v0.14.0
func CopyParameters ¶ added in v0.16.0
func CreateChannelPoint ¶ added in v0.14.0
func GetActiveChannelIdByFundingTransaction ¶ added in v0.13.0
func GetActiveChannelIdByShortChannelId ¶ added in v0.13.0
func GetActiveNodeIdByPublicKey ¶ added in v0.13.0
func GetAllActiveTorqNodeIds ¶ added in v0.13.0
func GetAllChannelPublicKeys ¶
func GetAllTorqNodeIds ¶
func GetAllTorqPublicKeys ¶
func GetChannelIdByChannelPoint ¶ added in v0.14.0
func GetChannelIdByFundingTransaction ¶ added in v0.13.0
func GetChannelIdByLndShortChannelId ¶ added in v0.14.0
func GetChannelIdByShortChannelId ¶ added in v0.13.0
func GetChannelIdsByNodeId ¶ added in v0.14.0
func GetChannelNodeIds ¶
func GetChannelPublicKeys ¶
func GetNodeIdByPublicKey ¶ added in v0.13.0
func GetShortChannelIdFromVector ¶ added in v0.16.4
func GetShortChannelIdFromVector(fundingTransactionHash string, fundingOutputIndex int, nodeSettings ManagedNodeSettings, lightningRequestChannel chan interface{}) string
func GetWorkflowNodes ¶ added in v0.16.0
func GetWorkflowNodes() map[WorkflowNodeType]WorkflowNodeTypeParameters
func InactivateChannelNode ¶
func MaintenanceServiceStart ¶ added in v0.16.4
func ManagedChannelCache ¶
func ManagedChannelCache(ch chan ManagedChannel, ctx context.Context)
func ManagedChannelGroupCache ¶ added in v0.12.0
func ManagedChannelGroupCache(ch chan ManagedChannelGroup, ctx context.Context)
func ManagedChannelStateCache ¶ added in v0.14.0
func ManagedChannelStateCache(ch chan ManagedChannelState, ctx context.Context, channelEvent chan interface{})
ManagedChannelStateCache parameter Context is for test cases...
func ManagedNodeCache ¶
func ManagedNodeCache(ch chan ManagedNode, ctx context.Context)
ManagedNodeCache parameter Context is for test cases...
func ManagedRebalanceCache ¶ added in v0.16.0
func ManagedRebalanceCache(ch chan ManagedRebalance, ctx context.Context)
func ManagedSettingsCache ¶
func ManagedSettingsCache(ch chan ManagedSettings, ctx context.Context)
func ManagedTriggerCache ¶ added in v0.16.0
func ManagedTriggerCache(ch chan ManagedTrigger, ctx context.Context)
func MutexLocked ¶ added in v0.11.0
func ParseChannelPoint ¶ added in v0.14.0
func RWMutexReadLocked ¶ added in v0.13.0
func RWMutexWriteLocked ¶ added in v0.13.0
func RebalanceServiceStart ¶ added in v0.16.0
func RebalanceServiceStart(ctx context.Context, conn *grpc.ClientConn, db *sqlx.DB, nodeId int, rebalanceRequestChannel chan RebalanceRequest)
func SendServiceEvent ¶ added in v0.16.1
func SendServiceEvent(nodeId int, eventChannel chan interface{}, previousStatus Status, status Status, serviceType ServiceType, subscriptionStream *SubscriptionStream)
func SendToManagedBoolChannel ¶ added in v0.16.0
func SendToManagedChannelBalanceStateSettingsChannel ¶ added in v0.14.0
func SendToManagedChannelBalanceStateSettingsChannel(ch chan *ManagedChannelBalanceStateSettings, managedChannelBalanceStateSettings *ManagedChannelBalanceStateSettings)
func SendToManagedChannelBalanceStatesSettingsChannel ¶ added in v0.14.0
func SendToManagedChannelBalanceStatesSettingsChannel(ch chan []ManagedChannelBalanceStateSettings, managedChannelBalanceStateSettings []ManagedChannelBalanceStateSettings)
func SendToManagedChannelChannel ¶
func SendToManagedChannelChannel(ch chan ManagedChannel, managedChannel ManagedChannel)
func SendToManagedChannelGroupSettingsChannel ¶ added in v0.12.0
func SendToManagedChannelGroupSettingsChannel(ch chan *ManagedChannelGroupSettings, managedChannelGroupSettings *ManagedChannelGroupSettings)
func SendToManagedChannelIdsChannel ¶ added in v0.14.0
func SendToManagedChannelSettingChannel ¶ added in v0.13.0
func SendToManagedChannelSettingChannel(ch chan ManagedChannelSettings, channelSettings ManagedChannelSettings)
func SendToManagedChannelSettingsChannel ¶
func SendToManagedChannelSettingsChannel(ch chan []ManagedChannelSettings, channelSettings []ManagedChannelSettings)
func SendToManagedChannelStateSettingsChannel ¶ added in v0.14.0
func SendToManagedChannelStateSettingsChannel(ch chan *ManagedChannelStateSettings, managedChannelStateSettings *ManagedChannelStateSettings)
func SendToManagedChannelStatesSettingsChannel ¶ added in v0.14.0
func SendToManagedChannelStatesSettingsChannel(ch chan []ManagedChannelStateSettings, managedChannelBalanceStateSettings []ManagedChannelStateSettings)
func SendToManagedNodeChannel ¶
func SendToManagedNodeChannel(ch chan ManagedNode, managedNode ManagedNode)
func SendToManagedNodeSettingChannel ¶ added in v0.16.0
func SendToManagedNodeSettingChannel(ch chan ManagedNodeSettings, nodeSetting ManagedNodeSettings)
func SendToManagedNodeSettingsChannel ¶
func SendToManagedNodeSettingsChannel(ch chan []ManagedNodeSettings, nodeSettings []ManagedNodeSettings)
func SendToManagedRebalanceChannel ¶ added in v0.16.0
func SendToManagedRebalanceChannel(ch chan ManagedRebalance, managedRebalance ManagedRebalance)
func SendToManagedRebalanceResultChannel ¶ added in v0.16.0
func SendToManagedRebalanceResultChannel(ch chan RebalanceResult, rebalanceResult RebalanceResult)
func SendToManagedSettingsChannel ¶
func SendToManagedSettingsChannel(ch chan ManagedSettings, managedSettings ManagedSettings)
func SendToManagedTriggerSettingsChannel ¶ added in v0.16.0
func SendToManagedTriggerSettingsChannel(ch chan ManagedTriggerSettings, managedTriggerSettings ManagedTriggerSettings)
func SendToRebalancersChannel ¶ added in v0.16.0
func SendToRebalancersChannel(ch chan []*Rebalancer, rebalancers []*Rebalancer)
func SetChannel ¶
func SetChannel(channelId int, shortChannelId *string, lndShortChannelId *uint64, status ChannelStatus, fundingTransactionHash string, fundingOutputIndex int, fundingBlockHeight *int64, fundedOn *time.Time, capacity int64, private bool, firstNodeId int, secondNodeId int, initiatingNodeId *int, acceptingNodeId *int, closingTransactionHash *string, closingNodeId *int, closingBlockHeight *int64, closedOn *time.Time)
func SetChannelGroupsByChannelId ¶ added in v0.12.0
func SetChannelGroupsByChannelId(channelId int, channelGroups []ChannelGroup)
func SetChannelNode ¶
func SetChannelNode(nodeId int, publicKey string, chain Chain, network Network, status ChannelStatus)
func SetChannelStateBalanceHtlcEvent ¶ added in v0.14.0
func SetChannelStateBalanceHtlcEvent(htlcEvent HtlcEvent)
func SetChannelStateBalanceUpdate ¶ added in v0.14.0
func SetChannelStateBalanceUpdateMsat ¶ added in v0.14.0
func SetChannelStateChannelStatus ¶ added in v0.14.0
func SetChannelStateNodeStatus ¶ added in v0.14.0
func SetChannelStateRoutingPolicy ¶ added in v0.14.0
func SetChannelStates ¶ added in v0.14.0
func SetChannelStates(nodeId int, channelStateSettings []ManagedChannelStateSettings)
func SetChannelStatus ¶
func SetChannelStatus(channelId int, status ChannelStatus)
func SetInactiveChannelNode ¶
func SetRebalanceAndChannels ¶ added in v0.16.0
func SetRebalanceAndChannels(db *sqlx.DB, rebalancer Rebalancer) error
func SetSettings ¶
func SetSettings(defaultDateRange, defaultLanguage, weekStartsOn, preferredTimeZone string)
func SetTorqNode ¶
func SetTorqNode(nodeId int, name string, status Status, publicKey string, chain Chain, network Network)
SetTorqNode When active then also adds to channelNodes
func SetTrigger ¶ added in v0.16.0
Types ¶
type BatchOpenChannel ¶ added in v0.15.0
type BatchOpenChannel struct { NodePubkey string `json:"nodePubkey"` LocalFundingAmount int64 `json:"localFundingAmount"` PushSat *int64 `json:"pushSat"` Private *bool `json:"private"` MinHtlcMsat *uint64 `json:"minHtlcMsat"` }
BATCH OPEN CHANNELS
type BatchOpenRequest ¶ added in v0.15.0
type BatchOpenRequest struct { NodeId int `json:"nodeId"` Channels []BatchOpenChannel `json:"channels"` TargetConf *int32 `json:"targetConf"` SatPerVbyte *int64 `json:"satPerVbyte"` }
type BatchOpenResponse ¶ added in v0.15.0
type BatchOpenResponse struct {
PendingChannels []PendingChannel `json:"pendingChannels"`
}
type BlockEvent ¶ added in v0.13.0
type ChannelBalanceEvent ¶ added in v0.16.0
type ChannelBalanceEvent struct { EventData ChannelId int `json:"channelId"` ChannelBalanceEventData PreviousEventData *ChannelBalanceEventData `json:"previous"` }
type ChannelBalanceEventData ¶ added in v0.16.0
type ChannelBalanceEventData struct { Capacity int64 `json:"capacity"` LocalBalance int64 `json:"localBalance"` LocalBalancePerMilleRatio int `json:"localBalancePerMilleRatio"` RemoteBalance int64 `json:"remoteBalance"` AggregatedLocalBalance int64 `json:"aggregatedLocalBalance"` AggregatedLocalBalancePerMilleRatio int `json:"aggregatedLocalBalancePerMilleRatio"` }
type ChannelBalanceStateHtlcInclude ¶ added in v0.14.0
type ChannelBalanceStateHtlcInclude uint
const ( PENDING_HTLCS_IGNORED ChannelBalanceStateHtlcInclude = iota // PENDING_HTLCS_LOCAL_BALANCE_ADJUSTED_DOWNWARDS: // LocalBalance = ConfirmedLocalBalance - PendingDecreasingForwardHTLCsAmount - PendingPaymentHTLCsAmount PENDING_HTLCS_LOCAL_BALANCE_ADJUSTED_DOWNWARDS // PENDING_HTLCS_REMOTE_BALANCE_ADJUSTED_DOWNWARDS: // RemoteBalance = ConfirmedRemoteBalance - PendingIncreasingForwardHTLCsAmount - PendingInvoiceHTLCsAmount PENDING_HTLCS_REMOTE_BALANCE_ADJUSTED_DOWNWARDS // PENDING_HTLCS_LOCAL_AND_REMOTE_BALANCE_ADJUSTED_DOWNWARDS: // LocalBalance = ConfirmedLocalBalance - PendingDecreasingForwardHTLCsAmount - PendingPaymentHTLCsAmount // RemoteBalance = ConfirmedRemoteBalance - PendingIncreasingForwardHTLCsAmount - PendingInvoiceHTLCsAmount PENDING_HTLCS_LOCAL_AND_REMOTE_BALANCE_ADJUSTED_DOWNWARDS // PENDING_HTLCS_LOCAL_BALANCE_ADJUSTED_UPWARDS: // LocalBalance = ConfirmedLocalBalance + PendingIncreasingForwardHTLCsAmount + PendingInvoiceHTLCsAmount PENDING_HTLCS_LOCAL_BALANCE_ADJUSTED_UPWARDS // RemoteBalance = ConfirmedRemoteBalance + PendingDecreasingForwardHTLCsAmount + PendingPaymentHTLCsAmount PENDING_HTLCS_REMOTE_BALANCE_ADJUSTED_UPWARDS // PENDING_HTLCS_LOCAL_AND_REMOTE_BALANCE_ADJUSTED_UPWARDS: // LocalBalance = ConfirmedLocalBalance + PendingIncreasingForwardHTLCsAmount + PendingInvoiceHTLCsAmount // RemoteBalance = ConfirmedRemoteBalance + PendingDecreasingForwardHTLCsAmount + PendingPaymentHTLCsAmount PENDING_HTLCS_LOCAL_AND_REMOTE_BALANCE_ADJUSTED_UPWARDS )
type ChannelEvent ¶ added in v0.13.0
type ChannelEvent struct { EventData Type lnrpc.ChannelEventUpdate_UpdateType `json:"type"` ChannelId int `json:"channelId"` }
type ChannelGraphEvent ¶ added in v0.13.0
type ChannelGraphEvent struct { GraphEventData ChannelGraphEventData PreviousEventTime *time.Time `json:"previousEventTime"` PreviousEventData *ChannelGraphEventData `json:"previous"` }
type ChannelGraphEventData ¶ added in v0.13.0
type ChannelGroup ¶ added in v0.12.0
type ChannelGroup struct { TagId *int `json:"tagId" db:"tag_id"` TagName *string `json:"tagName" db:"tag_name"` TagStyle *string `json:"tagStyle" db:"tag_style"` CategoryId *int `json:"categoryId" db:"category_id"` CategoryName *string `json:"categoryName" db:"category_name"` CategoryStyle *string `json:"categoryStyle" db:"category_style"` }
type ChannelGroupInclude ¶ added in v0.12.0
type ChannelGroupInclude uint
const ( CATEGORIES_ONLY ChannelGroupInclude = iota DISTINCT_REGULAR_AND_TAG_CATEGORIES ALL_REGULAR_AND_TAG_CATEGORIES TAGS_ONLY )
type ChannelPoint ¶ added in v0.15.0
type ChannelStateInclude ¶ added in v0.14.0
type ChannelStateInclude uint
const ( ALL_LOCAL_ACTIVE_CHANNELS ChannelStateInclude = iota ALL_LOCAL_AND_REMOTE_ACTIVE_CHANNELS ALL_CHANNELS )
type ChannelStatus ¶
type ChannelStatus int
func GetChannelStatusByChannelId ¶ added in v0.13.0
func GetChannelStatusByChannelId(channelId int) ChannelStatus
type ChannelStatusUpdateRequest ¶ added in v0.16.0
type ChannelStatusUpdateRequest struct { ResponseChannel chan ChannelStatusUpdateResponse `json:"-"` CommunicationRequest ChannelId int `json:"channelId"` ChannelStatus Status `json:"channelStatus"` }
type ChannelStatusUpdateResponse ¶ added in v0.16.0
type ChannelStatusUpdateResponse struct { Request ChannelStatusUpdateRequest `json:"request"` CommunicationResponse }
type CloseChannelRequest ¶ added in v0.15.0
type CloseChannelRequest struct { NodeId int `json:"nodeId"` ChannelId int `json:"channelId"` Force *bool `json:"force"` TargetConf *int32 `json:"targetConf"` DeliveryAddress *string `json:"deliveryAddress"` SatPerVbyte *uint64 `json:"satPerVbyte"` }
CLOSE CHANNEL
type CloseChannelResponse ¶ added in v0.15.0
type CloseChannelResponse struct { RequestId string `json:"requestId"` Request CloseChannelRequest `json:"request"` Status ChannelStatus `json:"status"` ClosePendingChannelPoint ChannelPoint `json:"closePendingChannelPoint"` CloseChannelStatus CloseChannelStatus `json:"closeChannelStatus"` }
type CloseChannelStatus ¶ added in v0.15.0
type CommunicationRequest ¶ added in v0.16.0
type CommunicationRequest struct { RequestId string `json:"requestId"` RequestTime *time.Time `json:"requestTime"` NodeId int `json:"nodeId"` }
Request/Response for lightningCommunication
type CommunicationResponse ¶ added in v0.16.0
type FailedRequest ¶ added in v0.15.0
GENERIC REQUEST/RESPONSE STRUCTS
type FailureDetails ¶ added in v0.15.0
type ForwardEvent ¶ added in v0.13.0
type GraphEventData ¶ added in v0.13.0
type Htlc ¶ added in v0.14.0
type Htlc struct { Incoming bool Amount int64 HashLock []byte ExpirationHeight uint32 // Index identifying the htlc on the channel. HtlcIndex uint64 // If this HTLC is involved in a forwarding operation, this field indicates // the forwarding channel. For an outgoing htlc, it is the incoming channel. // For an incoming htlc, it is the outgoing channel. When the htlc // originates from this node or this node is the final destination, // forwarding_channel will be zero. The forwarding channel will also be zero // for htlcs that need to be forwarded but don't have a forwarding decision // persisted yet. ForwardingChannel uint64 // Index identifying the htlc on the forwarding channel. ForwardingHtlcIndex uint64 }
type HtlcEvent ¶ added in v0.13.0
type HtlcEvent struct { EventData Timestamp time.Time `json:"timestamp"` Data string `json:"data"` EventOrigin *string `json:"eventOrigin"` EventType *string `json:"eventType"` OutgoingHtlcId *uint64 `json:"outgoingHtlcId"` IncomingHtlcId *uint64 `json:"incomingHtlcId"` TimestampNs *uint64 `json:"timestampNs"` IncomingAmtMsat *uint64 `json:"incomingAmtMsat"` OutgoingAmtMsat *uint64 `json:"outgoingAmtMsat"` IncomingTimelock *uint32 `json:"incomingTimelock"` OutgoingTimelock *uint32 `json:"outgoingTimelock"` BoltFailureCode *string `json:"boltFailureCode"` BoltFailureString *string `json:"boltFailureString"` LndFailureDetail *string `json:"lndFailureDetail"` OutgoingChannelId *int `json:"outgoingChannelId"` IncomingChannelId *int `json:"incomingChannelId"` }
type Implementation ¶
type Implementation int
type ImportRequest ¶ added in v0.13.0
type ImportRequest struct { ImportType ImportType Out chan error }
type ImportType ¶ added in v0.13.0
type ImportType int
type InvoiceEvent ¶ added in v0.13.0
type InvoiceEvent struct { EventData ChannelId int `json:"channelId"` AddIndex uint64 `json:"addIndex"` ValueMSat uint64 `json:"valueMSat"` State lnrpc.Invoice_InvoiceState `json:"state"` AmountPaidMsat uint64 `json:"amountPaidMsat"` SettledDate time.Time `json:"settledDate"` DestinationNodeId *int `json:"destinationNodeId"` }
type ManagedChannel ¶
type ManagedChannel struct { Type ManagedChannelCacheOperationType ChannelId int ShortChannelId string LndShortChannelId uint64 FundingTransactionHash string FundingOutputIndex int FundingBlockHeight *int64 FundedOn *time.Time Capacity int64 NodeId int FirstNodeId int SecondNodeId int InitiatingNodeId *int AcceptingNodeId *int Private bool Status ChannelStatus ClosingTransactionHash *string ClosingNodeId *int ClosingBlockHeight *int64 ClosedOn *time.Time Out chan ManagedChannel ChannelSettingOut chan ManagedChannelSettings ChannelSettingsOut chan []ManagedChannelSettings ChannelIdsOut chan []int }
type ManagedChannelBalanceStateSettings ¶ added in v0.14.0
type ManagedChannelBalanceStateSettings struct { NodeId int `json:"nodeId"` RemoteNodeId int `json:"remoteNodeId"` ChannelId int `json:"channelId"` HtlcInclude ChannelBalanceStateHtlcInclude `json:"htlcInclude"` LocalBalance int64 `json:"localBalance"` LocalBalancePerMilleRatio int `json:"localBalancePerMilleRatio"` RemoteBalance int64 `json:"remoteBalance"` RemoteBalancePerMilleRatio int `json:"remoteBalancePerMilleRatio"` }
func GetChannelBalanceState ¶ added in v0.14.0
func GetChannelBalanceState(nodeId, channelId int, forceResponse bool, htlcInclude ChannelBalanceStateHtlcInclude) *ManagedChannelBalanceStateSettings
func GetChannelBalanceStates ¶ added in v0.14.0
func GetChannelBalanceStates(nodeId int, forceResponse bool, channelStateInclude ChannelStateInclude, htlcInclude ChannelBalanceStateHtlcInclude) []ManagedChannelBalanceStateSettings
type ManagedChannelCacheOperationType ¶
type ManagedChannelCacheOperationType uint
const ( // READ_ACTIVE_CHANNELID_BY_SHORTCHANNELID please provide ShortChannelId and Out READ_ACTIVE_CHANNELID_BY_SHORTCHANNELID ManagedChannelCacheOperationType = iota // READ_CHANNELID_BY_SHORTCHANNELID please provide ShortChannelId and Out READ_CHANNELID_BY_SHORTCHANNELID // READ_ACTIVE_CHANNELID_BY_FUNDING_TRANSACTION please provide FundingTransactionHash, FundingOutputIndex and Out READ_ACTIVE_CHANNELID_BY_FUNDING_TRANSACTION // READ_CHANNELID_BY_FUNDING_TRANSACTION please provide FundingTransactionHash, FundingOutputIndex and Out READ_CHANNELID_BY_FUNDING_TRANSACTION // READ_CHANNELIDS_BY_NODE_ID please provide NodeId and ChannelIdsOut READ_CHANNELIDS_BY_NODE_ID // READ_STATUSID_BY_CHANNELID please provide ChannelId and Out READ_STATUSID_BY_CHANNELID // READ_CHANNEL_SETTINGS please provide ChannelId and ChannelSettingOut READ_CHANNEL_SETTINGS // READ_ALL_CHANNEL_SETTINGS please provide FirstNodeId and ChannelSettingsOut READ_ALL_CHANNEL_SETTINGS // WRITE_CHANNEL Please provide ChannelId, FundingTransactionHash, FundingOutputIndex and Status (other values are optional in case of pending open channel) WRITE_CHANNEL // WRITE_CHANNELSTATUSID Please provide ChannelId and Status WRITE_CHANNELSTATUSID )
type ManagedChannelGroup ¶ added in v0.12.0
type ManagedChannelGroup struct { Type ManagedChannelGroupCacheOperationType ChannelId int Include ChannelGroupInclude ChannelGroups []ChannelGroup Out chan *ManagedChannelGroupSettings }
type ManagedChannelGroupCacheOperationType ¶ added in v0.12.0
type ManagedChannelGroupCacheOperationType uint
const ( // READ_CHANNELGROUPS please provide ChannelId and Out READ_CHANNELGROUPS ManagedChannelGroupCacheOperationType = iota // WRITE_CHANNELGROUPS Please provide ChannelId, ChannelGroups WRITE_CHANNELGROUPS )
type ManagedChannelGroupSettings ¶ added in v0.12.0
type ManagedChannelGroupSettings struct { ChannelId int ChannelGroups []ChannelGroup }
func GetChannelGroupsByChannelId ¶ added in v0.12.0
func GetChannelGroupsByChannelId(channelId int, include ChannelGroupInclude) *ManagedChannelGroupSettings
type ManagedChannelSettings ¶
type ManagedChannelSettings struct { ChannelId int ShortChannelId string LndShortChannelId uint64 FundingTransactionHash string FundingOutputIndex int FundingBlockHeight *int64 FundedOn *time.Time Capacity int64 FirstNodeId int SecondNodeId int InitiatingNodeId *int AcceptingNodeId *int Private bool Status ChannelStatus ClosingTransactionHash *string ClosingNodeId *int ClosingBlockHeight *int64 ClosedOn *time.Time }
func GetChannelSettingByChannelId ¶ added in v0.13.0
func GetChannelSettingByChannelId(channelId int) ManagedChannelSettings
func GetChannelSettingsByNodeId ¶ added in v0.13.0
func GetChannelSettingsByNodeId(nodeId int) []ManagedChannelSettings
type ManagedChannelState ¶ added in v0.14.0
type ManagedChannelState struct { Type ManagedChannelStateCacheOperationType NodeId int RemoteNodeId int ChannelId int Status Status Local bool Balance int64 Disabled bool FeeBaseMsat uint64 FeeRateMilliMsat uint64 MinHtlcMsat uint64 MaxHtlcMsat uint64 TimeLockDelta uint32 Amount int64 ForceResponse bool HtlcEvent HtlcEvent ChannelStateSettings []ManagedChannelStateSettings HtlcInclude ChannelBalanceStateHtlcInclude StateInclude ChannelStateInclude StateOut chan *ManagedChannelStateSettings StatesOut chan []ManagedChannelStateSettings BalanceStateOut chan *ManagedChannelBalanceStateSettings BalanceStatesOut chan []ManagedChannelBalanceStateSettings }
type ManagedChannelStateCacheOperationType ¶ added in v0.14.0
type ManagedChannelStateCacheOperationType uint
const ( // READ_CHANNELSTATE please provide NodeId, ChannelId and StateOut READ_CHANNELSTATE ManagedChannelStateCacheOperationType = iota // READ_ALL_CHANNELSTATES please provide NodeId and StatesOut READ_ALL_CHANNELSTATES // READ_CHANNELBALANCESTATE please provide NodeId, ChannelId, HtlcInclude and BalanceStateOut READ_CHANNELBALANCESTATE // READ_ALL_CHANNELBALANCESTATES please provide NodeId, StateInclude, HtlcInclude and BalanceStatesOut READ_ALL_CHANNELBALANCESTATES // WRITE_INITIAL_CHANNELSTATES This requires the lock being active for writing! Please provide the complete information set WRITE_INITIAL_CHANNELSTATES WRITE_CHANNELSTATE_NODESTATUS WRITE_CHANNELSTATE_CHANNELSTATUS WRITE_CHANNELSTATE_ROUTINGPOLICY WRITE_CHANNELSTATE_UPDATEBALANCE WRITE_CHANNELSTATE_UPDATEHTLCEVENT )
type ManagedChannelStateSettings ¶ added in v0.14.0
type ManagedChannelStateSettings struct { NodeId int `json:"nodeId"` RemoteNodeId int `json:"remoteNodeId"` ChannelId int `json:"channelId"` LocalBalance int64 `json:"localBalance"` LocalDisabled bool `json:"localDisabled"` LocalFeeBaseMsat uint64 `json:"localFeeBaseMsat"` LocalFeeRateMilliMsat uint64 `json:"localFeeRateMilliMsat"` LocalMinHtlcMsat uint64 `json:"localMinHtlcMsat"` LocalMaxHtlcMsat uint64 `json:"localMaxHtlcMsat"` LocalTimeLockDelta uint32 `json:"localTimeLockDelta"` RemoteBalance int64 `json:"remoteBalance"` RemoteDisabled bool `json:"remoteDisabled"` RemoteFeeBaseMsat uint64 `json:"remoteFeeBaseMsat"` RemoteFeeRateMilliMsat uint64 `json:"remoteFeeRateMilliMsat"` RemoteMinHtlcMsat uint64 `json:"remoteMinHtlcMsat"` RemoteMaxHtlcMsat uint64 `json:"remoteMaxHtlcMsat"` RemoteTimeLockDelta uint32 `json:"remoteTimeLockDelta"` UnsettledBalance int64 `json:"unsettledBalance"` PendingHtlcs []Htlc `json:"pendingHtlcs"` // INCREASING LOCAL BALANCE HTLCs PendingIncomingHtlcCount int `json:"pendingIncomingHtlcCount"` PendingIncomingHtlcAmount int64 `json:"pendingIncomingHtlcAmount"` // DECREASING LOCAL BALANCE HTLCs PendingOutgoingHtlcCount int `json:"pendingOutgoingHtlcCount"` PendingOutgoingHtlcAmount int64 `json:"pendingOutgoingHtlcAmount"` // STALE INFORMATION ONLY OBTAINED VIA LND REGULAR CHECKINS SO NOT MAINTAINED CommitFee int64 `json:"commitFee"` CommitWeight int64 `json:"commitWeight"` FeePerKw int64 `json:"feePerKw"` NumUpdates uint64 `json:"numUpdates"` ChanStatusFlags string `json:"chanStatusFlags"` CommitmentType lnrpc.CommitmentType `json:"commitmentType"` Lifetime int64 `json:"lifetime"` TotalSatoshisReceived int64 `json:"totalSatoshisReceived"` TotalSatoshisSent int64 `json:"totalSatoshisSent"` }
func GetChannelState ¶ added in v0.14.0
func GetChannelState(nodeId, channelId int, forceResponse bool) *ManagedChannelStateSettings
func GetChannelStates ¶ added in v0.14.0
func GetChannelStates(nodeId int, forceResponse bool) []ManagedChannelStateSettings
type ManagedNode ¶
type ManagedNode struct { Type ManagedNodeCacheOperationType NodeId int Chain *Chain Network *Network PublicKey string Name *string Out chan ManagedNode NodeIdsOut chan []int NodeSettingOut chan ManagedNodeSettings NodeSettingsOut chan []ManagedNodeSettings PublicKeysOut chan []string }
type ManagedNodeCacheOperationType ¶
type ManagedNodeCacheOperationType uint
const ( READ_ALL_TORQ_NODE ManagedNodeCacheOperationType = iota WRITE_INACTIVE_TORQ_NODE READ_ALL_TORQ_NODEIDS READ_ALL_TORQ_PUBLICKEYS READ_ACTIVE_TORQ_NODE WRITE_ACTIVE_TORQ_NODE READ_ACTIVE_TORQ_NODEIDS READ_ACTIVE_TORQ_PUBLICKEYS READ_ALL_ACTIVE_TORQ_NODEIDS READ_ALL_ACTIVE_TORQ_NODESETTINGS READ_ACTIVE_CHANNEL_NODE READ_CHANNEL_NODE WRITE_ACTIVE_CHANNEL_NODE WRITE_INACTIVE_CHANNEL_NODE INACTIVATE_CHANNEL_NODE READ_ALL_CHANNEL_NODEIDS READ_ALL_CHANNEL_PUBLICKEYS READ_NODE_SETTING )
type ManagedNodeSettings ¶
type ManagedNodeSettings struct { NodeId int Chain Chain Network Network PublicKey string Name *string Status Status }
func GetActiveTorqNodeSettings ¶ added in v0.16.0
func GetActiveTorqNodeSettings() []ManagedNodeSettings
func GetNodeSettingsByNodeId ¶
func GetNodeSettingsByNodeId(nodeId int) ManagedNodeSettings
type ManagedRebalance ¶ added in v0.16.0
type ManagedRebalance struct { Type ManagedRebalanceCacheOperationType Origin RebalanceRequestOrigin OriginId int OriginReference string IncomingChannelId int IncomingPublicKey string OutgoingChannelId int OutgoingPublicKey string AmountMsat uint64 Status *Status Rebalancer *Rebalancer RebalanceResult RebalanceResult Out chan ManagedRebalance BoolOut chan bool RebalanceResultOut chan RebalanceResult RebalancersOut chan []*Rebalancer }
type ManagedRebalanceCacheOperationType ¶ added in v0.16.0
type ManagedRebalanceCacheOperationType uint
const ( READ_REBALANCER ManagedRebalanceCacheOperationType = iota READ_REBALANCERS WRITE_REBALANCER DELETE_REBALANCER READ_REBALANCE_RESULT READ_REBALANCE_RESULT_BY_ORIGIN WRITE_REBALANCE_RESULT )
type ManagedSettings ¶
type ManagedSettings struct { Type ManagedSettingsCacheOperationType DefaultLanguage string PreferredTimeZone string DefaultDateRange string WeekStartsOn string Out chan ManagedSettings }
func GetSettings ¶
func GetSettings() ManagedSettings
type ManagedSettingsCacheOperationType ¶
type ManagedSettingsCacheOperationType uint
const ( // READ_SETTINGS please provide Out READ_SETTINGS ManagedSettingsCacheOperationType = iota // WRITE_SETTINGS please provide defaultLanguage, preferredTimeZone, defaultDateRange and weekStartsOn WRITE_SETTINGS )
type ManagedTrigger ¶ added in v0.16.0
type ManagedTrigger struct { Type ManagedTriggerCacheOperationType NodeId int WorkflowVersionId int TriggeringWorkflowVersionNodeId int Reference string CancelFunction context.CancelFunc PreviousState string BootTime *time.Time VerificationTime *time.Time Status Status TriggerSettingsOut chan ManagedTriggerSettings }
type ManagedTriggerCacheOperationType ¶ added in v0.16.0
type ManagedTriggerCacheOperationType uint
const ( READ_TRIGGER_SETTINGS ManagedTriggerCacheOperationType = iota WRITE_TRIGGER WRITE_TRIGGER_VERIFICATIONTIME )
type ManagedTriggerSettings ¶ added in v0.16.0
type ManagedTriggerSettings struct { WorkflowVersionId int NodeId int TriggeringWorkflowVersionNodeId int Reference string CancelFunction context.CancelFunc PreviousState string BootTime *time.Time VerificationTime *time.Time Status Status }
func GetTriggerSettingsByWorkflowVersionId ¶ added in v0.16.0
func GetTriggerSettingsByWorkflowVersionId(nodeId int, workflowVersionId int) ManagedTriggerSettings
type Network ¶
type Network int
func GetNetwork ¶
GetNetwork defaults to MainNet when no match is found
type NewAddressRequest ¶ added in v0.15.0
type NewAddressRequest struct { NodeId int `json:"nodeId"` Type int32 `json:"type"` //The name of the account to generate a new address for. If empty, the default wallet account is used. Account string `json:"account"` }
NEW ADDRESS
type NewAddressResponse ¶ added in v0.15.0
type NewAddressResponse struct { RequestId string `json:"requestId"` Request NewAddressRequest `json:"request"` Address string `json:"address"` }
type NewPaymentRequest ¶ added in v0.15.0
type NewPaymentRequest struct { NodeId int `json:"nodeId"` Invoice *string `json:"invoice"` TimeOutSecs int32 `json:"timeoutSecs"` Dest *string `json:"dest"` AmtMSat *int64 `json:"amtMSat"` FeeLimitMsat *int64 `json:"feeLimitMsat"` AllowSelfPayment *bool `json:"allowSelfPayment"` }
NEW PAYMENT
type NewPaymentResponse ¶ added in v0.15.0
type NewPaymentResponse struct { RequestId string `json:"requestId"` Request NewPaymentRequest `json:"request"` Status string `json:"status"` FailureReason string `json:"failureReason"` Hash string `json:"hash"` Preimage string `json:"preimage"` PaymentRequest string `json:"paymentRequest"` AmountMsat int64 `json:"amountMsat"` FeeLimitMsat int64 `json:"feeLimitMsat"` FeePaidMsat int64 `json:"feePaidMsat"` CreationDate time.Time `json:"creationDate"` Attempt Attempt `json:"path"` }
type NodeConnectionDetailCustomSettings ¶ added in v0.13.0
type NodeConnectionDetailCustomSettings byte
const (
ImportFailedPayments NodeConnectionDetailCustomSettings = 1 << iota
)
type NodeGraphEvent ¶ added in v0.13.0
type NodeGraphEvent struct { GraphEventData NodeGraphEventData PreviousEventTime *time.Time `json:"previousEventTime"` PreviousEventData *NodeGraphEventData `json:"previous"` }
type NodeGraphEventData ¶ added in v0.13.0
type OpenChannelRequest ¶ added in v0.15.0
type OpenChannelRequest struct { NodeId int `json:"nodeId"` SatPerVbyte *uint64 `json:"satPerVbyte"` NodePubKey string `json:"nodePubKey"` Host *string `json:"host"` LocalFundingAmount int64 `json:"localFundingAmount"` PushSat *int64 `json:"pushSat"` TargetConf *int32 `json:"targetConf"` Private *bool `json:"private"` MinHtlcMsat *uint64 `json:"minHtlcMsat"` RemoteCsvDelay *uint32 `json:"remoteCsvDelay"` MinConfs *int32 `json:"minConfs"` SpendUnconfirmed *bool `json:"spendUnconfirmed"` CloseAddress *string `json:"closeAddress"` }
OPEN CHANNEL
type OpenChannelResponse ¶ added in v0.15.0
type OpenChannelResponse struct { RequestId string `json:"requestId"` Request OpenChannelRequest `json:"request"` Status ChannelStatus `json:"status"` ChannelPoint string `json:"channelPoint,omitempty"` PendingChannelPoint string `json:"pendingChannelPoint,omitempty"` }
type PayOnChainRequest ¶ added in v0.15.0
type PayOnChainRequest struct { NodeId int `json:"nodeId"` Address string `json:"address"` AmountSat int64 `json:"amountSat"` TargetConf *int32 `json:"targetConf"` SatPerVbyte *uint64 `json:"satPerVbyte"` SendAll *bool `json:"sendAll"` Label *string `json:"label"` MinConfs *int32 `json:"minConfs"` SpendUnconfirmed *bool `json:"spendUnconfirmed"` }
PAY ONCHAIN
type PayOnChainResponse ¶ added in v0.15.0
type PayOnChainResponse struct { Request PayOnChainRequest `json:"request"` TxId string `json:"txId"` }
type PaymentEvent ¶ added in v0.14.0
type PaymentEvent struct { EventData AmountPaid int64 `json:"amountPaid"` FeeMsat uint64 `json:"feeMsat"` PaymentStatus lnrpc.Payment_PaymentStatus `json:"paymentStatus"` PaymentFailureReason lnrpc.PaymentFailureReason `json:"paymentFailureReason"` OutgoingChannelId *int `json:"outgoingChannelId"` RebalanceAmountMsat *uint64 `json:"rebalanceAmount"` IncomingChannelId *int `json:"incomingChannelId"` }
type PeerEvent ¶ added in v0.13.0
type PeerEvent struct { EventData Type lnrpc.PeerEvent_EventType `json:"type"` EventNodeId int `json:"eventNodeId"` }
type PendingChannel ¶ added in v0.15.0
type PendingChannel struct {
PendingChannelPoint string `json:"pendingChannelPoint"`
}
type PingSystem ¶ added in v0.11.0
type PingSystem byte
const ( Amboss PingSystem = 1 << iota Vector )
type RebalanceRequest ¶ added in v0.16.0
type RebalanceRequest struct { CommunicationRequest ResponseChannel chan RebalanceResponse `json:"-"` Origin RebalanceRequestOrigin `json:"origin"` // Either manually generated number for manual rebalance or // WorkflowVersionNodeId for rebalance originating from workflows OriginId int `json:"originId"` OriginReference string `json:"originReference"` // Either IncomingChannelId is populated or OutgoingChannelId is. IncomingChannelId int `json:"incomingChannelId"` // Either OutgoingChannelId is populated or IncomingChannelId is. OutgoingChannelId int `json:"outgoingChannelIds"` ChannelIds []int `json:"channelIds"` AmountMsat uint64 `json:"amountMsat"` MaximumCostMsat uint64 `json:"maximumCostMsat"` MaximumConcurrency int `json:"maximumConcurrency"` }
type RebalanceRequestOrigin ¶ added in v0.16.0
type RebalanceRequestOrigin int
type RebalanceResponse ¶ added in v0.16.0
type RebalanceResponse struct { Request RebalanceRequest `json:"request"` CommunicationResponse }
type RebalanceResult ¶ added in v0.16.0
type RebalanceResult struct { RebalanceId int `json:"rebalanceId"` OutgoingChannelId int `json:"outgoingChannelId"` IncomingChannelId int `json:"incomingChannelId"` Status Status `json:"status"` Hops string `json:"hops"` TotalTimeLock uint32 `json:"total_time_lock"` TotalFeeMsat uint64 `json:"total_fee_msat"` TotalAmountMsat uint64 `json:"total_amount_msat"` Error string `json:"error"` CreatedOn time.Time `json:"createdOn"` UpdateOn time.Time `json:"updateOn"` Route *lnrpc.Route `json:"-"` }
type RebalanceRunner ¶ added in v0.16.0
type RebalanceRunner struct { RebalanceId int OutgoingChannelId int IncomingChannelId int Invoices map[uint64]*lnrpc.AddInvoiceResponse // FailedHops map[hopSourcePublicKey_hopDestinationPublicKey]amountMsat FailedHops map[string]uint64 FailedPairs []*lnrpc.NodePair Status Status Ctx context.Context Cancel context.CancelFunc }
type Rebalancer ¶ added in v0.16.0
type RoutingPolicyUpdateRequest ¶ added in v0.16.0
type RoutingPolicyUpdateRequest struct { CommunicationRequest ResponseChannel chan RoutingPolicyUpdateResponse `json:"-"` ChannelId int `json:"channelId"` FeeRateMilliMsat *uint64 `json:"feeRateMilliMsat"` FeeBaseMsat *uint64 `json:"feeBaseMsat"` MaxHtlcMsat *uint64 `json:"maxHtlcMsat"` MinHtlcMsat *uint64 `json:"minHtlcMsat"` TimeLockDelta *uint32 `json:"timeLockDelta"` }
type RoutingPolicyUpdateResponse ¶ added in v0.16.0
type RoutingPolicyUpdateResponse struct { Request RoutingPolicyUpdateRequest `json:"request"` CommunicationResponse FailedUpdates []FailedRequest `json:"failedUpdates"` }
type ServiceChannelMessage ¶ added in v0.11.0
type ServiceChannelMessage = struct { ServiceType ServiceType ServiceCommand ServiceCommand NodeId int // EnforcedServiceStatus is a one time status enforcement for a service EnforcedServiceStatus *Status // NoDelay is a one time no delay enforcement for a service NoDelay bool Out chan Status }
type ServiceCommand ¶ added in v0.11.0
type ServiceCommand int
type ServiceEvent ¶ added in v0.13.0
type ServiceEvent struct { EventData Type ServiceType SubscriptionStream *SubscriptionStream Status Status PreviousStatus Status }
type ServiceType ¶ added in v0.11.0
type ServiceType int
func GetServiceTypes ¶ added in v0.16.0
func GetServiceTypes() []ServiceType
type Services ¶ added in v0.13.0
type Services struct { ServiceType ServiceType // contains filtered or unexported fields }
func (*Services) AddSubscription ¶ added in v0.13.0
func (*Services) GetActiveNodeIds ¶ added in v0.13.0
func (*Services) GetBootLock ¶ added in v0.13.0
func (*Services) GetBootTime ¶ added in v0.13.0
GetBootTime When the service is active it will return it's boot time
func (*Services) GetChannelBalanceCacheStreamStatus ¶ added in v0.13.0
func (*Services) GetEnforcedServiceStatusCheck ¶ added in v0.13.0
func (*Services) GetIncludeIncomplete ¶ added in v0.13.0
func (*Services) GetNodeIds ¶ added in v0.13.0
func (*Services) GetStatus ¶ added in v0.13.0
GetStatus return the status of the Service but in case of ServiceType = LndSubscription then streamStatuses are also verified. If one of the streamStatuses is not active then this function return Pending
func (*Services) GetStreamBootTime ¶ added in v0.13.0
func (rs *Services) GetStreamBootTime(nodeId int, stream SubscriptionStream) *time.Time
GetStreamBootTime when the status of the LND Service is active and streamStatus is active then bootTime will have a value
func (*Services) GetStreamInitializationPingTime ¶ added in v0.13.0
func (rs *Services) GetStreamInitializationPingTime(nodeId int, stream SubscriptionStream) *time.Time
func (*Services) GetStreamStatus ¶ added in v0.13.0
func (rs *Services) GetStreamStatus(nodeId int, stream SubscriptionStream) Status
GetStreamStatus when the status of the LND Service is active then streamStatus will be returned.
func (*Services) Initialising ¶ added in v0.14.0
func (*Services) RemoveSubscription ¶ added in v0.13.0
func (*Services) SetIncludeIncomplete ¶ added in v0.13.0
func (*Services) SetStreamStatus ¶ added in v0.13.0
func (rs *Services) SetStreamStatus(nodeId int, stream SubscriptionStream, status Status) Status
type ShortChannelIdHttpRequest ¶ added in v0.16.2
type ShortChannelIdHttpResponse ¶ added in v0.16.2
type ShortChannelIdHttpResponse struct { Request ShortChannelIdHttpRequest `json:"request"` ShortChannelId string `json:"shortChannelId"` }
type ShortChannelIdRequest ¶ added in v0.16.2
type ShortChannelIdRequest struct { CommunicationRequest ResponseChannel chan ShortChannelIdResponse `json:"-"` TransactionHash string `json:"transactionHash"` OutputIndex int `json:"outputIndex"` }
Request/Response for Vector
type ShortChannelIdResponse ¶ added in v0.16.2
type ShortChannelIdResponse struct { Request ShortChannelIdRequest `json:"request"` CommunicationResponse ShortChannelId string `json:"shortChannelId"` }
type SignMessageRequest ¶ added in v0.16.2
type SignMessageRequest struct { CommunicationRequest ResponseChannel chan SignMessageResponse `json:"-"` Message string `json:"message"` }
type SignMessageResponse ¶ added in v0.16.2
type SignMessageResponse struct { Request SignMessageRequest `json:"request"` CommunicationResponse Signature string `json:"signature"` }
type SignatureVerificationRequest ¶ added in v0.16.2
type SignatureVerificationRequest struct { CommunicationRequest ResponseChannel chan SignatureVerificationResponse `json:"-"` Message string `json:"message"` Signature string `json:"signature"` }
type SignatureVerificationResponse ¶ added in v0.16.2
type SignatureVerificationResponse struct { Request SignatureVerificationRequest `json:"request"` CommunicationResponse PublicKey string `json:"publicKey"` }
type SubscriptionStream ¶ added in v0.13.0
type SubscriptionStream int
func (*SubscriptionStream) IsChannelBalanceCache ¶ added in v0.13.0
func (ss *SubscriptionStream) IsChannelBalanceCache() bool
type TransactionDetailsHttpRequest ¶ added in v0.16.4
type TransactionDetailsHttpResponse ¶ added in v0.16.4
type TransactionDetailsHttpResponse struct { Request TransactionDetailsHttpRequest `json:"request"` TransactionCount int `json:"transactionCount"` TransactionIndex int `json:"transactionIndex"` BlockHash string `json:"blockHash"` BlockTimestamp time.Time `json:"blockTimestamp"` BlockHeight int64 `json:"blockHeight"` }
func GetTransactionDetailsFromVector ¶ added in v0.16.4
func GetTransactionDetailsFromVector(transactionHash string, nodeSettings ManagedNodeSettings, lightningRequestChannel chan interface{}) TransactionDetailsHttpResponse
type TransactionEvent ¶ added in v0.13.0
type TransactionEvent struct { EventData Timestamp time.Time `json:"timestamp"` TransactionHash *string `json:"transactionHash"` Amount *int64 `json:"amount"` NumberOfConfirmations *int32 `json:"numberOfConfirmations"` BlockHash *string `json:"blockHash"` BlockHeight *int32 `json:"blockHeight"` TotalFees *int64 `json:"totalFees"` DestinationAddresses *[]string `json:"destinationAddresses"` RawTransactionHex *string `json:"rawTransactionHex"` Label *string `json:"label"` }
type WorkflowNodeType ¶ added in v0.16.0
type WorkflowNodeType int
type WorkflowNodeTypeParameters ¶ added in v0.16.0
type WorkflowNodeTypeParameters struct { WorkflowNodeType WorkflowNodeType RequiredInputs []WorkflowParameterWithLabel OptionalInputs []WorkflowParameterWithLabel RequiredOutputs []WorkflowParameterWithLabel OptionalOutputs []WorkflowParameterWithLabel }
type WorkflowParameter ¶ added in v0.16.0
type WorkflowParameter string
type WorkflowParameterType ¶ added in v0.16.0
type WorkflowParameterType int
type WorkflowParameterWithLabel ¶ added in v0.16.0
type WorkflowParameterWithLabel struct { Label string WorkflowParameter }
type WorkflowTriggerType ¶ added in v0.16.0
type WorkflowTriggerType int