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

LnUrl.Withdraw

Contents

Description

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

Workflow

  1. LN WALLET makes GET request
  2. LN SERVICE responds with Response SuccessResponse.
  3. LN WALLET get withdrawal amount from user.
  4. LN WALLET prepare and make GET request using getCallbackURL.
  5. LN SERVICE responds with AckResponse.
Synopsis

Client

getCallbackURL Source #

Arguments

:: SuccessResponse 
-> Text 
-> Maybe URI

URL where LN SERVICE can POST SuccessResponse values to notify the wallet

-> URI 

Use the first response to build the callback url

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 SuccessResponse Source #

The initial GET request responds with Response SuccessResponse

Constructors

SuccessResponse 

Fields

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