Class LNURLWithdrawRequest
- Namespace
- LNURL
- Assembly
- LNURL.Core.dll
Represents an LNURL-withdraw request as defined in LUD-03. Allows a wallet to withdraw funds by providing a BOLT11 invoice to the service.
public class LNURLWithdrawRequest
- Inheritance
-
LNURLWithdrawRequest
- Inherited Members
Properties
BalanceCheck
Gets or sets the URL the wallet can poll to check balance updates, as defined in LUD-14.
[JsonProperty("balanceCheck")]
[JsonConverter(typeof(UriJsonConverter))]
[JsonPropertyName("balanceCheck")]
public Uri BalanceCheck { get; set; }
Property Value
Callback
Gets or sets the callback URL to which the wallet submits its BOLT11 invoice for withdrawal.
[JsonProperty("callback")]
[JsonConverter(typeof(UriJsonConverter))]
[JsonPropertyName("callback")]
public Uri Callback { get; set; }
Property Value
CurrentBalance
Gets or sets the current balance available for withdrawal, as defined in LUD-14.
[JsonProperty("currentBalance")]
[JsonConverter(typeof(LightMoneyJsonConverter))]
[JsonPropertyName("currentBalance")]
public LightMoney CurrentBalance { get; set; }
Property Value
- LightMoney
DefaultDescription
Gets or sets the default description for the BOLT11 invoice.
[JsonProperty("defaultDescription")]
[JsonPropertyName("defaultDescription")]
public string DefaultDescription { get; set; }
Property Value
K1
Gets or sets the unique identifier for this withdraw request.
[JsonProperty("k1")]
[JsonPropertyName("k1")]
public string K1 { get; set; }
Property Value
MaxWithdrawable
Gets or sets the maximum withdrawable amount in millisatoshis.
[JsonProperty("maxWithdrawable")]
[JsonConverter(typeof(LightMoneyJsonConverter))]
[JsonPropertyName("maxWithdrawable")]
public LightMoney MaxWithdrawable { get; set; }
Property Value
- LightMoney
MinWithdrawable
Gets or sets the minimum withdrawable amount in millisatoshis.
[JsonProperty("minWithdrawable")]
[JsonConverter(typeof(LightMoneyJsonConverter))]
[JsonPropertyName("minWithdrawable")]
public LightMoney MinWithdrawable { get; set; }
Property Value
- LightMoney
PayLink
Gets or sets an optional LNURL-pay link associated with this withdraw request, as defined in LUD-19.
[JsonProperty("payLink", NullValueHandling = NullValueHandling.Ignore)]
[JsonConverter(typeof(UriJsonConverter))]
[JsonPropertyName("payLink")]
public Uri PayLink { get; set; }
Property Value
PinLimit
Gets or sets the maximum amount that can be withdrawn using a PIN, for BoltCard withdraw-pin support.
[JsonProperty("pinLimit", NullValueHandling = NullValueHandling.Ignore)]
[JsonConverter(typeof(LightMoneyJsonConverter))]
[JsonPropertyName("pinLimit")]
public LightMoney PinLimit { get; set; }
Property Value
- LightMoney
Tag
Gets or sets the LNURL tag. For withdraw requests this is always "withdrawRequest".
[JsonProperty("tag")]
[JsonPropertyName("tag")]
public string Tag { get; set; }
Property Value
Methods
SendRequest(string, HttpClient, string, Uri, CancellationToken)
Sends a withdrawal request to the service callback with the specified BOLT11 invoice, optional PIN, and optional balance notification URL.
public Task<LNUrlStatusResponse> SendRequest(string bolt11, HttpClient httpClient, string pin = null, Uri balanceNotify = null, CancellationToken cancellationToken = default)
Parameters
bolt11stringhttpClientHttpClientpinstringbalanceNotifyUricancellationTokenCancellationToken
Returns
SendRequest(string, HttpClient, Uri, CancellationToken)
Sends a withdrawal request to the service callback with the specified BOLT11 invoice.
public Task<LNUrlStatusResponse> SendRequest(string bolt11, HttpClient httpClient, Uri balanceNotify = null, CancellationToken cancellationToken = default)
Parameters
bolt11stringhttpClientHttpClientbalanceNotifyUricancellationTokenCancellationToken