pub enum SendError {
Secp256k1(Error),
TooBigPacket,
TooFewBlindedHops,
InvalidFirstHop(PublicKey),
PathNotFound,
InvalidMessage,
BufferFull,
GetNodeIdFailed,
UnresolvedIntroductionNode,
BlindedPathAdvanceFailed,
}Expand description
Errors that may occur when sending an onion message.
Variants§
Secp256k1(Error)
Errored computing onion message packet keys.
TooBigPacket
Because implementations such as Eclair will drop onion messages where the message packet exceeds 32834 bytes, we refuse to send messages where the packet exceeds this size.
TooFewBlindedHops
The provided Destination was an invalid BlindedMessagePath due to not having any
blinded hops.
InvalidFirstHop(PublicKey)
The first hop is not a peer and doesn’t have a known SocketAddress.
PathNotFound
Indicates that a path could not be found by the MessageRouter.
This occurs when either:
- No path from the sender to the destination was found to send the onion message
- No reply path to the sender could be created when responding to an onion message
InvalidMessage
Onion message contents must have a TLV type >= 64.
BufferFull
Our next-hop peer’s buffer was full or our total outbound buffer was full.
GetNodeIdFailed
Failed to retrieve our node id from the provided NodeSigner.
UnresolvedIntroductionNode
The provided Destination has a blinded path with an unresolved introduction node. An
attempt to resolve it in the MessageRouter when finding an OnionMessagePath likely
failed.
BlindedPathAdvanceFailed
We attempted to send to a blinded path where we are the introduction node, and failed to
advance the blinded path to make the second hop the new introduction node. Either
NodeSigner::ecdh failed, we failed to tweak the current blinding point to get the
new blinding point, or we were attempting to send to ourselves.