cabal-version: 3.0

name:           utxorpc-server
version:        0.0.1.0
synopsis:       An SDK for UTxO RPC services.
description:    This SDK includes helper functions for creating a UTxO RPC service with automated logging.
category:       Network, Blockchain, Cardano
homepage:       https://github.com/utxorpc/haskell-sdk#readme
bug-reports:    https://github.com/utxorpc/haskell-sdk/issues
author:         Dominic Mayhew
maintainer:     Dominic Mayhew <dominic.j.mayhew@gmail.com>
                TxPipe <registrant@txpipe.io>
license:        Apache-2.0
license-file:   LICENSE
build-type:     Simple

source-repository head
  type: git
  location: https://github.com/utxorpc/haskell-sdk

library
  exposed-modules:
      Utxorpc.Server
  other-modules:
      Utxorpc.Build
      Utxorpc.Submit
      Utxorpc.Sync
      Utxorpc.Watch
      Utxorpc.Logged
  hs-source-dirs:
      src
  ghc-options:
    -Wall
    -Wcompat
    -Widentities
    -Wincomplete-record-updates
    -Wincomplete-uni-patterns
    -Wmissing-export-lists
    -Wmissing-home-modules
    -Wpartial-fields
    -Wredundant-constraints
    -Wunused-packages
  build-depends:
    , base >=4.7 && <5
    , bytestring < 0.13
    , http2-grpc-proto-lens < 0.2
    , http2-grpc-types >= 0.5.0.0 && < 0.6
    , utxorpc >= 0.0.3.0 && < 0.1
    , uuid < 1.4
    , wai < 3.3
    , warp  < 3.5
    , warp-grpc < 0.5
    , warp-tls < 3.5
  default-language: Haskell2010

executable server-example
  main-is:
    Main.hs
  other-modules:
    BuildImpl
    KatipLogger
    EmptyHandlers
    SimpleLogger
    SubmitImpl
    SyncImpl
    WatchImpl
  hs-source-dirs:
    example
  ghc-options:
    -Wall
    -Wcompat
    -Widentities
    -Wincomplete-record-updates
    -Wincomplete-uni-patterns
    -Wmissing-export-lists
    -Wmissing-home-modules
    -Wpartial-fields
    -Wredundant-constraints
    -Wunused-packages
  build-depends:
    aeson < 2.3
    , base >= 4.7 && < 5
    , bytestring < 0.13
    , case-insensitive < 1.3
    , http2-grpc-types < 0.6
    , katip < 0.9
    , lens < 5.3
    , proto-lens < 0.8
    , time < 1.13
    , transformers < 0.7
    , unliftio < 0.3
    , utxorpc >= 0.0.3 && < 0.1
    , utxorpc-server
    , uuid < 1.4
    , wai < 3.3
    , warp  < 3.5
    , warp-grpc < 0.5
    , warp-tls < 3.5
  default-language: Haskell2010

test-suite logged_test_server
  type:
    exitcode-stdio-1.0
  main-is:
    logged_test.hs
  other-modules:
    Utxorpc.Logged
  hs-source-dirs:
    test
    src
  ghc-options:
    -Wall
    -Wcompat
    -Widentities
    -Wincomplete-record-updates
    -Wincomplete-uni-patterns
    -Wmissing-export-lists
    -Wmissing-home-modules
    -Wpartial-fields
    -Wredundant-constraints
    -Wunused-packages
  build-depends:
    , base >=4.7 && <5
    , bytestring < 0.13
    , directory >= 1.3.8 && < 1.4
    , http2-grpc-proto-lens < 0.2
    , http2-grpc-types < 0.6
    , hspec >= 2.11.7 && < 2.12
    , proto-lens < 0.8
    , transformers < 0.7
    , utxorpc >= 0.0.3 && < 0.1
    , uuid < 1.4
    , wai < 3.3
    , warp-grpc < 0.5
  default-language: Haskell2010