-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/purge-volatile-data-after-roll-forward
- Loading branch information
Showing
101 changed files
with
2,651 additions
and
935 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# use with https://github.com/casey/just | ||
# | ||
# Developer convenience functions | ||
|
||
# cspell: words prereqs, commitlog, rustls, nocapture | ||
|
||
default: | ||
@just --list --unsorted | ||
|
||
# expand all macros and produce a single unified source file. | ||
expand-macros: | ||
cargo expand --release --bin cat-gateway > ../expanded.rs |
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
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
32 changes: 32 additions & 0 deletions
32
catalyst-gateway/bin/src/service/api/cardano/cip36/endpoint.rs
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,32 @@ | ||
//! Implementation of the GET `/cardano/cip36` endpoint | ||
use std::time::Duration; | ||
|
||
use poem::http::HeaderMap; | ||
use tokio::time::sleep; | ||
|
||
use super::{ | ||
cardano::{self}, | ||
response, NoneOrRBAC, SlotNo, | ||
}; | ||
use crate::service::common::{self}; | ||
|
||
/// Process the endpoint operation | ||
pub(crate) async fn cip36_registrations( | ||
_lookup: Option<cardano::query::stake_or_voter::StakeOrVoter>, _asat: Option<SlotNo>, | ||
_page: common::types::generic::query::pagination::Page, | ||
_limit: common::types::generic::query::pagination::Limit, _auth: NoneOrRBAC, | ||
_headers: &HeaderMap, | ||
) -> response::AllRegistration { | ||
// Dummy sleep, remove it | ||
sleep(Duration::from_millis(1)).await; | ||
|
||
// Todo: refactor the below into a single operation here. | ||
|
||
// If _asat is None, then get the latest slot number from the chain follower and use that. | ||
// If _for is not defined, use the stake addresses defined for Role0 in the _auth | ||
// parameter. _auth not yet implemented, so put placeholder for that, and return not | ||
// found until _auth is implemented. | ||
|
||
response::Cip36Registration::NotFound.into() | ||
} |
Oops, something went wrong.