forked from fedimint/fedimint-clientd
-
Notifications
You must be signed in to change notification settings - Fork 0
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 fedimint#37 from fedimint/stateless-router-setup
- Loading branch information
Showing
20 changed files
with
75 additions
and
50 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
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,26 @@ | ||
use axum::extract::State; | ||
use axum::Json; | ||
use serde::Serialize; | ||
|
||
use crate::cashu::Keyset; | ||
use crate::error::AppError; | ||
use crate::state::AppState; | ||
|
||
#[derive(Serialize)] | ||
#[serde(rename_all = "lowercase")] | ||
pub struct KeysetsResponse { | ||
keysets: Vec<Keyset>, | ||
} | ||
|
||
#[axum_macros::debug_handler] | ||
pub async fn handle_keysets( | ||
State(state): State<AppState>, | ||
) -> Result<Json<KeysetsResponse>, AppError> { | ||
let mut keysets = Vec::<Keyset>::new(); | ||
let ids = state.multimint.ids().await; | ||
for id in ids { | ||
keysets.push(Keyset::from(id)) | ||
} | ||
|
||
Ok(Json(KeysetsResponse { keysets })) | ||
} |
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
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
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 +1,7 @@ | ||
pub mod handlers; | ||
pub mod check; | ||
pub mod info; | ||
pub mod keys; | ||
pub mod keysets; | ||
pub mod melt; | ||
pub mod mint; | ||
pub mod swap; |
File renamed without changes.
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