Module domain

Module domain 

Source
Expand description

§Domain

The main entry point for building and running a Domain.

use delta_domain_sdk::{Domain, Config};

async fn example() -> Result<(), Box<dyn std::error::Error>> {
    let config = Config::load()?;
    let Domain { runner, client, views } = Domain::from_config(config)
        .build()
        .await?;

    // Spawn the event loop
    let handle = tokio::spawn(runner.run());

    // Use client and views from other tasks
    // client.apply(messages).await?;
    // let vault = views.domain_view().get_vault(&address)?;
    Ok(())
}

Structs§

Domain
A delta domain