@@ -23,7 +23,7 @@ use num_traits::{CheckedAdd, CheckedMul};
2323use secp256k1:: ecdsa:: { RecoveryId , RecoverableSignature } ;
2424use secp256k1:: PublicKey ;
2525
26- use super :: { Bolt11Invoice , Sha256 , TaggedField , ExpiryTime , MinFinalCltvExpiryDelta , Fallback , PayeePubKey , InvoiceSignature , PositiveTimestamp ,
26+ use super :: { Bolt11Invoice , Sha256 , TaggedField , ExpiryTime , MinFinalCltvExpiryDelta , Fallback , PayeePubKey , Bolt11InvoiceSignature , PositiveTimestamp ,
2727 Bolt11SemanticError , PrivateRoute , Bolt11ParseError , ParseOrSemanticError , Description , RawTaggedField , Currency , RawHrp , SiPrefix , RawBolt11Invoice ,
2828 constants, SignedRawBolt11Invoice , RawDataPart , Bolt11InvoiceFeatures } ;
2929
@@ -292,7 +292,7 @@ impl FromStr for SignedRawBolt11Invoice {
292292 hrp. as_bytes ( ) ,
293293 & data[ ..data. len ( ) -104 ]
294294 ) ,
295- signature : InvoiceSignature :: from_base32 ( & data[ data. len ( ) -104 ..] ) ?,
295+ signature : Bolt11InvoiceSignature :: from_base32 ( & data[ data. len ( ) -104 ..] ) ?,
296296 } )
297297 }
298298}
@@ -365,17 +365,17 @@ impl FromBase32 for PositiveTimestamp {
365365 }
366366}
367367
368- impl FromBase32 for InvoiceSignature {
368+ impl FromBase32 for Bolt11InvoiceSignature {
369369 type Err = Bolt11ParseError ;
370370 fn from_base32 ( signature : & [ u5 ] ) -> Result < Self , Self :: Err > {
371371 if signature. len ( ) != 104 {
372- return Err ( Bolt11ParseError :: InvalidSliceLength ( "InvoiceSignature ::from_base32()" . into ( ) ) ) ;
372+ return Err ( Bolt11ParseError :: InvalidSliceLength ( "Bolt11InvoiceSignature ::from_base32()" . into ( ) ) ) ;
373373 }
374374 let recoverable_signature_bytes = Vec :: < u8 > :: from_base32 ( signature) ?;
375375 let signature = & recoverable_signature_bytes[ 0 ..64 ] ;
376376 let recovery_id = RecoveryId :: from_i32 ( recoverable_signature_bytes[ 64 ] as i32 ) ?;
377377
378- Ok ( InvoiceSignature ( RecoverableSignature :: from_compact (
378+ Ok ( Bolt11InvoiceSignature ( RecoverableSignature :: from_compact (
379379 signature,
380380 recovery_id
381381 ) ?) )
@@ -972,7 +972,7 @@ mod test {
972972 use lightning:: ln:: features:: Bolt11InvoiceFeatures ;
973973 use secp256k1:: ecdsa:: { RecoveryId , RecoverableSignature } ;
974974 use crate :: TaggedField :: * ;
975- use crate :: { SiPrefix , SignedRawBolt11Invoice , InvoiceSignature , RawBolt11Invoice , RawHrp , RawDataPart ,
975+ use crate :: { SiPrefix , SignedRawBolt11Invoice , Bolt11InvoiceSignature , RawBolt11Invoice , RawHrp , RawDataPart ,
976976 Currency , Sha256 , PositiveTimestamp } ;
977977
978978 // Feature bits 9, 15, and 99 are set.
@@ -998,7 +998,7 @@ mod test {
998998 hash : [ 0xb1 , 0x96 , 0x46 , 0xc3 , 0xbc , 0x56 , 0x76 , 0x1d , 0x20 , 0x65 , 0x6e , 0x0e , 0x32 ,
999999 0xec , 0xd2 , 0x69 , 0x27 , 0xb7 , 0x62 , 0x6e , 0x2a , 0x8b , 0xe6 , 0x97 , 0x71 , 0x9f ,
10001000 0xf8 , 0x7e , 0x44 , 0x54 , 0x55 , 0xb9 ] ,
1001- signature : InvoiceSignature ( RecoverableSignature :: from_compact (
1001+ signature : Bolt11InvoiceSignature ( RecoverableSignature :: from_compact (
10021002 & [ 0xd7 , 0x90 , 0x4c , 0xc4 , 0xb7 , 0x4a , 0x22 , 0x26 , 0x9c , 0x68 , 0xc1 , 0xdf , 0x68 ,
10031003 0xa9 , 0x6c , 0x21 , 0x4d , 0x65 , 0x1b , 0x93 , 0x76 , 0xe9 , 0xf1 , 0x64 , 0xd3 , 0x60 ,
10041004 0x4d , 0xa4 , 0xb7 , 0xde , 0xcc , 0xce , 0x0e , 0x82 , 0xaa , 0xab , 0x4c , 0x85 , 0xd3 ,
@@ -1018,7 +1018,7 @@ mod test {
10181018 fn test_raw_signed_invoice_deserialization ( ) {
10191019 use crate :: TaggedField :: * ;
10201020 use secp256k1:: ecdsa:: { RecoveryId , RecoverableSignature } ;
1021- use crate :: { SignedRawBolt11Invoice , InvoiceSignature , RawBolt11Invoice , RawHrp , RawDataPart , Currency , Sha256 ,
1021+ use crate :: { SignedRawBolt11Invoice , Bolt11InvoiceSignature , RawBolt11Invoice , RawHrp , RawDataPart , Currency , Sha256 ,
10221022 PositiveTimestamp } ;
10231023
10241024 assert_eq ! (
@@ -1051,7 +1051,7 @@ mod test {
10511051 0x7b , 0x1d , 0x85 , 0x8d , 0xb1 , 0xd1 , 0xf7 , 0xab , 0x71 , 0x37 , 0xdc , 0xb7 ,
10521052 0x83 , 0x5d , 0xb2 , 0xec , 0xd5 , 0x18 , 0xe1 , 0xc9
10531053 ] ,
1054- signature: InvoiceSignature ( RecoverableSignature :: from_compact(
1054+ signature: Bolt11InvoiceSignature ( RecoverableSignature :: from_compact(
10551055 & [
10561056 0x38u8 , 0xec , 0x68 , 0x91 , 0x34 , 0x5e , 0x20 , 0x41 , 0x45 , 0xbe , 0x8a ,
10571057 0x3a , 0x99 , 0xde , 0x38 , 0xe9 , 0x8a , 0x39 , 0xd6 , 0xa5 , 0x69 , 0x43 ,
0 commit comments