baseid_wallet_core/
presenter.rs1#[allow(async_fn_in_trait)]
5pub trait WalletPresenter: Send + Sync {
6 async fn select_credentials(
8 &self,
9 request: serde_json::Value,
10 ) -> baseid_core::Result<Vec<CredentialMatch>>;
11
12 async fn create_presentation(
14 &self,
15 selected: Vec<CredentialSelection>,
16 consent: baseid_pctf::ConsentRecord,
17 ) -> baseid_core::Result<serde_json::Value>;
18}
19
20#[derive(Debug, Clone)]
22pub struct CredentialMatch {
23 pub credential_id: baseid_core::types::CredentialId,
24 pub format: baseid_core::types::CredentialFormat,
25 pub matching_fields: Vec<String>,
26}
27
28#[derive(Debug, Clone)]
30pub struct CredentialSelection {
31 pub credential_id: baseid_core::types::CredentialId,
32 pub disclosed_fields: Vec<String>,
33}