1.1.1 • Published 6 years ago

@sulphate/steamlogin v1.1.1

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

A simple wrapper around Dr. McKay's steammcommunity and steam-tradeoffer-manager NPM packages to create a single-method log-on system for multiple Steam accounts.

Installation

npm install @sulphate/steamlogin

About

This package will most likely not be useful to you, it's very specific and made mostly for personal convenience uses. It logs into Steam using a given accounts file, and sets up a trade manager for each one, all with one line. It uses McKay's steamcommunity, steam-totp and steam-tradeoffer-manager packages.

Usage

  • Create a file called accounts.json in your project root folder.
  • The format of the file should be as follows:
{
    "accounts": [
        {
            "accountName": "Steam Username",
            "password": "Password",
            "sharedSecret": "Shared Secret",
            "identitySecret": "Optional Identity Secret"
        }
    ]
}

Note: The identity secret will be added to the returned object for each account, which can be used to confirm trade offers and other confirmations.

  • Require/import the package:
// ES6
import SteamLogin from "@sulphate/steamlogin";

// ES5
const SteamLogin = require("@sulphate/steamlogin");
  • Call the SteamLogin#login() function to log in to your Steam accounts. A promise is returned as this function is asynchronous
// Async/Await
let loggedInAccounts = await SteamLogin.login();

// Promises
SteamLogin.login().then(accounts => {
    // Do something with the accounts.
}, err => {
    // Handle the error.
});
  • The returned object contains the logged-in steamcommunity and steam-tradeoffer-manager instances, accessible by the account name that it corresponds to.
  • The community instance is under accounts[accountName].community, and the manager instance is under accounts[accountName].manager. The identity secret is the same, but .identitySecret.

  • Finally, you can pass in an instance of coloured-logger (package) and it will use it instead of default console logging.

1.1.1

6 years ago

1.1.0

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago