Class LNURLPayRequest.LNURLPayRequestCallbackResponse
- Namespace
- LNURL
- Assembly
- LNURL.Core.dll
Represents the callback response from an LNURL-pay service (LUD-06), containing the BOLT11 payment request and optional success action (LUD-09).
public class LNURLPayRequest.LNURLPayRequestCallbackResponse
- Inheritance
-
LNURLPayRequest.LNURLPayRequestCallbackResponse
- Inherited Members
Properties
Disposable
Gets or sets whether this payment request is disposable (LUD-11).
[JsonProperty("disposable")]
[JsonPropertyName("disposable")]
public bool? Disposable { get; set; }
Property Value
- bool?
Pr
Gets or sets the BOLT11 payment request (invoice) string.
[JsonProperty("pr")]
[JsonPropertyName("pr")]
public string Pr { get; set; }
Property Value
Routes
Gets or sets an array of route hints for the payment.
[JsonProperty("routes")]
[JsonPropertyName("routes")]
public string[] Routes { get; set; }
Property Value
- string[]
SuccessAction
Gets or sets the success action to display after payment (LUD-09).
[JsonProperty("successAction")]
[JsonConverter(typeof(LNURLPayRequest.LNURLPayRequestCallbackResponse.LNURLPayRequestSuccessActionJsonConverter))]
[JsonPropertyName("successAction")]
public LNURLPayRequest.LNURLPayRequestCallbackResponse.ILNURLPayRequestSuccessAction SuccessAction { get; set; }
Property Value
VerifyUrl
Gets or sets the URL for verifying payment settlement status (LUD-21).
[JsonProperty("verify", NullValueHandling = NullValueHandling.Ignore)]
[JsonConverter(typeof(UriJsonConverter))]
[JsonPropertyName("verify")]
public Uri VerifyUrl { get; set; }
Property Value
Methods
FetchVerifyResponse(HttpClient, CancellationToken)
Fetches the payment verification status from the VerifyUrl endpoint (LUD-21).
public Task<LNURLVerifyResponse> FetchVerifyResponse(HttpClient httpClient, CancellationToken cancellationToken = default)
Parameters
httpClientHttpClientcancellationTokenCancellationToken
Returns
GetPaymentRequest(Network)
Parses and returns the BOLT11 payment request from the Pr string.
public BOLT11PaymentRequest GetPaymentRequest(Network network)
Parameters
networkNetwork
Returns
- BOLT11PaymentRequest
Verify(LNURLPayRequest, LightMoney, Network, out BOLT11PaymentRequest, bool)
Verifies that the BOLT11 invoice matches the expected amount.
public bool Verify(LNURLPayRequest request, LightMoney expectedAmount, Network network, out BOLT11PaymentRequest bolt11PaymentRequest, bool verifyDescriptionHash = false)
Parameters
requestLNURLPayRequestexpectedAmountLightMoneynetworkNetworkbolt11PaymentRequestBOLT11PaymentRequestverifyDescriptionHashbool