Skip to content

Commit

Permalink
Reformat example VP request
Browse files Browse the repository at this point in the history
  • Loading branch information
lukehare committed Jun 23, 2023
1 parent 6e97c9a commit f50b60c
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions trustchain-http/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,23 @@ pub mod state;
pub mod static_handlers;
pub mod verifier;

/// Example VP request used by demo.spruceid.com
pub const EXAMPLE_VP_REQUEST: &str = r#"{ "type": "VerifiablePresentationRequest", "query": [ { "type": "QueryByExample", "credentialQuery": { "reason": "Request credential", "example": { "@context": [ "https://www.w3.org/2018/credentials/v1" ], "type": "VerifiableCredential" } } } ], "challenge": "a877fb0a-11dd-11ee-9df7-9be7abdeee2d", "domain": "https://alan-turing-institute.github.io/trustchain" }"#;
/// Example VP request.
pub const EXAMPLE_VP_REQUEST: &str = r#"{
"type": "VerifiablePresentationRequest",
"query": [
{
"type": "QueryByExample",
"credentialQuery": {
"reason": "Request credential",
"example": {
"@context": [
"https://www.w3.org/2018/credentials/v1"
],
"type": "VerifiableCredential"
}
}
}
],
"challenge": "a877fb0a-11dd-11ee-9df7-9be7abdeee2d",
"domain": "https://alan-turing-institute.github.io/trustchain"
}"#;

0 comments on commit f50b60c

Please sign in to comment.