lnurl-0.1.0.0: Support for developing against the LNURL protocol
Safe HaskellNone
LanguageHaskell2010

LnUrl.Channel

Contents

Description

See https://github.com/fiatjaf/lnurl-rfc/blob/master/lnurl-channel.md.

Workflow

  1. LN SERVICE provides a URL for LNURL-channel.
  2. LN WALLET makes a GET request to this URL.
  3. LN SERVICE responds with Response SuccessResponse.
  4. LN WALLET connects to the node at remoteNode.
  5. LN WALLET prepare and make a GET request using proceed (followed possibly by cancel).
  6. LN SERVICE responds with AckResponse.
  7. LN WALLET awaits an OpenChannel message.
Synopsis

Client

proceed :: SuccessResponse -> NodeId -> Bool -> URI Source #

Create the URL for the follow up LNURL-channel request. LN SERVICE responds with AckResponse.

cancel :: SuccessResponse -> NodeId -> URI Source #

Create the URL to cancel a LNURL-channel request. LN SERVICE responds with AckResponse.

Types

data Response a Source #

Constructors

Success a 
ErrorResponse Text 

Instances

Instances details
Eq a => Eq (Response a) Source # 
Instance details

Defined in LnUrl

Methods

(==) :: Response a -> Response a -> Bool #

(/=) :: Response a -> Response a -> Bool #

Show a => Show (Response a) Source # 
Instance details

Defined in LnUrl

Methods

showsPrec :: Int -> Response a -> ShowS #

show :: Response a -> String #

showList :: [Response a] -> ShowS #

ToJSON a => ToJSON (Response a) Source # 
Instance details

Defined in LnUrl

FromJSON a => FromJSON (Response a) Source # 
Instance details

Defined in LnUrl

data AckResponse Source #

Constructors

AckSuccess 
AckError Text 

Instances

Instances details
Eq AckResponse Source # 
Instance details

Defined in LnUrl

Show AckResponse Source # 
Instance details

Defined in LnUrl

ToJSON AckResponse Source # 
Instance details

Defined in LnUrl

FromJSON AckResponse Source # 
Instance details

Defined in LnUrl