-
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 #31 from maestro-org/30-v1-support
Feat 30: V1 endpoints support for Atlas
- Loading branch information
Showing
83 changed files
with
1,976 additions
and
475 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
module Maestro.Run.Address where | ||
|
||
import Control.Monad (unless) | ||
import Data.List (sort) | ||
import qualified Data.Text as T (pack) | ||
import Maestro.Client.Env | ||
import qualified Maestro.Client.V0 as V0 | ||
import qualified Maestro.Client.V1 as V1 | ||
import Maestro.Types.V1.Common (v1UtxoWithSlotToV0) | ||
|
||
runAddressAPI :: String -> IO () | ||
runAddressAPI apiKey = do | ||
mEnvV0 <- mkMaestroEnv @'V0 (T.pack apiKey) Preprod | ||
mEnvV1 <- mkMaestroEnv @'V1 (T.pack apiKey) Preprod | ||
let addrs = undefined -- Mention list of addresses. | ||
utxos <- V0.allPages $ flip (V0.utxosAtMultiAddresses mEnvV0 Nothing Nothing) addrs | ||
let utxosSorted = sort utxos | ||
utxos' <- fmap (fmap v1UtxoWithSlotToV0) $ V1.allPages $ flip (V1.utxosAtMultiAddresses mEnvV1 Nothing Nothing) addrs | ||
let utxos'Sorted = sort utxos' | ||
unless (utxosSorted == utxos'Sorted) $ error "Not same" |
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,9 @@ | ||
module Maestro.Run.General where | ||
|
||
import Maestro.Client.V0 | ||
import Text.Printf (printf) | ||
|
||
runGeneralAPI :: MaestroEnv 'V0 -> IO () | ||
runGeneralAPI mEnv = do | ||
chainTip <- getChainTip mEnv | ||
printf "Querying chain-tip, received: ⮯\n%s\n" (show chainTip) |
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
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
Oops, something went wrong.