arthurfiorette / steam-trader Goto Github PK
View Code? Open in Web Editor NEW๐ Trade items smartly with multiple automated steam accounts at the same time!
Home Page: https://arthur.run/steam-trader
License: GNU General Public License v3.0
๐ Trade items smartly with multiple automated steam accounts at the same time!
Home Page: https://arthur.run/steam-trader
License: GNU General Public License v3.0
Probably only possible when Steam WEB API is successfully implemented
This issue has been automatically created by todo-actions based on a TODO comment found in web/src/components/accounts/util.ts:3. It will automatically be closed when the TODO comment is removed from the default branch (main).
[start:app] "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _process=require("process");var _steamTotp=_interopRequireDefault(require("steam-totp"));var _steamTradeofferManager=_interopRequireDefault(require("steam-tradeoffer-manager"));var _steamUser=_interopRequireDefault(require("steam-user"));var _steamcommunity=_interopRequireDefault(require("steamcommunity"));var _logger=_interopRequireDefault(require("../logger"));var _updater=require("../server/socket/updater");var _currency=require("../steam/currency");var _processor=_interopRequireDefault(require("../transactions/processor"));var _serializer=require("./serializer");var Account=function(){function Account(options){var _this=this;(0,_classCallCheck2["default"])(this,Account);this.options=options;(0,_defineProperty2["default"])(this,"client",new _steamUser"default");(0,_defineProperty2["default"])(this,"community",new _steamcommunity"default");(0,_defineProperty2["default"])(this,"manager",new _steamTradeofferManager"default");(0,_defineProperty2["default"])(this,"trader",new _processor"default");(0,_defineProperty2["default"])(this,"logger",void 0);(0,_defineProperty2["default"])(this,"login",function(){_this.logger.info('Attempting to logging In');if(_this.online){_this.logger.warn('Login attempt, but we are already logged in');return;}_this.client.logOn({accountName:_this.options.login.username,password:_this.options.login.password,twoFactorCode:_this.getAuthCode(),machineName:'steam-trader'});});(0,_defineProperty2["default"])(this,"logoff",function(){_this.logger.info("Attempting to log Off");if(!_this.online){_this.logger.warn('Logoff attempt, but we are already logged off');return;}_this.client.logOff();});(0,_defineProperty2["default"])(this,"onLoggedOn",function(_details,_parental){_this.logger.info('We logged in');_this.client.setPersona(1);if(_this.options.status.gameId!==-1){_this.client.gamesPlayed(Number(_this.options.status.gameId));}_this.update();});(0,_defineProperty2["default"])(this,"onDisconnect",function(resultId,msg){_this.logger.info("We logged off (".concat(resultId,"): ").concat(msg));_this.update();});(0,_defineProperty2["default"])(this,"onWebSession",function(_sessionId,cookies){_this.logger.debug('Started web session, delivering cookies');_this.manager.setCookies(cookies,undefined,undefined);_this.community.setCookies(cookies);_this.community.startConfirmationChecker(11000,_this.options.login.identity);});(0,_defineProperty2["default"])(this,"onSteamGuard",function(){var _ref=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee(_domain,callback){var auth;return _regenerator["default"].wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:auth=_this.getAuthCode();_context.next=3;return callback(auth);case 3:_this.logger.debug("Requested steam guard. Returned ".concat(auth));case 4:case"end":return _context.stop();}}},_callee);}));return function(_x,_x2){return _ref.apply(this,arguments);};}());(0,_defineProperty2["default"])(this,"onWallet",function(_hasWallet,currencyId){var name=_currency.CurrencyId[currencyId];if(!name){throw new Error("Currency ".concat(currencyId," unrecognized"));}_this.logger.debug("The currency used is '".concat(name,"'"));_this.options.status.currency=namename;});(0,_defineProperty2["default"])(this,"onError",function(err){_this.logger.error("Occurred an error on the last operation: ".concat(err));});(0,_defineProperty2["default"])(this,"getAuthCode",function(){var sharedSecret=_this.options.login.sharedSecret;var auth=_steamTotp["default"].generateAuthCode(sharedSecret);_this.logger.debug("Requested steam guard auth code '".concat(auth,"'"));return auth;});(0,_defineProperty2["default"])(this,"onNewOffer",function(){var _ref2=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee2(offer){return _regenerator["default"].wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:_this.trader.begin(offer);case 1:case"end":return _context2.stop();}}},_callee2);}));return function(_x3){return _ref2.apply(this,arguments);};}());(0,_defineProperty2["default"])(this,"update",function(){(0,_process.nextTick)(function(){return(0,_updater.update)(_this);});});(0,_defineProperty2["default"])(this,"serialize",function(){return(0,_serializer.serializer)(_this);});this.logger=(0,_logger["default"])(options.login.username);this.logger.info("'".concat(options.login.username,"' was created, waiting for login..."));this.client.on('webSession',this.onWebSession);this.client.on('wallet',this.onWallet);this.client.on('error',this.onError);this.client.on('loggedOn',this.onLoggedOn);this.client.on('disconnected',this.onDisconnect);this.client.on('steamGuard',this.onSteamGuard);this.manager.on('newOffer',this.onNewOffer);}(0,_createClass2["default"])(Account,[{key:"online",get:function get(){return!!this.client.steamID;}}]);return Account;}();exports["default"]=Account;
[start:app]
[start:app]
[start:app] Error: Currency 0 unrecognized
[start:app] at SteamUser. (\steam-trader-main\app\build\accounts\account.js:1:3783)
[start:app] at SteamUser.emit (node:events:513:28)
[start:app] at SteamUser. (\steam-trader-main\app\node_modules\steam-user\components\account.js:207:7)
[start:app] at D:\CSGO FARM\steam-trader-main\app\node_modules\steam-user\components\classes\HandlerManager.js:37:12[start:app] at Array.forEach ()
[start:app] at HandlerManager.emit (\steam-trader-main\app\node_modules\steam-user\components\classes\HandlerManager.js:36:12)
[start:app] at SteamUser._handleMessage (\steam-trader-main\app\node_modules\steam-user\components\messages.js:631:24)
[start:app] at SteamUser._handleNetMessage (\steam-trader-main\app\node_modules\steam-user\components\messages.js:552:7)
[start:app] at SteamUser._processMulti (\steam-trader-main\app\node_modules\steam-user\components\messages.js:676:8)
[start:app] at processTicksAndRejections (node:internal/process/task_queues:96:5)
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[start:app] error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[start:app] error Command failed with exit code 1.
[start:app] yarn run start:app exited with code 1
The accounts/account.tsx and trades/item.tsx images could be standardized (bootstrap '.img-thumbnail' ??) and extracted to a dedicated file.
This issue has been automatically created by todo-actions based on a TODO comment found in web/src/components/accounts/account.tsx:63. It will automatically be closed when the TODO comment is removed from the default branch (main).
This issue has been automatically created by todo-actions based on a TODO comment found in web/src/components/trades/trade.tsx:5. It will automatically be closed when the TODO comment is removed from the default branch (main).
This issue has been automatically created by todo-actions based on a TODO comment found in app/src/server/index.ts:16. It will automatically be closed when the TODO comment is removed from the default branch (main).
This issue has been automatically created by todo-actions based on a TODO comment found in web/src/components/accounts/account.tsx:26. It will automatically be closed when the TODO comment is removed from the default branch (main).
The problem after compiling the image and starting it, an error is returned that the module 'src/steam/currency'
cannot be found:
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module 'src/steam/currency'
Require stack:
- /usr/local/steam-trader/app/build/transactions/logic/calculatePrices.js
- /usr/local/steam-trader/app/build/transactions/logic/index.js
- /usr/local/steam-trader/app/build/transactions/processor.js
- /usr/local/steam-trader/app/build/accounts/account.js
- /usr/local/steam-trader/app/build/accounts/controller.js
- /usr/local/steam-trader/app/build/server/routes/users.js
- /usr/local/steam-trader/app/build/server/routes/index.js
- /usr/local/steam-trader/app/build/server/index.js
- /usr/local/steam-trader/app/build/server/socket/transport.js
- /usr/local/steam-trader/app/build/logger.js
- /usr/local/steam-trader/app/build/ads.js
- /usr/local/steam-trader/app/build/index.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/usr/local/steam-trader/app/build/transactions/logic/calculatePrices.js:1:437)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/usr/local/steam-trader/app/build/transactions/logic/calculatePrices.js',
'/usr/local/steam-trader/app/build/transactions/logic/index.js',
yarn run v1.22.5
$ node build/index.js
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
'/usr/local/steam-trader/app/build/transactions/processor.js',
'/usr/local/steam-trader/app/build/accounts/account.js',
'/usr/local/steam-trader/app/build/accounts/controller.js',
'/usr/local/steam-trader/app/build/server/routes/users.js',
'/usr/local/steam-trader/app/build/server/routes/index.js',
'/usr/local/steam-trader/app/build/server/index.js',
'/usr/local/steam-trader/app/build/server/socket/transport.js',
'/usr/local/steam-trader/app/build/logger.js',
'/usr/local/steam-trader/app/build/ads.js',
'/usr/local/steam-trader/app/build/index.js'
]
}
error Command failed with exit code 1.
It would be nice if the user could change the price source. Type to use with the backpack.tf api and so on.
In some DoctorMcKay node-steam-* repo I saw a complete implementation
https://github.com/DoctorMcKay
Here are all steam codes:
This issue has been automatically created by todo-actions based on a TODO comment found in app/src/steam/currency.ts:59. It will automatically be closed when the TODO comment is removed from the default branch (main).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.