Skip to main content

lnv2_await_send

Function lnv2_await_send 

Source
async fn lnv2_await_send(
    client: &Client,
    send_op: OperationId,
) -> Result<FinalSendOperationState>
Expand description

Run await-send and parse the JSON, tolerating the pre-0.12 CLI output shape so this works across the backwards-compatibility test matrix.

Pre-0.12 binaries serialize FinalSendOperationState::Success as the bare string "Success" (unit variant); 0.12+ serializes it as {"Success": "<hex preimage>"} (tuple variant carrying the preimage). Coerce the old shape to a synthetic Success(zero-preimage) so callers can match uniformly regardless of which CLI produced the output.