 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- type AuxChannelNegotiator
- func (n *AuxChannelNegotiator) GetChannelFeatures(cid lnwire.ChannelID) lnwire.FeatureVector
- func (n *AuxChannelNegotiator) GetInitRecords(_ route.Vertex) (lnwire.CustomRecords, error)
- func (n *AuxChannelNegotiator) GetPeerFeatures(peer route.Vertex) lnwire.FeatureVector
- func (n *AuxChannelNegotiator) ProcessChannelReady(cid lnwire.ChannelID, peer route.Vertex)
- func (n *AuxChannelNegotiator) ProcessInitRecords(peer route.Vertex, customRecords lnwire.CustomRecords) error
- func (n *AuxChannelNegotiator) ProcessReestablish(cid lnwire.ChannelID, peer route.Vertex)
 
- type AuxFeatureBits
Constants ¶
const ( // NoOpHTLCsRequired is a feature bit that declares the noop-htlcs as a // required feature. NoOpHTLCsRequired lnwire.FeatureBit = 0 // NoOpHTLCsOptional is a feature bit that declares the noop-htlcs as an // optional feature. NoOpHTLCsOptional lnwire.FeatureBit = 1 // STXORequired is a feature bit that declares STXO proofs as a required // feature. STXORequired lnwire.FeatureBit = 2 // STXOOptional is a feature bit that declares the STXO proofs as an // optional feature. STXOOptional lnwire.FeatureBit = 3 )
const ( // AuxFeatureBitsTLV is the TLV type used to encode auxiliary feature // bits in the init message. These feature bits allow aux channel // implementations to negotiate custom channel behavior. AuxFeatureBitsTLV tlv.Type = 65545 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuxChannelNegotiator ¶
type AuxChannelNegotiator struct {
	// contains filtered or unexported fields
}
    AuxChannelNegotiator is responsible for producing the extra tlv blob that is encapsulated in the init and reestablish peer messages. This helps us communicate custom feature bits with our peer.
func NewAuxChannelNegotiator ¶
func NewAuxChannelNegotiator() *AuxChannelNegotiator
NewAuxChannelNegotiator returns a new instance of the aux channel negotiator.
func (*AuxChannelNegotiator) GetChannelFeatures ¶
func (n *AuxChannelNegotiator) GetChannelFeatures( cid lnwire.ChannelID) lnwire.FeatureVector
GetChannelFeatures returns the negotiated feature bits vector for the channel identified by the given channelID.
func (*AuxChannelNegotiator) GetInitRecords ¶
func (n *AuxChannelNegotiator) GetInitRecords( _ route.Vertex) (lnwire.CustomRecords, error)
GetInitRecords is called when sending an init message to a peer. It returns custom feature bits to include in the init message TLVs. The implementation can decide which features to advertise based on the peer's identity.
func (*AuxChannelNegotiator) GetPeerFeatures ¶
func (n *AuxChannelNegotiator) GetPeerFeatures( peer route.Vertex) lnwire.FeatureVector
GetPeerFeatures returns the negotiated feature bit vector that was established with the given peer.
func (*AuxChannelNegotiator) ProcessChannelReady ¶
func (n *AuxChannelNegotiator) ProcessChannelReady(cid lnwire.ChannelID, peer route.Vertex)
ProcessChannelReady handles the reception of the ChannelReady message, which signals that a newly established channel is now ready to use. This helps us correlate a peer's features with a channel outpoint
func (*AuxChannelNegotiator) ProcessInitRecords ¶
func (n *AuxChannelNegotiator) ProcessInitRecords(peer route.Vertex, customRecords lnwire.CustomRecords) error
ProcessInitRecords handles received init feature TLVs from a peer. The implementation can store state internally to affect future channel operations with this peer.
func (*AuxChannelNegotiator) ProcessReestablish ¶
func (n *AuxChannelNegotiator) ProcessReestablish( cid lnwire.ChannelID, peer route.Vertex)
ProcessReestablish handles the reception of the ChannelReestablish message, which signals that a previously established channel is now ready to use. This helps us correlate a peer's features with a channel outpoint.
type AuxFeatureBits ¶
AuxFeatureBits is a type alias for a TLV blob that contains custom feature bits for auxiliary channel negotiation.