pub trait SandboxNetwork {
// Required methods
fn rpc_url(&self) -> &str;
fn root_account_id(&self) -> &str;
fn root_secret_key(&self) -> &str;
}Expand description
Trait for sandbox network configuration.
Implement this trait for your sandbox type to enable ergonomic
integration with the Near client via Near::sandbox().
§Example
ⓘ
use near_sandbox::Sandbox;
let sandbox = Sandbox::start_sandbox().await?;
let near = Near::sandbox(&sandbox).build();
// The root account credentials are automatically configured
near.transfer("alice.sandbox", "10 NEAR").await?;Required Methods§
Sourcefn root_account_id(&self) -> &str
fn root_account_id(&self) -> &str
The root account ID (e.g., "sandbox").
Sourcefn root_secret_key(&self) -> &str
fn root_secret_key(&self) -> &str
The root account’s secret key.