Class LNURLVerifyResponse
- Namespace
- LNURL
- Assembly
- LNURL.Core.dll
Represents the response from an LNURL payment verification endpoint as defined in LUD-21. Allows a wallet to check whether a Lightning payment has been settled by the service.
public class LNURLVerifyResponse
- Inheritance
-
LNURLVerifyResponse
- Inherited Members
Properties
Pr
Gets or sets the BOLT11 payment request string associated with this verification.
[JsonProperty("pr")]
[JsonPropertyName("pr")]
public string Pr { get; set; }
Property Value
Preimage
Gets or sets the hex-encoded payment preimage, available once the payment is settled.
[JsonProperty("preimage")]
[JsonPropertyName("preimage")]
public string Preimage { get; set; }
Property Value
Settled
Gets or sets whether the payment has been settled (received) by the service.
[JsonProperty("settled")]
[JsonPropertyName("settled")]
public bool Settled { get; set; }
Property Value
Status
Gets or sets the status string (e.g. "OK").
[JsonProperty("status")]
[JsonPropertyName("status")]
public string Status { get; set; }
Property Value
Methods
FetchStatus(Uri, HttpClient, CancellationToken)
Fetches the payment verification status from a LUD-21 verify endpoint.
public static Task<LNURLVerifyResponse> FetchStatus(Uri verifyUrl, HttpClient httpClient, CancellationToken cancellationToken = default)
Parameters
verifyUrlUriThe verification URL (obtained from VerifyUrl).
httpClientHttpClientThe HttpClient used to perform the HTTP request.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<LNURLVerifyResponse>
An LNURLVerifyResponse containing the settlement status.
Exceptions
- LNUrlException
Thrown when the verify endpoint returns an error response.