stellar-veritas/bundled/Network/Stellar/Horizon.hs
2026-01-25 02:27:22 +01:00

29 lines
664 B
Haskell

{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-}
module Network.Stellar.Horizon
( HorizonServer
, publicHorizon
, testHorizon
, httpServer
, httpsServer
)
where
import Data.Text
import Network.HTTP.Req (Url, Scheme(..), http, https)
type HorizonServer (scheme :: Scheme) = Url scheme
publicHorizon :: HorizonServer 'Https
publicHorizon = httpsServer "horizon.stellar.org"
testHorizon :: HorizonServer 'Https
testHorizon = httpsServer "horizon-testnet.stellar.org"
httpServer :: Text -> HorizonServer 'Http
httpServer = http
httpsServer :: Text -> HorizonServer 'Https
httpsServer = https