- LDK::CResult_ThirtyTwoBytesPaymentErrorZ invoice_pay_res = pay_invoice(invoice2, Retry_attempts(0), &cm1);
+ LDK::CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ pay_params =
+ payment_parameters_from_invoice(invoice2);
+ LDK::RecipientOnionFields invoice2_recipient(std::move(pay_params->contents.result->b));
+ LDK::RouteParameters invoice2_params(std::move(pay_params->contents.result->c));
+ assert(pay_params->result_ok);
+ LDKThirtyTwoBytes payment_id { .data = 0 };
+ LDK::CResult_NoneRetryableSendFailureZ invoice_pay_res = ChannelManager_send_payment(
+ &cm1, std::move(pay_params->contents.result->a), std::move(invoice2_recipient),
+ std::move(payment_id), std::move(invoice2_params), Retry_attempts(0)
+ );