wire

package
v0.0.0-...-12e863f Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2018 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MsgInit             lnwire.MessageType = 16
	MsgOpenChannel                         = 32
	MsgAcceptChannel                       = 33
	MsgFundingCreated                      = 34
	MsgFundingSigned                       = 35
	MsgFundingLocked                       = 36
	MsgInitiateSwap                        = 900
	MsgSwapAccepted                        = 901
	MsgInvoiceGenerated                    = 902
	MsgInvoiceExecuted                     = 903
)
View Source
const MsgPrefix = 0xbeef
View Source
const UnknownMsg = "<unknown>"

Variables

This section is empty.

Functions

func MessageName

func MessageName(msgType lnwire.MessageType) string

func ReadMessage

func ReadMessage(r io.Reader, pver uint32) (lnwire.Message, error)

func ReadTCPAddr

func ReadTCPAddr(r io.Reader, addr *net.TCPAddr) (uint, error)

func WriteMessage

func WriteMessage(w io.Writer, msg lnwire.Message) (int, error)

func WriteTCPAddr

func WriteTCPAddr(w io.Writer, addr *net.TCPAddr) error

Types

type AcceptChannel

type AcceptChannel struct {
	PendingChannelID [32]byte
	CsvDelay         uint16
	MaxAcceptedHTLCs uint16
	FundingKey       *crypto.PublicKey
}

func (*AcceptChannel) Decode

func (msg *AcceptChannel) Decode(r io.Reader, pver uint32) error

func (*AcceptChannel) Encode

func (msg *AcceptChannel) Encode(w io.Writer, pver uint32) error

func (*AcceptChannel) MaxPayloadLength

func (msg *AcceptChannel) MaxPayloadLength(uint32) uint32

func (*AcceptChannel) MsgType

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

type FundingCreated

type FundingCreated struct {
	PendingChannelID [32]byte
	InputID          common.Hash
	Sig              crypto.Signature
}

func (*FundingCreated) Decode

func (msg *FundingCreated) Decode(r io.Reader, pver uint32) error

func (*FundingCreated) Encode

func (msg *FundingCreated) Encode(w io.Writer, pver uint32) error

func (*FundingCreated) MaxPayloadLength

func (msg *FundingCreated) MaxPayloadLength(uint32) uint32

func (*FundingCreated) MsgType

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

type FundingLocked

type FundingLocked struct {
	ChannelID common.Hash
}

func (*FundingLocked) Decode

func (msg *FundingLocked) Decode(r io.Reader, pver uint32) error

func (*FundingLocked) Encode

func (msg *FundingLocked) Encode(w io.Writer, pver uint32) error

func (*FundingLocked) MaxPayloadLength

func (msg *FundingLocked) MaxPayloadLength(uint32) uint32

func (*FundingLocked) MsgType

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

type FundingSigned

type FundingSigned struct {
	ChannelID common.Hash
	Sig       crypto.Signature
}

func (*FundingSigned) Decode

func (msg *FundingSigned) Decode(r io.Reader, pver uint32) error

func (*FundingSigned) Encode

func (msg *FundingSigned) Encode(w io.Writer, pver uint32) error

func (*FundingSigned) MaxPayloadLength

func (msg *FundingSigned) MaxPayloadLength(uint32) uint32

func (*FundingSigned) MsgType

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

type Init

type Init struct {
	LNDIdentificationKey *crypto.PublicKey
	LNDHost              string
}

func NewInit

func NewInit(ident *crypto.PublicKey, host string) *Init

func (*Init) Decode

func (msg *Init) Decode(r io.Reader, pver uint32) error

func (*Init) Encode

func (msg *Init) Encode(w io.Writer, pver uint32) error

func (*Init) MaxPayloadLength

func (msg *Init) MaxPayloadLength(uint32) uint32

func (*Init) MsgType

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

type InitiateSwap

type InitiateSwap struct {
	SwapID                 [32]byte
	PaymentHash            [32]byte
	ETHChannelID           [32]byte
	ETHAmount              *big.Int
	ETHCommitmentSignature crypto.Signature
	SendingAddress         *crypto.PublicKey
	RequestedAmount        *big.Int
}

func (*InitiateSwap) Decode

func (msg *InitiateSwap) Decode(r io.Reader, pver uint32) error

func (*InitiateSwap) Encode

func (msg *InitiateSwap) Encode(w io.Writer, pver uint32) error

func (*InitiateSwap) MaxPayloadLength

func (msg *InitiateSwap) MaxPayloadLength(uint32) uint32

func (*InitiateSwap) MsgType

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

type InvoiceExecuted

type InvoiceExecuted struct {
	SwapID [32]byte
}

func (*InvoiceExecuted) Decode

func (msg *InvoiceExecuted) Decode(r io.Reader, pver uint32) error

func (*InvoiceExecuted) Encode

func (msg *InvoiceExecuted) Encode(w io.Writer, pver uint32) error

func (*InvoiceExecuted) MaxPayloadLength

func (msg *InvoiceExecuted) MaxPayloadLength(uint32) uint32

func (*InvoiceExecuted) MsgType

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

type InvoiceGenerated

type InvoiceGenerated struct {
	SwapID         [32]byte
	PaymentRequest string
}

func (*InvoiceGenerated) Decode

func (msg *InvoiceGenerated) Decode(r io.Reader, pver uint32) error

func (*InvoiceGenerated) Encode

func (msg *InvoiceGenerated) Encode(w io.Writer, pver uint32) error

func (*InvoiceGenerated) MaxPayloadLength

func (msg *InvoiceGenerated) MaxPayloadLength(uint32) uint32

func (*InvoiceGenerated) MsgType

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

type OpenChannel

type OpenChannel struct {
	PendingChannelID [32]byte
	FundingAmount    *big.Int
	CsvDelay         uint16
	MaxAcceptedHTLCs uint16
	FundingKey       *crypto.PublicKey
}

func (*OpenChannel) Decode

func (msg *OpenChannel) Decode(r io.Reader, pver uint32) error

func (*OpenChannel) Encode

func (msg *OpenChannel) Encode(w io.Writer, pver uint32) error

func (*OpenChannel) MaxPayloadLength

func (msg *OpenChannel) MaxPayloadLength(uint32) uint32

func (*OpenChannel) MsgType

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

type SwapAccepted

type SwapAccepted struct {
	SwapID       [32]byte
	BTCChannelID uint64
}

func (*SwapAccepted) Decode

func (msg *SwapAccepted) Decode(r io.Reader, pver uint32) error

func (*SwapAccepted) Encode

func (msg *SwapAccepted) Encode(w io.Writer, pver uint32) error

func (*SwapAccepted) MaxPayloadLength

func (msg *SwapAccepted) MaxPayloadLength(uint32) uint32

func (*SwapAccepted) MsgType

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

Jump to

Keyboard shortcuts

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