Versions in this module Expand all Collapse all v0 v0.0.2 Oct 3, 2016 Changes in this version + const CmdCancelHTLC + const CmdCloseComplete + const CmdCloseRequest + const CmdCommitRevocation + const CmdCommitSignature + const CmdErrorGeneric + const CmdHTLCAddAccept + const CmdHTLCAddReject + const CmdHTLCAddRequest + const CmdHTLCSettleRequest + const CmdNeighborAckMessage + const CmdNeighborHelloMessage + const CmdNeighborRstMessage + const CmdNeighborUpdMessage + const CmdRoutingTableRequestMessage + const CmdRoutingTableTransferMessage + const CmdSingleFundingComplete + const CmdSingleFundingOpenProof + const CmdSingleFundingRequest + const CmdSingleFundingResponse + const CmdSingleFundingSignComplete + const MaxMessagePayload + const MaxSliceLength + const MessageHeaderSize + func WriteMessage(w io.Writer, msg Message, pver uint32, btcnet wire.BitcoinNet) (int, error) + type CancelHTLC struct + ChannelPoint *wire.OutPoint + HTLCKey HTLCKey + func NewHTLCTimeoutRequest() *CancelHTLC + func (c *CancelHTLC) Command() uint32 + func (c *CancelHTLC) Decode(r io.Reader, pver uint32) error + func (c *CancelHTLC) Encode(w io.Writer, pver uint32) error + func (c *CancelHTLC) MaxPayloadLength(uint32) uint32 + func (c *CancelHTLC) String() string + func (c *CancelHTLC) Validate() error + type CloseComplete struct + ChannelPoint *wire.OutPoint + ResponderCloseSig *btcec.Signature + func NewCloseComplete() *CloseComplete + func (c *CloseComplete) Command() uint32 + func (c *CloseComplete) Decode(r io.Reader, pver uint32) error + func (c *CloseComplete) Encode(w io.Writer, pver uint32) error + func (c *CloseComplete) MaxPayloadLength(uint32) uint32 + func (c *CloseComplete) String() string + func (c *CloseComplete) Validate() error + type CloseRequest struct + ChannelPoint *wire.OutPoint + Fee btcutil.Amount + RequesterCloseSig *btcec.Signature + func NewCloseRequest(cp *wire.OutPoint, sig *btcec.Signature) *CloseRequest + func (c *CloseRequest) Command() uint32 + func (c *CloseRequest) Decode(r io.Reader, pver uint32) error + func (c *CloseRequest) Encode(w io.Writer, pver uint32) error + func (c *CloseRequest) MaxPayloadLength(pver uint32) uint32 + func (c *CloseRequest) String() string + func (c *CloseRequest) Validate() error + type CommitHeight uint64 + type CommitRevocation struct + ChannelPoint *wire.OutPoint + NextRevocationHash [32]byte + NextRevocationKey *btcec.PublicKey + Revocation [32]byte + func NewCommitRevocation() *CommitRevocation + func (c *CommitRevocation) Command() uint32 + func (c *CommitRevocation) Decode(r io.Reader, pver uint32) error + func (c *CommitRevocation) Encode(w io.Writer, pver uint32) error + func (c *CommitRevocation) MaxPayloadLength(uint32) uint32 + func (c *CommitRevocation) String() string + func (c *CommitRevocation) Validate() error + type CommitSignature struct + ChannelPoint *wire.OutPoint + CommitSig *btcec.Signature + Fee btcutil.Amount + LogIndex uint64 + func NewCommitSignature() *CommitSignature + func (c *CommitSignature) Command() uint32 + func (c *CommitSignature) Decode(r io.Reader, pver uint32) error + func (c *CommitSignature) Encode(w io.Writer, pver uint32) error + func (c *CommitSignature) MaxPayloadLength(uint32) uint32 + func (c *CommitSignature) String() string + func (c *CommitSignature) Validate() error + type CreditsAmount int64 + func (c CreditsAmount) ToSatoshi() int64 + type ErrorGeneric struct + ChannelPoint *wire.OutPoint + ErrorID uint16 + Problem string + func NewErrorGeneric() *ErrorGeneric + func (c *ErrorGeneric) Command() uint32 + func (c *ErrorGeneric) Decode(r io.Reader, pver uint32) error + func (c *ErrorGeneric) Encode(w io.Writer, pver uint32) error + func (c *ErrorGeneric) MaxPayloadLength(uint32) uint32 + func (c *ErrorGeneric) String() string + func (c *ErrorGeneric) Validate() error + type HTLCAddReject struct + ChannelPoint *wire.OutPoint + HTLCKey HTLCKey + func NewHTLCAddReject() *HTLCAddReject + func (c *HTLCAddReject) Command() uint32 + func (c *HTLCAddReject) Decode(r io.Reader, pver uint32) error + func (c *HTLCAddReject) Encode(w io.Writer, pver uint32) error + func (c *HTLCAddReject) MaxPayloadLength(uint32) uint32 + func (c *HTLCAddReject) String() string + func (c *HTLCAddReject) Validate() error + type HTLCAddRequest struct + Amount CreditsAmount + ChannelPoint *wire.OutPoint + ContractType uint8 + Expiry uint32 + OnionBlob []byte + RedemptionHashes [][32]byte + RefundContext HTLCKey + func NewHTLCAddRequest() *HTLCAddRequest + func (c *HTLCAddRequest) Command() uint32 + func (c *HTLCAddRequest) Decode(r io.Reader, pver uint32) error + func (c *HTLCAddRequest) Encode(w io.Writer, pver uint32) error + func (c *HTLCAddRequest) MaxPayloadLength(uint32) uint32 + func (c *HTLCAddRequest) String() string + func (c *HTLCAddRequest) Validate() error + type HTLCKey int64 + type HTLCSettleRequest struct + ChannelPoint *wire.OutPoint + HTLCKey HTLCKey + RedemptionProofs [][32]byte + func NewHTLCSettleRequest(chanPoint *wire.OutPoint, key HTLCKey, redemptionProofs [][32]byte) *HTLCSettleRequest + func (c *HTLCSettleRequest) Command() uint32 + func (c *HTLCSettleRequest) Decode(r io.Reader, pver uint32) error + func (c *HTLCSettleRequest) Encode(w io.Writer, pver uint32) error + func (c *HTLCSettleRequest) MaxPayloadLength(uint32) uint32 + func (c *HTLCSettleRequest) String() string + func (c *HTLCSettleRequest) Validate() error + type Message interface + Command func() uint32 + Decode func(io.Reader, uint32) error + Encode func(io.Writer, uint32) error + MaxPayloadLength func(uint32) uint32 + String func() string + Validate func() error + func ReadMessage(r io.Reader, pver uint32, btcnet wire.BitcoinNet) (int, Message, []byte, error) + type NeighborAckMessage struct + func (msg *NeighborAckMessage) Command() uint32 + func (msg *NeighborAckMessage) Decode(r io.Reader, pver uint32) error + func (msg *NeighborAckMessage) Encode(w io.Writer, pver uint32) error + func (msg *NeighborAckMessage) MaxPayloadLength(uint32) uint32 + func (msg *NeighborAckMessage) String() string + func (msg *NeighborAckMessage) Validate() error + type NeighborHelloMessage struct + RT *rt.RoutingTable + func (msg *NeighborHelloMessage) Command() uint32 + func (msg *NeighborHelloMessage) Decode(r io.Reader, pver uint32) error + func (msg *NeighborHelloMessage) Encode(w io.Writer, pver uint32) error + func (msg *NeighborHelloMessage) MaxPayloadLength(uint32) uint32 + func (msg *NeighborHelloMessage) String() string + func (msg *NeighborHelloMessage) Validate() error + type NeighborRstMessage struct + func (msg *NeighborRstMessage) Command() uint32 + func (msg *NeighborRstMessage) Decode(r io.Reader, pver uint32) error + func (msg *NeighborRstMessage) Encode(w io.Writer, pver uint32) error + func (msg *NeighborRstMessage) MaxPayloadLength(uint32) uint32 + func (msg *NeighborRstMessage) String() string + func (msg *NeighborRstMessage) Validate() error + type NeighborUpdMessage struct + DiffBuff *rt.DifferenceBuffer + func (msg *NeighborUpdMessage) Command() uint32 + func (msg *NeighborUpdMessage) Decode(r io.Reader, pver uint32) error + func (msg *NeighborUpdMessage) Encode(w io.Writer, pver uint32) error + func (msg *NeighborUpdMessage) MaxPayloadLength(uint32) uint32 + func (msg *NeighborUpdMessage) String() string + func (msg *NeighborUpdMessage) Validate() error + type PkScript []byte + type RoutingTableRequestMessage struct + func (msg *RoutingTableRequestMessage) Command() uint32 + func (msg *RoutingTableRequestMessage) Decode(r io.Reader, pver uint32) error + func (msg *RoutingTableRequestMessage) Encode(w io.Writer, pver uint32) error + func (msg *RoutingTableRequestMessage) MaxPayloadLength(uint32) uint32 + func (msg *RoutingTableRequestMessage) String() string + func (msg *RoutingTableRequestMessage) Validate() error + type RoutingTableTransferMessage struct + RT *rt.RoutingTable + func (msg *RoutingTableTransferMessage) Command() uint32 + func (msg *RoutingTableTransferMessage) Decode(r io.Reader, pver uint32) error + func (msg *RoutingTableTransferMessage) Encode(w io.Writer, pver uint32) error + func (msg *RoutingTableTransferMessage) MaxPayloadLength(uint32) uint32 + func (msg *RoutingTableTransferMessage) String() string + func (msg *RoutingTableTransferMessage) Validate() error + type SingleFundingComplete struct + ChannelID uint64 + CommitSignature *btcec.Signature + FundingOutPoint *wire.OutPoint + RevocationKey *btcec.PublicKey + func NewSingleFundingComplete(chanID uint64, fundingPoint *wire.OutPoint, commitSig *btcec.Signature, ...) *SingleFundingComplete + func (s *SingleFundingComplete) Command() uint32 + func (s *SingleFundingComplete) Decode(r io.Reader, pver uint32) error + func (s *SingleFundingComplete) Encode(w io.Writer, pver uint32) error + func (s *SingleFundingComplete) MaxPayloadLength(uint32) uint32 + func (s *SingleFundingComplete) String() string + func (s *SingleFundingComplete) Validate() error + type SingleFundingOpenProof struct + ChannelID uint64 + SpvProof []byte + func NewSingleFundingOpenProof(chanID uint64, spvProof []byte) *SingleFundingOpenProof + func (s *SingleFundingOpenProof) Command() uint32 + func (s *SingleFundingOpenProof) Decode(r io.Reader, pver uint32) error + func (s *SingleFundingOpenProof) Encode(w io.Writer, pver uint32) error + func (s *SingleFundingOpenProof) MaxPayloadLength(uint32) uint32 + func (s *SingleFundingOpenProof) String() string + func (s *SingleFundingOpenProof) Validate() error + type SingleFundingRequest struct + ChannelDerivationPoint *btcec.PublicKey + ChannelID uint64 + ChannelType uint8 + CoinType uint64 + CommitmentKey *btcec.PublicKey + CsvDelay uint32 + DeliveryPkScript PkScript + FeePerKb btcutil.Amount + FundingAmount btcutil.Amount + func NewSingleFundingRequest(chanID uint64, chanType uint8, coinType uint64, fee btcutil.Amount, ...) *SingleFundingRequest + func (c *SingleFundingRequest) Command() uint32 + func (c *SingleFundingRequest) Decode(r io.Reader, pver uint32) error + func (c *SingleFundingRequest) Encode(w io.Writer, pver uint32) error + func (c *SingleFundingRequest) MaxPayloadLength(uint32) uint32 + func (c *SingleFundingRequest) String() string + func (c *SingleFundingRequest) Validate() error + type SingleFundingResponse struct + ChannelDerivationPoint *btcec.PublicKey + ChannelID uint64 + CommitmentKey *btcec.PublicKey + CsvDelay uint32 + DeliveryPkScript PkScript + RevocationKey *btcec.PublicKey + func NewSingleFundingResponse(chanID uint64, rk, ck, cdp *btcec.PublicKey, delay uint32, ...) *SingleFundingResponse + func (c *SingleFundingResponse) Command() uint32 + func (c *SingleFundingResponse) Decode(r io.Reader, pver uint32) error + func (c *SingleFundingResponse) Encode(w io.Writer, pver uint32) error + func (c *SingleFundingResponse) MaxPayloadLength(uint32) uint32 + func (c *SingleFundingResponse) String() string + func (c *SingleFundingResponse) Validate() error + type SingleFundingSignComplete struct + ChannelID uint64 + CommitSignature *btcec.Signature + func NewSingleFundingSignComplete(chanID uint64, sig *btcec.Signature) *SingleFundingSignComplete + func (c *SingleFundingSignComplete) Command() uint32 + func (c *SingleFundingSignComplete) Decode(r io.Reader, pver uint32) error + func (c *SingleFundingSignComplete) Encode(w io.Writer, pver uint32) error + func (c *SingleFundingSignComplete) MaxPayloadLength(uint32) uint32 + func (c *SingleFundingSignComplete) String() string + func (s *SingleFundingSignComplete) Validate() error