Enum InputType
pub enum InputType {
BitcoinAddress {
address: BitcoinAddressData,
},
LiquidAddress {
address: LiquidAddressData,
},
Bolt11 {
invoice: LNInvoice,
},
Bolt12Offer {
offer: LNOffer,
bip353_address: Option<String>,
},
NodeId {
node_id: String,
},
Url {
url: String,
},
LnUrlPay {
data: LnUrlPayRequestData,
bip353_address: Option<String>,
},
LnUrlWithdraw {
data: LnUrlWithdrawRequestData,
},
LnUrlAuth {
data: LnUrlAuthRequestData,
},
LnUrlError {
data: LnUrlErrorData,
},
}Expand description
Different kinds of inputs supported by parse, including any relevant details extracted from the input
Variants§
BitcoinAddress
§Supported standards
- plain on-chain BTC address
- BIP21
Fields
§
address: BitcoinAddressDataLiquidAddress
§Supported standards
- plain on-chain liquid address
- BIP21 on liquid/liquidtestnet/liquidregtest
Fields
§
address: LiquidAddressDataBolt11
Also covers URIs like bitcoin:...&lightning=bolt11. In this case, it returns the BOLT11
and discards all other data.
Bolt12Offer
Fields
NodeId
Url
LnUrlPay
§Supported standards
- LUD-01 LNURL bech32 encoding
- LUD-06
payRequestspec - LUD-16 LN Address
- LUD-17 Support for lnurlp prefix with non-bech32-encoded LNURL URLs
Fields
§
data: LnUrlPayRequestDataLnUrlWithdraw
§Supported standards
- LUD-01 LNURL bech32 encoding
- LUD-03
withdrawRequestspec - LUD-17 Support for lnurlw prefix with non-bech32-encoded LNURL URLs
§Not supported (yet)
- LUD-14
balanceCheck: reusablewithdrawRequests - LUD-19 Pay link discoverable from withdraw link
Fields
LnUrlAuth
§Supported standards
- LUD-01 LNURL bech32 encoding
- LUD-04
authbase spec - LUD-17 Support for keyauth prefix with non-bech32-encoded LNURL URLs
Fields
§
data: LnUrlAuthRequestDataLnUrlError
Error returned by the LNURL endpoint
Fields
§
data: LnUrlErrorDataTrait Implementations§
§impl<'de> Deserialize<'de> for InputType
impl<'de> Deserialize<'de> for InputType
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<InputType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<InputType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl From<LnUrlRequestData> for InputType
impl From<LnUrlRequestData> for InputType
§fn from(lnurl_data: LnUrlRequestData) -> InputType
fn from(lnurl_data: LnUrlRequestData) -> InputType
Converts to this type from the input type.
§impl Serialize for InputType
impl Serialize for InputType
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for InputType
impl RefUnwindSafe for InputType
impl Send for InputType
impl Sync for InputType
impl Unpin for InputType
impl UnwindSafe for InputType
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request