Skip to content

Commit

Permalink
feat: expose more SSI api in teddybear_vc (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan770 authored Sep 6, 2024
1 parent 9daa71d commit 6a53b3e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
6 changes: 4 additions & 2 deletions crates/teddybear-js/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ use teddybear_jwe::{A256Gcm, XC20P};
use wasm_bindgen::prelude::*;

use teddybear_vc::{
issue_vc, present_vp, verify, ContextLoader as InnerContextLoader, JsonPresentation,
SpecializedJsonCredential, DI,
issue_vc, present_vp,
ssi_json_ld::ContextLoader as InnerContextLoader,
ssi_vc::v2::syntax::{JsonPresentation, SpecializedJsonCredential},
verify, DI,
};

const OBJECT_SERIALIZER: Serializer = Serializer::new().serialize_maps_as_objects(true);
Expand Down
25 changes: 13 additions & 12 deletions crates/teddybear-vc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,16 @@ use ssi_claims::{
StandardCryptographicSuite,
},
Invalid, InvalidClaims, ProofValidationError, SignatureEnvironment, SignatureError,
ValidateProof, VerificationParameters,
ValidateClaims, ValidateProof, VerifiableClaims, VerificationParameters,
};
use ssi_json_ld::{ContextLoader, Expandable, IriBuf, JsonLdNodeObject};
use ssi_vc::{
v2::{
syntax::{JsonPresentation, SpecializedJsonCredential},
Credential, Presentation,
},
Identified,
};
use ssi_json_ld::IriBuf;
use ssi_verification_methods::{
Ed25519VerificationKey2020, ProofPurpose, ReferenceOrOwned, SingleSecretSigner,
VerificationMethodResolutionError, VerificationMethodResolver,
Expand All @@ -20,16 +27,10 @@ use teddybear_crypto::{default_did_method, CustomVerificationMethodDIDResolver,

use crate::credential_ref::CredentialRef;

pub use ssi_claims::{ValidateClaims, VerifiableClaims};
pub use ssi_json_ld::{ContextLoader, Expand, Expandable, JsonLdNodeObject, ValidId};
pub use ssi_vc::{
syntax::{RequiredContext, RequiredContextList, RequiredType, RequiredTypeSet},
v2::{
syntax::{JsonPresentation, SpecializedJsonCredential},
Credential, Presentation,
},
Identified,
};
pub use ssi_claims;
pub use ssi_json_ld;
pub use ssi_vc;
pub use ssi_verification_methods;

pub type DI<V> = DataIntegrity<V, Ed25519Signature2020>;

Expand Down

0 comments on commit 6a53b3e

Please sign in to comment.