use bitcoin_hashes::Hash;
use bitcoin_hashes::sha256;
+use lightning::ln::PaymentSecret;
use lightning::routing::network_graph::RoutingFees;
use lightning::routing::router::RouteHintHop;
use secp256k1::recovery::{RecoveryId, RecoverableSignature};
use secp256k1::key::PublicKey;
-use super::*;
+use super::{Invoice, Sha256, TaggedField, ExpiryTime, MinFinalCltvExpiry, Fallback, PayeePubKey, InvoiceSignature, PositiveTimestamp,
+ SemanticError, RouteHint, Description, RawTaggedField, Currency, RawHrp, SiPrefix, RawInvoice, constants, SignedRawInvoice,
+ RawDataPart, CreationError, InvoiceFeatures};
use self::hrp_sm::parse_hrp;
}
}
-impl FromBase32 for PaymentSecret {
- type Err = ParseError;
-
- fn from_base32(field_data: &[u5]) -> Result<PaymentSecret, ParseError> {
- if field_data.len() != 52 {
- Err(ParseError::Skip)
- } else {
- let data_bytes = Vec::<u8>::from_base32(field_data)?;
- let mut payment_secret = [0; 32];
- payment_secret.copy_from_slice(&data_bytes);
- Ok(PaymentSecret(payment_secret))
- }
- }
-}
-
impl FromBase32 for ExpiryTime {
type Err = ParseError;