Versions in this module Expand all Collapse all v0 v0.15.10001 Jan 16, 2023 v0.15.101 Jan 16, 2023 Changes in this version + const EncrypterTypeMock + const EncrypterTypeNone + const EncrypterTypeSphinx + var Exit lnwire.ShortChannelID + var Source lnwire.ShortChannelID + func NewCustomRecords(parsedTypes tlv.TypeMap) record.CustomSet + func UseLogger(logger btclog.Logger) + func ValidateParsedPayloadTypes(parsedTypes tlv.TypeMap, nextHop lnwire.ShortChannelID) error + type DecodeHopIteratorRequest struct + IncomingCltv uint32 + OnionReader io.Reader + RHash []byte + type DecodeHopIteratorResponse struct + FailCode lnwire.FailCode + HopIterator Iterator + func (r *DecodeHopIteratorResponse) Result() (Iterator, lnwire.FailCode) + type EncrypterType byte + type ErrInvalidPayload struct + FinalHop bool + Type tlv.Type + Violation PayloadViolation + func (e ErrInvalidPayload) Error() string + type ErrorEncrypter interface + Decode func(io.Reader) error + Encode func(io.Writer) error + EncryptFirstHop func(lnwire.FailureMessage) (lnwire.OpaqueReason, error) + EncryptMalformedError func(lnwire.OpaqueReason) lnwire.OpaqueReason + IntermediateEncrypt func(lnwire.OpaqueReason) lnwire.OpaqueReason + Reextract func(ErrorEncrypterExtracter) error + Type func() EncrypterType + type ErrorEncrypterExtracter func(*btcec.PublicKey) (ErrorEncrypter, lnwire.FailCode) + type ForwardingInfo struct + AmountToForward lnwire.MilliSatoshi + Network Network + NextHop lnwire.ShortChannelID + OutgoingCTLV uint32 + type Iterator interface + EncodeNextHop func(w io.Writer) error + ExtractErrorEncrypter func(ErrorEncrypterExtracter) (ErrorEncrypter, lnwire.FailCode) + HopPayload func() (*Payload, error) + type Network uint8 + const BitcoinNetwork + const LitecoinNetwork + func (c Network) String() string + type OnionProcessor struct + func NewOnionProcessor(router *sphinx.Router) *OnionProcessor + func (p *OnionProcessor) DecodeHopIterator(r io.Reader, rHash []byte, incomingCltv uint32) (Iterator, lnwire.FailCode) + func (p *OnionProcessor) DecodeHopIterators(id []byte, reqs []DecodeHopIteratorRequest) ([]DecodeHopIteratorResponse, error) + func (p *OnionProcessor) ExtractErrorEncrypter(ephemeralKey *btcec.PublicKey) (ErrorEncrypter, lnwire.FailCode) + func (p *OnionProcessor) ReconstructHopIterator(r io.Reader, rHash []byte) (Iterator, error) + func (p *OnionProcessor) Start() error + func (p *OnionProcessor) Stop() error + type Payload struct + AMP *record.AMP + FwdInfo ForwardingInfo + MPP *record.MPP + func NewLegacyPayload(f *sphinx.HopData) *Payload + func NewPayloadFromReader(r io.Reader) (*Payload, error) + func (h *Payload) AMPRecord() *record.AMP + func (h *Payload) CustomRecords() record.CustomSet + func (h *Payload) ForwardingInfo() ForwardingInfo + func (h *Payload) Metadata() []byte + func (h *Payload) MultiPath() *record.MPP + type PayloadViolation byte + const IncludedViolation + const OmittedViolation + const RequiredViolation + func (v PayloadViolation) String() string + type SphinxErrorEncrypter struct + EphemeralKey *btcec.PublicKey + func NewSphinxErrorEncrypter() *SphinxErrorEncrypter + func (s *SphinxErrorEncrypter) Decode(r io.Reader) error + func (s *SphinxErrorEncrypter) Encode(w io.Writer) error + func (s *SphinxErrorEncrypter) EncryptFirstHop(failure lnwire.FailureMessage) (lnwire.OpaqueReason, error) + func (s *SphinxErrorEncrypter) EncryptMalformedError(reason lnwire.OpaqueReason) lnwire.OpaqueReason + func (s *SphinxErrorEncrypter) IntermediateEncrypt(reason lnwire.OpaqueReason) lnwire.OpaqueReason + func (s *SphinxErrorEncrypter) Reextract(extract ErrorEncrypterExtracter) error + func (s *SphinxErrorEncrypter) Type() EncrypterType