use crate::blinded_path::BlindedHop;
use crate::blinded_path::message::BlindedMessagePath;
use crate::sign::KeyMaterial;
- use crate::ln::features::{Bolt12InvoiceFeatures, InvoiceRequestFeatures, OfferFeatures};
+ use crate::types::features::{Bolt12InvoiceFeatures, InvoiceRequestFeatures, OfferFeatures};
use crate::ln::inbound_payment::ExpandedKey;
use crate::ln::msgs::DecodeError;
- use crate::offers::invoice_request::InvoiceRequestTlvStreamRef;
- use crate::offers::merkle::{SignError, SignatureTlvStreamRef, TaggedHash, self};
+ use crate::offers::invoice_request::{ExperimentalInvoiceRequestTlvStreamRef, InvoiceRequestTlvStreamRef};
+ use crate::offers::merkle::{SignError, SignatureTlvStreamRef, TaggedHash, TlvStream, self};
use crate::offers::nonce::Nonce;
- use crate::offers::offer::{Amount, OfferTlvStreamRef, Quantity};
+ use crate::offers::offer::{Amount, ExperimentalOfferTlvStreamRef, OfferTlvStreamRef, Quantity};
use crate::prelude::*;
#[cfg(not(c_bindings))]
use {
use crate::io;
use crate::blinded_path::message::BlindedMessagePath;
use crate::blinded_path::payment::BlindedPaymentPath;
-use crate::ln::types::PaymentHash;
+use crate::types::payment::PaymentHash;
use crate::ln::channelmanager::PaymentId;
-use crate::ln::features::InvoiceRequestFeatures;
+use crate::types::features::InvoiceRequestFeatures;
use crate::ln::inbound_payment::{ExpandedKey, IV_LEN};
use crate::ln::msgs::DecodeError;
- use crate::offers::merkle::{SignError, SignFn, SignatureTlvStream, SignatureTlvStreamRef, TaggedHash, self};
+ use crate::offers::merkle::{SignError, SignFn, SignatureTlvStream, SignatureTlvStreamRef, TaggedHash, TlvStream, self, SIGNATURE_TLV_RECORD_SIZE};
use crate::offers::nonce::Nonce;
- use crate::offers::offer::{Offer, OfferContents, OfferId, OfferTlvStream, OfferTlvStreamRef};
+ use crate::offers::offer::{EXPERIMENTAL_OFFER_TYPES, ExperimentalOfferTlvStream, ExperimentalOfferTlvStreamRef, OFFER_TYPES, Offer, OfferContents, OfferId, OfferTlvStream, OfferTlvStreamRef};
use crate::offers::parse::{Bolt12ParseError, ParsedMessage, Bolt12SemanticError};
use crate::offers::payer::{PayerContents, PayerTlvStream, PayerTlvStreamRef};
use crate::offers::signer::{Metadata, MetadataMaterial};
use crate::io;
use crate::blinded_path::message::BlindedMessagePath;
use crate::ln::channelmanager::PaymentId;
-use crate::ln::features::OfferFeatures;
+use crate::types::features::OfferFeatures;
use crate::ln::inbound_payment::{ExpandedKey, IV_LEN};
use crate::ln::msgs::{DecodeError, MAX_VALUE_MSAT};
- use crate::offers::merkle::{TaggedHash, TlvStream};
+ use crate::offers::merkle::{TaggedHash, TlvRecord, TlvStream};
use crate::offers::nonce::Nonce;
use crate::offers::parse::{Bech32Encode, Bolt12ParseError, Bolt12SemanticError, ParsedMessage};
use crate::offers::signer::{Metadata, MetadataMaterial, self};
use crate::io;
use crate::blinded_path::message::BlindedMessagePath;
use crate::blinded_path::payment::BlindedPaymentPath;
-use crate::ln::types::PaymentHash;
+use crate::types::payment::PaymentHash;
use crate::ln::channelmanager::PaymentId;
-use crate::ln::features::InvoiceRequestFeatures;
+use crate::types::features::InvoiceRequestFeatures;
use crate::ln::inbound_payment::{ExpandedKey, IV_LEN};
use crate::ln::msgs::{DecodeError, MAX_VALUE_MSAT};
- use crate::offers::invoice_request::{InvoiceRequestTlvStream, InvoiceRequestTlvStreamRef};
+ use crate::offers::invoice_request::{ExperimentalInvoiceRequestTlvStream, ExperimentalInvoiceRequestTlvStreamRef, InvoiceRequestTlvStream, InvoiceRequestTlvStreamRef};
use crate::offers::nonce::Nonce;
- use crate::offers::offer::{OfferTlvStream, OfferTlvStreamRef};
+ use crate::offers::offer::{ExperimentalOfferTlvStream, ExperimentalOfferTlvStreamRef, OfferTlvStream, OfferTlvStreamRef};
use crate::offers::parse::{Bech32Encode, Bolt12ParseError, Bolt12SemanticError, ParsedMessage};
use crate::offers::payer::{PayerContents, PayerTlvStream, PayerTlvStreamRef};
use crate::offers::signer::{Metadata, MetadataMaterial, self};
use crate::blinded_path::message::BlindedMessagePath;
use crate::sign::KeyMaterial;
use crate::ln::channelmanager::PaymentId;
- use crate::ln::features::{InvoiceRequestFeatures, OfferFeatures};
+ use crate::types::features::{InvoiceRequestFeatures, OfferFeatures};
use crate::ln::inbound_payment::ExpandedKey;
use crate::ln::msgs::{DecodeError, MAX_VALUE_MSAT};
- use crate::offers::invoice_request::InvoiceRequestTlvStreamRef;
+ use crate::offers::invoice_request::{EXPERIMENTAL_INVOICE_REQUEST_TYPES, ExperimentalInvoiceRequestTlvStreamRef, INVOICE_REQUEST_TYPES, InvoiceRequestTlvStreamRef};
use crate::offers::nonce::Nonce;
- use crate::offers::offer::OfferTlvStreamRef;
+ use crate::offers::offer::{ExperimentalOfferTlvStreamRef, OfferTlvStreamRef};
use crate::offers::parse::{Bolt12ParseError, Bolt12SemanticError};
use crate::offers::payer::PayerTlvStreamRef;
use crate::offers::test_utils::*;
};
use crate::offers::nonce::Nonce;
use crate::offers::offer::{
- Amount, Offer, OfferContents, OfferTlvStream, OfferTlvStreamRef, Quantity, OFFER_TYPES,
+ Amount, ExperimentalOfferTlvStream, ExperimentalOfferTlvStreamRef, Offer, OfferContents,
+ OfferTlvStream, OfferTlvStreamRef, Quantity, EXPERIMENTAL_OFFER_TYPES, OFFER_TYPES,
};
use crate::offers::parse::{Bolt12ParseError, Bolt12SemanticError, ParsedMessage};
+use crate::types::features::{Bolt12InvoiceFeatures, OfferFeatures};
use crate::util::ser::{CursorReadable, Iterable, WithoutLength, Writeable, Writer};
use crate::util::string::PrintableString;
use bitcoin::address::Address;
mod tests {
use crate::blinded_path::message::BlindedMessagePath;
use crate::blinded_path::BlindedHop;
- use crate::ln::features::{Bolt12InvoiceFeatures, OfferFeatures};
use crate::ln::inbound_payment::ExpandedKey;
use crate::ln::msgs::DecodeError;
- use crate::offers::invoice::InvoiceTlvStreamRef;
+ use crate::offers::invoice::{
+ ExperimentalInvoiceTlvStreamRef, InvoiceTlvStreamRef, EXPERIMENTAL_INVOICE_TYPES,
+ INVOICE_TYPES,
+ };
use crate::offers::merkle;
- use crate::offers::merkle::{SignatureTlvStreamRef, TaggedHash};
+ use crate::offers::merkle::{SignatureTlvStreamRef, TaggedHash, TlvStream};
use crate::offers::nonce::Nonce;
- use crate::offers::offer::{Offer, OfferBuilder, OfferTlvStreamRef, Quantity};
+ use crate::offers::offer::{
+ ExperimentalOfferTlvStreamRef, Offer, OfferBuilder, OfferTlvStreamRef, Quantity,
+ };
use crate::offers::parse::{Bolt12ParseError, Bolt12SemanticError};
use crate::offers::static_invoice::{
- StaticInvoice, StaticInvoiceBuilder, DEFAULT_RELATIVE_EXPIRY, SIGNATURE_TAG,
+ StaticInvoice, StaticInvoiceBuilder, UnsignedStaticInvoice, DEFAULT_RELATIVE_EXPIRY,
+ SIGNATURE_TAG,
};
use crate::offers::test_utils::*;
use crate::sign::KeyMaterial;