-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Project import generated by Copybara.
GitOrigin-RevId: b8f9bc3ce00b1d3bbcfeb0a42da4ef6d1d160792
- Loading branch information
Showing
12 changed files
with
204 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,40 @@ | ||
#[derive(Debug, Clone)] | ||
pub struct Config {} | ||
pub struct Config { | ||
pub api_client_id: String, | ||
pub api_client_secret: String, | ||
pub node_id: String, | ||
pub username: String, | ||
pub user_id: String, | ||
pub uma_encryption_private_key_hex: String, | ||
pub uma_signing_private_key_hex: String, | ||
pub node_master_seed_hex: String, | ||
pub client_base_url: String, | ||
} | ||
|
||
impl Config { | ||
pub fn new_from_env() -> Self { | ||
let api_endpoint = std::env::var("LIGHTSPARK_API_ENDPOINT").ok(); | ||
let api_client_id = std::env::var("LIGHTSPARK_API_CLIENT_ID").ok(); | ||
let api_client_secret = std::env::var("LIGHTSPARK_API_CLIENT_SECRET").ok(); | ||
let master_seed_hex = std::env::var("LIGHTSPARK_MASTER_SEED_HEX").ok(); | ||
let node_id = std::env::var("LIGHTSPARK_NODE_ID").ok(); | ||
let username = std::env::var("LIGHTSPARK_USERNAME").ok(); | ||
let user_id = std::env::var("LIGHTSPARK_USER_ID").ok(); | ||
let uma_encryption_private_key_hex = | ||
std::env::var("LIGHTSPARK_UMA_ENCRYPTION_PRIVATE_KEY_HEX").ok(); | ||
let uma_signing_private_key_hex = | ||
std::env::var("LIGHTSPARK_UMA_SIGNING_PRIVATE_KEY_HEX").ok(); | ||
|
||
Config { | ||
api_client_id: api_client_id.unwrap_or_default(), | ||
api_client_secret: api_client_secret.unwrap_or_default(), | ||
node_id: node_id.unwrap_or_default(), | ||
username: username.unwrap_or_default(), | ||
user_id: user_id.unwrap_or_default(), | ||
uma_encryption_private_key_hex: uma_encryption_private_key_hex.unwrap_or_default(), | ||
uma_signing_private_key_hex: uma_signing_private_key_hex.unwrap_or_default(), | ||
node_master_seed_hex: master_seed_hex.unwrap_or_default(), | ||
client_base_url: api_endpoint.unwrap_or_default(), | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
name = "lightspark-remote-signing" | ||
description = "Lightspark Remote Signing SDK for Rust" | ||
authors = ["Lightspark Group, Inc. <[email protected]>"] | ||
version = "0.2.0" | ||
version = "0.2.1" | ||
edition = "2021" | ||
documentation = "https://app.lightspark.com/docs/" | ||
homepage = "https://www.lightspark.com/" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
name = "lightspark" | ||
description = "Lightspark Rust SDK" | ||
authors = ["Lightspark Group, Inc. <[email protected]>"] | ||
version = "0.7.0" | ||
version = "0.7.1" | ||
edition = "2021" | ||
documentation = "https://app.lightspark.com/docs/sdk" | ||
homepage = "https://www.lightspark.com/" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters