rbpcp-api-0.1.0.0: RESTful Bitcoin Payment Channel Protocol Servant API description

Safe HaskellNone
LanguageHaskell2010

RBPCP.Api

Synopsis

Documentation

type VER = "v2" Source #

type FundInfo = VER :> ("funding" :> (Capture "client_pubkey" (Client PubKey) :> (Capture "exp_time" BLT :> ("info" :> Get '[JSON] FundingInfo)))) Source #

type BeginOpen = VER :> ("funding" :> (Capture "client_pubkey" (Client PubKey) :> (Capture "server_pubkey" (Server PubKey) :> (Capture "exp_time" BLT :> ("begin_open" :> (Header "Host" String :> Get '[JSON] ChannelLocation)))))) Source #

type ChanOpen = VER :> ("channels" :> (Capture "client_pubkey" (Client PubKey) :> (Capture "exp_time" BLT :> (Capture "funding_txid" TxHash :> (Capture "funding_vout" Vout :> (ReqBody '[JSON] Payment :> Verb POST 201 '[JSON] PaymentResult)))))) Source #

type ChanPay = VER :> ("channels" :> (Capture "client_pubkey" (Client PubKey) :> (Capture "exp_time" BLT :> (Capture "funding_txid" TxHash :> (Capture "funding_vout" Vout :> (ReqBody '[JSON] Payment :> Put '[JSON] PaymentResult)))))) Source #

type ChanClose = VER :> ("channels" :> (Capture "client_pubkey" (Client PubKey) :> (Capture "exp_time" BLT :> (Capture "funding_txid" TxHash :> (Capture "funding_vout" Vout :> ("close" :> (ReqBody '[JSON] Payment :> Put '[JSON] PaymentResult))))))) Source #

type RBPCP = FundInfo :<|> (BeginOpen :<|> (ChanOpen :<|> (ChanPay :<|> ChanClose))) Source #

RESTful Bitcoin payment channel protocol