stm

steam-tradeoffer-manager

Simple and sane Steam trade offer management

Showing:

100 Versions

2.10.3

  • Fixed deprecation warning

2.10.2

  • Added body property to some Error objects
    • This property may be undefined, string, or object (it's an object if the response was valid JSON)

2.10.1

  • Removed anonymous usage statistics reporting

2.10.0

2.9.5

  • Fixed crash resulting from malformed pollData json on disk (#280)

2.9.4

  • Now returns a "Not Logged In" error if you try to get your own inventory contents without yet being logged in
  • Updated EResult

2.9.3

  • Ignore responses from the WebAPI that indicate they failed but actually seem to contain valid data

2.9.2

  • Fixed cancelTime not being able to be set for offers that need to be confirmed

2.9.1

  • Fixed problems with poll timers at startup (PRs #237, #238)
  • Updated getOfferToken to use node-steamcommunity's new getTradeURL method
  • Updated EResult

2.9.0

  • Added disk persistence, which reduces memory usage for the asset cache (when a language is set in the constructor)
  • Added constructor options: dataDirectory, gzipData, savePollData

2.8.1

  • Standardized EconItem tag data
  • Restored market_fee_app in EconItem objects if it's missing and shouldn't be

2.8.0

  • In getExchangeDetails output, if you have a language set in your constructor, item objects will be EconItem objects with item description details
  • Fixed market_actions in EconItem objects being an object with numeric keys instead of an array

2.7.5

  • Fixed Chinese languages not working
    • Use tzh for traditional Chinese
    • Use szh for simplified Chinese
  • Fixed item descriptions retrieved using getUserInventoryContents not being localized in selected language

2.7.4

2.7.3

  • Added id property to objects pushed to itemsToGive and itemsToReceive when building a trade offer (PR #225)
  • Made the TradeOffer class exportable for use with Bluebird (PR #227)
    • This still isn't officially supported and may break in the future if you rely on it
  • Updated getExchangeDetails to use new WebAPI method which has greater reliability

2.7.2

  • Fixed callback not being fired if accepting a trade offer when the web session has expired (thanks to @eblanshey in PR #223)

2.7.1

  • Fixed getExchangeDetails not taking into account 2-day hold periods
  • All data associated with a trade offer will now be returned when you call data() without any arguments (thanks to @Johnix1337 in PR #211)

2.7.0

  • Added OfferLimitExceeded and ItemServerUnavailable offer failure causes

2.6.1

  • Fixed v2.6.0 crashing the application immediately after being required

2.6.0

2.5.0

  • Added argument to doPoll to trigger at full update (thanks @blazej00 in PR #189)
  • Removed unnecessary clone dependency
  • Added TradeOfferManager#getInventoryContents, TradeOfferManager#getUserInventoryContents, and TradeOffer#getPartnerInventoryContents
  • TradeOfferManager#loadInventory, TradeOfferManager#loadUserInventory, and TradeOffer#loadPartnerInventory are all deprecated now and will be removed in a future release.

2.4.0

  • Updated dependencies
  • Added skipStateUpdate argument to TradeOffer#accept (thanks @tuktun in PR #180)

2.3.3

  • Disabled automatic poll data cleanup for now due to issues in Steam's API

2.3.2

  • Fixed crash resulting from HTTP error when sending offer (fixes DoctorMcKay/node-steamcommunity#131)

2.3.1

  • Fixed some cryptic errors that result from trying to send/accept an offer while not logged in

2.3.0

  • Added realTimeTradeConfirmationRequired and realTimeTradeCompleted events

2.2.3

  • Now checks timestamps before purging old trade offers
  • Fixed a problem with trade offer purging

2.2.2

  • Fixed issue where Active offers could be prematurely cleared from poll data

2.2.1

  • Fixed an issue where crafted names could cause false err.cause values

2.2.0

  • Added avatar URLs to getUserDetails

2.1.0

  • Added ability to supply Family View PIN to setCookies
  • Fixed callback never firing to parentalUnlock if there was no error

2.0.1

  • Fixed a crash when adding item descriptions (thanks to @deStrO in PR #150)
  • Fixed getOfferToken after Valve broke it

2.0.0

There are many breaking changes in v2, so please update your code accordingly.

  • BREAKING Node.js v4 or later is now required and TradeOfferManager will not run on lower versions of Node
  • BREAKING Removed message and token arguments from TradeOffer#send
    • See below for how you can specify a trade offer message and/or token now
  • BREAKING Removed autoRetry from TradeOffer#accept
    • The functionality has been removed entirely
  • BREAKING Removed getEscrowDuration from both TradeOfferManager and from TradeOffer
    • Use getUserDetails instead (see below)
  • BREAKING Removed TradeOfferManager.getStateName and EResult.getName
    • Use TradeOfferManager.ETradeOfferState[value] and TradeOfferManager.EResult[value] instead, respectively
  • BREAKING Removed obsolete and unofficial enum values (such as EConfirmationMethod.Mobile and ETradeOfferState.EmailPending)
  • Added value-to-name mappings to bundled enums (except EOfferFilter) so you can do ESomeEnum[value] directly to get its string representation
  • Added TradeOffer#setMessage
  • Added TradeOffer#setToken
  • You can now provide trade tokens directly in TradeOfferManager#createOffer
  • You can now use trade URLs instead of SteamIDs in TradeOfferManager#createOffer
  • Added TradeOffer#getUserDetails
    • Replaces TradeOfferManager#getEscrowDuration and TradeOffer#getEscrowDuration
  • Added offerList event
  • Now uses gzip compression in WebAPI responses
  • Improved some security by running remote JavaScript from steamcommunity.com in VMs instead of using eval() directly
  • Some of the simpler dependencies (languages, deep-equal, clone) are now bundled in the npm download
  • Added a possible fix for known offers being reported as unknown (thanks @kinsi55 in PR #147)

2.0.0-beta2

  • Fixed internal references to now-removed ETradeOfferState.PendingConfirmation

2.0.0-beta1

This is the first beta release of TradeOfferManager v2. There are many breaking changes, so please update your code accordingly.

You can install it using npm install steam-tradeoffer-manager@beta.

  • BREAKING Node.js v4 or later is now required and TradeOfferManager will not run on lower versions of Node
  • BREAKING Removed message and token arguments from TradeOffer#send
    • See below for how you can specify a trade offer message and/or token now
  • BREAKING Removed autoRetry from TradeOffer#accept
    • The functionality has been removed entirely
  • BREAKING Removed getEscrowDuration from both TradeOfferManager and from TradeOffer
    • Use getUserDetails instead (see below)
  • BREAKING Removed TradeOfferManager.getStateName and EResult.getName
    • Use TradeOfferManager.ETradeOfferState[value] and TradeOfferManager.EResult[value] instead, respectively
  • BREAKING Removed obsolete and unofficial enum values (such as EConfirmationMethod.Mobile and ETradeOfferState.EmailPending)
  • Added value-to-name mappings to bundled enums (except EOfferFilter) so you can do ESomeEnum[value] directly to get its string representation
  • Added TradeOffer#setMessage
  • Added TradeOffer#setToken
  • You can now provide trade tokens directly in TradeOfferManager#createOffer
  • You can now use trade URLs instead of SteamIDs in TradeOfferManager#createOffer
  • Added TradeOffer#getUserDetails
    • Replaces TradeOfferManager#getEscrowDuration and TradeOffer#getEscrowDuration
  • Added offerList event
  • Now uses gzip compression in WebAPI responses
  • Improved some security by running remove JavaScript from steamcommunity.com in VMs instead of using eval() directly
  • Some of the simpler dependencies (languages, deep-equal, clone) are now bundled in the npm download

1.22.3

  • Fixed TradeOffer#update() not updating the state property, causing "Unknown state 2" errors when accepting offers (thanks @someazndude in PR #137)
  • Fixed some offers events being delayed by about a minute

1.22.2

  • Fixed isGlitched always returning true if the manager isn't requesting descriptions (i.e. no language is set)
    • This should fix sentOfferChanged and receivedOfferChanged not being emitted

1.22.1

  • Added some debug logging to try to track down missing events

1.22.0

  • Added ability to pass pollData to constructor (thanks @lootmarket via PR #125)
  • Added TradeOffer#isGlitched method
  • Added TradeOffer#containsItem method
  • Added TradeOfferManager#getOffersContainingItems (issue #128)
  • Fixed EOfferFilter.All not working properly
  • Fixed TradeOffer#state not being updated when an offer is canceled or declined
  • Fixed missing var declaration which caused issues in strict mode (thanks @kryogenic via PR #127)
  • Only properties which might change are now updated when TradeOffer#update is called, unless the offer is glitched

1.21.4

  • An Error will now be thrown if you try to create a new TradeOffer using an invalid SteamID
  • getOffers will now fail if any offer is missing an accountid_other
  • Updated SteamID to v1.0.0

1.21.3

  • Fixed "Data temporarily unavailable error" when there are no offers to return to getOffers

1.21.2

  • Fixed an issue where particular offers would break getOffers entirely
    • Apparently some (valid) offers can be empty, because Steam

1.21.1

  • Fixed an issue which caused offers to be pruned from poll data prematurely

1.21.0

  • When an offer is successfully accepted, a poll is done immediately so as to expedite the emit of receivedOfferChanged

1.20.4

  • Fixed crash when cleaning up an old offer ID and we have no offers of a kind (sent/received) (issue #109)

1.20.2

  • Fixed an issue where offer send/accept errors resulted in "HTTP error 500" instead of the Steam error message

1.20.1

  • Fixed issues which could cause events to be missed entirely for offers (thanks to @someazndude in PR #110)

1.20.0

  • Now uses node-steamcommunity's unified HTTP interface
  • Added a more specific error message for when Steam sends back {"success":false} in response to a trade receipt request (previously "No session")
  • Added community constructor option

1.20.0-beta2

  • Fixed POST API methods not working

1.20.0-beta1

  • Use the beta steamcommunity HTTP request interface

1.19.2

  • Fixed a polling crash introduced in v1.19.1

1.19.0

  • Added globalAssetCache option
  • Added getActions argument to getReceivedItems
  • Old offers are now cleaned from poll data to reduce memory usage (thanks to @Cohedrin in PR #94)
  • Updated storehouse examples with trade confirmations (thanks to @Aareksio in PR #100 and #101)

1.18.1

  • Fixed possible rate condition where a poll could happen after the manager shuts down

1.18.0

  • Added loadUserInventory method to get the inventory of any user (thanks to @kaikash in PR #68)
  • To prepare for future additions, steam-tradeoffer-manager now suggests that you use node v4.0.0 or later

1.17.1

  • Fixed error sending trade offers if you pass in item data in a type that Steam doesn't expect

1.17.0

  • Added return values to addMyItem, addMyItems, addTheirItem, addTheirItems (thanks @andrewda in PR #66)
  • (Inherited from steamcommunity) Now uses gzip for all HTTP requests

1.16.4

  • Fixed check for item already in trade (thanks @andrewda in PR #64)

1.16.3

  • Fixed callback to setCookies not being optional

1.16.2

  • Added some more info to getOffers failures

1.16.1

  • Fixed errors when requesting descriptions for many unique items at once; this affected very large offers (issue #58)

1.16.0

  • Added TradeOffer#rawJson property
  • Added cancelOfferCount and cancelOfferCountMinAge constructor options/TradeOfferManager properties
  • Added reason argument to sentOfferCanceled event
  • Fixed case where the callback to TradeOffer#cancel could fire twice on failure (issue #52)

1.15.1

  • Fixed multilingual support (issue #48)

1.15.0

  • Added TradeOffer#duplicate method
  • Added TradeOffer#update method
    • This is now called before the callback of TradeOffer#accept on success, so the new offer data will be completely accurate
    • This fixes escrowed trades not appearing as InEscrow after you accept them, and populates the escrowEnds property
  • Fixed the confirmationMethod property always being null

1.14.1

  • Fixed crash related to escrow (thanks @lincsanders in PR #41)

1.14.0

  • Added TradeOffer#getEscrowDuration (issue #38)
  • Added pendingCancelTime option and sentPendingOfferCanceled event (issue #39)
  • Fixed inability to cancel unsent-but-needs-confirmation offers
  • Fixed cancelTime using created time instead of updated time

1.13.1

  • Fixed incorrect No session error in getReceivedItems

1.13.0

  • Updated ETradeOfferState and EConfirmationMethod with official Valve values and new InEscrow value
  • Added escrowEnds property to TradeOffer

1.12.0

  • Added getEscrowDuration method to TradeOfferManager

1.11.0

  • Updated EResult
  • Added confirmationMethod property to TradeOffer
    • Added EConfirmationMethod
  • Added 3-second delay between offers are created and unknownOfferSent is emitted

1.10.1

  • After unknownOfferSent is fired, offers are recorded so it isn't fired again in the future

1.10.0

1.9.2

  • Fixed TradeOffer#data not setting data properly if the offer was already sent

1.9.1

  • Fixed TradeOffer#data not retrieving data properly

1.9.0

  • Added TradeOffer#data method which can be used to associate arbitrary data with an offer across callbacks and app sessions
    • This feature allows you to set a custom cancelTime per-offer
  • Fixed TradeOfferManager polling on trigger before an API key is available

1.8.5

  • Hopefully fixed a case where some changed offers can be missed

1.8.4

  • Will now return an Error if we attempt to call the API before we have our key (thanks @kinsi55 in PR #11)
  • Fixed inability to call getReceivedItems in callback of TradeOffer#accept (fixes #14)

1.8.3

  • Fixed support for Steam currencies

1.8.2

  • Fixed TradeOffer#loadPartnerInventory crashing (bug introduced in 1.8.0)

1.8.1

  • Fixed items returned by TradeOffer#getReceivedItems not being EconItem objects

1.8.0

All item objects are now instances of an EconItem class

1.7.0

  • Added shutdown method

1.6.3

  • Fixed problem when passing null for token in TradeOffer#send
  • The pollData event is now only emitted when the data changes

1.6.2

  • Fixed crash when removing items from offers

1.6.1

  • Removed support for item announcement-based polling for node-steam.
    • This still works for node-steam-user.
    • This was modifying the prototype, and was therefore causing problems.
    • It also wasn't properly checking if the object passed into steam was a node-steam SteamUser or a node-steam-user SteamUser.
    • Thanks to @kinsi55 for reporting this.

1.6.0

  • Added steamID property to TradeOfferManager
  • Added manager property to TradeOffer
  • Added removeMyItem, removeMyItems, removeTheirItem, removeTheirItems methods to TradeOffer
  • Added pollInterval property to TradeOfferManager
  • Added cancelTime property to TradeOfferManager
  • Fixed not being able to use items with a contextid or assetid of 0

1.5.2

  • Updated dependency versions

1.5.1

  • Fixed EOfferFilter.All not working
  • Fixed first poll using current time instead of 0 (so no new offers will be found on the first poll)
  • Disabled protobuf requests for GetTradeOffers for now, as the message structure is incorrect
    • Protobuf responses are still enabled

1.5.0

  • If Steam returns an error message when loading inventories, that message will now be exposed to the callback
  • Now uses protobuf API requests and responses, which are more bandwidth efficient
  • All items will now have both id and assetid properties
  • Fixed item announcement-based polling for node-steam 0.6.x

1.4.0

1.3.0

  • Added cause parameter to Error events received in TradeOffer#send or TradeOffer#accept, if cause is known and no eresult is available
  • Module will no longer continually attempt to retry accepting offers if the failure cause is known

1.2.4

  • Fixed trade token regex in getOfferToken not including dash

1.2.3

  • Fixed trade offer token regex in getOfferToken not including underscore (thanks to @kinsi55 in pull request #8)

1.2.2

  • Bumped required steamcommunity version
    • Fixes issues where a poll would fail and never resume

1.2.1

  • Added support for node-steam 1.0.0 and node-steam-user.

1.2.0

1.1.0

  • Added EResult enum
  • Added eresult property to various Error objects returned in callbacks

0.1.9

  • Backported the fix from v1.0.2 to v0.1.x.

1.0.2

  • Fixed an issue where an outstanding poll timer wouldn't be cleared before creating a new one

0.1.8

1.0.1

  • HTTP errors returned by TradeOffer#getReceivedItems will now be of the format HTTP error xxx instead of just xxx, which is consistent with the rest of the module.