1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use crate::{VaultTrait, VaultWorker};
use ockam_core::{Address, Result};
use ockam_node::Context;
pub struct Vault {}
impl Vault {
#[cfg(feature = "software_vault")]
pub async fn create(ctx: &Context) -> Result<Address> {
use ockam_vault::SoftwareVault;
Self::create_with_inner(ctx, SoftwareVault::default()).await
}
pub async fn create_with_inner<V: VaultTrait>(ctx: &Context, inner: V) -> Result<Address> {
VaultWorker::create_with_inner(ctx, inner).await
}
}