Documentation
¶
Index ¶
- Constants
- func MessageName(msgType lnwire.MessageType) string
- func ReadMessage(r io.Reader, pver uint32) (lnwire.Message, error)
- func ReadTCPAddr(r io.Reader, addr *net.TCPAddr) (uint, error)
- func WriteMessage(w io.Writer, msg lnwire.Message) (int, error)
- func WriteTCPAddr(w io.Writer, addr *net.TCPAddr) error
- type AcceptChannel
- type FundingCreated
- type FundingLocked
- type FundingSigned
- type Init
- type InitiateSwap
- type InvoiceExecuted
- type InvoiceGenerated
- type OpenChannel
- type SwapAccepted
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
Types ¶
type AcceptChannel ¶
type AcceptChannel struct {
PendingChannelID [32]byte
CsvDelay uint16
MaxAcceptedHTLCs uint16
FundingKey *crypto.PublicKey
}
func (*AcceptChannel) MaxPayloadLength ¶
func (msg *AcceptChannel) MaxPayloadLength(uint32) uint32
func (*AcceptChannel) MsgType ¶
func (msg *AcceptChannel) MsgType() lnwire.MessageType
type FundingCreated ¶
func (*FundingCreated) MaxPayloadLength ¶
func (msg *FundingCreated) MaxPayloadLength(uint32) uint32
func (*FundingCreated) MsgType ¶
func (msg *FundingCreated) MsgType() lnwire.MessageType
type FundingLocked ¶
func (*FundingLocked) MaxPayloadLength ¶
func (msg *FundingLocked) MaxPayloadLength(uint32) uint32
func (*FundingLocked) MsgType ¶
func (msg *FundingLocked) MsgType() lnwire.MessageType
type FundingSigned ¶
func (*FundingSigned) MaxPayloadLength ¶
func (msg *FundingSigned) MaxPayloadLength(uint32) uint32
func (*FundingSigned) MsgType ¶
func (msg *FundingSigned) MsgType() lnwire.MessageType
type Init ¶
func (*Init) MaxPayloadLength ¶
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) 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) MaxPayloadLength ¶
func (msg *InvoiceExecuted) MaxPayloadLength(uint32) uint32
func (*InvoiceExecuted) MsgType ¶
func (msg *InvoiceExecuted) MsgType() lnwire.MessageType
type InvoiceGenerated ¶
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) MaxPayloadLength ¶
func (msg *OpenChannel) MaxPayloadLength(uint32) uint32
func (*OpenChannel) MsgType ¶
func (msg *OpenChannel) MsgType() lnwire.MessageType
type SwapAccepted ¶
func (*SwapAccepted) MaxPayloadLength ¶
func (msg *SwapAccepted) MaxPayloadLength(uint32) uint32
func (*SwapAccepted) MsgType ¶
func (msg *SwapAccepted) MsgType() lnwire.MessageType
Click to show internal directories.
Click to hide internal directories.