-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from maestro-org/txAtAddressOrCredential
Feat: Client functions to get transactions at an address / payment credential...
- Loading branch information
Showing
16 changed files
with
498 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
cabal-version: 3.0 | ||
name: maestro-sdk | ||
version: 1.5.0 | ||
version: 1.6.0 | ||
synopsis: Maestro Blockchain Indexer SDK | ||
description: Maestro provides blockchain indexers, APIs and event management systems for the Cardano blockchain. | ||
description: | ||
Maestro provides blockchain indexers, APIs and event management systems for the Cardano blockchain. | ||
|
||
license: Apache-2.0 | ||
license-file: LICENSE | ||
author: [email protected] | ||
|
@@ -12,118 +14,115 @@ build-type: Simple | |
category: Blockchain, Cardano, SDK, API, REST | ||
extra-doc-files: CHANGELOG.md | ||
extra-source-files: README.md | ||
tested-with: GHC == { 8.10.7, 9.2.8, 9.6.2 } | ||
tested-with: GHC ==8.10.7 || ==9.2.8 || ==9.6.2 | ||
|
||
source-repository head | ||
type: git | ||
location: https://github.com/maestro-org/haskell-sdk | ||
|
||
common common | ||
ghc-options: -Wall | ||
default-extensions: | ||
GADTs | ||
DataKinds | ||
DeriveGeneric | ||
DerivingStrategies | ||
DerivingVia | ||
GeneralisedNewtypeDeriving | ||
FlexibleInstances | ||
FlexibleContexts | ||
MultiParamTypeClasses | ||
NumericUnderscores | ||
OverloadedStrings | ||
RecordWildCards | ||
RoleAnnotations | ||
ScopedTypeVariables | ||
TemplateHaskell | ||
TypeApplications | ||
TypeFamilies | ||
TypeOperators | ||
QuasiQuotes | ||
ghc-options: -Wall | ||
default-extensions: | ||
DataKinds | ||
DeriveGeneric | ||
DerivingStrategies | ||
DerivingVia | ||
FlexibleContexts | ||
FlexibleInstances | ||
GADTs | ||
GeneralisedNewtypeDeriving | ||
MultiParamTypeClasses | ||
NumericUnderscores | ||
OverloadedStrings | ||
QuasiQuotes | ||
RecordWildCards | ||
RoleAnnotations | ||
ScopedTypeVariables | ||
TemplateHaskell | ||
TypeApplications | ||
TypeFamilies | ||
TypeOperators | ||
|
||
library | ||
import: common | ||
exposed-modules: | ||
Maestro.API.V1 | ||
Maestro.API.V1.Accounts | ||
Maestro.API.V1.Addresses | ||
Maestro.API.V1.Blocks | ||
Maestro.API.V1.Datum | ||
Maestro.API.V1.DefiMarkets | ||
Maestro.API.V1.General | ||
Maestro.API.V1.Pools | ||
Maestro.API.V1.Transactions | ||
Maestro.API.V1.TxManager | ||
|
||
Maestro.Client.Env | ||
Maestro.Client.Error | ||
|
||
Maestro.Client.V1 | ||
Maestro.Client.V1.Core | ||
Maestro.Client.V1.Core.Pagination | ||
Maestro.Client.V1.Accounts | ||
Maestro.Client.V1.Addresses | ||
Maestro.Client.V1.Blocks | ||
Maestro.Client.V1.Datum | ||
Maestro.Client.V1.DefiMarkets | ||
Maestro.Client.V1.General | ||
Maestro.Client.V1.Pools | ||
Maestro.Client.V1.Transactions | ||
Maestro.Client.V1.TxManager | ||
|
||
Maestro.Types.Common | ||
|
||
Maestro.Types.V1 | ||
Maestro.Types.V1.Accounts | ||
Maestro.Types.V1.Addresses | ||
Maestro.Types.V1.Blocks | ||
Maestro.Types.V1.Datum | ||
Maestro.Types.V1.DefiMarkets | ||
Maestro.Types.V1.Common | ||
Maestro.Types.V1.Common.Pagination | ||
Maestro.Types.V1.Common.Timestamped | ||
Maestro.Types.V1.General | ||
Maestro.Types.V1.Pools | ||
Maestro.Types.V1.Transactions | ||
import: common | ||
exposed-modules: | ||
Maestro.API.V1 | ||
Maestro.API.V1.Accounts | ||
Maestro.API.V1.Addresses | ||
Maestro.API.V1.Assets | ||
Maestro.API.V1.Blocks | ||
Maestro.API.V1.Datum | ||
Maestro.API.V1.DefiMarkets | ||
Maestro.API.V1.General | ||
Maestro.API.V1.Pools | ||
Maestro.API.V1.Transactions | ||
Maestro.API.V1.TxManager | ||
Maestro.Client.Env | ||
Maestro.Client.Error | ||
Maestro.Client.V1 | ||
Maestro.Client.V1.Accounts | ||
Maestro.Client.V1.Addresses | ||
Maestro.Client.V1.Assets | ||
Maestro.Client.V1.Blocks | ||
Maestro.Client.V1.Core | ||
Maestro.Client.V1.Core.Pagination | ||
Maestro.Client.V1.Datum | ||
Maestro.Client.V1.DefiMarkets | ||
Maestro.Client.V1.General | ||
Maestro.Client.V1.Pools | ||
Maestro.Client.V1.Transactions | ||
Maestro.Client.V1.TxManager | ||
Maestro.Types.Common | ||
Maestro.Types.V1 | ||
Maestro.Types.V1.Accounts | ||
Maestro.Types.V1.Addresses | ||
Maestro.Types.V1.Assets | ||
Maestro.Types.V1.Blocks | ||
Maestro.Types.V1.Common | ||
Maestro.Types.V1.Common.Pagination | ||
Maestro.Types.V1.Common.Timestamped | ||
Maestro.Types.V1.Datum | ||
Maestro.Types.V1.DefiMarkets | ||
Maestro.Types.V1.General | ||
Maestro.Types.V1.Pools | ||
Maestro.Types.V1.Transactions | ||
|
||
build-depends: | ||
aeson ^>=2.1, | ||
base ^>=4.14.3.0 || ^>=4.16.4.0 || ^>=4.18.0.0, | ||
bytestring ^>=0.10 || ^>=0.11, | ||
containers ^>=0.6, | ||
data-default-class ^>=0.1, | ||
deriving-aeson ^>=0.2, | ||
http-api-data ^>=0.5 || ^>=0.6, | ||
http-client ^>=0.7, | ||
http-client-tls ^>=0.3, | ||
http-types ^>=0.12, | ||
retry ^>=0.9, | ||
servant ^>=0.19 || ^>=0.20, | ||
servant-client ^>=0.19 || ^>=0.20, | ||
servant-client-core ^>=0.19 || ^>=0.20, | ||
text ^>=1.2 || ^>=2.0, | ||
time ^>=1.9 || ^>=1.11 || ^>=1.12 | ||
build-depends: | ||
, aeson ^>=2.1 | ||
, base ^>=4.14.3.0 || ^>=4.16.4.0 || ^>=4.18.0.0 | ||
, bytestring >=0.10 && <0.11 || ^>=0.11 | ||
, containers ^>=0.6 | ||
, data-default-class ^>=0.1 | ||
, deriving-aeson ^>=0.2 | ||
, http-api-data >=0.5 && <0.6 || ^>=0.6 | ||
, http-client ^>=0.7 | ||
, http-client-tls ^>=0.3 | ||
, http-types ^>=0.12 | ||
, retry ^>=0.9 | ||
, servant >=0.19 && <0.20 || ^>=0.20 | ||
, servant-client >=0.19 && <0.20 || ^>=0.20 | ||
, servant-client-core >=0.19 && <0.20 || ^>=0.20 | ||
, text ^>=1.2 || ^>=2.0 | ||
, time ^>=1.9 || >=1.11 && <1.12 || ^>=1.12 | ||
|
||
hs-source-dirs: src | ||
default-language: Haskell2010 | ||
hs-source-dirs: src | ||
default-language: Haskell2010 | ||
|
||
test-suite maestro-sdk-tests | ||
import: common | ||
default-language: Haskell2010 | ||
type: exitcode-stdio-1.0 | ||
hs-source-dirs: test | ||
main-is: Driver.hs | ||
other-modules: | ||
Maestro.Test.Backoff | ||
import: common | ||
default-language: Haskell2010 | ||
type: exitcode-stdio-1.0 | ||
hs-source-dirs: test | ||
main-is: Driver.hs | ||
other-modules: Maestro.Test.Backoff | ||
build-depends: | ||
, base ^>=4.14.3.0 || ^>=4.16.4.0 || ^>=4.18.0.0 | ||
, containers ^>=0.6.5.1 | ||
, hspec ^>=2.11.4 | ||
, maestro-sdk | ||
, tasty ^>=1.4.3 | ||
, tasty-hspec ^>=1.2.0.4 | ||
, text ^>=1.2.4.1 || ^>=2.0.2 | ||
, time ^>=1.9.3 || ^>=1.11.1.1 || ^>=1.12.2 | ||
|
||
build-depends: | ||
base ^>=4.14.3.0 || ^>=4.16.4.0 || ^>=4.18.0.0, | ||
maestro-sdk, | ||
containers ^>=0.6.5.1, | ||
hspec ^>=2.11.4, | ||
tasty ^>=1.4.3, | ||
tasty-hspec ^>=1.2.0.4, | ||
text ^>=1.2.4.1 || ^>=2.0.2, | ||
time ^>=1.9.3 || ^>=1.11.1.1 || ^>=1.12.2 | ||
build-tool-depends: | ||
tasty-discover:tasty-discover | ||
build-tool-depends: tasty-discover:tasty-discover |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module Maestro.API.V1.Assets where | ||
|
||
import Maestro.Types.V1 | ||
import Servant.API | ||
import Servant.API.Generic | ||
|
||
data AssetsAPI route = AssetsAPI | ||
{ assetInfo :: | ||
route | ||
:- Capture "asset" NonAdaNativeToken | ||
:> Get '[JSON] TimestampedAssetInfo | ||
-- ^ Native asset information. | ||
} | ||
deriving (Generic) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
module Maestro.API.V1.DefiMarkets where | ||
|
||
import Maestro.Types.V1 | ||
import Servant.API | ||
import Servant.API.Generic | ||
import Data.Time (Day) | ||
import Data.Word (Word64) | ||
import Maestro.Types.V1 | ||
import Servant.API | ||
import Servant.API.Generic | ||
|
||
data DefiMarketsAPI route = DefiMarketsAPI | ||
{ | ||
dexOHLC | ||
:: route | ||
:- "ohlc" | ||
:> Capture "dex" Dex | ||
:> Capture "pair" (TaggedText PairOfDexTokens) | ||
:> QueryParam "resolution" Resolution | ||
:> QueryParam "sort" Order | ||
:> Get '[JSON] [OHLCCandleInfo] | ||
|
||
, dexPairs | ||
:: route | ||
:- Capture "dex" Dex | ||
:> Get '[JSON] DexPairResponse | ||
|
||
} deriving (Generic) | ||
{ dexOHLC :: | ||
route | ||
:- "ohlc" | ||
:> Capture "dex" Dex | ||
:> Capture "pair" (TaggedText PairOfDexTokens) | ||
:> QueryParam "resolution" Resolution | ||
:> QueryParam "from" Day | ||
:> QueryParam "to" Day | ||
:> QueryParam "limit" Word64 | ||
:> QueryParam "sort" Order | ||
:> Get '[JSON] [OHLCCandleInfo] | ||
, dexPairs :: | ||
route | ||
:- Capture "dex" Dex | ||
:> Get '[JSON] DexPairResponse | ||
} | ||
deriving (Generic) |
Oops, something went wrong.