Skip to content

Commit

Permalink
Decode input from propagation pallet
Browse files Browse the repository at this point in the history
  • Loading branch information
ameba23 committed Aug 16, 2024
1 parent 8d1f3ca commit 33797ef
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions crates/threshold-signature-server/src/attestation/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use crate::{
AppState,
};
use axum::{body::Bytes, extract::State, http::StatusCode};
use entropy_shared::OcwMessageAttestationRequest;
use subxt::tx::PairSigner;
use x25519_dalek::StaticSecret;

Expand All @@ -31,9 +32,11 @@ use x25519_dalek::StaticSecret;
/// [Index TDX DCAP Quoting Library API](https://download.01.org/intel-sgx/latest/dcap-latest/linux/docs/Intel_TDX_DCAP_Quoting_Library_API.pdf).
pub async fn attest(
State(app_state): State<AppState>,
_input: Bytes,
input: Bytes,
) -> Result<StatusCode, AttestationErr> {
// TODO input should be Vec<AccountId32> - check it
let attestaion_requests = OcwMessageAttestationRequest::decode(&mut input.as_ref())?;
// TODO check that attestation_requests.tss_account_ids contains our account_id
// which is signer.signer().public().0

let api = get_api(&app_state.configuration.endpoint).await?;
let rpc = get_rpc(&app_state.configuration.endpoint).await?;
Expand Down

0 comments on commit 33797ef

Please sign in to comment.