1pub mod agent;
9
10pub mod agent_key;
12
13pub mod agent_key_manager;
15
16pub mod config;
18
19pub mod cli;
21
22pub mod did;
24
25pub mod error;
27
28pub mod key_manager;
30
31pub mod local_agent_key;
33
34pub mod message;
36
37pub mod message_packing;
39
40pub mod storage;
42
43pub trait ErasedSerialize {
45 fn to_json(&self) -> std::result::Result<String, serde_json::Error>;
47}
48
49impl<T: serde::Serialize> ErasedSerialize for T {
50 fn to_json(&self) -> std::result::Result<String, serde_json::Error> {
51 serde_json::to_string(self)
52 }
53}
54
55pub use agent_key_manager::{AgentKeyManager, AgentKeyManagerBuilder};
57pub use config::AgentConfig;
58pub use did::{
59 DIDDoc, DIDGenerationOptions, DIDKeyGenerator, GeneratedKey, KeyResolver, KeyType,
60 VerificationMaterial, VerificationMethod, VerificationMethodType,
61};
62pub use error::{Error, Result};
63pub use key_manager::{KeyManager, Secret, SecretMaterial, SecretType};
64pub use storage::{KeyStorage, StoredKey};
65
66pub use agent_key::{
68 AgentKey, DecryptionKey, EncryptionKey, JweAlgorithm, JweEncryption, JwsAlgorithm, SigningKey,
69 VerificationKey,
70};
71pub use local_agent_key::{LocalAgentKey, PublicVerificationKey};
72pub use message::SecurityMode;
73pub use message_packing::{KeyManagerPacking, PackOptions, Packable, UnpackOptions, Unpackable};
74pub use tap_msg::didcomm::PlainMessage;
75
76#[cfg(not(target_arch = "wasm32"))]
78pub use did::MultiResolver;
79
80#[cfg(not(target_arch = "wasm32"))]
82pub use agent::{Agent, DeliveryResult, TapAgent};
83#[cfg(not(target_arch = "wasm32"))]
84pub use did::{DIDMethodResolver, SyncDIDResolver};
85#[cfg(not(target_arch = "wasm32"))]
86pub use message::PRESENTATION_MESSAGE_TYPE;
87
88#[cfg(target_arch = "wasm32")]
90pub use agent::WasmAgent;
91#[cfg(target_arch = "wasm32")]
92pub use did::{WasmDIDMethodResolver, WasmDIDResolver};
93
94pub const VERSION: &str = env!("CARGO_PKG_VERSION");
96
97pub fn is_running_tests() -> bool {
99 true }