Skip to content

Commit

Permalink
fix: remove custom VerifiablePresentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nanderstabel committed Jun 19, 2023
1 parent 15294f8 commit 15a1a0d
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions dif-presentation-exchange/src/presentation_definition.rs
Original file line number Diff line number Diff line change
@@ -1,34 +1,7 @@
use getset::Getters;
use serde::{Deserialize, Serialize};
use serde_with::skip_serializing_none;
use std::collections::HashMap;

// TODO: replace with identity_credential once this issue is resolved:
// https://github.com/iotaledger/identity.rs/issues/1151
#[skip_serializing_none]
#[derive(Debug, Deserialize, Serialize, PartialEq, Clone)]
#[serde(rename_all = "camelCase")]
pub struct VerifiablePresentation {
#[serde(rename = "@context")]
pub context: Vec<String>,
pub id: Option<String>,
pub type_: Vec<String>,
pub verifiable_credential: Option<Vec<String>>,
pub holder: Option<String>,
}

impl Default for VerifiablePresentation {
fn default() -> Self {
VerifiablePresentation {
context: vec!["https://www.w3.org/2018/credentials/v1".to_string()],
id: None,
type_: vec!["VerifiablePresentation".to_string()],
verifiable_credential: None,
holder: None,
}
}
}

/// As specified in https://identity.foundation/presentation-exchange/#presentation-definition.
#[allow(dead_code)]
#[derive(Deserialize, Debug, Getters, PartialEq, Clone, Serialize)]
Expand Down

0 comments on commit 15a1a0d

Please sign in to comment.