pub async fn build(mut self) -> Result<Account> {
    let account: Account = match self.storage {
      AccountStorage::Memory => Account::with_config(MemStore::new(), self.config).await?,
      #[cfg(feature = "stronghold")]
      AccountStorage::Stronghold(snapshot, password) => {
        let passref: Option<&str> = password.as_deref();
        let adapter: Stronghold = Stronghold::new(&snapshot, passref).await?;

        if let Some(mut password) = password {
          password.zeroize();
        }

        Account::with_config(adapter, self.config).await?
      }
      AccountStorage::Custom(adapter) => Account::with_config(adapter, self.config).await?,
    };

    if let Some(clients) = self.clients.take() {
      for (_, client) in clients.into_iter() {
        account.set_client(client.build().await?);
      }
    }

    Ok(account)
  }
/// Creates a new [Account] based on the builder configuration.
Creates a new [Account] based on the builder configuration.
Creates a new [ Account ] based on the builder configuration .
pub async fn build(mut self) -> Result<Account> {
    let account: Account = match self.storage {
      AccountStorage::Memory => Account::with_config(MemStore::new(), self.config).await?,
      #[cfg(feature = "stronghold")]
      AccountStorage::Stronghold(snapshot, password) => {
        let passref: Option<&str> = password.as_deref();
        let adapter: Stronghold = Stronghold::new(&snapshot, passref).await?;
        if let Some(mut password) = password {
          password.zeroize();
        }
        Account::with_config(adapter, self.config).await?
      }
      AccountStorage::Custom(adapter) => Account::with_config(adapter, self.config).await?,
    };
    if let Some(clients) = self.clients.take() {
      for (_, client) in clients.into_iter() {
        account.set_client(client.build().await?);
      }
    }
    Ok(account)
  }
pub async fn build ( mut self ) -> Result < Account > { let account : Account = match self . storage { AccountStorage :: Memory => Account :: with_config ( MemStore :: new ( ) , self . config ) . await ? , # [ cfg ( feature " " ) ] AccountStorage :: Stronghold ( snapshot , password ) => { let passref : Option < & str > = password . as_deref ( ) ; let adapter : Stronghold = Stronghold :: new ( & snapshot , passref ) . await ? ; if let Some ( mut password ) = password { password . zeroize ( ) ; } Account :: with_config ( adapter , self . config ) . await ? } AccountStorage :: Custom ( adapter ) => Account :: with_config ( adapter , self . config ) . await ? , } ; if let Some ( clients ) = self . clients . take ( ) { for ( _ , client ) in clients . into_iter ( ) { account . set_client ( client . build ( ) . await ? ) ; } } Ok ( account ) }
Creates a new [Account] based on the builder configuration.
Creates a new [ Account ] based on the builder configuration .
mut self
mut self