Class LNURLChannelRequest
- Namespace
- LNURL
- Assembly
- LNURL.Core.dll
Represents an LNURL-channel request as defined in LUD-02. Allows a wallet to request a channel to be opened from the service node.
public class LNURLChannelRequest
- Inheritance
-
LNURLChannelRequest
- Inherited Members
Properties
Callback
Gets or sets the callback URL to which the wallet sends its node ID to request a channel.
[JsonProperty("callback")]
[JsonConverter(typeof(UriJsonConverter))]
[JsonPropertyName("callback")]
public Uri Callback { get; set; }
Property Value
K1
Gets or sets the unique identifier for this channel request.
[JsonProperty("k1")]
[JsonPropertyName("k1")]
public string K1 { get; set; }
Property Value
Tag
Gets or sets the LNURL tag. For channel requests this is always "channelRequest".
[JsonProperty("tag")]
[JsonPropertyName("tag")]
public string Tag { get; set; }
Property Value
Uri
Gets or sets the node URI of the service that will open the channel.
[JsonProperty("uri")]
[JsonConverter(typeof(NodeUriJsonConverter))]
[JsonPropertyName("uri")]
public NodeInfo Uri { get; set; }
Property Value
- NodeInfo
Methods
CancelRequest(PubKey, HttpClient, CancellationToken)
Sends a cancellation request for this channel request to the service callback.
public Task CancelRequest(PubKey ourId, HttpClient httpClient, CancellationToken cancellationToken = default)
Parameters
ourIdPubKeyhttpClientHttpClientcancellationTokenCancellationToken
Returns
SendRequest(PubKey, bool, HttpClient, CancellationToken)
Sends a channel open request to the service callback.
public Task SendRequest(PubKey ourId, bool privateChannel, HttpClient httpClient, CancellationToken cancellationToken = default)
Parameters
ourIdPubKeyprivateChannelboolhttpClientHttpClientcancellationTokenCancellationToken