Gathering detailed insights and metrics for waxpeer
Gathering detailed insights and metrics for waxpeer
Gathering detailed insights and metrics for waxpeer
Gathering detailed insights and metrics for waxpeer
Waxpeer module that makes it easy to sell your items via p2p system
npm install waxpeer
Typescript
Module System
Node Version
NPM Version
Updated on 19 Oct 2024
TypeScript (100%)
Cumulative downloads
Total Downloads
Last day
-31.9%
Compared to previous day
Last week
13.5%
Compared to previous week
Last month
-7.1%
Compared to previous month
Last year
31.6%
Compared to previous year
8
3
Waxpeer API wrapper for Node.js
Full API documentation here
Trade websocket documentation here
Now in order to go online and sell items safely you need to implement the following logic:
user_change
event, in which can_p2p
indicates whether you are online or not when it is changed by p2p controller.source
parameter on the authentification event (auth
) without which the account will not be able to get online (example: "source": "myAwesomeProject").1$ npm install waxpeer
1import { Waxpeer, TradeWebsocket, WebsiteWebsocket } from 'waxpeer'; 2 3//API wrapper 4const WP = new Waxpeer(WAXPEER_API); 5 6const tokenUpd = await WP.UserSteamToken( 7 btoa( 8 'eyAidHlwIjogIkpXVCIsICJhbGciOiAiRWREU0EiIH0.eyAiaXfsd23123123.2B9wKjf2323-S3i3ctdCg', //your Steam access token, which must be valid for more than an hour (the token is active only 24 hours after refreshing in Steam) and belong to the account from which you are trying to go online. 9 ), 10 ); 11if (!tokenUpd?.success) //most likely you need to refresh access token and try again with a new token 12//Trade websocket 13const TS = new TradeWebsocket(STEAM_API, STEAM_ID, TRADELINK, WAX_API, ACCESS_TOKEN); //auto connect after init. At least one of [STEAM_API, WAX_API, ACCESS_TOKEN] is required! 14// const TS = new TradeWebsocket(null, STEAM_ID, TRADELINK, WAX_API); //example with waxApi to be able sell from limited account BUT not Rust game 15// const TS = new TradeWebsocket(null, STEAM_ID, TRADELINK, null, ACCESS_TOKEN); //example with waxApi to be able sell from limited account BUT not Rust game 16 17TS.disconnectWss(); //disconnect 18TS.connectWss(); //connect 19TS.on('user_change', ({can_p2p}: TradeWebsocketChangeUser) => { //new online change event 20 console.log(can_p2p); //example: true 21}); 22TS.on('send-trade', (message: TradeWebsocketCreateTradeData) => { 23 console.log(message); 24 //you create a trade in steam and have a tradeid from Steam response 25 const callback = await WP.steamTrade(tradeid, message.waxid); 26 if(!callback?.success) //if the response is not successful (success is false) you need to update your Steam access token and cancel the trade (if it was created) without performing mobile confirmation. 27 //if the answer is successful, you can do mobile confirmation 28}); 29 30//Website websocket 31const WS = new WebsiteWebsocket(WAXPEER_API, ['csgo']); //auto connect after init 32WS.disconnectWss(); //disconnect 33WS.connectWss(); //connect
1const user = await WP.getProfile(); 2console.log(user);
1const history = WP.myHistory(0, '2022-11-11', '2022-12-12', 'DESC'); 2console.log(history);
1let data = await WP.changeTradeLink('https://steamcommunity.com/tradeoffer/new/?partner=900267897&token=P2YkRJOk'); 2console.log(data);
1let data = await WP.setMyKeys('11EDA9771EB4A200B579A530009CC000'); 2console.log(data);
1const purchase = await WP.buyItemWithId(17441538677, 798500, 'oFvyi0Ma', '378049039'); 2console.log(purchase);
1const purchase = await WP.buyItemWithName( 2 'AK-47 | Redline (Field-Tested)', 3 15000, 4 'oFvyi0Ma', 5 '378049039', 6 null, 7 'csgo', 8); 9console.log(purchase);
1const items = await WP.getPrices('csgo'); 2console.log(items);
1const items = await WP.getPricesDopplers('any'); 2console.log(items);
1const items = await WP.massInfo(['AK-47 | Redline (Field-Tested)', 'csgo']); 2console.log(items);
1const items = await WP.searchItems(['AK-47 | Redline (Field-Tested)', 'csgo']); 2console.log(items);
1const items = await WP.customTradeRequest(['my_id_1', 'my_id_2']); 2console.log(items);
1const items = await WP.tradeRequestStatus(['12345', '23456']); 2console.log(items);
1const items = await WP.checkItemAvailability(['17441538677', '17441538678']); 2console.log(items);
1const data = await WP.validateTradeLink('https://steamcommunity.com/tradeoffer/new/?partner=900267897&token=P2YkRJOk'); 2console.log(data);
1const data = await WP.getHistory('153912146', 'ssR242yo'); 2console.log(data);
1const data = await WP.readyToTransferP2P('11EDA9771EB4A200B579A530009CC000'); 2console.log(data);
1const data = await WP.checkWssUser('765611983383140000'); 2console.log(data);
1const data = await WP.editItems([{ item_id: 1, price: 1 }], 'csgo'); 2console.log(data);
1const data = await WP.fetchInventory('csgo'); 2console.log(data);
1const data = await WP.getMyInventory(0, 'csgo'); 2console.log(data);
1const data = await WP.myListedItems('csgo'); 2console.log(data);
1const data = await WP.listItemsSteam([{ item_id: 1, price: 1 }], 'csgo'); 2console.log(data);
1const data = await WP.removeItems([1, 2, 3, 4]); 2console.log(data);
1const data = await WP.removeAll('csgo'); 2console.log(data);
1const data = await WP.buyOrderHistory(0, 'csgo'); 2console.log(data);
1const data = await WP.buyOrders(0, 'AK-47 | Redline (Field-Tested)', '1', 'csgo'); 2console.log(data);
1const data = await WP.createBuyOrder('AK-47 | Redline (Field-Tested)', 5, 15000, 'csgo'); 2console.log(data);
1const data = await WP.editBuyOrder(123, 5, 1000); 2console.log(data);
1const data = await WP.removeBuyOrder([1, 2, 3]); 2console.log(data);
1const data = await WP.removeAllOrders('csgo'); 2console.log(data);
1const data = await WP.getItemsList(0, null, 'knife', 'DESC'); 2console.log(data);
1const data = await WP.getSteamItems(730); 2console.log(data);
1const data = await WP.getMerchantUser('76561198000000000', 'my_merchant'); 2console.log(data);
1const data = await WP.postMerchantUser( 2 'my_merchant', 3 'https://steamcommunity.com/tradeoffer/new/?partner=900267897&token=P2YkRJOk', 4 '76561198000000000', 5); 6console.log(data);
1const data = await WP.MerchantInventoryUpdate('76561198000000000', 'my_merchant'); 2console.log(data);
1const data = await WP.MerchantInventory('76561198000000000', 'my_merchant', 730); 2console.log(data);
1const data = await WP.MerchantListItemsSteam('my_merchant', '76561198000000000', [{ item_id: 1, price: 1 }]); 2console.log(data);
1const data = await WP.MerchantDepositsHistory( 2 'my_merchant', 3 '76561198000000000', 4 'aaabe17b-dddd-4444-affd-dcad3fa6fbbe', 5); 6console.log(data);
1TS.on('send-trade', (message: TradeWebsocketCreateTradeData) => { 2 console.log(message); 3}); 4TS.on('cancelTrade', (message: TradeWebsocketCancelTradeData) => { 5 console.log(message); 6}); 7TS.on('accept_withdraw', (message: TradeWebsocketAcceptWithdrawData) => { 8 console.log(message); 9}); 10TS.on('user_change', ({ can_p2p }: TradeWebsocketChangeUser) => { 11 console.log(can_p2p); //example: true 12});
1//manual sub events [csgo,rust,tf2,dota2] 2WS.on('new', (message: IInventoryEmit) => { 3 console.log(message); //waxpeer new item event 4}); 5WS.on('update', (message: IInventoryEmit) => { 6 console.log(message); //waxpeer item removed event 7}); 8WS.on('removed', (message: IInventoryEmit) => { 9 console.log(message); //waxpeer item removed event 10}); 11 12//auto sub after auth 13WS.on('change_user', (message: ChangeUserEvent) => { 14 if (message.name === 'wallet') console.log(message); // user change event 15}); 16WS.on('steamTrade', (message: SteamTrade) => { 17 console.log(message); //waxpeer trade event 18});
1try { 2 let user = await WP.getProfile(); 3 console.log(user); 4} catch (e) { 5 let timeout = axios.isCancel(e) ? true : false; 6 let response = e?.response?.data; 7 let status_code = e?.response?.status; 8 console.log({ timeout, status_code, response }); //{ timeout: false, status_code: 403, response: { success: false, msg: 'wrong api' } } 9}
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 9/12 approved changesets -- score normalized to 7
Reason
4 existing vulnerabilities detected
Details
Reason
2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More