2 releases

0.2.2 May 17, 2022
0.2.1 Aug 31, 2021

#37 in #totp


Used in 2 crates (via steam-mobile)

MIT license

19KB
396 lines

SteamHelper-rs

SteamHelper is (in the future) a modular Rust alternative to popular libraries as C# SteamRE/SteamKit, node.js DoctorMcKay/node-steam-client, and Python ValvePython/steam, to enable interaction with the Steam Network through an easy to follow API.

It can be used to create bots, automate profiles, the possibilities are endless.

The library needs contributors. Check issues that need help and send those PRs in! To learn more about how Steam works, check here.

Crates:

Stable:

  • Steam Trading: Create/Accept/Deny trade offers and confirm them through mobile;
  • Steam Mobile: Generate mobile 2FA codes (library/cli), Register 2FA (library/cli);
  • Tappet: Typed wrapper around Steam Web API. Allows late injection of api key and client reuse. Ergonomic;

Progress Paused:

  • Steam Client: Same functionality as desktop client, go online, answer to messages, etc. Still very WIP;

License

This project is licensed under the MIT license.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in SteamHelper by you, shall be licensed as MIT, without any additional terms or conditions.


lib.rs:

Direct port of DoctorMcKay/node-steam-totp

This crate generates Steam 2FA auth codes for a shared secret. It currently requires nightly Rust.

Example

use steam_totp::{Time,Secret,generate_auth_code};

#
let time = Time::with_offset().await?;
let shared_secret = Secret::from_hex("deadbeefcafe")?;
let auth_code = generate_auth_code(shared_secret, time);

println!("{}", auth_code);  // Will print a 5 character code similar to "R7VRC"
#

Dependencies

~5–17MB
~228K SLoC