Enum InputType
pub enum InputType {
BitcoinAddress {
address: BitcoinAddressData,
},
LiquidAddress {
address: LiquidAddressData,
},
Bolt11 {
invoice: LNInvoice,
},
Bolt12Offer {
offer: LNOffer,
},
NodeId {
node_id: String,
},
Url {
url: String,
},
LnUrlPay {
data: LnUrlPayRequestData,
},
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: BitcoinAddressData
LiquidAddress
§Supported standards
- plain on-chain liquid address
- BIP21 on liquid/liquidtestnet
Fields
§
address: LiquidAddressData
Bolt11
Also covers URIs like bitcoin:...&lightning=bolt11
. In this case, it returns the BOLT11
and discards all other data.
Bolt12Offer
NodeId
Url
LnUrlPay
§Supported standards
- LUD-01 LNURL bech32 encoding
- LUD-06
payRequest
spec - LUD-16 LN Address
- LUD-17 Support for lnurlp prefix with non-bech32-encoded LNURL URLs
Fields
§
data: LnUrlPayRequestData
LnUrlWithdraw
§Supported standards
- LUD-01 LNURL bech32 encoding
- LUD-03
withdrawRequest
spec - LUD-17 Support for lnurlw prefix with non-bech32-encoded LNURL URLs
§Not supported (yet)
- LUD-14
balanceCheck
: reusablewithdrawRequest
s - LUD-19 Pay link discoverable from withdraw link
Fields
LnUrlAuth
§Supported standards
- LUD-01 LNURL bech32 encoding
- LUD-04
auth
base spec - LUD-17 Support for keyauth prefix with non-bech32-encoded LNURL URLs
Fields
§
data: LnUrlAuthRequestData
LnUrlError
Error returned by the LNURL endpoint
Fields
§
data: LnUrlErrorData
Trait Implementations§
§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<'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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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> 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