@@ -83,6 +83,7 @@ use crate::ln::msgs::MAX_VALUE_MSAT;
8383use crate :: offers:: invoice_request:: InvoiceRequestBuilder ;
8484use crate :: offers:: merkle:: TlvStream ;
8585use crate :: offers:: parse:: { Bech32Encode , ParseError , ParsedMessage , SemanticError } ;
86+ use crate :: offers:: signer:: SigningPubkey ;
8687use crate :: onion_message:: BlindedPath ;
8788use crate :: util:: ser:: { HighZeroBytesDroppedBigSize , WithoutLength , Writeable , Writer } ;
8889use crate :: util:: string:: PrintableString ;
@@ -92,21 +93,6 @@ use crate::prelude::*;
9293#[ cfg( feature = "std" ) ]
9394use std:: time:: SystemTime ;
9495
95- /// A pubkey for signing invoices, either given explicitly or derived.
96- pub enum SigningPubkey < ' a > {
97- /// A pubkey that is typically known like a node id.
98- Explicit ( PublicKey ) ,
99-
100- /// Data needed to derive a pubkey.
101- Derived ( & ' a ExpandedKey , Nonce ) ,
102- }
103-
104- impl < ' a > From < PublicKey > for SigningPubkey < ' a > {
105- fn from ( pubkey : PublicKey ) -> Self {
106- SigningPubkey :: Explicit ( pubkey)
107- }
108- }
109-
11096/// Builds an [`Offer`] for the "offer to be paid" flow.
11197///
11298/// See [module-level documentation] for usage.
@@ -760,7 +746,7 @@ impl core::fmt::Display for Offer {
760746
761747#[ cfg( test) ]
762748mod tests {
763- use super :: { Amount , Offer , OfferBuilder , OfferTlvStreamRef , Quantity , SigningPubkey } ;
749+ use super :: { Amount , Offer , OfferBuilder , OfferTlvStreamRef , Quantity } ;
764750
765751 use bitcoin:: blockdata:: constants:: ChainHash ;
766752 use bitcoin:: network:: constants:: Network ;
@@ -774,6 +760,7 @@ mod tests {
774760 use crate :: ln:: inbound_payment:: { ExpandedKey , Nonce } ;
775761 use crate :: ln:: msgs:: { DecodeError , MAX_VALUE_MSAT } ;
776762 use crate :: offers:: parse:: { ParseError , SemanticError } ;
763+ use crate :: offers:: signer:: SigningPubkey ;
777764 use crate :: onion_message:: { BlindedHop , BlindedPath } ;
778765 use crate :: util:: ser:: { BigSize , Writeable } ;
779766 use crate :: util:: string:: PrintableString ;
0 commit comments