diff --git a/Cargo.toml b/Cargo.toml index 76fdd65..f285ccd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -clap = { version = "3.2.22", features = ["env", "derive"] } +clap = { version = "4.0.7", features = ["env", "derive"] } chrono = { version = "0.4.22", features = ["serde"] } envy = "0.4.2" getset = "0.1.2" @@ -16,7 +16,7 @@ lunanode_macros = { path = "./lunanode_macros" } parse-display-derive = "0.6.0" sha2 = "0.10.5" serde = { version = "1.0.0", features = ["derive"] } -serde_json = { version = "1.0.85", features = ["preserve_order"] } +serde_json = "1.0.85" serde_with = "1.0.0" ureq = { version = "2.5.0", features = ["json"] } uuid = { version = "1.1.2", features = ["serde"] } diff --git a/src/types.rs b/src/types.rs index b88adaa..c6d4e5e 100644 --- a/src/types.rs +++ b/src/types.rs @@ -15,15 +15,15 @@ type HmacSHA512 = Hmac; #[display("{api_id}")] /// Used to specify API credentials. These are not required as long as LUNANODE_KEY_ID and LUNANODE_API_KEY are specified in the environment. pub struct ApiKeys { - #[clap(long, takes_value=true, env="LUNANODE_KEY_ID", help="The API key ID from the Lunanode Dashboard.", long_help="The API key ID from the Lunanode dashboard. You may also specify this option via the LUNANODE_KEY_ID environment variable.", required=false, min_values=0, max_values=1, multiple_values=false)] + #[clap(long, env="LUNANODE_KEY_ID", help="The API key ID from the Lunanode Dashboard.", long_help="The API key ID from the Lunanode dashboard. You may also specify this option via the LUNANODE_KEY_ID environment variable.", required=false)] /// The API id string as used by LunaNode. This should be exactly 16 bytes. This will get enforced at a later date. pub api_id: String, #[serde(skip)] - #[clap(long, takes_value=true, env="LUNANODE_API_KEY", help="The Lunanode API key received from the dashboard.", long_help="The Lunanode API key recieved from the dashboard. This option may also be set by the LUNANODE_API_KEY environemnt variable.", required=false, min_values=0, max_values=1, multiple_values=false)] + #[clap(long, env="LUNANODE_API_KEY", help="The Lunanode API key received from the dashboard.", long_help="The Lunanode API key recieved from the dashboard. This option may also be set by the LUNANODE_API_KEY environemnt variable.", required=false)] /// Used for convenience. It is not serialized nor deserializes; this means that this object can NOT be deserialized at all, since this is not an Option. /// This is used to fill in the api_paritlakey field, and to give the request a way to access the api key locally. pub api_key: String, - #[clap(long, takes_value=true, env="LUNANODE_API_PARTIALKEY", help="The Lunanode API key received from the dashboard, but only the first 64 bytes of it.", long_help="The Lunanode API key recieved from the dashboard. This option may also be set by the LUNANODE_API_PARTIALKEY environemnt variable. This should be autogenerated based on the LUNANODE_API_KEY, but it isn't. TODO.", required=false, min_values=0, max_values=1, multiple_values=false)] + #[clap(long, env="LUNANODE_API_PARTIALKEY", help="The Lunanode API key received from the dashboard, but only the first 64 bytes of it.", long_help="The Lunanode API key recieved from the dashboard. This option may also be set by the LUNANODE_API_PARTIALKEY environemnt variable. This should be autogenerated based on the LUNANODE_API_KEY, but it isn't. TODO.", required=false)] /// The api_paritalkey field as used by LunaNode (the first 64 bytes of the api_key). Note that this field is autofilled. /// Since this should always be a 64 byte array, this will be enforced at some point in the future. TODO pub api_partialkey: String,