+/// Errors that may occur when [sending an onion message].
+///
+/// [sending an onion message]: OnionMessenger::send_onion_message
+#[derive(Debug, PartialEq)]
+pub enum SendError {
+ /// Errored computing onion message packet keys.
+ Secp256k1(secp256k1::Error),
+ /// 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.
+ TooBigPacket,
+ /// The provided [`Destination`] was an invalid [`BlindedRoute`], due to having fewer than two
+ /// blinded hops.
+ TooFewBlindedHops,
+}
+