Balance-Wingman Send shares on win to Vaulet

Every time you win a bet the script sends your desired % to the Vaulet

目前為 2020-08-06 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name Balance-Wingman Send shares on win to Vaulet
  3. // @description Every time you win a bet the script sends your desired % to the Vaulet
  4. // @description Create your acc here to support my work https://stake.com/?c=263733c1bc
  5. // @version 1.3
  6. // @author Dauersendung
  7. // @namespace https://greasyfork.org/de/users/444902-dauersendung
  8. // @match https://stake.com/*
  9. // @run-at document-start
  10. // ==/UserScript==
  11.  
  12. var oldBal = 0;
  13. var accessToken = localStorage.getItem('session').replace(/"/g, '');
  14.  
  15. function depositBal(depositAmount) {
  16. var data = [
  17. {
  18. operationName: "CreateVaultDeposit",
  19. query: "mutation CreateVaultDeposit($amount: Float!, $currency: CurrencyEnum!) { createVaultDeposit(amount: $amount, currency: $currency) { id amount currency user { id balances { available { amount currency __typename } vault { amount currency __typename } __typename } __typename } __typename } } ",
  20. variables: {
  21. amount: depositAmount,
  22. currency: "xrp", // you need to replace your playing currency here like: "xrp" "trx" "btc" "doge" "eos" "eth" "ltc" "bch"
  23. }
  24. }
  25. ]
  26. return fetch("https://api.stake.com/graphql", {
  27. "credentials": "omit",
  28. "headers": {
  29. "content-type": "application/json",
  30. 'x-access-token': accessToken,
  31. 'x-lockdown-token': undefined
  32. },
  33. "referrer": "https://stake.com/?currency=xrp&modal=vault&operation=deposit", // you need to replace your playing currency here like: "xrp" "trx" "btc" "doge" "eos" "eth" "ltc" "bch"
  34. "body": JSON.stringify(data),
  35. "method": "POST",
  36. "mode": "cors"
  37. });
  38. }
  39.  
  40. function checkBalance() {
  41. var curBalEle = document.querySelector(".styles__Cashier-puey40-2.dMSTdD .styles__Content-rlm06o-1.ixoRjG");
  42. if (!curBalEle) return false;
  43.  
  44. var curBal = curBalEle.innerText;
  45. if (!curBal) return false;
  46.  
  47. if (curBal > oldBal) {
  48. var depositAmount = ((curBal - oldBal)*0.20); // set the % to send here 0.2 = 20 %
  49. depositBal(depositAmount).then(() => oldBal = curBalEle.innerText);
  50. }
  51. }
  52.  
  53. window.setInterval(checkBalance, 3300);