Probably part of #14
PaymentStatus is defined in ldk-server-protos/src/types.rs:
/// Represents the current status of a payment.#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]#[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]#[derive(Clone,Copy,Debug,PartialEq,Eq,Hash,PartialOrd,Ord,::prost::Enumeration)]#[repr(i32)]pubenumPaymentStatus{/// The payment is still pending.Pending = 0,/// The payment succeeded.Succeeded = 1,/// The payment failed.Failed = 2,}and we print this struct serialized with serde_json::to_string_pretty in ldk-server-cli/src/main.rs
fnhandle_response_result<Rs,Js>(response:Result<Rs,LdkServerError>)whereRs:Into<Js>,Js:Serialize + std::fmt::Debug,{match response {Ok(response) => {let json_response:Js = response.into();match serde_json::to_string_pretty(&json_response){Ok(json) => println!("{json}"),Err(e) => {eprintln!("Error serializing response ({json_response:?}) to JSON: {e}");
std::process::exit(1);},}},Err(e) => {handle_error(e);},}}
Probably part of #14
PaymentStatusis defined inldk-server-protos/src/types.rs:and we print this struct serialized with
serde_json::to_string_prettyinldk-server-cli/src/main.rs