Documentation
¶
Index ¶
- Constants
- func GetLoadbalancerHostname(serviceName string, namespace string, kubeconfig string) (string, error)
- type BitcoinNodeInterface
- type CLNConnectionFiles
- type ConnectionDetails
- type ConnectionFiles
- type LNDConnectionFiles
- type LightningNodeInterface
- type NetworkType
- type NodeInterface
- type SLNetwork
- func DiscoverRunningNetwork(kubeconfig string, overrideAPIHost string, overrideAPIPort uint16, ...) (*SLNetwork, error)
- func NewSLNetwork(helmfile string, kubeConfig string, Network NetworkType, namespace string) (SLNetwork, error)
- func NewSLNetworkWithoutNamespace(helmfile string, kubeConfig string, Network NetworkType) (SLNetwork, error)
- func (n *SLNetwork) ChannelBalance(nodeName string) (types.Amount, error)
- func (n *SLNetwork) CheckDependencies() error
- func (n *SLNetwork) ConnectPeer(fromNodeName string, toNodeName string) (string, error)
- func (n *SLNetwork) CreateAndStart() error
- func (n *SLNetwork) CreateInvoice(nodeName string, amountSats uint64) (string, error)
- func (n *SLNetwork) Destroy() error
- func (n *SLNetwork) Generate(nodeName string, numBlocks uint32) (hashes []string, err error)
- func (n *SLNetwork) GetAllNodes() []NodeInterface
- func (n *SLNetwork) GetBitcoinNode(name string) (BitcoinNodeInterface, error)
- func (n *SLNetwork) GetConnectionDetails(nodeName string) ([]ConnectionDetails, error)
- func (n *SLNetwork) GetConnectionDetailsForAllNodes() ([]ConnectionDetails, error)
- func (n *SLNetwork) GetLightningNode(name string) (LightningNodeInterface, error)
- func (n *SLNetwork) GetNewAddress(nodeName string) (string, error)
- func (n *SLNetwork) GetNode(name string) (NodeInterface, error)
- func (n *SLNetwork) GetPubKey(nodeName string) (types.PubKey, error)
- func (n *SLNetwork) GetWalletBalance(nodeName string) (types.Amount, error)
- func (n *SLNetwork) IsNodeRunning(nodeName string) (bool, error)
- func (n *SLNetwork) OpenChannel(fromNodeName string, toNodeName string, localAmountSats uint64) (types.ChannelPoint, error)
- func (n *SLNetwork) PayInvoice(nodeName string, invoice string) (preimage string, err error)
- func (n *SLNetwork) Send(fromNodeName string, toNodeName string, amountSats uint64) (string, error)
- func (n *SLNetwork) SendToAddress(fromNodeName string, toAddress string, amountSats uint64) (string, error)
- func (n *SLNetwork) Start() error
- func (n *SLNetwork) StartNode(nodeName string) error
- func (n *SLNetwork) Stop() error
- func (n *SLNetwork) StopNode(nodeName string) error
Constants ¶
View Source
const DefaultNamespace = "sl"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BitcoinNodeInterface ¶ added in v0.3.1
type BitcoinNodeInterface interface { GetName() string Generate( client stdbitcoinclient.BitcoinClient, commonClient stdcommonclient.CommonClient, numBlocks uint32, ) (hashes []string, err error) GetWalletBalance(client stdcommonclient.CommonClient) (types.Amount, error) SendToAddress( client stdcommonclient.CommonClient, address string, amount types.Amount, ) (TxId string, err error) GetNewAddress(client stdcommonclient.CommonClient) (string, error) GetConnectionPorts(kubeConfig string) ([]bitcoinnode.ConnectionPorts, error) }
type CLNConnectionFiles ¶
type ConnectionDetails ¶
type ConnectionFiles ¶
type ConnectionFiles struct { LND *LNDConnectionFiles CLN *CLNConnectionFiles }
type LNDConnectionFiles ¶
type LightningNodeInterface ¶ added in v0.3.1
type LightningNodeInterface interface { GetName() string SendToAddress( client stdcommonclient.CommonClient, address string, amount types.Amount, ) (string, error) GetNewAddress(client stdcommonclient.CommonClient) (string, error) GetPubKey(client stdlightningclient.LightningClient) (types.PubKey, error) GetWalletBalance(client stdcommonclient.CommonClient) (types.Amount, error) ConnectPeer( client stdlightningclient.LightningClient, pubkey types.PubKey, nodeName string, ) error OpenChannel( client stdlightningclient.LightningClient, pubkey types.PubKey, localAmt types.Amount, ) (types.ChannelPoint, error) GetConnectionFiles(network string, kubeConfig string) (*lightningnode.ConnectionFiles, error) WriteAuthFilesToDirectory(network string, kubeConfig string, dir string) error GetConnectionPort(kubeConfig string) (uint16, error) CreateInvoice(client stdlightningclient.LightningClient, amountSats uint64) (string, error) PayInvoice(client stdlightningclient.LightningClient, invoice string) (string, error) ChannelBalance(client stdlightningclient.LightningClient) (types.Amount, error) }
type NetworkType ¶
type NetworkType int
const ( Mainnet NetworkType = iota Testnet Signet Regtest Simnet )
func (NetworkType) String ¶
func (n NetworkType) String() string
type NodeInterface ¶ added in v0.3.1
type NodeInterface interface { GetName() string GetWalletBalance(client stdcommonclient.CommonClient) (types.Amount, error) SendToAddress( client stdcommonclient.CommonClient, address string, amount types.Amount, ) (TxId string, err error) GetNewAddress(client stdcommonclient.CommonClient) (string, error) }
type SLNetwork ¶
type SLNetwork struct { BitcoinNodes []BitcoinNodeInterface LightningNodes []LightningNodeInterface ApiHost string ApiPort uint16 Network NetworkType RetryCommands bool RetryDelay time.Duration RetryTimeout time.Duration Namespace string // contains filtered or unexported fields }
func DiscoverRunningNetwork ¶ added in v0.3.1
func NewSLNetwork ¶
func NewSLNetwork(helmfile string, kubeConfig string, Network NetworkType, namespace string) (SLNetwork, error)
NewSLNetwork creates a new SLNetwork object that is used to interact with an existing network
func NewSLNetworkWithoutNamespace ¶ added in v0.4.0
func NewSLNetworkWithoutNamespace(helmfile string, kubeConfig string, Network NetworkType) (SLNetwork, error)
NewSLNetworkWithoutNamespace should be only used when creating a new network from helmfile
func (*SLNetwork) ChannelBalance ¶ added in v0.3.0
func (*SLNetwork) CheckDependencies ¶
func (*SLNetwork) ConnectPeer ¶ added in v0.3.0
func (*SLNetwork) CreateAndStart ¶ added in v0.3.1
func (*SLNetwork) CreateInvoice ¶ added in v0.3.0
func (*SLNetwork) GetAllNodes ¶
func (n *SLNetwork) GetAllNodes() []NodeInterface
func (*SLNetwork) GetBitcoinNode ¶
func (n *SLNetwork) GetBitcoinNode(name string) (BitcoinNodeInterface, error)
func (*SLNetwork) GetConnectionDetails ¶ added in v0.3.0
func (n *SLNetwork) GetConnectionDetails(nodeName string) ([]ConnectionDetails, error)
func (*SLNetwork) GetConnectionDetailsForAllNodes ¶ added in v0.3.0
func (n *SLNetwork) GetConnectionDetailsForAllNodes() ([]ConnectionDetails, error)
func (*SLNetwork) GetLightningNode ¶
func (n *SLNetwork) GetLightningNode(name string) (LightningNodeInterface, error)
func (*SLNetwork) GetNewAddress ¶ added in v0.3.0
func (*SLNetwork) GetWalletBalance ¶ added in v0.3.0
func (*SLNetwork) IsNodeRunning ¶ added in v0.3.1
func (*SLNetwork) OpenChannel ¶ added in v0.3.0
func (*SLNetwork) PayInvoice ¶ added in v0.3.0
func (*SLNetwork) SendToAddress ¶ added in v0.4.2
Click to show internal directories.
Click to hide internal directories.