pub mod client;
pub mod error;
pub mod signer;
pub mod types;
pub mod address_watches;
pub mod agreements;
pub mod allocations;
pub mod auth;
pub mod exchanges;
pub mod fee_sponsors;
pub mod keys;
pub mod networks;
pub mod payins;
pub mod payouts;
pub mod permissions;
pub mod policies;
pub mod signers;
pub mod staking;
pub mod swaps;
pub mod vaults;
pub mod wallets;
pub mod webhooks;
pub use client::{Client, MultipartFile, Options};
pub use error::Error;
#[derive(Clone)]
pub struct DfnsClient {
pub address_watches: address_watches::AddressWatchesClient,
pub agreements: agreements::AgreementsClient,
pub allocations: allocations::AllocationsClient,
pub auth: auth::AuthClient,
pub exchanges: exchanges::ExchangesClient,
pub fee_sponsors: fee_sponsors::FeeSponsorsClient,
pub keys: keys::KeysClient,
pub networks: networks::NetworksClient,
pub payins: payins::PayinsClient,
pub payouts: payouts::PayoutsClient,
pub permissions: permissions::PermissionsClient,
pub policies: policies::PoliciesClient,
pub signers: signers::SignersClient,
pub staking: staking::StakingClient,
pub swaps: swaps::SwapsClient,
pub vaults: vaults::VaultsClient,
pub wallets: wallets::WalletsClient,
pub webhooks: webhooks::WebhooksClient,
}
impl DfnsClient {
pub fn new(options: Options) -> Result<Self, Error> {
let client = Client::new(options)?;
Ok(DfnsClient {
address_watches: address_watches::AddressWatchesClient::new(client.clone()),
agreements: agreements::AgreementsClient::new(client.clone()),
allocations: allocations::AllocationsClient::new(client.clone()),
auth: auth::AuthClient::new(client.clone()),
exchanges: exchanges::ExchangesClient::new(client.clone()),
fee_sponsors: fee_sponsors::FeeSponsorsClient::new(client.clone()),
keys: keys::KeysClient::new(client.clone()),
networks: networks::NetworksClient::new(client.clone()),
payins: payins::PayinsClient::new(client.clone()),
payouts: payouts::PayoutsClient::new(client.clone()),
permissions: permissions::PermissionsClient::new(client.clone()),
policies: policies::PoliciesClient::new(client.clone()),
signers: signers::SignersClient::new(client.clone()),
staking: staking::StakingClient::new(client.clone()),
swaps: swaps::SwapsClient::new(client.clone()),
vaults: vaults::VaultsClient::new(client.clone()),
wallets: wallets::WalletsClient::new(client.clone()),
webhooks: webhooks::WebhooksClient::new(client.clone()),
})
}
}