-
Notifications
You must be signed in to change notification settings - Fork 21
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 #43 from blockfrost/srk/chores
Chores, add Sanchonet
- Loading branch information
Showing
30 changed files
with
899 additions
and
14 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
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
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,50 @@ | ||
-- | Cardano utility endpoints | ||
|
||
{-# OPTIONS_HADDOCK hide #-} | ||
|
||
module Blockfrost.API.Cardano.Utils | ||
where | ||
|
||
import Data.Text | ||
import Servant.API | ||
import Servant.API.Generic | ||
|
||
import Blockfrost.Types.Cardano.Utils | ||
import Blockfrost.Types.Shared.CBOR | ||
|
||
data UtilsAPI route = | ||
UtilsAPI | ||
{ | ||
_deriveAddr | ||
:: route | ||
:- Summary "Derive an address" | ||
:> Description "Derive Shelley address from an xpub." | ||
:> "addresses" | ||
:> "xpub" | ||
:> Capture "xpub" Text | ||
:> Capture "role" Integer | ||
:> Capture "Index" Integer | ||
:> Get '[JSON] DerivedAddress | ||
|
||
, _txEvaluate | ||
:: route | ||
:- Summary "Submit a transaction for execution units evaluation" | ||
:> Description "Submit an already serialized transaction to evaluate \ | ||
\how much execution units it requires." | ||
:> "txs" | ||
:> "evaluate" | ||
:> ReqBody '[CBOR] CBORString | ||
:> Post '[JSON] TxEval | ||
|
||
, _txEvaluateUTXOs | ||
:: route | ||
:- Summary "Submit a transaction for execution units evaluation (additional UTXO set)" | ||
:> Description "Submit a JSON payload with transaction CBOR and additional UTXO set \ | ||
\to evaluate how much execution units it requires." | ||
:> "txs" | ||
:> "evaluate" | ||
:> "utxos" | ||
:> ReqBody '[JSON] TxEvalInput | ||
:> Post '[JSON] TxEval | ||
|
||
} 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
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.