diff --git a/scripts/count-ethereum-core/src/main.rs b/scripts/count-ethereum-core/src/main.rs index 30b851d..6162966 100644 --- a/scripts/count-ethereum-core/src/main.rs +++ b/scripts/count-ethereum-core/src/main.rs @@ -72,9 +72,9 @@ async fn main() { dotenv::dotenv().unwrap(); let client = Arc::new(SxTClient::new( - env::var("PROVER_ROOT_URL").unwrap_or("api.spaceandtime.dev".to_string()), - env::var("AUTH_ROOT_URL").unwrap_or("api.spaceandtime.dev".to_string()), - env::var("SUBSTRATE_NODE_URL").unwrap_or("foo.bar.spaceandtime.dev".to_string()), + env::var("PROVER_ROOT_URL").unwrap_or("https://api.spaceandtime.dev".to_string()), + env::var("AUTH_ROOT_URL").unwrap_or("https://proxy.api.spaceandtime.dev".to_string()), + env::var("SUBSTRATE_NODE_URL").unwrap_or("https://rpc.testnet.sxt.network".to_string()), env::var("SXT_API_KEY").expect("SXT_API_KEY is required"), env::var("VERIFIER_SETUP").unwrap_or("verifier_setup.bin".to_string()), )); diff --git a/sdk/src/args.rs b/sdk/src/args.rs index f8da3aa..be02423 100644 --- a/sdk/src/args.rs +++ b/sdk/src/args.rs @@ -20,19 +20,19 @@ pub struct SdkArgs { #[arg( long, value_name = "PROVER_ROOT_URL", - default_value = "api.spaceandtime.dev", + default_value = "https://api.spaceandtime.dev", env = "PROVER_ROOT_URL" )] pub prover_root_url: String, /// Root URL for the Auth service /// - /// Used for authentication requests. Generally the same as the Prover Root URL. + /// Used for authentication requests. /// Can be set via AUTH_ROOT_URL environment variable. #[arg( long, value_name = "AUTH_ROOT_URL", - default_value = "api.spaceandtime.dev", + default_value = "https://proxy.api.spaceandtime.dev", env = "AUTH_ROOT_URL" )] pub auth_root_url: String, @@ -44,7 +44,7 @@ pub struct SdkArgs { #[arg( long, value_name = "SUBSTRATE_NODE_URL", - default_value = "foo.bar.spaceandtime.dev", + default_value = "https://rpc.testnet.sxt.network", env = "SUBSTRATE_NODE_URL" )] pub substrate_node_url: String, diff --git a/sdk/src/auth.rs b/sdk/src/auth.rs index 5421968..bfc8dd5 100644 --- a/sdk/src/auth.rs +++ b/sdk/src/auth.rs @@ -9,7 +9,7 @@ pub async fn get_access_token( url: &str, ) -> Result> { let client = Client::new(); - let auth_url = format!("https://proxy.{}/auth/apikey", url); + let auth_url = format!("{}/auth/apikey", url); let response = client .post(auth_url) .header("apikey", apikey) diff --git a/sdk/src/client.rs b/sdk/src/client.rs index c93920e..8415fd8 100644 --- a/sdk/src/client.rs +++ b/sdk/src/client.rs @@ -18,28 +18,21 @@ mod prover { #[derive(Debug, Clone)] pub struct SxTClient { /// Root URL for the Prover service - /// - /// This URL is used for interacting with the prover service. pub prover_root_url: String, /// Root URL for the Auth service - /// - /// Used for authentication requests. Generally the same as the Prover Root URL. pub auth_root_url: String, /// URL for the Substrate node service - /// - /// Specifies the Substrate node endpoint used for accessing commitment data. pub substrate_node_url: String, /// API Key for Space and Time (SxT) services /// - /// The API key required for authorization with Space and Time services. + /// Please visit [Space and Time Studio](https://app.spaceandtime.ai/) to obtain an API key + /// if you do not have one. pub sxt_api_key: String, /// Path to the verifier setup binary file - /// - /// Specifies the path to the `verifier_setup.bin` file required for verification. pub verifier_setup: String, } @@ -101,7 +94,7 @@ impl SxTClient { let client = Client::new(); let access_token = get_access_token(&self.sxt_api_key, &self.auth_root_url).await?; let response = client - .post(format!("https://{}/v1/prove", &self.prover_root_url)) + .post(format!("{}/v1/prove", &self.prover_root_url)) .bearer_auth(&access_token) .json(&prover_query) .send()