JSPM

node-steam-key

1.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q29079F
  • License MIT

Exposes an API for activating game/CD keys through the Steam client.

Package Exports

  • node-steam-key

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (node-steam-key) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

node-steam-key

Exposes an API to activate game/CD keys on Steam via NodeJS.

Notice

By using this library, I (Joshua Ferrara) am relieved of any legal issues you run into while using this library. This library is purely for educational purposes. Activating Steam keys via an unofficial API is a touchy subject and is most likely frowned upon. Keep this in mind while using this library.

Finally, I do not provide any support for this library. Use at your own risk. Feel free to make any pull requests, though.

Usage

Initialize a SteamRegistrar object and call the methods below on the created object. Refer to example.js for a full example.

Methods

activateKey(string key, function(purchaseResponse)) - Sends a request to activate a product key. Listen for the purchaseResponse event or provide a callback. If a callback is provided, the purchaseResponse event will NOT be emitted.
SteamRegistrar.activateKey("AAAAA-BBBBB-CCCCC", function(purchaseResponse) {
  [...]
});

Events

purchaseResponse - emitted in reponse to activateKey(string key).

An eresult of 1 seems to be a valid activation, while an eresult of anything else might be invalid. I've set any integers to be zeroes in the event they contain sensitive information. I have no concrete idea as to what these numbers mean - if anyone has an idea, feel free to edit the README and make a pull request.

{ eresult: 2,
  purchase_result_details: 14,
  purchase_receipt_info:
   { MessageObject:
      { TransactionID: [Object],
        paymentMethod: 00000000,
        PurchaseStatus: 00000000,
        ResultDetail: 000000000,
        BasePrice: 0,
        TotalDiscount: 0,
        Tax: 0,
        Shipping: 0,
        CurrencyCode: 0,
        TransactionTime: -0000000000,
        PackageID: -1,
        ErrorHeadline: '',
        ErrorString: '',
        ErrorLinkText: '',
        ErrorLinkURL: '' } } }

License

MIT