{"_id":"@dedwatson/steam-mobile-confirmations","_rev":"1-b4f8344569296b9d7176b7e4944a7202","name":"@dedwatson/steam-mobile-confirmations","dist-tags":{"latest":"1.1.2"},"versions":{"1.1.2":{"name":"@dedwatson/steam-mobile-confirmations","description":"An updated trade-confirmation module for node-steam with support socks5 proxy","version":"1.1.2","author":{"name":"Kirill Kuznetsov"},"repository":{"type":"git","url":"git+https://github.com/dedwatson/node-steam-mobile-confirmations.git"},"license":"MIT","dependencies":{"cheerio":"^0.22.0","request":"^2.79.0","steam-totp":"^1.4.0","underscore":"^1.8.3"},"bugs":{"url":"https://github.com/dedwatson/node-steam-mobile-confirmations/issues"},"homepage":"https://github.com/dedwatson/node-steam-mobile-confirmations#readme","main":"index.js","devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"gitHead":"ca5e8a7fa17d83bb6c66f9cabdf10e2e71638071","_id":"@dedwatson/steam-mobile-confirmations@1.1.2","_nodeVersion":"10.16.3","_npmVersion":"6.13.6","dist":{"integrity":"sha512-vYiYXPs5FO3OGOChhkl/juZ9hqrTNvgjEZHwDY1vpEg6rXm4W2U6s3QMIfNs6n33Kjv8NzH/CkkHuapunLRRcA==","shasum":"2855fe9c020a730be365c51c86e90a0c9c944d4c","tarball":"https://registry.npmjs.org/@dedwatson/steam-mobile-confirmations/-/steam-mobile-confirmations-1.1.2.tgz","fileCount":5,"unpackedSize":18470,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeLEMoCRA9TVsSAnZWagAAx3gP/i/0JLZ8S21RKcSC6F2G\nCPqHlLfMM5X6ByOzGNQO3V3Pmf9Wy+SBNfzrIuahSS/OJueeE7hYbYu78p+H\n/ZDHaFt0RaY5+yEZbOzPBh+eY4nmeaIBM8yYTipRYBOtpw331jNJhc9AHsu4\nug4hD4he9fBi7bxJ0rgH/spHU1Xj1YL7Wg5797WXWUmT7+G57dozpUrWdQQU\nBPMKAwI5iZV+whSv6j4uLChGGpUIDQPQfDertQpFxOMPJLHTbzJd3YFqso6O\nt+gEmOCRWLXhZ7F2biQIgHh2fnHa4GbOXbcgiB+3L3wQGuCsuO1D8R5dE+fN\nvocArGfqjnxgcz0ycs1VssK/+HqN4M/6S9xCFIDTJ4BvPV5VqoHBzFkqmYs/\nqSKT12V/fgdKJCdPg63cJWB0vsbUZmg1PiRyTCCkDyP1khYPRPfH94Jlamzh\nL2A41Aowx6OfX6ALUkFkq6yvl5jFJOAPI/JR0vgieu5lNPzRKdwSyCzKAC84\nKK3HTbdRSRQouEVdWoCFbUw82DbBCa28PI0D4piYlvVCquKqd5kvqSnt0yxG\nsqnQr6U6bjBpEb2Y8FLjMMErKceVJj5tjSVmrES7VheyXB60//v8z5E7/ZtD\njYhbAGcxRYb7kZd2QbLBXE6PuH8QW5F2yYPCfTZqV8Y6BzGT8aDS75WiORRR\nEQpH\r\n=+w5L\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFb5sOPQ4qtU1jRO/f9jS6CF6wyp8Sg4Ma27OfjseXHRAiBeAhexSKmtONTRhf4N3oaXaggukQ0SfZISYntsga/INg=="}]},"maintainers":[{"name":"dedwatson","email":"cirilcuz@gmail.com"}],"_npmUser":{"name":"dedwatson","email":"cirilcuz@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/steam-mobile-confirmations_1.1.2_1579959079765_0.3500844305742723"},"_hasShrinkwrap":false}},"time":{"created":"2020-01-25T13:31:19.736Z","1.1.2":"2020-01-25T13:31:19.873Z","modified":"2022-04-05T03:35:08.130Z"},"maintainers":[{"name":"dedwatson","email":"cirilcuz@gmail.com"}],"description":"An updated trade-confirmation module for node-steam with support socks5 proxy","homepage":"https://github.com/dedwatson/node-steam-mobile-confirmations#readme","repository":{"type":"git","url":"git+https://github.com/dedwatson/node-steam-mobile-confirmations.git"},"author":{"name":"Kirill Kuznetsov"},"bugs":{"url":"https://github.com/dedwatson/node-steam-mobile-confirmations/issues"},"license":"MIT","readme":"# node-steam-mobile-confirmations\nA pure JS library for accepting mobile confirmations. This is a better, more updated version of [GaletskyIvan's older module](https://github.com/GaletskyIvan/steamcommunity-mobile-confirmations).\n\nAdd support socks proxy.\n\n**Currently a work-in-progress.**\n\n## Functionality\nThis will aim to:\n\n* Fetch mobile confirmations\n* Accept / Deny confirmations\n* Accept / Deny multi-confirmations\n* ...have good documentation\n\n## Installation\nIn the near future, you'll be able to do this:\n`npm install steam-mobile-confirmations`\n\n## Usage\nInstantiate a SteamMobileConfirmations object, with the required defaults (keep reading for more detail):\n```js\nvar SteamMobileConfirmations = require('steam-mobile-confirmations');\nvar steamConfirmations = new SteamMobileConfirmations({\n  steamId: steamId64,\n  identitySecret: identitySecret,\n  webCookie: webCookie\n});\n```\n\nObtain session information with [node-steam](https://github.com/seishun/node-steam) and its plugin [steam-weblogon](https://github.com/Alex7Kom/node-steam-weblogon)\n\n## Examples\nComing soon.\n\n## Methods\nThe `options` param of all methods is an object. All callbacks are supplied with `Error` as the first argument, or `null` if no errors occurred.\n\n## constructor(options)\nThis sets up all final values, and should only be called **once**.\n\nOptions:\n* `steamId` is a valid SteamID64\n* `identitySecret` is the secret key used for generating confirmation codes. (_not_ the one used for generating login codes)\n* `webCookie` is the cookies we need for interacting with steam. Fetch them from the modules mentioned above.\n* `deviceId` (optional) is the device id used for all calls. Starts with `android:` - one will be generated if you do not provide one.\n* `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](https://github.com/DoctorMcKay/node-steam-totp) module. (Use the returned `offset` value)\n* `waitTime` (optional) is how long (in milliseconds) the module will wait if it encounters an error before trying again. (Defaults to `10000`)\n\n### updateCookies(webCookie)\nThis method updates the current session / cookies currently in use. Run this after the error `needsNewSession` is emitted.\n\n`webCookie` can be obtained using [node-steam](https://github.com/seishun/node-steam) and its plugin [steam-weblogon](https://github.com/Alex7Kom/node-steam-weblogon)\n\n### fetchConfirmations(callback)\nReturns all currently outstanding (active) confirmations.\n\nThe second argument to `callback` will be an array of [Confirmation](https://github.com/luop90/node-steam-mobile-confirmations/wiki/CConfirmation) objects.\n\n### acceptConfirmation(confirmation, callback)\nThis accepts a confirmation (or array of confirmations) from the fetchConfirmations() call. If an error occurs while accepting, it tries once more before erroring.\n\nThe second argument to `callback` will be a success boolean. (`true` for confirmed, `false` for error.)\n\n### getConfirmationTradeId(confirmation, callback)\n**You will likely not need to use this**, since the trade offer ID is already included in the [Confirmation](https://github.com/luop90/node-steam-mobile-confirmations/wiki/CConfirmation) object.\n\nThis will only fetch the confirmation information again, and then return the trade offer ID.\n\nThe second argument to `callback` will be the tradeId, fetched from Valve.\n\n## Events\n### 'needsNewSession'\nThis is called when Steam returns a specific error, and your Steam Community session needs to be re-connected. Re-run [steam-weblogon](https://github.com/Alex7Kom/node-steam-weblogon), and then call `updateCookies()` with the new cookies.\n\nNo calls will be made to Steam until you have called `updateCookies()`\n\n## License\nMIT\n","readmeFilename":"README.md"}