+ #[cfg_attr(c_bindings, allow(dead_code))]
+ pub(super) fn build_unchecked($self: $self_type) -> UnsignedInvoiceRequest {
+ $self.build_without_checks().0
+ }
+} }
+
+impl<'a, 'b, T: secp256k1::Signing> InvoiceRequestBuilder<'a, 'b, ExplicitPayerId, T> {
+ invoice_request_explicit_payer_id_builder_methods!(self, Self);
+}
+
+impl<'a, 'b, T: secp256k1::Signing> InvoiceRequestBuilder<'a, 'b, DerivedPayerId, T> {
+ invoice_request_derived_payer_id_builder_methods!(self, Self, T);
+}
+
+impl<'a, 'b, P: PayerIdStrategy, T: secp256k1::Signing> InvoiceRequestBuilder<'a, 'b, P, T> {
+ invoice_request_builder_methods!(self, Self, Self, self, T, mut);
+
+ #[cfg(test)]
+ invoice_request_builder_test_methods!(self, Self, Self, self, mut);
+}
+
+#[cfg(all(c_bindings, not(test)))]
+impl<'a, 'b> InvoiceRequestWithExplicitPayerIdBuilder<'a, 'b> {
+ invoice_request_explicit_payer_id_builder_methods!(self, &mut Self);
+ invoice_request_builder_methods!(self, &mut Self, (), (), secp256k1::All);
+}
+
+#[cfg(all(c_bindings, test))]
+impl<'a, 'b> InvoiceRequestWithExplicitPayerIdBuilder<'a, 'b> {
+ invoice_request_explicit_payer_id_builder_methods!(self, &mut Self);
+ invoice_request_builder_methods!(self, &mut Self, &mut Self, self, secp256k1::All);
+ invoice_request_builder_test_methods!(self, &mut Self, &mut Self, self);
+}
+
+#[cfg(all(c_bindings, not(test)))]
+impl<'a, 'b> InvoiceRequestWithDerivedPayerIdBuilder<'a, 'b> {
+ invoice_request_derived_payer_id_builder_methods!(self, &mut Self, secp256k1::All);
+ invoice_request_builder_methods!(self, &mut Self, (), (), secp256k1::All);
+}
+
+#[cfg(all(c_bindings, test))]
+impl<'a, 'b> InvoiceRequestWithDerivedPayerIdBuilder<'a, 'b> {
+ invoice_request_derived_payer_id_builder_methods!(self, &mut Self, secp256k1::All);
+ invoice_request_builder_methods!(self, &mut Self, &mut Self, self, secp256k1::All);
+ invoice_request_builder_test_methods!(self, &mut Self, &mut Self, self);
+}
+
+#[cfg(c_bindings)]
+impl<'a, 'b> From<InvoiceRequestWithExplicitPayerIdBuilder<'a, 'b>>
+for InvoiceRequestBuilder<'a, 'b, ExplicitPayerId, secp256k1::All> {
+ fn from(builder: InvoiceRequestWithExplicitPayerIdBuilder<'a, 'b>) -> Self {
+ let InvoiceRequestWithExplicitPayerIdBuilder {
+ offer, invoice_request, payer_id, payer_id_strategy, secp_ctx,
+ } = builder;
+
+ Self {
+ offer, invoice_request, payer_id, payer_id_strategy, secp_ctx,
+ }
+ }
+}
+
+#[cfg(c_bindings)]
+impl<'a, 'b> From<InvoiceRequestWithDerivedPayerIdBuilder<'a, 'b>>
+for InvoiceRequestBuilder<'a, 'b, DerivedPayerId, secp256k1::All> {
+ fn from(builder: InvoiceRequestWithDerivedPayerIdBuilder<'a, 'b>) -> Self {
+ let InvoiceRequestWithDerivedPayerIdBuilder {
+ offer, invoice_request, payer_id, payer_id_strategy, secp_ctx,
+ } = builder;
+
+ Self {
+ offer, invoice_request, payer_id, payer_id_strategy, secp_ctx,
+ }