npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@dedwatson/steam-mobile-confirmations

v1.1.2

Published

An updated trade-confirmation module for node-steam with support socks5 proxy

Downloads

2

Readme

node-steam-mobile-confirmations

A pure JS library for accepting mobile confirmations. This is a better, more updated version of GaletskyIvan's older module.

Add support socks proxy.

Currently a work-in-progress.

Functionality

This will aim to:

  • Fetch mobile confirmations
  • Accept / Deny confirmations
  • Accept / Deny multi-confirmations
  • ...have good documentation

Installation

In the near future, you'll be able to do this: npm install steam-mobile-confirmations

Usage

Instantiate a SteamMobileConfirmations object, with the required defaults (keep reading for more detail):

var SteamMobileConfirmations = require('steam-mobile-confirmations');
var steamConfirmations = new SteamMobileConfirmations({
  steamId: steamId64,
  identitySecret: identitySecret,
  webCookie: webCookie
});

Obtain session information with node-steam and its plugin steam-weblogon

Examples

Coming soon.

Methods

The options param of all methods is an object. All callbacks are supplied with Error as the first argument, or null if no errors occurred.

constructor(options)

This sets up all final values, and should only be called once.

Options:

  • steamId is a valid SteamID64
  • identitySecret is the secret key used for generating confirmation codes. (not the one used for generating login codes)
  • webCookie is the cookies we need for interacting with steam. Fetch them from the modules mentioned above.
  • deviceId (optional) is the device id used for all calls. Starts with android: - one will be generated if you do not provide one.
  • steamOffset (optional) is the time offset between you and steam. This is highly recommended to be provided, as not providing it can cause avoidable errors. You can find this by running getTimeOffset() from the node-steam-totp module. (Use the returned offset value)
  • waitTime (optional) is how long (in milliseconds) the module will wait if it encounters an error before trying again. (Defaults to 10000)

updateCookies(webCookie)

This method updates the current session / cookies currently in use. Run this after the error needsNewSession is emitted.

webCookie can be obtained using node-steam and its plugin steam-weblogon

fetchConfirmations(callback)

Returns all currently outstanding (active) confirmations.

The second argument to callback will be an array of Confirmation objects.

acceptConfirmation(confirmation, callback)

This accepts a confirmation (or array of confirmations) from the fetchConfirmations() call. If an error occurs while accepting, it tries once more before erroring.

The second argument to callback will be a success boolean. (true for confirmed, false for error.)

getConfirmationTradeId(confirmation, callback)

You will likely not need to use this, since the trade offer ID is already included in the Confirmation object.

This will only fetch the confirmation information again, and then return the trade offer ID.

The second argument to callback will be the tradeId, fetched from Valve.

Events

'needsNewSession'

This is called when Steam returns a specific error, and your Steam Community session needs to be re-connected. Re-run steam-weblogon, and then call updateCookies() with the new cookies.

No calls will be made to Steam until you have called updateCookies()

License

MIT