Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add config builder methods #384

Merged
merged 2 commits into from
Nov 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions aries_vcx/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ failure = "0.1.6"
strum = "0.16.0"
strum_macros = "0.16.0"
agency_client = { version = "0.1.0", path = "../agency_client" }
derive_builder = "0.10.2"

[target.'cfg(target_os = "android")'.dependencies]
android_logger = "0.5"
3 changes: 2 additions & 1 deletion aries_vcx/src/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ use crate::libindy::utils::wallet::{build_wallet_config, build_wallet_credential
use crate::settings;
use crate::utils::provision::AgencyClientConfig;

#[derive(Clone, Debug, Serialize, Deserialize)]
#[derive(Clone, Debug, Builder, Serialize, Deserialize)]
#[builder(setter(into))]
pub struct PoolConfig {
pub genesis_path: String,
pub pool_name: Option<String>,
Expand Down
2 changes: 2 additions & 0 deletions aries_vcx/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ extern crate strum_macros;
extern crate time;
extern crate url;
extern crate uuid;
#[macro_use]
extern crate derive_builder;

#[macro_use]
pub mod utils;
Expand Down
3 changes: 2 additions & 1 deletion aries_vcx/src/libindy/utils/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ use crate::init::open_as_main_wallet;
use crate::libindy::utils::{anoncreds, signus};
use crate::settings;

#[derive(Clone, Debug, Serialize, Deserialize)]
#[derive(Clone, Debug, Builder, Serialize, Deserialize)]
#[builder(setter(into))]
pub struct WalletConfig {
pub wallet_name: String,
pub wallet_key: String,
Expand Down
3 changes: 2 additions & 1 deletion aries_vcx/src/utils/provision.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ use crate::error::prelude::*;
use crate::libindy::utils::signus;
use crate::settings;

#[derive(Serialize, Deserialize, Debug, Clone)]
#[derive(Serialize, Deserialize, Builder, Clone)]
#[builder(setter(into))]
pub struct AgentProvisionConfig {
pub agency_did: String,
pub agency_verkey: String,
Expand Down