lnsocket

package module
v0.0.0-...-0fad35b Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: MIT Imports: 10 Imported by: 5

Documentation

Index

Constants

View Source
const (
	COMMANDO_CMD             = 0x4c4f
	COMMANDO_REPLY_CONTINUES = 0x594b
	COMMANDO_REPLY_TERM      = 0x594d
)

Variables

This section is empty.

Functions

func ParseMsgType

func ParseMsgType(bytes []byte) uint16

Types

type CommandoMsg

type CommandoMsg struct {
	Rune      string
	Method    string
	Params    string
	RequestId uint64
}

func NewCommandoMsg

func NewCommandoMsg(token string, method string, params string) CommandoMsg

func (*CommandoMsg) Decode

func (msg *CommandoMsg) Decode(reader io.Reader, size uint32) error

func (*CommandoMsg) Encode

func (msg *CommandoMsg) Encode(buf *bytes.Buffer, pver uint32) error

func (*CommandoMsg) MsgType

func (msg *CommandoMsg) MsgType() lnwire.MessageType

type LNSocket

type LNSocket struct {
	Conn        net.Conn
	PrivKeyECDH *keychain.PrivKeyECDH
}

func (*LNSocket) Connect

func (ln *LNSocket) Connect(hostname string, pubkey string) error

func (*LNSocket) ConnectAndInit

func (ln *LNSocket) ConnectAndInit(hostname string, pubkey string) error

func (*LNSocket) ConnectWith

func (ln *LNSocket) ConnectWith(netAddr *lnwire.NetAddress) error

func (*LNSocket) Disconnect

func (ln *LNSocket) Disconnect()

func (*LNSocket) GenKey

func (ln *LNSocket) GenKey()

func (*LNSocket) PerformInit

func (ln *LNSocket) PerformInit() error

func (*LNSocket) Recv

func (ln *LNSocket) Recv() (uint16, []byte, error)

func (*LNSocket) Rpc

func (ln *LNSocket) Rpc(token string, method string, params string) (string, error)

Jump to

Keyboard shortcuts

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