entities

package
v0.0.27 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BalanceReportCallback

type BalanceReportCallback func(ctx context.Context, report *ChannelBalanceReport) bool

type ChannelBalance

type ChannelBalance struct {
	Active  bool `json:"active"`
	Private bool `json:"private"`
	// Deprecated
	ActivePrevious bool `json:"active_previous"`

	LocalPubkey  string `json:"local_pubkey"`
	RemotePubkey string `json:"remote_pubkey"`
	ChanId       uint64 `json:"chan_id"`
	Capacity     uint64 `json:"capacity"`

	RemoteNominator uint64 `json:"remote_nominator"`
	LocalNominator  uint64 `json:"local_nominator"`
	Denominator     uint64 `json:"denominator"`

	// Deprecated
	RemoteNominatorDiff int64 `json:"remote_nominator_diff"`
	// Deprecated
	LocalNominatorDiff int64 `json:"local_nominator_diff"`
	// Deprecated
	DenominatorDiff int64 `json:"denominator_diff"`

	ActiveRemote bool `json:"active_remote"`
	// Deprecated
	ActiveRemotePrevious bool `json:"active_remote_previous"`
	ActiveLocal          bool `json:"active_local"`
	// Deprecated
	ActiveLocalPrevious bool `json:"active_local_previous"`

	// For backward compatibility - will be removed
	Nominator     uint64 `json:"nominator"`
	NominatorDiff int64  `json:"nominator_diff"`
}

type ChannelBalanceReport

type ChannelBalanceReport struct {
	ReportingSettings
	Chain           string            `json:"chain"`   // should be bitcoin (bitcoin, litecoin)
	Network         string            `json:"network"` // should be mainnet (regtest, testnet, mainnet)
	PubKey          string            `json:"pubkey"`
	UniqueId        string            `json:"uniqueId,omitempty"` // optional unique identifier
	Timestamp       entities.JsonTime `json:"timestamp"`
	ChangedChannels []ChannelBalance  `json:"changed_channels"`
	ClosedChannels  []ClosedChannel   `json:"closed_channels"`
}

type ClosedChannel

type ClosedChannel struct {
	ChannelId uint64 `json:"channel_id"`
}

type InfoCallback added in v0.0.5

type InfoCallback func(ctx context.Context, report *InfoReport) bool

type InfoReport added in v0.0.5

type InfoReport struct {
	UniqueId  string            `json:"uniqueId,omitempty"` // optional unique identifier
	Timestamp entities.JsonTime `json:"timestamp"`

	api.NodeInfoApiExtended
}

type Interval

type Interval int
const (
	MANUAL_REQUEST Interval = iota
	SECOND
	TEN_SECONDS
	MINUTE
	TEN_MINUTE
	HOUR
)

func (Interval) Duration

func (i Interval) Duration() time.Duration

func (*Interval) MarshalJSON

func (i *Interval) MarshalJSON() ([]byte, error)

func (*Interval) UnmarshalJSON

func (i *Interval) UnmarshalJSON(s []byte) (err error)

type NewApiCall added in v0.0.5

type NewApiCall func() api.LightingApiCalls

type NodeIdentifier

type NodeIdentifier struct {
	Identifier string `json:"identifier"`
	UniqueId   string `json:"unique_id"`
}

func (*NodeIdentifier) GetId added in v0.0.4

func (n *NodeIdentifier) GetId() string

type ReentrancyBlock added in v0.0.17

type ReentrancyBlock struct {
	// contains filtered or unexported fields
}

func NewReentrancyBlock added in v0.0.17

func NewReentrancyBlock() *ReentrancyBlock

func (*ReentrancyBlock) Enter added in v0.0.17

func (r *ReentrancyBlock) Enter(id string) bool

func (*ReentrancyBlock) Release added in v0.0.17

func (r *ReentrancyBlock) Release(id string)

type ReportingSettings

type ReportingSettings struct {
	GraphPollInterval    time.Duration `json:"-"`
	NoopInterval         time.Duration `json:"-"` // If that much time has passed send null report
	PollInterval         Interval      `json:"poll_interval"`
	AllowedEntropy       int           `json:"allowed_entropy"`        // 64 bits is the default
	AllowPrivateChannels bool          `json:"allow_private_channels"` // default is false
}

Jump to

Keyboard shortcuts

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