Documentation
¶
Index ¶
Constants ¶
View Source
const ( NodePubkeyKeysendType uint64 = 555555 MessageKeysendType uint64 = 684931 MessageOrderKeysendType uint64 = 123456 )
View Source
const MAX_CUST_SIZE = 900
Variables ¶
This section is empty.
Functions ¶
func RandomUint64 ¶
func RandomUint64() uint64
Types ¶
type Node ¶
type Node interface {
// GetInfo will get the node's basic info.
GetInfo() (*lnrpc.GetInfoResponse, error)
// GetPubkey will get the node's public key.
GetPubkey() string
// Subscribe will subscribe to keysends through the channel from the node.
Subscribe(chan comm.IncomingDIDMessage) error
// Keysend will send a message through Lightning to another node with an amount.
Keysend(pubKey string, msgData []byte, amt int64) error
// SignMessage will sign the provided message using a node
SignMessage([]byte) ([]byte, error)
// VerifySignature will verify the provided signature using a node
VerifySignature(msg, signature []byte) (bool, error)
// VerifySignature will verify the provided signature using a specific node pubkey.
VerifySignatureFromPubkey(msg, signature, pubkey []byte) (bool, error)
// GenerateInvoice will generate an invoice from one of the active nodes.
GenerateInvoice(int64, string) (string, error)
// PayInvoice will pay an invoice from one of the active nodes.
PayInvoice(string) (string, error)
// PayInvoice will check an invoice for payment.
CheckInvoice(string) (bool, error)
// Disconnect will disconnect safely from the node.
Disconnect() error
// ShouldListen indicates if this node should listen to incoming messages
ShouldListen() bool
// GetChannels Get the channels from the connected LND node
GetChannels() (int64, error)
// ListPayments Get the payments from the connected LND node
ListPayments() (string, error)
// ListInvoices Get the invoices from the connected LND node
ListInvoices() (string, error)
}
Node is an implementation of a single lightning node with only the functionality that the LightningManager needs to worry about.
Click to show internal directories.
Click to hide internal directories.