Skip to content

Commit

Permalink
Remove commented out code and obsolete variant
Browse files Browse the repository at this point in the history
  • Loading branch information
sgreenbury committed May 13, 2024
1 parent 1eacd2a commit 4604858
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 40 deletions.
12 changes: 0 additions & 12 deletions trustchain-api/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -440,16 +440,4 @@ mod tests {
.await
.unwrap()
}

// #[test]
// fn get_key_entry() {
// use ps_sig::keys::Params;
// use ssi::jwk::rss::generate_keys_jwk;
// use ssi::jwk::JWK;

// let key: JWK = generate_keys_jwk(64, &Params::new("test".to_string().as_bytes())).unwrap();
// println!("{}", serde_json::to_string_pretty(&key).unwrap());
// let entry: PublicKeyEntry = key.try_into().unwrap();
// println!("{}", serde_json::to_string_pretty(&entry).unwrap());
// }
}
28 changes: 0 additions & 28 deletions trustchain-ffi/src/mobile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ pub enum FFIMobileError {
FailedToVerifyPresentation(PresentationError),
#[error("Failed to make create operation from mnemonic: {0}.")]
FailedCreateOperation(String),
#[error("Failed to redact credential fields with RSS selective disclosure: {0}.")]
FailedToRedactCredential(ssi::ldp::Error),
}

/// Checks time on proof is valid.
Expand Down Expand Up @@ -155,32 +153,6 @@ pub fn vc_verify_credential(credential: String, opts: String) -> Result<String>
})
}

// /// Generate a selectivley disclosed Credential with a new RSS proof derived from the original
// /// credential and a masked copy of the credential subject.
// pub fn vc_redact(
// original_credential: String,
// credential_subject_mask: String,
// opts: String,
// ) -> Result<String> {
// let mobile_opts: FFIConfig = opts.parse()?;
// let endpoint_opts = mobile_opts.endpoint()?;
// let mut o_cred: Credential = serde_json::from_str(&original_credential)?;
// let cred_sub: CredentialSubject = serde_json::from_str(&credential_subject_mask)?;
// let mut masked_copy = o_cred.clone();
// masked_copy.credential_subject = OneOrMany::One(cred_sub);
// let resolver =
// trustchain_resolver_light_client(&endpoint_opts.trustchain_endpoint().to_address());

// let rt = Runtime::new().unwrap();
// rt.block_on(async {
// o_cred
// .rss_redact(masked_copy, &resolver, &mut ContextLoader::default())
// .await
// })
// .map_err(FFIMobileError::FailedToRedactCredential)?;
// Ok(serde_json::to_string_pretty(&o_cred).map_err(FFIMobileError::FailedToSerialize)?)
// }

/// Issues a verifiable presentation. Analogous with [didkit](https://docs.rs/didkit/latest/didkit/c/fn.didkit_vc_issue_presentation.html).
pub fn vp_issue_presentation(
presentation: String,
Expand Down

0 comments on commit 4604858

Please sign in to comment.