├── .gitignore ├── README.md ├── build ├── auth │ ├── KeyAuth.js │ └── checkKey.js ├── config.json ├── main.js ├── modules │ ├── compute.js │ ├── config.js │ ├── fetch_token.js │ ├── get_accounts.js │ ├── get_keypair.js │ ├── pool_keys.js │ ├── send_transaction.js │ └── swap.js └── utils.js ├── package-lock.json ├── package.json ├── src ├── auth │ ├── KeyAuth.js │ └── checkKey.js ├── main.ts ├── modules │ ├── compute.ts │ ├── config.ts │ ├── fetch_token.ts │ ├── get_accounts.ts │ ├── get_keypair.ts │ ├── pool_keys.ts │ ├── send_transaction.ts │ └── swap.ts └── utils.ts └── tsconfig.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | ## Installation 3 | 4 | 1. Clone this repository to your local machine. 5 | 2. Navigate to the cloned directory . 6 | 3. Install dependencies using your package manager of choice: `npm install` or `yarn install`. 7 | 8 | 9 | ## Verbose Manual 10 | 11 | Go to `Sniper Mode` => `usage` 12 | 13 | ## Usage: 14 | start Application: `npm run start`. 15 | 16 | ## Config 17 | 18 | All configurations should prefereably be done inside the settings menu of the application. 19 | 20 | # Contributing 21 | 22 | Contributions are welcome! If you find a bug or want to enhance the application, feel free to create an issue or submit a pull request. 23 | 24 | -------------------------------------------------------------------------------- /build/auth/KeyAuth.js: -------------------------------------------------------------------------------- 1 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 2 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 3 | return new (P || (P = Promise))(function (resolve, reject) { 4 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 5 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 6 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 7 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 8 | }); 9 | }; 10 | //* Importing ExecSync from "child_process" *// 11 | const { execSync } = require('child_process'); 12 | //* Importing Axios *// 13 | const axios = require('axios'); 14 | //* Importing OS *// 15 | const os = require('os'); 16 | //* Import FS *// 17 | const fs = require("fs"); 18 | //* KeyAuth Class *// 19 | class KeyAuth { 20 | /** 21 | * @param {string} [name] - The name of the application 22 | * @param {string} [ownerId] - The ownerId of the application 23 | * @param {string} [secret] - The secret of the application 24 | * @param {string} [version] - The version of the application 25 | **/ 26 | constructor(name, ownerId, secret, version) { 27 | /** 28 | * Initializes the connection with KeyAuth in order to use any of the functions 29 | **/ 30 | this.Initialize = () => new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { 31 | const post_data = { 32 | type: 'init', 33 | ver: this.version, 34 | name: this.name, 35 | ownerid: this.ownerId 36 | }; 37 | const Json = yield this.make_request(post_data); 38 | if (Json === 'KeyAuth_Invalid') { 39 | Misc.error('Invalid Application, please check your application details.'); 40 | } 41 | if (!Json.success || Json.success == false) { 42 | return resolve(false); 43 | } 44 | this.app_data = Json.appinfo; 45 | this.sessionid = Json.sessionid; 46 | this.initialized = true; 47 | resolve(true); 48 | })); 49 | /** 50 | * Registers the user using a license and gives the user a subscription that matches their license level 51 | * @param {string} [username] - The username for the user 52 | * @param {string} [password] - The password for the user 53 | * @param {string} [license] - The License Key for the sub 54 | **/ 55 | this.register = (user, password, license, email = "") => new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { 56 | this.check_initialize(); 57 | let hwId; 58 | if (!hwId) { 59 | hwId = Misc.GetCurrentHardwareId(); 60 | } 61 | const post_data = { 62 | type: 'register', 63 | username: user, 64 | pass: password, 65 | email, 66 | key: license, 67 | hwid: hwId, 68 | sessionid: this.sessionid, 69 | name: this.name, 70 | ownerid: this.ownerId 71 | }; 72 | const Json = yield this.make_request(post_data); 73 | this.Load_Response_Struct(Json); 74 | if (Json.success) { 75 | this.Load_User_Data(Json.info); 76 | return resolve(Json.message); 77 | } 78 | else { 79 | Misc.error(Json.message); 80 | } 81 | })); 82 | this.forgot = (username, email) => new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { 83 | this.check_initialize(); 84 | const post_data = { 85 | type: 'forgot', 86 | username, 87 | email, 88 | sessionid: this.sessionid, 89 | name: this.name, 90 | ownerid: this.ownerId 91 | }; 92 | const Json = yield this.make_request(post_data); 93 | this.Load_Response_Struct(Json); 94 | })); 95 | /** 96 | * Authenticates the user using their username and password 97 | * @param {string} [username] - The username for the user 98 | * @param {string} [password] - The password for the user 99 | **/ 100 | this.login = (username, password) => new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { 101 | this.check_initialize(); 102 | let hwId; 103 | if (!hwId) { 104 | hwId = Misc.GetCurrentHardwareId(); 105 | } 106 | const post_data = { 107 | type: 'login', 108 | username, 109 | pass: password, 110 | hwid: hwId, 111 | sessionid: this.sessionid, 112 | name: this.name, 113 | ownerid: this.ownerId 114 | }; 115 | const Json = yield this.make_request(post_data); 116 | this.Load_Response_Struct(Json); 117 | if (Json.success && Json.success == true) { 118 | this.Load_User_Data(Json.info); 119 | return resolve(Json); 120 | } 121 | else { 122 | Misc.error(Json.message); 123 | } 124 | })); 125 | /** 126 | * Authenticate without using usernames and passwords 127 | * @param {string} [key] - Licence used to login with 128 | **/ 129 | this.license = (key) => new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { 130 | this.check_initialize(); 131 | let hwId; 132 | if (!hwId) { 133 | hwId = Misc.GetCurrentHardwareId(); 134 | } 135 | const post_data = { 136 | type: 'license', 137 | key, 138 | hwid: hwId, 139 | sessionid: this.sessionid, 140 | name: this.name, 141 | ownerid: this.ownerId 142 | }; 143 | const Json = yield this.make_request(post_data); 144 | this.Load_Response_Struct(Json); 145 | if (Json.success && Json.success == true) { 146 | this.Load_User_Data(Json.info); 147 | return resolve(Json); 148 | } 149 | else { 150 | Misc.error(Json.message); 151 | } 152 | })); 153 | /** 154 | * Gives the user a subscription that has the same level as the key 155 | * @param {string} [username] - Username of the user thats going to get upgraded 156 | * @param {string} [license] - License with the same level as the subscription you want to give the user 157 | **/ 158 | this.upgrade = (username, license) => new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { 159 | this.check_initialize(); 160 | const post_data = { 161 | type: 'upgrade', 162 | username, 163 | key: license, 164 | sessionid: this.sessionid, 165 | name: this.name, 166 | ownerid: this.ownerId 167 | }; 168 | const Json = yield this.make_request(post_data); 169 | this.Load_Response_Struct(Json); 170 | if (!Json.success || Json.success == false) { 171 | return resolve(Json.message); 172 | } 173 | else { 174 | // Don't let them yet for dashboard. 175 | Misc.error(Json.message); 176 | } 177 | })); 178 | /** 179 | * Gets an existing global variable 180 | * @param {string} [VarId] - Name of the variable / Variable ID 181 | * returns {string} - The value of the variable / The content of the variable 182 | **/ 183 | this.var = (VarId) => new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { 184 | this.check_initialize(); 185 | const post_data = { 186 | type: 'var', 187 | varid: VarId, 188 | sessionid: this.sessionid, 189 | name: this.name, 190 | ownerid: this.ownerId 191 | }; 192 | const Json = yield this.make_request(post_data); 193 | this.Load_Response_Struct(Json); 194 | if (Json.success && Json.success == true) { 195 | return resolve(Json); 196 | } 197 | resolve(Json.message); 198 | })); 199 | /** 200 | * Gets the an existing user variable 201 | * @Param {string} [VarId] - User Variable Name 202 | * returns {string} - The value of the variable / The content of the user variable 203 | **/ 204 | this.GetVar = (VarId) => new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { 205 | this.check_initialize(); 206 | const post_data = { 207 | type: 'getvar', 208 | var: VarId, 209 | sessionid: this.sessionid, 210 | name: this.name, 211 | ownerid: this.ownerId 212 | }; 213 | const Json = yield this.make_request(post_data); 214 | this.Load_Response_Struct(Json); 215 | if (Json.success && Json.success == true) { 216 | return resolve(Json); 217 | } 218 | resolve(Json.message); 219 | })); 220 | /** 221 | * Change the data of an existing user variable, *User must be logged in* 222 | * @Param {string} [VarId] - User variable name 223 | * @Param {string} [VarData] - The content of the variable 224 | **/ 225 | this.SetVar = (VarId, VarData) => new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { 226 | this.check_initialize(); 227 | const post_data = { 228 | type: 'setvar', 229 | var: VarId, 230 | data: VarData, 231 | sessionid: this.sessionid, 232 | name: this.name, 233 | ownerid: this.ownerId 234 | }; 235 | const Json = yield this.make_request(post_data); 236 | this.Load_Response_Struct(Json); 237 | if (Json.success && Json.success == true) { 238 | return resolve(Json); 239 | } 240 | resolve(Json.message); 241 | })); 242 | /** 243 | * Bans the current logged in user 244 | **/ 245 | this.ban = () => new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { 246 | this.check_initialize(); 247 | const post_data = { 248 | type: 'ban', 249 | sessionid: this.sessionid, 250 | name: this.name, 251 | ownerid: this.ownerId 252 | }; 253 | const Json = yield this.make_request(post_data); 254 | this.Load_Response_Struct(Json); 255 | if (Json.success && Json.success == true) { 256 | return resolve(true); 257 | } 258 | resolve(Json.message); 259 | })); 260 | /** 261 | * KeyAuth acts as proxy and downlods the file in a secure way 262 | * @Param {string} [fileId] - File ID 263 | * @Param {string} [path] - Path to save the file 264 | * @Param {boolean} [execute] - Execute the file after download - Windows Only Requires path for file! 265 | * returns {byte} - Returns The bytes of the download file 266 | **/ 267 | this.file = (fileId, path = null, execute = false) => new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { 268 | this.check_initialize(); 269 | const post_data = { 270 | type: 'file', 271 | fileid: fileId.toString(), 272 | sessionid: this.sessionid, 273 | name: this.name, 274 | ownerid: this.ownerId 275 | }; 276 | const Json = yield this.make_request(post_data); 277 | this.Load_Response_Struct(Json); 278 | if (Json.success && Json.success == true) { 279 | if (path != null) { 280 | var bytes = yield this.strToByteArray(Json.contents); 281 | fs.writeFile(path, bytes, (err) => __awaiter(this, void 0, void 0, function* () { 282 | if (err) 283 | throw err; 284 | if (execute) { 285 | var exec = require('child_process').exec; 286 | yield exec(path, function (error, stdout, stderr) { 287 | if (error) { 288 | console.error(error); 289 | return; 290 | } 291 | }); 292 | return resolve(true); 293 | } 294 | else { 295 | return resolve(true); 296 | } 297 | })); 298 | } 299 | else { 300 | return resolve(this.strToByteArray(Json.contents)); 301 | } 302 | } 303 | resolve(Json.message); 304 | })); 305 | /** 306 | * Sends a request to a webhook that you've added in the dashboard in a safe way without it being showed for example a http debugger 307 | * @Param {string} [webId] - Webhook ID 308 | * @Param {string} [Params] - Webhook Parameters 309 | * @Param {string} [message] - Body of the request, empty by default 310 | * @Param {string} [username] - Content type, empty by default 311 | * Returns {string} - Returns the response of the webhook 312 | **/ 313 | this.webhook = (webId, Params, body = '', contType = '') => new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { 314 | this.check_initialize(); 315 | const post_data = { 316 | type: 'webhook', 317 | webid: webId, 318 | params: Params, 319 | body, 320 | conttype: contType, 321 | sessionid: this.sessionid, 322 | name: this.name, 323 | ownerid: this.ownerId 324 | }; 325 | const Json = yield this.make_request(post_data); 326 | this.Load_Response_Struct(Json); 327 | if (Json.success && Json.success == true) { 328 | return resolve(Json.response); 329 | } 330 | resolve(Json.message); 331 | })); 332 | /** 333 | * Check if the current session is validated or not 334 | * Returns {string} - Returns if the session is valid or not 335 | **/ 336 | this.check = () => new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { 337 | this.check_initialize(); 338 | const post_data = { 339 | type: 'check', 340 | sessionid: this.sessionid, 341 | name: this.name, 342 | ownerid: this.ownerId 343 | }; 344 | const Json = yield this.make_request(post_data); 345 | this.Load_Response_Struct(Json); 346 | if (Json.success && Json.success == true) { 347 | return resolve(Json); 348 | } 349 | ; 350 | resolve(Json.message); 351 | })); 352 | /** 353 | * Checks if the current IP Address/HardwareId is blacklisted 354 | * returns {boolean} - Returns true if the IP Address/HardwareId is blacklisted, otherwise false 355 | **/ 356 | this.checkBlack = () => new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { 357 | this.check_initialize(); 358 | const hwId = Misc.GetCurrentHardwareId(); 359 | const post_data = { 360 | type: 'checkblacklist', 361 | hwid: hwId, 362 | sessionid: this.sessionid, 363 | name: this.name, 364 | ownerid: this.ownerId 365 | }; 366 | const Json = yield this.make_request(post_data); 367 | this.Load_Response_Struct(Json); 368 | if (Json.success && Json.success == true) { 369 | return resolve(true); 370 | } 371 | resolve(false); 372 | })); 373 | /** 374 | * Fetch usernames of online users 375 | * Returns {array} - Returns an array of usernames 376 | **/ 377 | this.fetchOnline = () => new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { 378 | this.check_initialize(); 379 | const post_data = { 380 | type: 'fetchOnline', 381 | sessionid: this.sessionid, 382 | name: this.name, 383 | ownerid: this.ownerId 384 | }; 385 | const Json = yield this.make_request(post_data); 386 | this.Load_Response_Struct(Json); 387 | if (Json.success && Json.success == true) { 388 | return resolve(Json.users); 389 | } 390 | else { 391 | return resolve(Json.message); 392 | } 393 | })); 394 | /** 395 | * Gets the last 20 sent messages of that channel 396 | * @param {string} [ChannelName] - The name of the channel, where you want the messages 397 | * Returns {array} the last 20 sent messages of that channel 398 | **/ 399 | this.ChatGet = (ChannelName) => new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { 400 | this.check_initialize(); 401 | const post_data = { 402 | type: 'chatget', 403 | channel: ChannelName, 404 | sessionid: this.sessionid, 405 | name: this.name, 406 | ownerid: this.ownerId 407 | }; 408 | const Json = yield this.make_request(post_data); 409 | this.Load_Response_Struct(Json); 410 | if (Json.success && Json.success == true) { 411 | if (Json.messages[0].message == 'not_found') { 412 | return resolve([]); 413 | } 414 | else { 415 | return resolve(Json.messages); 416 | } 417 | } 418 | else { 419 | return resolve([]); 420 | } 421 | })); 422 | /** 423 | * Sends a message to the given channel name 424 | * @param {string} [ChannelName] - Channel Name where the message will be sent to 425 | * @param {string} [Message] - Message what will be sent to [ChannelName] 426 | * Returns {bool} - Returns true if the message was sent, otherwise false 427 | **/ 428 | this.ChatSend = (ChannelName, Message) => new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { 429 | this.check_initialize(); 430 | const post_data = { 431 | type: 'fetchOnline', 432 | message: Message, 433 | channel: ChannelName, 434 | sessionid: this.sessionid, 435 | name: this.name, 436 | ownerid: this.ownerId 437 | }; 438 | const Json = yield this.make_request(post_data); 439 | this.Load_Response_Struct(Json); 440 | if (Json.success && Json.success == true) { 441 | return resolve(true); 442 | } 443 | else { 444 | return resolve(false); 445 | } 446 | })); 447 | /** 448 | * Logs the IP address,PC Name with a message, if a discord webhook is set up in the app settings, the log will get sent there and the dashboard if not set up it will only be in the dashboard 449 | * @param {string} [message] - Message / Discord Embed Title Message 450 | * Returns None 451 | **/ 452 | this.log = (message) => new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { 453 | this.check_initialize(); 454 | const post_data = { 455 | type: 'log', 456 | pcuser: os.userInfo().username, 457 | message, 458 | sessionid: this.sessionid, 459 | name: this.name, 460 | ownerid: this.ownerId 461 | }; 462 | yield this.make_request(post_data); 463 | resolve(true); 464 | })); 465 | this.strToByteArray = (hex) => new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { 466 | try { 467 | const numberChars = hex.length; 468 | const bytes = new Uint8Array(numberChars / 2); 469 | for (let i = 0; i < numberChars; i += 2) { 470 | bytes[i / 2] = parseInt(hex.substr(i, 2), 16); 471 | } 472 | resolve(bytes); 473 | } 474 | catch (err) { 475 | console.error('The session has ended, open program again.'); 476 | process.exit(0); 477 | } 478 | })); 479 | if (!(name && ownerId && secret && version)) { 480 | Misc.error('Application not setup correctly.'); 481 | } 482 | this.name = name; 483 | this.ownerId = ownerId; 484 | this.secret = secret; 485 | this.version = version; 486 | this.responseTime = null; 487 | } 488 | ; 489 | /** 490 | * Check if the current session is initialized 491 | * @returns [true] if client is Initialized. 492 | **/ 493 | check_initialize() { 494 | if (!this.initialized) { 495 | Misc.error('You must initialize the API before using it!'); 496 | } 497 | return true; 498 | } 499 | ; 500 | /** 501 | * Load the response struct for Response of Request 502 | **/ 503 | Load_Response_Struct(data) { 504 | this.response = { 505 | success: data.success, 506 | message: data.message 507 | }; 508 | } 509 | ; 510 | /** 511 | * Load the response struct for User Data 512 | **/ 513 | Load_User_Data(data) { 514 | this.user_data = { 515 | username: data.username, 516 | ip: data.ip, 517 | hwid: data.hwid, 518 | createdate: data.createdate, 519 | lastlogin: data.lastlogin, 520 | subscriptions: data.subscriptions 521 | }; 522 | } 523 | ; 524 | /** 525 | * Change Console Application Title 526 | * @param {string} [title] - Your new Title for the App 527 | * Returns Promise Timeout 528 | **/ 529 | setTitle(title) { 530 | process.stdout.write(String.fromCharCode(27) + ']0;' + title + String.fromCharCode(7)); 531 | } 532 | ; 533 | /** 534 | * Sleeping / Timeout Function 535 | * @param {number} [ms] - Time in milliseconds 536 | * Returns Promise Timeout 537 | **/ 538 | sleep(ms) { 539 | return new Promise((resolve) => { 540 | setTimeout(resolve, ms); 541 | }); 542 | } 543 | ; 544 | /** 545 | * Request the API with the POST Data 546 | * @param {string} [data] - Post Data Array 547 | * Returns {array} - Returns the API Response [NON-ENCRYPTED] 548 | **/ 549 | make_request(data) { 550 | const startTime = Date.now(); // Start the stopwatch 551 | return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { 552 | const request = yield axios({ 553 | method: 'POST', 554 | url: 'https://keyauth.win/api/1.1/', 555 | data: new URLSearchParams(data).toString() 556 | }).catch((err) => { 557 | Misc.error(err); 558 | }); 559 | const endTime = Date.now(); // Stop the stopwatch 560 | this.responseTime = `${endTime - startTime} ms`; 561 | if (request && request.data) { 562 | resolve(request.data); 563 | } 564 | else { 565 | resolve(null); 566 | } 567 | ; 568 | })); 569 | } 570 | } 571 | class Misc { 572 | /** 573 | * Get the current user HardwareId 574 | * @returns {string} - Returns user HardwareID 575 | **/ 576 | static GetCurrentHardwareId() { 577 | if (os.platform() != 'win32') 578 | return false; 579 | const cmd = execSync('wmic useraccount where name="%username%" get sid').toString('utf-8'); 580 | const system_id = cmd.split('\n')[1].trim(); 581 | return system_id; 582 | } 583 | ; 584 | /** 585 | * Error Print Function 586 | * @param {string} [message] - Message to Show and then exit app. 587 | **/ 588 | static error(message) { 589 | console.log(message); 590 | return process.exit(0); 591 | } 592 | } 593 | /** 594 | * Export KeyAuth Class to be used in other files 595 | **/ 596 | module.exports = KeyAuth; 597 | -------------------------------------------------------------------------------- /build/auth/checkKey.js: -------------------------------------------------------------------------------- 1 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 2 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 3 | return new (P || (P = Promise))(function (resolve, reject) { 4 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 5 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 6 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 7 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 8 | }); 9 | }; 10 | const KeyAuth = require('./KeyAuth'); 11 | const readline = require("readline"); 12 | const moment = require("moment"); 13 | const CRL = readline.createInterface({ input: process.stdin, output: process.stdout }); 14 | const KeyAuthApp = new KeyAuth("DexSpyder", "8d7VumkIWc", "86342a655b33a96164cf9899837d05e20b8e568bacbd414c3a3839c21dab7eab", // Application Secret 15 | "1.0"); 16 | (() => __awaiter(this, void 0, void 0, function* () { 17 | yield KeyAuthApp.Initialize(); 18 | yield KeyAuthApp.check(); 19 | yield KeyAuthApp.sleep(1200); 20 | var license = ""; 21 | yield CRL.question("License : ", (lic) => __awaiter(this, void 0, void 0, function* () { 22 | license = lic; 23 | yield KeyAuthApp.license(license); 24 | if (KeyAuthApp.response.status == "failed") { 25 | console.log(KeyAuthApp.response.message); 26 | process.exit(0); 27 | } 28 | console.log(KeyAuthApp.response.message); 29 | yield CRL.question("Press any key to continue...", () => __awaiter(this, void 0, void 0, function* () { 30 | console.clear(); 31 | })); 32 | })); 33 | }))(); 34 | -------------------------------------------------------------------------------- /build/config.json: -------------------------------------------------------------------------------- 1 | {"webhook_url":"None","rpc_endpoint":"https://white-quiet-glitter.solana-mainnet.quiknode.pro/2d4bcbb69148d23b481215ff6c3776ecb183f698/","wallet":"2tRxLG6a5dWmrAi4TdFS9KtGo5VEFBNtpA79P3cB163n74Mzkgaws4cUncDzFd9HwTAJdikWMugKZ7FY31mwEFnB","slippage":5,"license":"ZeNA-dN2b-cUVu-zr1A"} -------------------------------------------------------------------------------- /build/main.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 3 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 4 | return new (P || (P = Promise))(function (resolve, reject) { 5 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 6 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 7 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 8 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 9 | }); 10 | }; 11 | var __importDefault = (this && this.__importDefault) || function (mod) { 12 | return (mod && mod.__esModule) ? mod : { "default": mod }; 13 | }; 14 | Object.defineProperty(exports, "__esModule", { value: true }); 15 | const readline_1 = __importDefault(require("readline")); 16 | const utils_1 = __importDefault(require("./utils")); 17 | const chalk_1 = __importDefault(require("chalk")); 18 | const config_1 = require("./modules/config"); 19 | const fs_1 = __importDefault(require("fs")); 20 | const cli_spinners_1 = __importDefault(require("cli-spinners")); 21 | const fetch_token_1 = require("./modules/fetch_token"); 22 | const request_1 = require("request"); 23 | const hwid_1 = require("hwid"); 24 | const get_keypair_1 = require("./modules/get_keypair"); 25 | const web3_js_1 = require("@solana/web3.js"); 26 | const pool_keys_1 = require("./modules/pool_keys"); 27 | const compute_1 = require("./modules/compute"); 28 | const swap_1 = require("./modules/swap"); 29 | const get_accounts_1 = require("./modules/get_accounts"); 30 | //control variables 31 | var choice = 0; 32 | //key auth instance 33 | //spinner function 34 | const Spinner = cli_spinners_1.default.dots4; 35 | let i = 0; 36 | let animationInterval; 37 | const updateSpinner = () => { 38 | const frame = Spinner.frames[i % Spinner.frames.length]; 39 | process.stdout.cursorTo(0); 40 | process.stdout.write('\t' + frame); 41 | i++; 42 | }; 43 | const startSpinner = () => { 44 | animationInterval = setInterval(updateSpinner, Spinner.interval); 45 | }; 46 | const stopSpinner = () => { 47 | clearInterval(animationInterval); 48 | process.stdout.clearLine(0); 49 | process.stdout.cursorTo(0); 50 | }; 51 | //creating interface 52 | const rl = readline_1.default.createInterface({ 53 | input: process.stdin, 54 | output: process.stdout 55 | }); 56 | //clearing-resetting screen 57 | function clear_screen() { 58 | console.clear(); 59 | } 60 | //sleep function 61 | function sleep(ms) { 62 | return new Promise(resolve => setTimeout(resolve, ms)); 63 | } 64 | //saving license for ease of use 65 | function save_license(new_license) { 66 | var config_txt = fs_1.default.readFileSync('config.json', 'utf8'); 67 | var config_obj = JSON.parse(config_txt); 68 | //updating config 69 | config_obj.license = new_license; 70 | //writing new config 71 | const new_config = JSON.stringify(config_obj); 72 | fs_1.default.writeFileSync('config.json', new_config); 73 | } 74 | //authenticating 75 | function verify_license(license) { 76 | return __awaiter(this, void 0, void 0, function* () { 77 | startSpinner(); 78 | // post request to URL: 79 | // https://api.cactusweb.io/api/v1/devices 80 | // Headers: 81 | // content-type: application/json 82 | // Body: 83 | // { 84 | // key: '[licenseKey]', 85 | // device: '[deviceId]', 86 | // id: '6473bfaa496af9a7ca1291c6' 87 | // } 88 | let hwid = yield (0, hwid_1.getHWID)(); 89 | const options = { 90 | url: 'https://api.cactusweb.io/api/v1/devices', 91 | headers: { 92 | 'content-type': 'application/json' 93 | }, 94 | body: { 95 | key: license, 96 | device: hwid, 97 | id: '6473bfaa496af9a7ca1291c6' 98 | }, 99 | json: true 100 | }; 101 | (0, request_1.post)(options, (err, res, body) => { var res; return __awaiter(this, void 0, void 0, function* () { 102 | if (err) { 103 | console.error('Error, please try again later'); 104 | throw err; 105 | } 106 | res = res; 107 | if (res.statusCode == 200) { 108 | stopSpinner(); 109 | console.log(chalk_1.default.green("\n\tLicense Verified!")); 110 | save_license(license); 111 | yield sleep(1500); 112 | main(); 113 | } 114 | else { 115 | stopSpinner(); 116 | console.log(chalk_1.default.red("\n\tInvalid License!")); 117 | yield sleep(1500); 118 | process.exit(0); 119 | } 120 | }); }); 121 | // if (res.statusCode == 200) { 122 | // stopSpinner() 123 | // console.log(chalk.green("\n\tLicense Verified!")); 124 | // save_license(license); 125 | // await sleep(1500); 126 | // main(); 127 | // } else { 128 | // stopSpinner() 129 | // console.log(chalk.red("\n\tInvalid License!")); 130 | // await sleep(1500); 131 | // process.exit(0); 132 | // } 133 | }); 134 | } 135 | //program start 136 | //initial authentication 137 | //(async () => { 138 | // 139 | // startSpinner() 140 | // stopSpinner() 141 | // 142 | // var config_txt = fs.readFileSync('config.json','utf8'); 143 | // var config_obj:config = JSON.parse(config_txt); 144 | // const license = config_obj.license; 145 | // if (license != ''){ 146 | // await verify_license(license) 147 | // }else{ 148 | // rl.question("\tLicense : ", async (lic) => { 149 | // await verify_license(lic); 150 | // }); 151 | // } 152 | //})(); 153 | main(); 154 | function start_swapping(connection, is_snipe, amount_in, pool, slip, owner) { 155 | return __awaiter(this, void 0, void 0, function* () { 156 | console.log(chalk_1.default.greenBright('\tinputs valid\n')); 157 | console.log(chalk_1.default.white(`\t[1] - ${chalk_1.default.blueBright(is_snipe ? 'Snipe' : 'Sell')}`)); 158 | console.log(chalk_1.default.white('\t[2] - Return')); 159 | rl.question(`\n\t${is_snipe ? '[Sniper]' : '[Exit Position]'} - choice: `, (answer) => __awaiter(this, void 0, void 0, function* () { 160 | const ans = parseInt(answer); 161 | if (ans == 1) { 162 | finished = false; 163 | const SwapSpinner = cli_spinners_1.default.dots4; 164 | let i = 0; 165 | let animationInterval; 166 | const updateSwapSpinner = () => { 167 | const frame = Spinner.frames[i % Spinner.frames.length]; 168 | process.stdout.cursorTo(0); 169 | process.stdout.write(chalk_1.default.blueBright('\tSwapping' + frame)); 170 | i++; 171 | }; 172 | const startSwapSpinner = () => { 173 | animationInterval = setInterval(updateSwapSpinner, SwapSpinner.interval); 174 | }; 175 | const stopSwapSpinner = () => { 176 | clearInterval(animationInterval); 177 | process.stdout.clearLine(0); 178 | process.stdout.cursorTo(0); 179 | }; 180 | startSpinner(); 181 | var finished = false; 182 | const pool_keys = yield (0, pool_keys_1.fetchPoolKeys)(connection, new web3_js_1.PublicKey(pool)); 183 | var token_in_key; 184 | var token_out_key; 185 | if (is_snipe) { 186 | token_in_key = pool_keys.quoteMint; 187 | token_out_key = pool_keys.baseMint; 188 | } 189 | else { 190 | token_in_key = pool_keys.baseMint; 191 | token_out_key = pool_keys.quoteMint; 192 | } 193 | while (!finished) { 194 | const computation = yield (0, compute_1.compute)(connection, pool_keys, token_in_key, token_out_key, amount_in, slip); 195 | const amountOut = computation[0]; 196 | const minAmountOut = computation[1]; 197 | const currentPrice = computation[2]; 198 | const executionPrice = computation[3]; 199 | const priceImpact = computation[4]; 200 | const fee = computation[5]; 201 | const amountIn = computation[6]; 202 | stopSpinner(); 203 | console.log(`\n\tAmount out: ${amountOut.toFixed()},\n\tMin Amount out: ${minAmountOut.toFixed()}`); 204 | if (priceImpact.toFixed() > 5) { 205 | console.log(chalk_1.default.red(`\tpriceImpact: ${priceImpact.toFixed()}`)); 206 | } 207 | else if (priceImpact.toFixed() < 5 && priceImpact.toFixed() > 1) { 208 | console.log(chalk_1.default.yellowBright(`\tpriceImpact: ${priceImpact.toFixed()}`)); 209 | } 210 | else { 211 | console.log(chalk_1.default.green(`\tpriceImpact: ${priceImpact.toFixed()}`)); 212 | } 213 | console.log('\n'); 214 | startSwapSpinner(); 215 | const token_accounts = yield (0, get_accounts_1.getTokenAccountsByOwner)(connection, owner.publicKey); 216 | const swap_status = yield (0, swap_1.swap)(connection, pool_keys, owner, token_accounts, is_snipe, amountIn, minAmountOut); 217 | stopSwapSpinner(); 218 | if (swap_status == 0) { 219 | console.log(chalk_1.default.greenBright('\tSwap successful!')); 220 | rl.question("\tpress enter to return..", () => __awaiter(this, void 0, void 0, function* () { 221 | snipe_menu(); 222 | })); 223 | break; 224 | } 225 | else { 226 | console.log(chalk_1.default.red('\tSwap failed, retrying...')); 227 | continue; 228 | } 229 | } 230 | } 231 | else if (ans == 2) { 232 | snipe_menu(); 233 | } 234 | else { 235 | console.log(chalk_1.default.red("\n\tInvalid choice")); 236 | yield sleep(1000); 237 | snipe_menu(); 238 | } 239 | })); 240 | }); 241 | } 242 | function snipe_choice() { 243 | return __awaiter(this, void 0, void 0, function* () { 244 | clear_screen(); 245 | utils_1.default.aff_logo(); 246 | utils_1.default.aff_title(); 247 | utils_1.default.aff_snipe_option(); 248 | const owner = (0, get_keypair_1.get_wallet)('config.json'); 249 | var config_txt = fs_1.default.readFileSync('config.json', 'utf8'); 250 | var config_obj = JSON.parse(config_txt); 251 | const slip = config_obj.slippage; 252 | const connection = new web3_js_1.Connection(config_obj.rpc_endpoint); 253 | rl.question("\n\tPool ID: ", (answer) => __awaiter(this, void 0, void 0, function* () { 254 | const pool = answer; 255 | rl.question("\n\tAmount in(enter 'MAX' for max amount): ", (answer) => __awaiter(this, void 0, void 0, function* () { 256 | console.log('\n\t'); 257 | startSpinner(); 258 | var res; 259 | const amount_in = parseFloat(answer); 260 | const is_max = answer; 261 | const token_amount = yield (0, fetch_token_1.get_token_amount)(pool, true); 262 | stopSpinner(); 263 | if (token_amount == -1) { 264 | console.log(chalk_1.default.red("\n\tInvalid Pool ID or an error has occured.")); 265 | yield sleep(1000); 266 | snipe_menu(); 267 | } 268 | else if (token_amount == -2) { 269 | console.log(chalk_1.default.red("\n\tSol Balance less than 0.01")); 270 | yield sleep(1000); 271 | snipe_menu(); 272 | } 273 | else if (token_amount == 0) { 274 | console.log(chalk_1.default.red("\n\tNo balance found.")); 275 | yield sleep(1000); 276 | snipe_menu(); 277 | } 278 | else { 279 | if (is_max.toUpperCase() == 'MAX') { 280 | if (token_amount < 0.00001) { 281 | console.log(chalk_1.default.red("\n\tInput too small.")); 282 | yield sleep(1000); 283 | snipe_menu(); 284 | } 285 | else { 286 | yield start_swapping(connection, true, token_amount, pool, slip, owner); 287 | } 288 | } 289 | else if (isNaN(amount_in)) { 290 | console.log(chalk_1.default.red("\n\tInvalid Input.")); 291 | yield sleep(1000); 292 | snipe_menu(); 293 | } 294 | else { 295 | if (amount_in > token_amount) { 296 | console.log(chalk_1.default.red("\n\tinsufficient balance.")); 297 | yield sleep(1000); 298 | snipe_menu(); 299 | } 300 | else { 301 | if (amount_in < 0.00001) { 302 | console.log(chalk_1.default.red("\n\tInput too small.")); 303 | yield sleep(1000); 304 | snipe_menu(); 305 | } 306 | else { 307 | yield start_swapping(connection, true, amount_in, pool, slip, owner); 308 | } 309 | } 310 | } 311 | } 312 | })); 313 | })); 314 | }); 315 | } 316 | function sell_choice() { 317 | return __awaiter(this, void 0, void 0, function* () { 318 | clear_screen(); 319 | utils_1.default.aff_logo(); 320 | utils_1.default.aff_title(); 321 | utils_1.default.aff_sell_option(); 322 | const owner = (0, get_keypair_1.get_wallet)('config.json'); 323 | var config_txt = fs_1.default.readFileSync('config.json', 'utf8'); 324 | var config_obj = JSON.parse(config_txt); 325 | const slip = config_obj.slippage; 326 | const connection = new web3_js_1.Connection(config_obj.rpc_endpoint); 327 | rl.question("\n\tPool ID: ", (answer) => __awaiter(this, void 0, void 0, function* () { 328 | const pool = answer; 329 | rl.question("\n\tAmount in(enter 'MAX' for max amount): ", (answer) => __awaiter(this, void 0, void 0, function* () { 330 | console.log('\n\t'); 331 | startSpinner(); 332 | var res; 333 | const amount_in = parseFloat(answer); 334 | const is_max = answer; 335 | const token_amount = yield (0, fetch_token_1.get_token_amount)(pool, false); 336 | stopSpinner(); 337 | if (token_amount == -1) { 338 | console.log(chalk_1.default.red("\n\tInvalid Pool ID or an error has occured.")); 339 | yield sleep(1000); 340 | snipe_menu(); 341 | } 342 | else if (token_amount == -2) { 343 | console.log(chalk_1.default.red("\n\tSol Balance less than 0.01")); 344 | yield sleep(1000); 345 | snipe_menu(); 346 | } 347 | else if (token_amount == 0) { 348 | console.log(chalk_1.default.red("\n\tNo balance found.")); 349 | yield sleep(1000); 350 | snipe_menu(); 351 | } 352 | else { 353 | if (is_max.toUpperCase() == 'MAX') { 354 | yield start_swapping(connection, false, token_amount, pool, slip, owner); 355 | } 356 | else if (isNaN(amount_in)) { 357 | console.log(chalk_1.default.red("\n\tInvalid Input.")); 358 | yield sleep(1000); 359 | snipe_menu(); 360 | } 361 | else { 362 | if (amount_in > token_amount) { 363 | console.log(chalk_1.default.red("\n\tinsufficient balance.")); 364 | yield sleep(1000); 365 | snipe_menu(); 366 | } 367 | else { 368 | yield start_swapping(connection, false, amount_in, pool, slip, owner); 369 | } 370 | } 371 | } 372 | })); 373 | })); 374 | }); 375 | } 376 | function usage() { 377 | clear_screen(); 378 | utils_1.default.aff_logo(); 379 | utils_1.default.aff_title(); 380 | utils_1.default.aff_guide(); 381 | rl.question("\n\tpress enter to return..", () => __awaiter(this, void 0, void 0, function* () { 382 | snipe_menu(); 383 | })); 384 | } 385 | //sniper menu 386 | function snipe_menu() { 387 | return __awaiter(this, void 0, void 0, function* () { 388 | var config_txt = fs_1.default.readFileSync('config.json', 'utf8'); 389 | var config_obj = JSON.parse(config_txt); 390 | const wallet = config_obj.wallet; 391 | if (wallet === 'None') { 392 | console.log(chalk_1.default.red("\n\tPlease add a wallet in settings")); 393 | yield sleep(1500); 394 | main(); 395 | } 396 | else { 397 | clear_screen(); 398 | utils_1.default.aff_logo(); 399 | utils_1.default.aff_title(); 400 | utils_1.default.aff_sniper_menu(); 401 | rl.question(chalk_1.default.white('\t[Sniper Mode] - Choice: '), (answer) => __awaiter(this, void 0, void 0, function* () { 402 | choice = parseInt(answer); 403 | if (choice == 1) { 404 | snipe_choice(); 405 | } 406 | else if (choice == 2) { 407 | sell_choice(); 408 | } 409 | else if (choice == 3) { 410 | usage(); 411 | } 412 | else if (choice == 4) { 413 | main(); 414 | } 415 | else { 416 | console.log(chalk_1.default.red("\tInvalid choice.")); 417 | yield sleep(1500); 418 | snipe_menu(); 419 | } 420 | })); 421 | } 422 | }); 423 | } 424 | //settings menu 425 | function settings_menu() { 426 | clear_screen(); 427 | utils_1.default.aff_logo(); 428 | utils_1.default.aff_title(); 429 | utils_1.default.aff_settings_menu(); 430 | rl.question(chalk_1.default.white('\t[Settings] - Choice: '), (answer) => __awaiter(this, void 0, void 0, function* () { 431 | choice = parseInt(answer); 432 | if (choice == 1) { 433 | rl.question(chalk_1.default.white('\t[Settings] - New RPC Endpoint: '), (answer) => __awaiter(this, void 0, void 0, function* () { 434 | const res = yield (0, config_1.update_rpc)(answer); 435 | yield sleep(1000); 436 | if (res === 1) { 437 | console.log(chalk_1.default.red('\tInvalid RPC Value')); 438 | yield sleep(1000); 439 | settings_menu(); 440 | } 441 | else { 442 | console.log('\tRPC Updated'); 443 | yield sleep(1000); 444 | settings_menu(); 445 | } 446 | })); 447 | } 448 | else if (choice == 2) { 449 | } 450 | else if (choice == 3) { 451 | rl.question(chalk_1.default.white('\t[Settings] - New Slippage(0-100): '), (answer) => __awaiter(this, void 0, void 0, function* () { 452 | const res = (0, config_1.update_slippage)(answer); 453 | if (res === 1) { 454 | console.log(chalk_1.default.red('\tInvalid Slippage Value')); 455 | yield sleep(1000); 456 | settings_menu(); 457 | } 458 | else { 459 | console.log('\tSlippage Updated!'); 460 | yield sleep(1000); 461 | settings_menu(); 462 | } 463 | })); 464 | } 465 | else if (choice == 4) { 466 | rl.question(chalk_1.default.white('\t[Settings] - Enter Private Key: '), (answer) => __awaiter(this, void 0, void 0, function* () { 467 | const res = (0, config_1.update_wallet)(answer); 468 | if (res === 1) { 469 | console.log(chalk_1.default.red('\tInvalid Input or Wallet Not Found')); 470 | yield sleep(1000); 471 | settings_menu(); 472 | } 473 | else { 474 | console.log('\tWallet Updated!'); 475 | yield sleep(1000); 476 | settings_menu(); 477 | } 478 | })); 479 | } 480 | else if (choice == 5) { 481 | clear_screen(); 482 | utils_1.default.aff_logo(); 483 | utils_1.default.aff_title(); 484 | (0, config_1.show_config)(); 485 | rl.question(chalk_1.default.white('\n\tpress enter to return..'), (answer) => { 486 | settings_menu(); 487 | }); 488 | } 489 | else if (choice == 6) { 490 | main(); 491 | } 492 | else { 493 | console.log(chalk_1.default.red("\tInvalid choice.")); 494 | yield sleep(1500); 495 | settings_menu(); 496 | } 497 | })); 498 | } 499 | //main menu 500 | function main() { 501 | console.clear(); 502 | utils_1.default.aff_logo(); 503 | utils_1.default.aff_title(); 504 | utils_1.default.aff_main_menu(); 505 | rl.question(chalk_1.default.white('\t[Main] - Choice: '), (answer) => __awaiter(this, void 0, void 0, function* () { 506 | choice = parseInt(answer); 507 | if (choice == 1) { 508 | snipe_menu(); 509 | } 510 | else if (choice == 2) { 511 | settings_menu(); 512 | } 513 | else if (choice == 3) { 514 | process.exit(); 515 | } 516 | else { 517 | console.log(chalk_1.default.red("\tInvalid choice.")); 518 | yield sleep(1500); 519 | main(); 520 | } 521 | })); 522 | } 523 | module.exports = { 524 | main 525 | }; 526 | -------------------------------------------------------------------------------- /build/modules/compute.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 3 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 4 | return new (P || (P = Promise))(function (resolve, reject) { 5 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 6 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 7 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 8 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 9 | }); 10 | }; 11 | Object.defineProperty(exports, "__esModule", { value: true }); 12 | exports.compute = void 0; 13 | const raydium_sdk_1 = require("@raydium-io/raydium-sdk"); 14 | //computes live estimates of the swap and returns details for transaction building or display on UI. 15 | //returns a list containing trade details (fees,price impact,expected amount out etc..) 16 | function compute(connection, poolKeys, curr_in, curr_out, amount_in, slip) { 17 | return __awaiter(this, void 0, void 0, function* () { 18 | try { 19 | const poolInfo = yield raydium_sdk_1.Liquidity.fetchInfo({ connection, poolKeys }); 20 | //setting up decimals 21 | var in_decimal; 22 | var out_decimal; 23 | if (curr_in.toBase58() === poolKeys.baseMint.toBase58()) { 24 | in_decimal = poolInfo.baseDecimals; 25 | out_decimal = poolInfo.quoteDecimals; 26 | } 27 | else { 28 | out_decimal = poolInfo.baseDecimals; 29 | in_decimal = poolInfo.quoteDecimals; 30 | } 31 | //priming and computing 32 | const amountIn = new raydium_sdk_1.TokenAmount(new raydium_sdk_1.Token(curr_in, in_decimal), amount_in, false); 33 | const currencyOut = new raydium_sdk_1.Token(curr_out, out_decimal); 34 | const slippage = new raydium_sdk_1.Percent(slip, 100); 35 | const { amountOut, minAmountOut, currentPrice, executionPrice, priceImpact, fee, } = raydium_sdk_1.Liquidity.computeAmountOut({ poolKeys, poolInfo, amountIn, currencyOut, slippage }); 36 | return [ 37 | amountOut, 38 | minAmountOut, 39 | currentPrice, 40 | executionPrice, 41 | priceImpact, 42 | fee, 43 | amountIn, 44 | ]; 45 | } 46 | catch (e) { 47 | console.log(e); 48 | return 1; 49 | } 50 | }); 51 | } 52 | exports.compute = compute; 53 | -------------------------------------------------------------------------------- /build/modules/config.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 3 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 4 | return new (P || (P = Promise))(function (resolve, reject) { 5 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 6 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 7 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 8 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 9 | }); 10 | }; 11 | var __importDefault = (this && this.__importDefault) || function (mod) { 12 | return (mod && mod.__esModule) ? mod : { "default": mod }; 13 | }; 14 | Object.defineProperty(exports, "__esModule", { value: true }); 15 | exports.update_wallet = exports.update_slippage = exports.update_rpc = exports.show_config = void 0; 16 | const web3_js_1 = require("@solana/web3.js"); 17 | const bs58_1 = __importDefault(require("bs58")); 18 | const fs_1 = __importDefault(require("fs")); 19 | const hash_key = "pleasedonotlookatstringsincodethanks"; 20 | //fetching from config 21 | function show_config() { 22 | var config_txt = fs_1.default.readFileSync('config.json', 'utf8'); 23 | var config_obj = JSON.parse(config_txt); 24 | var pubkey; 25 | try { 26 | const secretkey = bs58_1.default.decode(config_obj.wallet); 27 | const ownerKeypair = web3_js_1.Keypair.fromSecretKey(secretkey); 28 | var pubkey = ownerKeypair.publicKey.toBase58(); 29 | } 30 | catch (e) { 31 | pubkey = config_obj.wallet; 32 | } 33 | console.log(`\tWallet Address: ${pubkey}`); 34 | console.log(`\tRPC URL: ${config_obj.rpc_endpoint}`); 35 | console.log(`\tWebhook URL: ${config_obj.webhook_url}`); 36 | console.log(`\tSlippage: ${config_obj.slippage}%`); 37 | } 38 | exports.show_config = show_config; 39 | //updating config 40 | //returns 0 for success and 1 for failure 41 | function update_rpc(rpc) { 42 | return __awaiter(this, void 0, void 0, function* () { 43 | try { 44 | const connection = new web3_js_1.Connection(rpc); 45 | const balance = yield connection.getBalance(new web3_js_1.PublicKey('TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA')); 46 | if (balance) { 47 | //reading config file 48 | var config_txt = fs_1.default.readFileSync('config.json', 'utf8'); 49 | var config_obj = JSON.parse(config_txt); 50 | //updating config 51 | config_obj.rpc_endpoint = rpc; 52 | //writing new config 53 | const new_config = JSON.stringify(config_obj); 54 | fs_1.default.writeFileSync('config.json', new_config); 55 | return 0; 56 | } 57 | else { 58 | return 1; 59 | } 60 | } 61 | catch (e) { 62 | return 1; 63 | } 64 | }); 65 | } 66 | exports.update_rpc = update_rpc; 67 | function update_slippage(slip) { 68 | try { 69 | const parsedSlippage = parseInt(slip); 70 | if (isNaN(parsedSlippage)) { 71 | return 1; 72 | } 73 | else if (parsedSlippage > 100 || parsedSlippage < 0) { 74 | return 1; 75 | } 76 | else { 77 | //reading config file 78 | var config_txt = fs_1.default.readFileSync('config.json', 'utf8'); 79 | var config_obj = JSON.parse(config_txt); 80 | //updating config 81 | config_obj.slippage = parsedSlippage; 82 | //writing new config 83 | const new_config = JSON.stringify(config_obj); 84 | fs_1.default.writeFileSync('config.json', new_config); 85 | return 0; 86 | } 87 | } 88 | catch (e) { 89 | return 1; 90 | } 91 | } 92 | exports.update_slippage = update_slippage; 93 | function update_wallet(wallet) { 94 | var config_txt = fs_1.default.readFileSync('config.json', 'utf8'); 95 | var config_obj = JSON.parse(config_txt); 96 | try { 97 | const secretkey = bs58_1.default.decode(wallet); 98 | const ownerKeypair = web3_js_1.Keypair.fromSecretKey(secretkey); 99 | //updating config 100 | config_obj.wallet = wallet; 101 | //writing new config 102 | const new_config = JSON.stringify(config_obj); 103 | fs_1.default.writeFileSync('config.json', new_config); 104 | return 0; 105 | } 106 | catch (e) { 107 | return 1; 108 | } 109 | } 110 | exports.update_wallet = update_wallet; 111 | -------------------------------------------------------------------------------- /build/modules/fetch_token.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 3 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 4 | return new (P || (P = Promise))(function (resolve, reject) { 5 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 6 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 7 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 8 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 9 | }); 10 | }; 11 | var __importDefault = (this && this.__importDefault) || function (mod) { 12 | return (mod && mod.__esModule) ? mod : { "default": mod }; 13 | }; 14 | Object.defineProperty(exports, "__esModule", { value: true }); 15 | exports.get_token_amount = void 0; 16 | const web3_js_1 = require("@solana/web3.js"); 17 | const fs_1 = __importDefault(require("fs")); 18 | const bs58_1 = __importDefault(require("bs58")); 19 | const raydium_sdk_1 = require("@raydium-io/raydium-sdk"); 20 | function get_token_amount(poolId, buying) { 21 | return __awaiter(this, void 0, void 0, function* () { 22 | try { 23 | //fetching pool data 24 | var config_txt = fs_1.default.readFileSync('config.json', 'utf8'); 25 | var config_obj = JSON.parse(config_txt); 26 | const rpc_url = config_obj.rpc_endpoint; 27 | const version = 4; 28 | const connection = new web3_js_1.Connection(rpc_url); 29 | const account = yield connection.getAccountInfo(new web3_js_1.PublicKey(poolId)); 30 | const { state: LiquidityStateLayout } = raydium_sdk_1.Liquidity.getLayouts(version); 31 | //@ts-ignore 32 | const fields = LiquidityStateLayout.decode(account === null || account === void 0 ? void 0 : account.data); 33 | const { status, baseMint, quoteMint, lpMint, openOrders, targetOrders, baseVault, quoteVault, marketId, baseDecimal, quoteDecimal, } = fields; 34 | var is_valid = false; 35 | [quoteMint, baseMint, lpMint].forEach((e) => { 36 | if (e.toBase58() != '11111111111111111111111111111111') { 37 | is_valid = true; 38 | } 39 | }); 40 | if (!is_valid) { 41 | return -1; 42 | } 43 | //fetching token data 44 | const secretkey = bs58_1.default.decode(config_obj.wallet); 45 | const ownerKeypair = web3_js_1.Keypair.fromSecretKey(secretkey); 46 | const owner_address = ownerKeypair.publicKey; 47 | const tokenAddress = buying ? quoteMint : baseMint; 48 | //console.log(tokenAddress.toBase58()); 49 | const bal = yield connection.getBalance(new web3_js_1.PublicKey(owner_address.toBase58())); 50 | if (bal < 0.01) { 51 | return -2; 52 | } 53 | if (tokenAddress.toBase58() == 'So11111111111111111111111111111111111111112') { 54 | return (bal / 1000000000) - 0.0099; 55 | } 56 | else { 57 | const tokenAccounts = yield connection.getParsedTokenAccountsByOwner(owner_address, { programId: new web3_js_1.PublicKey('TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA') }); 58 | for (var cand in tokenAccounts.value) { 59 | if (tokenAccounts.value[cand].account.data.parsed.info.mint === tokenAddress.toBase58()) { 60 | const tokenAccount = tokenAccounts.value[cand]; 61 | const tokenBalance = tokenAccount.account.data.parsed.info.tokenAmount.uiAmount; 62 | return tokenBalance; 63 | } 64 | } 65 | return 0; 66 | } 67 | } 68 | catch (e) { 69 | return -1; 70 | } 71 | }); 72 | } 73 | exports.get_token_amount = get_token_amount; 74 | function test() { 75 | return __awaiter(this, void 0, void 0, function* () { 76 | const res = yield get_token_amount('AZqjt9vYMGZMuNfzSmFjMFgcMHnkBPndpTn1uprKLrq2', false); 77 | console.log(res); 78 | }); 79 | } 80 | //test(); 81 | -------------------------------------------------------------------------------- /build/modules/get_accounts.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 3 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 4 | return new (P || (P = Promise))(function (resolve, reject) { 5 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 6 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 7 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 8 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 9 | }); 10 | }; 11 | Object.defineProperty(exports, "__esModule", { value: true }); 12 | exports.getTokenAccountsByOwner = void 0; 13 | const raydium_sdk_1 = require("@raydium-io/raydium-sdk"); 14 | //fetching token accounts 15 | function getTokenAccountsByOwner(connection, owner) { 16 | return __awaiter(this, void 0, void 0, function* () { 17 | const tokenResp = yield connection.getTokenAccountsByOwner(owner, { 18 | programId: raydium_sdk_1.TOKEN_PROGRAM_ID 19 | }); 20 | const accounts = []; 21 | for (const { pubkey, account } of tokenResp.value) { 22 | accounts.push({ 23 | pubkey, 24 | accountInfo: raydium_sdk_1.SPL_ACCOUNT_LAYOUT.decode(account.data) 25 | }); 26 | } 27 | return accounts; 28 | }); 29 | } 30 | exports.getTokenAccountsByOwner = getTokenAccountsByOwner; 31 | -------------------------------------------------------------------------------- /build/modules/get_keypair.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __importDefault = (this && this.__importDefault) || function (mod) { 3 | return (mod && mod.__esModule) ? mod : { "default": mod }; 4 | }; 5 | Object.defineProperty(exports, "__esModule", { value: true }); 6 | exports.get_wallet = void 0; 7 | const web3_js_1 = require("@solana/web3.js"); 8 | const bs58_1 = __importDefault(require("bs58")); 9 | const fs_1 = __importDefault(require("fs")); 10 | //function to fetch the owners keypair object from config 11 | //returns Keypair instance if valid or undefined if not 12 | function get_wallet(config_path) { 13 | var config_txt = fs_1.default.readFileSync(config_path, 'utf8'); 14 | var config_obj = JSON.parse(config_txt); 15 | try { 16 | const secretkey = bs58_1.default.decode(config_obj.wallet); 17 | const ownerKeypair = web3_js_1.Keypair.fromSecretKey(secretkey); 18 | return ownerKeypair; 19 | } 20 | catch (_a) { 21 | } 22 | } 23 | exports.get_wallet = get_wallet; 24 | -------------------------------------------------------------------------------- /build/modules/pool_keys.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 3 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 4 | return new (P || (P = Promise))(function (resolve, reject) { 5 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 6 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 7 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 8 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 9 | }); 10 | }; 11 | Object.defineProperty(exports, "__esModule", { value: true }); 12 | exports.fetchPoolKeys = void 0; 13 | const raydium_sdk_1 = require("@raydium-io/raydium-sdk"); 14 | const web3_js_1 = require("@solana/web3.js"); 15 | //returns the pool keys (info and required params/program id's) 16 | //neccessary to interact with the liquidity pool program and compute live prices and estimates. 17 | function fetchPoolKeys(connection, poolId, version = 4) { 18 | return __awaiter(this, void 0, void 0, function* () { 19 | const serumVersion = 10; 20 | const marketVersion = 3; 21 | const programId = new web3_js_1.PublicKey('675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8'); 22 | const serumProgramId = new web3_js_1.PublicKey('srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX'); 23 | const account = yield connection.getAccountInfo(poolId); 24 | const { state: LiquidityStateLayout } = raydium_sdk_1.Liquidity.getLayouts(version); 25 | //@ts-ignore 26 | const fields = LiquidityStateLayout.decode(account === null || account === void 0 ? void 0 : account.data); 27 | const { status, baseMint, quoteMint, lpMint, openOrders, targetOrders, baseVault, quoteVault, marketId, baseDecimal, quoteDecimal, } = fields; 28 | let withdrawQueue, lpVault; 29 | if (raydium_sdk_1.Liquidity.isV4(fields)) { 30 | withdrawQueue = fields.withdrawQueue; 31 | lpVault = fields.lpVault; 32 | } 33 | else { 34 | withdrawQueue = web3_js_1.PublicKey.default; 35 | lpVault = web3_js_1.PublicKey.default; 36 | } 37 | // uninitialized 38 | // if (status.isZero()) { 39 | // return ; 40 | // } 41 | const associatedPoolKeys = raydium_sdk_1.Liquidity.getAssociatedPoolKeys({ 42 | version: version, 43 | marketVersion, 44 | marketId, 45 | baseMint: baseMint, 46 | quoteMint: quoteMint, 47 | baseDecimals: baseDecimal.toNumber(), 48 | quoteDecimals: quoteDecimal.toNumber(), 49 | programId, 50 | marketProgramId: serumProgramId, 51 | }); 52 | const poolKeys = { 53 | id: poolId, 54 | baseMint, 55 | quoteMint, 56 | lpMint, 57 | version, 58 | programId, 59 | authority: associatedPoolKeys.authority, 60 | openOrders, 61 | targetOrders, 62 | baseVault, 63 | quoteVault, 64 | withdrawQueue, 65 | lpVault, 66 | marketVersion: serumVersion, 67 | marketProgramId: serumProgramId, 68 | marketId, 69 | marketAuthority: associatedPoolKeys.marketAuthority, 70 | }; 71 | const marketInfo = yield connection.getAccountInfo(marketId); 72 | const { state: MARKET_STATE_LAYOUT } = raydium_sdk_1.Market.getLayouts(marketVersion); 73 | //@ts-ignore 74 | const market = MARKET_STATE_LAYOUT.decode(marketInfo.data); 75 | const { baseVault: marketBaseVault, quoteVault: marketQuoteVault, bids: marketBids, asks: marketAsks, eventQueue: marketEventQueue, } = market; 76 | // const poolKeys: LiquidityPoolKeys; 77 | return Object.assign(Object.assign({}, poolKeys), { 78 | marketBaseVault, 79 | marketQuoteVault, 80 | marketBids, 81 | marketAsks, 82 | marketEventQueue, 83 | }); 84 | }); 85 | } 86 | exports.fetchPoolKeys = fetchPoolKeys; 87 | -------------------------------------------------------------------------------- /build/modules/send_transaction.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 3 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 4 | return new (P || (P = Promise))(function (resolve, reject) { 5 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 6 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 7 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 8 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 9 | }); 10 | }; 11 | Object.defineProperty(exports, "__esModule", { value: true }); 12 | exports.sendTx = void 0; 13 | //sleep function 14 | function sleep(ms) { 15 | return new Promise(resolve => setTimeout(resolve, ms)); 16 | } 17 | //sending a transaction 18 | function sendTx(connection, transaction, signers) { 19 | return __awaiter(this, void 0, void 0, function* () { 20 | const hash_info = (yield connection.getLatestBlockhashAndContext()).value; 21 | transaction.recentBlockhash = hash_info.blockhash; 22 | transaction.lastValidBlockHeight = hash_info.lastValidBlockHeight; 23 | transaction.feePayer = signers[0].publicKey; 24 | transaction.sign(...signers); 25 | const rawTransaction = transaction.serialize(); 26 | var txid; 27 | try { 28 | txid = yield connection.sendRawTransaction(rawTransaction, { skipPreflight: true, }); 29 | } 30 | catch (e) { 31 | return 1; 32 | } 33 | while (true) { 34 | const ret = yield connection.getSignatureStatus(txid, { searchTransactionHistory: true }); 35 | try { 36 | //@ts-ignore 37 | if (ret) { 38 | if (ret.value && ret.value.err == null) { 39 | return 0; 40 | } 41 | else if (ret.value && ret.value.err != null) { 42 | return 1; 43 | } 44 | else { 45 | continue; 46 | } 47 | } 48 | } 49 | catch (e) { 50 | return 1; 51 | } 52 | } 53 | }); 54 | } 55 | exports.sendTx = sendTx; 56 | -------------------------------------------------------------------------------- /build/modules/swap.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 3 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 4 | return new (P || (P = Promise))(function (resolve, reject) { 5 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 6 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 7 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 8 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 9 | }); 10 | }; 11 | Object.defineProperty(exports, "__esModule", { value: true }); 12 | exports.swap = void 0; 13 | const raydium_sdk_1 = require("@raydium-io/raydium-sdk"); 14 | const web3_js_1 = require("@solana/web3.js"); 15 | const send_transaction_1 = require("./send_transaction"); 16 | function swap(connection, poolKeys, ownerKeypair, tokenAccounts, is_snipe, amountIn, minAmountOut) { 17 | return __awaiter(this, void 0, void 0, function* () { 18 | const owner = ownerKeypair.publicKey; 19 | const inst = yield raydium_sdk_1.Liquidity.makeSwapInstructionSimple({ 20 | connection: connection, 21 | poolKeys: poolKeys, 22 | userKeys: { 23 | tokenAccounts, 24 | owner, 25 | }, 26 | amountIn, 27 | amountOut: minAmountOut, 28 | fixedSide: 'in', 29 | config: {} 30 | }); 31 | //@ts-ignore 32 | //const instructions = inst.innerTransactions[0].instructions[0]; 33 | //console.log(inst.innerTransactions); 34 | //console.log(inst.innerTransactions[0]); 35 | //console.log(inst.innerTransactions[0].signers) 36 | const tx = new web3_js_1.Transaction(); 37 | const signers = [ownerKeypair]; 38 | inst.innerTransactions[0].instructions.forEach(e => { 39 | tx.add(e); 40 | }); 41 | inst.innerTransactions[0].signers.forEach(e => { 42 | signers.push(e); 43 | }); 44 | const res = yield (0, send_transaction_1.sendTx)(connection, tx, signers); 45 | return res; 46 | }); 47 | } 48 | exports.swap = swap; 49 | -------------------------------------------------------------------------------- /build/utils.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __importDefault = (this && this.__importDefault) || function (mod) { 3 | return (mod && mod.__esModule) ? mod : { "default": mod }; 4 | }; 5 | Object.defineProperty(exports, "__esModule", { value: true }); 6 | exports.aff_settings_menu = exports.aff_sniper_menu = exports.aff_main_menu = exports.aff_guide = exports.aff_sell_option = exports.aff_snipe_option = exports.aff_title = exports.aff_logo = void 0; 7 | const chalk_1 = __importDefault(require("chalk")); 8 | const logo = ` 9 | \t 10 | \t 11 | \t ( & 12 | \t % % 13 | \t & % & 14 | \t &&/ &****& & 15 | \t % % (*****./ .( 16 | \t % ./ ((((((,( *( 17 | \t % % %///( ( 18 | \t &&&.*//////**// % * .,/ ./ * / /,,/((# / 19 | \t * (//*.. & / */( .# ,.*/(( 20 | \t *** , /&( / *(( 21 | \t , .,*,./, .,*,/%#//(# #*# 22 | \t */*# &*, /( &/ .( * 23 | \t ./ * /% (&, (#/ 24 | \t ( (,( / /( %,/# 25 | \t ,/% /,/ 26 | \t ( .( 27 | \t (( , 28 | \t , 29 | \t ( / 30 | \t 31 | `; 32 | const title = ` 33 | \t▓█████▄ ▓█████ ▒██ ██▒ ██████ ██▓███ ▓██ ██▓▓█████▄ ▓█████ ██▀███ 34 | \t▒██▀ ██▌▓█ ▀ ▒▒ █ █ ▒░▒██ ▒ ▓██░ ██▒▒██ ██▒▒██▀ ██▌▓█ ▀ ▓██ ▒ ██▒ 35 | \t░██ █▌▒███ ░░ █ ░░ ▓██▄ ▓██░ ██▓▒ ▒██ ██░░██ █▌▒███ ▓██ ░▄█ ▒ 36 | \t░▓█▄ ▌▒▓█ ▄ ░ █ █ ▒ ▒ ██▒▒██▄█▓▒ ▒ ░ ▐██▓░░▓█▄ ▌▒▓█ ▄ ▒██▀▀█▄ 37 | \t░▒████▓ ░▒████▒▒██▒ ▒██▒▒██████▒▒▒██▒ ░ ░ ░ ██▒▓░░▒████▓ ░▒████▒░██▓ ▒██▒ 38 | \t ▒▒▓ ▒ ░░ ▒░ ░▒▒ ░ ░▓ ░▒ ▒▓▒ ▒ ░▒▓▒░ ░ ░ ██▒▒▒ ▒▒▓ ▒ ░░ ▒░ ░░ ▒▓ ░▒▓░ 39 | \t ░ ▒ ▒ ░ ░ ░░░ ░▒ ░░ ░▒ ░ ░░▒ ░ ▓██ ░▒░ ░ ▒ ▒ ░ ░ ░ ░▒ ░ ▒░ 40 | \t ░ ░ ░ ░ ░ ░ ░ ░ ░ ░░ ▒ ▒ ░░ ░ ░ ░ ░ ░░ ░ 41 | \t ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ 42 | \t ░ ░ ░ ░ 43 | 44 | 45 | `; 46 | function aff_logo() { 47 | for (let i = 0; i < logo.length; i++) { 48 | if (logo[i] == '@') { 49 | process.stdout.write(chalk_1.default.black(logo[i])); 50 | } 51 | else { 52 | process.stdout.write(chalk_1.default.magenta(logo[i])); 53 | } 54 | } 55 | } 56 | exports.aff_logo = aff_logo; 57 | function aff_title() { 58 | for (let i = 0; i < title.length; i++) { 59 | if (title[i] == '▓') { 60 | process.stdout.write(chalk_1.default.black(title[i])); 61 | } 62 | else { 63 | process.stdout.write(chalk_1.default.magenta(title[i])); 64 | } 65 | } 66 | } 67 | exports.aff_title = aff_title; 68 | function aff_snipe_option() { 69 | console.log(chalk_1.default.cyanBright('\tDisclaimer: \t- the tool will start sniping if all inputs are valid!')); 70 | console.log(chalk_1.default.cyanBright('\t \t- double check the amount and pool details in the monitor')); 71 | console.log(chalk_1.default.cyanBright('\t \t to avoid miss-inputs and big price impact')); 72 | } 73 | exports.aff_snipe_option = aff_snipe_option; 74 | function aff_sell_option() { 75 | console.log(chalk_1.default.cyanBright('\tDisclaimer: \t- the tool will sell supplied balance if all inputs are valid!')); 76 | console.log(chalk_1.default.cyanBright('\t \t- double check the held balance and pool details in the monitor')); 77 | console.log(chalk_1.default.cyanBright('\t \t to avoid miss-inputs and big price impact')); 78 | } 79 | exports.aff_sell_option = aff_sell_option; 80 | function aff_guide() { 81 | console.log(chalk_1.default.white('\tUSAGE: ')); 82 | console.log(chalk_1.default.white('\n')); 83 | console.log(chalk_1.default.white('\tsniper option \t - requires AMM pool ID and amount of token in as input')); 84 | console.log(chalk_1.default.white('\t \t - Amount in should be the Quote of the pair (from on-chain monitor)')); 85 | console.log(chalk_1.default.white('\t \t - make sure to have the supplied amount of token in or the transaction will not go through')); 86 | console.log(chalk_1.default.white('\n')); 87 | console.log(chalk_1.default.white('\texit position option\t - requires AMM pool ID and amount of token out as input')); 88 | console.log(chalk_1.default.white('\t \t - Amount in should be the Base of the pair (from on-chain monitor)')); 89 | console.log(chalk_1.default.white('\t \t - make sure to have the supplied amount of token out or the transactions will not got through')); 90 | console.log(chalk_1.default.white('\n')); 91 | console.log(chalk_1.default.white('\tdefault slippage \t - 10%')); 92 | console.log(chalk_1.default.white('\tsuggested slippage \t - between 10% and 30%')); 93 | console.log(chalk_1.default.white("\tRPCs \t - Custom RPC's are highly suggested for fast transaction commitment speed")); 94 | console.log(chalk_1.default.white('\n')); 95 | } 96 | exports.aff_guide = aff_guide; 97 | function aff_main_menu() { 98 | console.log(chalk_1.default.white('\t[1] - Sniper Mode')); 99 | console.log(chalk_1.default.white('\t[2] - Settings')); 100 | console.log(chalk_1.default.white('\t[3] - Exit')); 101 | console.log("\n"); 102 | } 103 | exports.aff_main_menu = aff_main_menu; 104 | function aff_sniper_menu() { 105 | console.log(chalk_1.default.blueBright('\t[1] - Snipe')); 106 | console.log(chalk_1.default.greenBright('\t[2] - Exit Position')); 107 | console.log(chalk_1.default.white('\t[3] - Usage')); 108 | console.log(chalk_1.default.white('\t[4] - return')); 109 | console.log("\n"); 110 | } 111 | exports.aff_sniper_menu = aff_sniper_menu; 112 | function aff_settings_menu() { 113 | console.log(chalk_1.default.white('\t[1] - Change RPC')); 114 | console.log(chalk_1.default.white('\t[2] - Change Webhook')); 115 | console.log(chalk_1.default.white('\t[3] - Change Slippage')); 116 | console.log(chalk_1.default.white('\t[4] - Change Wallet')); 117 | console.log(chalk_1.default.white('\t[5] - Show Current Settings')); 118 | console.log(chalk_1.default.white('\t[6] - Back')); 119 | console.log("\n"); 120 | } 121 | exports.aff_settings_menu = aff_settings_menu; 122 | const default_export = { 123 | aff_logo, 124 | aff_title, 125 | aff_main_menu, 126 | aff_settings_menu, 127 | aff_sniper_menu, 128 | aff_snipe_option, 129 | aff_sell_option, 130 | aff_guide, 131 | }; 132 | exports.default = default_export; 133 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dexspyder_v1_cli", 3 | "version": "1.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "dexspyder_v1_cli", 9 | "version": "1.0.0", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@raydium-io/raydium-sdk": "^1.3.0-beta.18", 13 | "@solana/spl-token": "^0.3.7", 14 | "@solana/web3.js": "^1.77.2", 15 | "axios": "^1.4.0", 16 | "bs58": "^5.0.0", 17 | "chalk": "^4.1.2", 18 | "clear": "^0.1.0", 19 | "cli-spinners": "^2.9.0", 20 | "hwid": "^0.3.0", 21 | "moment": "^2.29.4", 22 | "request": "^2.88.2", 23 | "requests": "^0.3.0" 24 | } 25 | }, 26 | "node_modules/@babel/runtime": { 27 | "version": "7.22.3", 28 | "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.3.tgz", 29 | "integrity": "sha512-XsDuspWKLUsxwCp6r7EhsExHtYfbe5oAGQ19kqngTdCPUoPQzOPdUbD/pB9PJiwb2ptYKQDjSJT3R6dC+EPqfQ==", 30 | "dependencies": { 31 | "regenerator-runtime": "^0.13.11" 32 | }, 33 | "engines": { 34 | "node": ">=6.9.0" 35 | } 36 | }, 37 | "node_modules/@noble/curves": { 38 | "version": "1.0.0", 39 | "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.0.0.tgz", 40 | "integrity": "sha512-2upgEu0iLiDVDZkNLeFV2+ht0BAVgQnEmCk6JsOch9Rp8xfkMCbvbAZlA2pBHQc73dbl+vFOXfqkf4uemdn0bw==", 41 | "funding": [ 42 | { 43 | "type": "individual", 44 | "url": "https://paulmillr.com/funding/" 45 | } 46 | ], 47 | "dependencies": { 48 | "@noble/hashes": "1.3.0" 49 | } 50 | }, 51 | "node_modules/@noble/ed25519": { 52 | "version": "1.7.3", 53 | "resolved": "https://registry.npmjs.org/@noble/ed25519/-/ed25519-1.7.3.tgz", 54 | "integrity": "sha512-iR8GBkDt0Q3GyaVcIu7mSsVIqnFbkbRzGLWlvhwunacoLwt4J3swfKhfaM6rN6WY+TBGoYT1GtT1mIh2/jGbRQ==", 55 | "funding": [ 56 | { 57 | "type": "individual", 58 | "url": "https://paulmillr.com/funding/" 59 | } 60 | ] 61 | }, 62 | "node_modules/@noble/hashes": { 63 | "version": "1.3.0", 64 | "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.0.tgz", 65 | "integrity": "sha512-ilHEACi9DwqJB0pw7kv+Apvh50jiiSyR/cQ3y4W7lOR5mhvn/50FLUfsnfJz0BDZtl/RR16kXvptiv6q1msYZg==", 66 | "funding": [ 67 | { 68 | "type": "individual", 69 | "url": "https://paulmillr.com/funding/" 70 | } 71 | ] 72 | }, 73 | "node_modules/@noble/secp256k1": { 74 | "version": "1.7.1", 75 | "resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.7.1.tgz", 76 | "integrity": "sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==", 77 | "funding": [ 78 | { 79 | "type": "individual", 80 | "url": "https://paulmillr.com/funding/" 81 | } 82 | ] 83 | }, 84 | "node_modules/@raydium-io/raydium-sdk": { 85 | "version": "1.3.0-beta.18", 86 | "resolved": "https://registry.npmjs.org/@raydium-io/raydium-sdk/-/raydium-sdk-1.3.0-beta.18.tgz", 87 | "integrity": "sha512-gMBZ+WcwOhggwEZQqvasUhdOnm77bRoX83K6kWT5EykShk41ThhUGGxyv/siLu64w1K6ImlMGXjy4I5668/Gtw==", 88 | "dependencies": { 89 | "@solana/buffer-layout": "^4.0.1", 90 | "@solana/spl-token": "^0.3.7", 91 | "@solana/web3.js": "1.73.0", 92 | "axios": "^1.2.6", 93 | "big.js": "^6.2.1", 94 | "bn.js": "^5.2.1", 95 | "decimal.js": "^10.4.3", 96 | "decimal.js-light": "^2.5.1", 97 | "fecha": "^4.2.3", 98 | "lodash": "^4.17.21", 99 | "toformat": "^2.0.0" 100 | } 101 | }, 102 | "node_modules/@raydium-io/raydium-sdk/node_modules/@solana/web3.js": { 103 | "version": "1.73.0", 104 | "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.73.0.tgz", 105 | "integrity": "sha512-YrgX3Py7ylh8NYkbanoINUPCj//bWUjYZ5/WPy9nQ9SK3Cl7QWCR+NmbDjmC/fTspZGR+VO9LTQslM++jr5PRw==", 106 | "dependencies": { 107 | "@babel/runtime": "^7.12.5", 108 | "@noble/ed25519": "^1.7.0", 109 | "@noble/hashes": "^1.1.2", 110 | "@noble/secp256k1": "^1.6.3", 111 | "@solana/buffer-layout": "^4.0.0", 112 | "agentkeepalive": "^4.2.1", 113 | "bigint-buffer": "^1.1.5", 114 | "bn.js": "^5.0.0", 115 | "borsh": "^0.7.0", 116 | "bs58": "^4.0.1", 117 | "buffer": "6.0.1", 118 | "fast-stable-stringify": "^1.0.0", 119 | "jayson": "^3.4.4", 120 | "node-fetch": "2", 121 | "rpc-websockets": "^7.5.0", 122 | "superstruct": "^0.14.2" 123 | }, 124 | "engines": { 125 | "node": ">=12.20.0" 126 | } 127 | }, 128 | "node_modules/@raydium-io/raydium-sdk/node_modules/base-x": { 129 | "version": "3.0.9", 130 | "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", 131 | "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", 132 | "dependencies": { 133 | "safe-buffer": "^5.0.1" 134 | } 135 | }, 136 | "node_modules/@raydium-io/raydium-sdk/node_modules/bs58": { 137 | "version": "4.0.1", 138 | "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", 139 | "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", 140 | "dependencies": { 141 | "base-x": "^3.0.2" 142 | } 143 | }, 144 | "node_modules/@raydium-io/raydium-sdk/node_modules/buffer": { 145 | "version": "6.0.1", 146 | "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.1.tgz", 147 | "integrity": "sha512-rVAXBwEcEoYtxnHSO5iWyhzV/O1WMtkUYWlfdLS7FjU4PnSJJHEfHXi/uHPI5EwltmOA794gN3bm3/pzuctWjQ==", 148 | "funding": [ 149 | { 150 | "type": "github", 151 | "url": "https://github.com/sponsors/feross" 152 | }, 153 | { 154 | "type": "patreon", 155 | "url": "https://www.patreon.com/feross" 156 | }, 157 | { 158 | "type": "consulting", 159 | "url": "https://feross.org/support" 160 | } 161 | ], 162 | "dependencies": { 163 | "base64-js": "^1.3.1", 164 | "ieee754": "^1.2.1" 165 | } 166 | }, 167 | "node_modules/@solana/buffer-layout": { 168 | "version": "4.0.1", 169 | "resolved": "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz", 170 | "integrity": "sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA==", 171 | "dependencies": { 172 | "buffer": "~6.0.3" 173 | }, 174 | "engines": { 175 | "node": ">=5.10" 176 | } 177 | }, 178 | "node_modules/@solana/buffer-layout-utils": { 179 | "version": "0.2.0", 180 | "resolved": "https://registry.npmjs.org/@solana/buffer-layout-utils/-/buffer-layout-utils-0.2.0.tgz", 181 | "integrity": "sha512-szG4sxgJGktbuZYDg2FfNmkMi0DYQoVjN2h7ta1W1hPrwzarcFLBq9UpX1UjNXsNpT9dn+chgprtWGioUAr4/g==", 182 | "dependencies": { 183 | "@solana/buffer-layout": "^4.0.0", 184 | "@solana/web3.js": "^1.32.0", 185 | "bigint-buffer": "^1.1.5", 186 | "bignumber.js": "^9.0.1" 187 | }, 188 | "engines": { 189 | "node": ">= 10" 190 | } 191 | }, 192 | "node_modules/@solana/spl-token": { 193 | "version": "0.3.7", 194 | "resolved": "https://registry.npmjs.org/@solana/spl-token/-/spl-token-0.3.7.tgz", 195 | "integrity": "sha512-bKGxWTtIw6VDdCBngjtsGlKGLSmiu/8ghSt/IOYJV24BsymRbgq7r12GToeetpxmPaZYLddKwAz7+EwprLfkfg==", 196 | "dependencies": { 197 | "@solana/buffer-layout": "^4.0.0", 198 | "@solana/buffer-layout-utils": "^0.2.0", 199 | "buffer": "^6.0.3" 200 | }, 201 | "engines": { 202 | "node": ">=16" 203 | }, 204 | "peerDependencies": { 205 | "@solana/web3.js": "^1.47.4" 206 | } 207 | }, 208 | "node_modules/@solana/web3.js": { 209 | "version": "1.77.2", 210 | "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.77.2.tgz", 211 | "integrity": "sha512-pKu9S21NGAi6Nsayz2KEdhqOlPUJIr3L911bgQvPg2Dbk/U4gJsk41XGdxyfsfnwKPEI/KbitcByterst4VQ3g==", 212 | "dependencies": { 213 | "@babel/runtime": "^7.12.5", 214 | "@noble/curves": "^1.0.0", 215 | "@noble/hashes": "^1.3.0", 216 | "@solana/buffer-layout": "^4.0.0", 217 | "agentkeepalive": "^4.2.1", 218 | "bigint-buffer": "^1.1.5", 219 | "bn.js": "^5.0.0", 220 | "borsh": "^0.7.0", 221 | "bs58": "^4.0.1", 222 | "buffer": "6.0.3", 223 | "fast-stable-stringify": "^1.0.0", 224 | "jayson": "^3.4.4", 225 | "node-fetch": "^2.6.7", 226 | "rpc-websockets": "^7.5.1", 227 | "superstruct": "^0.14.2" 228 | } 229 | }, 230 | "node_modules/@solana/web3.js/node_modules/base-x": { 231 | "version": "3.0.9", 232 | "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", 233 | "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", 234 | "dependencies": { 235 | "safe-buffer": "^5.0.1" 236 | } 237 | }, 238 | "node_modules/@solana/web3.js/node_modules/bs58": { 239 | "version": "4.0.1", 240 | "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", 241 | "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", 242 | "dependencies": { 243 | "base-x": "^3.0.2" 244 | } 245 | }, 246 | "node_modules/@types/connect": { 247 | "version": "3.4.35", 248 | "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", 249 | "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", 250 | "dependencies": { 251 | "@types/node": "*" 252 | } 253 | }, 254 | "node_modules/@types/node": { 255 | "version": "12.20.55", 256 | "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", 257 | "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" 258 | }, 259 | "node_modules/@types/ws": { 260 | "version": "7.4.7", 261 | "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", 262 | "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==", 263 | "dependencies": { 264 | "@types/node": "*" 265 | } 266 | }, 267 | "node_modules/agentkeepalive": { 268 | "version": "4.3.0", 269 | "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.3.0.tgz", 270 | "integrity": "sha512-7Epl1Blf4Sy37j4v9f9FjICCh4+KAQOyXgHEwlyBiAQLbhKdq/i2QQU3amQalS/wPhdPzDXPL5DMR5bkn+YeWg==", 271 | "dependencies": { 272 | "debug": "^4.1.0", 273 | "depd": "^2.0.0", 274 | "humanize-ms": "^1.2.1" 275 | }, 276 | "engines": { 277 | "node": ">= 8.0.0" 278 | } 279 | }, 280 | "node_modules/ajv": { 281 | "version": "6.12.6", 282 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", 283 | "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", 284 | "dependencies": { 285 | "fast-deep-equal": "^3.1.1", 286 | "fast-json-stable-stringify": "^2.0.0", 287 | "json-schema-traverse": "^0.4.1", 288 | "uri-js": "^4.2.2" 289 | }, 290 | "funding": { 291 | "type": "github", 292 | "url": "https://github.com/sponsors/epoberezkin" 293 | } 294 | }, 295 | "node_modules/ansi-styles": { 296 | "version": "4.3.0", 297 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 298 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 299 | "dependencies": { 300 | "color-convert": "^2.0.1" 301 | }, 302 | "engines": { 303 | "node": ">=8" 304 | }, 305 | "funding": { 306 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 307 | } 308 | }, 309 | "node_modules/asn1": { 310 | "version": "0.2.6", 311 | "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", 312 | "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", 313 | "dependencies": { 314 | "safer-buffer": "~2.1.0" 315 | } 316 | }, 317 | "node_modules/assert-plus": { 318 | "version": "1.0.0", 319 | "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", 320 | "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", 321 | "engines": { 322 | "node": ">=0.8" 323 | } 324 | }, 325 | "node_modules/asynckit": { 326 | "version": "0.4.0", 327 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 328 | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" 329 | }, 330 | "node_modules/aws-sign2": { 331 | "version": "0.7.0", 332 | "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", 333 | "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", 334 | "engines": { 335 | "node": "*" 336 | } 337 | }, 338 | "node_modules/aws4": { 339 | "version": "1.12.0", 340 | "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", 341 | "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==" 342 | }, 343 | "node_modules/axios": { 344 | "version": "1.4.0", 345 | "resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz", 346 | "integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==", 347 | "dependencies": { 348 | "follow-redirects": "^1.15.0", 349 | "form-data": "^4.0.0", 350 | "proxy-from-env": "^1.1.0" 351 | } 352 | }, 353 | "node_modules/axo": { 354 | "version": "0.0.2", 355 | "resolved": "https://registry.npmjs.org/axo/-/axo-0.0.2.tgz", 356 | "integrity": "sha512-8CC4Mb+OhK97UEng0PgiqUDNZjzVcWDsV+G2vLYCQn1jEL7y6VqiRVlZlRu+aA/ckSznmNzW6X1I6nj2As/haQ==" 357 | }, 358 | "node_modules/base-x": { 359 | "version": "4.0.0", 360 | "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", 361 | "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" 362 | }, 363 | "node_modules/base64-js": { 364 | "version": "1.5.1", 365 | "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", 366 | "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", 367 | "funding": [ 368 | { 369 | "type": "github", 370 | "url": "https://github.com/sponsors/feross" 371 | }, 372 | { 373 | "type": "patreon", 374 | "url": "https://www.patreon.com/feross" 375 | }, 376 | { 377 | "type": "consulting", 378 | "url": "https://feross.org/support" 379 | } 380 | ] 381 | }, 382 | "node_modules/bcrypt-pbkdf": { 383 | "version": "1.0.2", 384 | "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", 385 | "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", 386 | "dependencies": { 387 | "tweetnacl": "^0.14.3" 388 | } 389 | }, 390 | "node_modules/big.js": { 391 | "version": "6.2.1", 392 | "resolved": "https://registry.npmjs.org/big.js/-/big.js-6.2.1.tgz", 393 | "integrity": "sha512-bCtHMwL9LeDIozFn+oNhhFoq+yQ3BNdnsLSASUxLciOb1vgvpHsIO1dsENiGMgbb4SkP5TrzWzRiLddn8ahVOQ==", 394 | "engines": { 395 | "node": "*" 396 | }, 397 | "funding": { 398 | "type": "opencollective", 399 | "url": "https://opencollective.com/bigjs" 400 | } 401 | }, 402 | "node_modules/bigint-buffer": { 403 | "version": "1.1.5", 404 | "resolved": "https://registry.npmjs.org/bigint-buffer/-/bigint-buffer-1.1.5.tgz", 405 | "integrity": "sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA==", 406 | "hasInstallScript": true, 407 | "dependencies": { 408 | "bindings": "^1.3.0" 409 | }, 410 | "engines": { 411 | "node": ">= 10.0.0" 412 | } 413 | }, 414 | "node_modules/bignumber.js": { 415 | "version": "9.1.1", 416 | "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz", 417 | "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==", 418 | "engines": { 419 | "node": "*" 420 | } 421 | }, 422 | "node_modules/bindings": { 423 | "version": "1.5.0", 424 | "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", 425 | "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", 426 | "dependencies": { 427 | "file-uri-to-path": "1.0.0" 428 | } 429 | }, 430 | "node_modules/bn.js": { 431 | "version": "5.2.1", 432 | "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", 433 | "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" 434 | }, 435 | "node_modules/borsh": { 436 | "version": "0.7.0", 437 | "resolved": "https://registry.npmjs.org/borsh/-/borsh-0.7.0.tgz", 438 | "integrity": "sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA==", 439 | "dependencies": { 440 | "bn.js": "^5.2.0", 441 | "bs58": "^4.0.0", 442 | "text-encoding-utf-8": "^1.0.2" 443 | } 444 | }, 445 | "node_modules/borsh/node_modules/base-x": { 446 | "version": "3.0.9", 447 | "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", 448 | "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", 449 | "dependencies": { 450 | "safe-buffer": "^5.0.1" 451 | } 452 | }, 453 | "node_modules/borsh/node_modules/bs58": { 454 | "version": "4.0.1", 455 | "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", 456 | "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", 457 | "dependencies": { 458 | "base-x": "^3.0.2" 459 | } 460 | }, 461 | "node_modules/bs58": { 462 | "version": "5.0.0", 463 | "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", 464 | "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", 465 | "dependencies": { 466 | "base-x": "^4.0.0" 467 | } 468 | }, 469 | "node_modules/buffer": { 470 | "version": "6.0.3", 471 | "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", 472 | "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", 473 | "funding": [ 474 | { 475 | "type": "github", 476 | "url": "https://github.com/sponsors/feross" 477 | }, 478 | { 479 | "type": "patreon", 480 | "url": "https://www.patreon.com/feross" 481 | }, 482 | { 483 | "type": "consulting", 484 | "url": "https://feross.org/support" 485 | } 486 | ], 487 | "dependencies": { 488 | "base64-js": "^1.3.1", 489 | "ieee754": "^1.2.1" 490 | } 491 | }, 492 | "node_modules/bufferutil": { 493 | "version": "4.0.7", 494 | "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.7.tgz", 495 | "integrity": "sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw==", 496 | "hasInstallScript": true, 497 | "optional": true, 498 | "dependencies": { 499 | "node-gyp-build": "^4.3.0" 500 | }, 501 | "engines": { 502 | "node": ">=6.14.2" 503 | } 504 | }, 505 | "node_modules/caseless": { 506 | "version": "0.12.0", 507 | "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", 508 | "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" 509 | }, 510 | "node_modules/chalk": { 511 | "version": "4.1.2", 512 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 513 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 514 | "dependencies": { 515 | "ansi-styles": "^4.1.0", 516 | "supports-color": "^7.1.0" 517 | }, 518 | "engines": { 519 | "node": ">=10" 520 | }, 521 | "funding": { 522 | "url": "https://github.com/chalk/chalk?sponsor=1" 523 | } 524 | }, 525 | "node_modules/clear": { 526 | "version": "0.1.0", 527 | "resolved": "https://registry.npmjs.org/clear/-/clear-0.1.0.tgz", 528 | "integrity": "sha512-qMjRnoL+JDPJHeLePZJuao6+8orzHMGP04A8CdwCNsKhRbOnKRjefxONR7bwILT3MHecxKBjHkKL/tkZ8r4Uzw==", 529 | "engines": { 530 | "node": "*" 531 | } 532 | }, 533 | "node_modules/cli-spinners": { 534 | "version": "2.9.0", 535 | "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.0.tgz", 536 | "integrity": "sha512-4/aL9X3Wh0yiMQlE+eeRhWP6vclO3QRtw1JHKIT0FFUs5FjpFmESqtMvYZ0+lbzBw900b95mS0hohy+qn2VK/g==", 537 | "engines": { 538 | "node": ">=6" 539 | }, 540 | "funding": { 541 | "url": "https://github.com/sponsors/sindresorhus" 542 | } 543 | }, 544 | "node_modules/color-convert": { 545 | "version": "2.0.1", 546 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 547 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 548 | "dependencies": { 549 | "color-name": "~1.1.4" 550 | }, 551 | "engines": { 552 | "node": ">=7.0.0" 553 | } 554 | }, 555 | "node_modules/color-name": { 556 | "version": "1.1.4", 557 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 558 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" 559 | }, 560 | "node_modules/combined-stream": { 561 | "version": "1.0.8", 562 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 563 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 564 | "dependencies": { 565 | "delayed-stream": "~1.0.0" 566 | }, 567 | "engines": { 568 | "node": ">= 0.8" 569 | } 570 | }, 571 | "node_modules/commander": { 572 | "version": "2.20.3", 573 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", 574 | "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" 575 | }, 576 | "node_modules/core-util-is": { 577 | "version": "1.0.2", 578 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", 579 | "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" 580 | }, 581 | "node_modules/dashdash": { 582 | "version": "1.14.1", 583 | "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", 584 | "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", 585 | "dependencies": { 586 | "assert-plus": "^1.0.0" 587 | }, 588 | "engines": { 589 | "node": ">=0.10" 590 | } 591 | }, 592 | "node_modules/debug": { 593 | "version": "4.3.4", 594 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", 595 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", 596 | "dependencies": { 597 | "ms": "2.1.2" 598 | }, 599 | "engines": { 600 | "node": ">=6.0" 601 | }, 602 | "peerDependenciesMeta": { 603 | "supports-color": { 604 | "optional": true 605 | } 606 | } 607 | }, 608 | "node_modules/decimal.js": { 609 | "version": "10.4.3", 610 | "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", 611 | "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==" 612 | }, 613 | "node_modules/decimal.js-light": { 614 | "version": "2.5.1", 615 | "resolved": "https://registry.npmjs.org/decimal.js-light/-/decimal.js-light-2.5.1.tgz", 616 | "integrity": "sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg==" 617 | }, 618 | "node_modules/delay": { 619 | "version": "5.0.0", 620 | "resolved": "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz", 621 | "integrity": "sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==", 622 | "engines": { 623 | "node": ">=10" 624 | }, 625 | "funding": { 626 | "url": "https://github.com/sponsors/sindresorhus" 627 | } 628 | }, 629 | "node_modules/delayed-stream": { 630 | "version": "1.0.0", 631 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 632 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", 633 | "engines": { 634 | "node": ">=0.4.0" 635 | } 636 | }, 637 | "node_modules/depd": { 638 | "version": "2.0.0", 639 | "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", 640 | "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", 641 | "engines": { 642 | "node": ">= 0.8" 643 | } 644 | }, 645 | "node_modules/ecc-jsbn": { 646 | "version": "0.1.2", 647 | "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", 648 | "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", 649 | "dependencies": { 650 | "jsbn": "~0.1.0", 651 | "safer-buffer": "^2.1.0" 652 | } 653 | }, 654 | "node_modules/es6-promise": { 655 | "version": "4.2.8", 656 | "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", 657 | "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" 658 | }, 659 | "node_modules/es6-promisify": { 660 | "version": "5.0.0", 661 | "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", 662 | "integrity": "sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==", 663 | "dependencies": { 664 | "es6-promise": "^4.0.3" 665 | } 666 | }, 667 | "node_modules/eventemitter3": { 668 | "version": "4.0.7", 669 | "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", 670 | "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" 671 | }, 672 | "node_modules/extend": { 673 | "version": "3.0.2", 674 | "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", 675 | "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" 676 | }, 677 | "node_modules/extendible": { 678 | "version": "0.1.1", 679 | "resolved": "https://registry.npmjs.org/extendible/-/extendible-0.1.1.tgz", 680 | "integrity": "sha512-AglckQA0TJV8/ZmhQcNmaaFcFFPXFIoZbfuoQOlGDK7Jh/roWotYzJ7ik1FBBCHBr8n7CgTR8lXXPAN8Rfb7rw==" 681 | }, 682 | "node_modules/extsprintf": { 683 | "version": "1.3.0", 684 | "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", 685 | "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", 686 | "engines": [ 687 | "node >=0.6.0" 688 | ] 689 | }, 690 | "node_modules/eyes": { 691 | "version": "0.1.8", 692 | "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", 693 | "integrity": "sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==", 694 | "engines": { 695 | "node": "> 0.1.90" 696 | } 697 | }, 698 | "node_modules/failure": { 699 | "version": "1.1.1", 700 | "resolved": "https://registry.npmjs.org/failure/-/failure-1.1.1.tgz", 701 | "integrity": "sha512-lzrrk0NUfjVeU3jLmfU01zP5bfg4XVFxHREYGvgJowaCqHLSQtqIGENH/CU+oSs6yfYObdSM7b9UY/3p2VJOSg==" 702 | }, 703 | "node_modules/fast-deep-equal": { 704 | "version": "3.1.3", 705 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", 706 | "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" 707 | }, 708 | "node_modules/fast-json-stable-stringify": { 709 | "version": "2.1.0", 710 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", 711 | "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" 712 | }, 713 | "node_modules/fast-stable-stringify": { 714 | "version": "1.0.0", 715 | "resolved": "https://registry.npmjs.org/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz", 716 | "integrity": "sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag==" 717 | }, 718 | "node_modules/fecha": { 719 | "version": "4.2.3", 720 | "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.3.tgz", 721 | "integrity": "sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==" 722 | }, 723 | "node_modules/file-uri-to-path": { 724 | "version": "1.0.0", 725 | "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", 726 | "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" 727 | }, 728 | "node_modules/follow-redirects": { 729 | "version": "1.15.2", 730 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", 731 | "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", 732 | "funding": [ 733 | { 734 | "type": "individual", 735 | "url": "https://github.com/sponsors/RubenVerborgh" 736 | } 737 | ], 738 | "engines": { 739 | "node": ">=4.0" 740 | }, 741 | "peerDependenciesMeta": { 742 | "debug": { 743 | "optional": true 744 | } 745 | } 746 | }, 747 | "node_modules/forever-agent": { 748 | "version": "0.6.1", 749 | "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", 750 | "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", 751 | "engines": { 752 | "node": "*" 753 | } 754 | }, 755 | "node_modules/form-data": { 756 | "version": "4.0.0", 757 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", 758 | "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", 759 | "dependencies": { 760 | "asynckit": "^0.4.0", 761 | "combined-stream": "^1.0.8", 762 | "mime-types": "^2.1.12" 763 | }, 764 | "engines": { 765 | "node": ">= 6" 766 | } 767 | }, 768 | "node_modules/getpass": { 769 | "version": "0.1.7", 770 | "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", 771 | "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", 772 | "dependencies": { 773 | "assert-plus": "^1.0.0" 774 | } 775 | }, 776 | "node_modules/hang": { 777 | "version": "1.0.0", 778 | "resolved": "https://registry.npmjs.org/hang/-/hang-1.0.0.tgz", 779 | "integrity": "sha512-vtBz98Bt/Tbm03cZO5Ymc7ZL8ead/jIx9T5Wg/xuz+9BXPAJNJSdGQW63LoaesogUQKTpHyal339hxTaTf/APg==" 780 | }, 781 | "node_modules/har-schema": { 782 | "version": "2.0.0", 783 | "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", 784 | "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", 785 | "engines": { 786 | "node": ">=4" 787 | } 788 | }, 789 | "node_modules/har-validator": { 790 | "version": "5.1.5", 791 | "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", 792 | "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", 793 | "deprecated": "this library is no longer supported", 794 | "dependencies": { 795 | "ajv": "^6.12.3", 796 | "har-schema": "^2.0.0" 797 | }, 798 | "engines": { 799 | "node": ">=6" 800 | } 801 | }, 802 | "node_modules/has-flag": { 803 | "version": "4.0.0", 804 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 805 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 806 | "engines": { 807 | "node": ">=8" 808 | } 809 | }, 810 | "node_modules/http-signature": { 811 | "version": "1.2.0", 812 | "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", 813 | "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", 814 | "dependencies": { 815 | "assert-plus": "^1.0.0", 816 | "jsprim": "^1.2.2", 817 | "sshpk": "^1.7.0" 818 | }, 819 | "engines": { 820 | "node": ">=0.8", 821 | "npm": ">=1.3.7" 822 | } 823 | }, 824 | "node_modules/humanize-ms": { 825 | "version": "1.2.1", 826 | "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", 827 | "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", 828 | "dependencies": { 829 | "ms": "^2.0.0" 830 | } 831 | }, 832 | "node_modules/hwid": { 833 | "version": "0.3.0", 834 | "resolved": "https://registry.npmjs.org/hwid/-/hwid-0.3.0.tgz", 835 | "integrity": "sha512-CpTrSl34DPnDawpYIeOPgb/Xjto0y8GfmlvmwjcborTXA+IED15t1b97WIa9F2cXwrA3RSy4UADfEGl/uQ91QA==", 836 | "dependencies": { 837 | "tslib": "^2.1.0", 838 | "winreg": "^1.2.4" 839 | }, 840 | "engines": { 841 | "node": ">=10" 842 | } 843 | }, 844 | "node_modules/ieee754": { 845 | "version": "1.2.1", 846 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", 847 | "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", 848 | "funding": [ 849 | { 850 | "type": "github", 851 | "url": "https://github.com/sponsors/feross" 852 | }, 853 | { 854 | "type": "patreon", 855 | "url": "https://www.patreon.com/feross" 856 | }, 857 | { 858 | "type": "consulting", 859 | "url": "https://feross.org/support" 860 | } 861 | ] 862 | }, 863 | "node_modules/is-typedarray": { 864 | "version": "1.0.0", 865 | "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", 866 | "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" 867 | }, 868 | "node_modules/isomorphic-ws": { 869 | "version": "4.0.1", 870 | "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", 871 | "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==", 872 | "peerDependencies": { 873 | "ws": "*" 874 | } 875 | }, 876 | "node_modules/isstream": { 877 | "version": "0.1.2", 878 | "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", 879 | "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" 880 | }, 881 | "node_modules/jayson": { 882 | "version": "3.7.0", 883 | "resolved": "https://registry.npmjs.org/jayson/-/jayson-3.7.0.tgz", 884 | "integrity": "sha512-tfy39KJMrrXJ+mFcMpxwBvFDetS8LAID93+rycFglIQM4kl3uNR3W4lBLE/FFhsoUCEox5Dt2adVpDm/XtebbQ==", 885 | "dependencies": { 886 | "@types/connect": "^3.4.33", 887 | "@types/node": "^12.12.54", 888 | "@types/ws": "^7.4.4", 889 | "commander": "^2.20.3", 890 | "delay": "^5.0.0", 891 | "es6-promisify": "^5.0.0", 892 | "eyes": "^0.1.8", 893 | "isomorphic-ws": "^4.0.1", 894 | "json-stringify-safe": "^5.0.1", 895 | "JSONStream": "^1.3.5", 896 | "lodash": "^4.17.20", 897 | "uuid": "^8.3.2", 898 | "ws": "^7.4.5" 899 | }, 900 | "bin": { 901 | "jayson": "bin/jayson.js" 902 | }, 903 | "engines": { 904 | "node": ">=8" 905 | } 906 | }, 907 | "node_modules/jayson/node_modules/uuid": { 908 | "version": "8.3.2", 909 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", 910 | "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", 911 | "bin": { 912 | "uuid": "dist/bin/uuid" 913 | } 914 | }, 915 | "node_modules/jsbn": { 916 | "version": "0.1.1", 917 | "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", 918 | "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" 919 | }, 920 | "node_modules/json-schema": { 921 | "version": "0.4.0", 922 | "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", 923 | "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" 924 | }, 925 | "node_modules/json-schema-traverse": { 926 | "version": "0.4.1", 927 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", 928 | "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" 929 | }, 930 | "node_modules/json-stringify-safe": { 931 | "version": "5.0.1", 932 | "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", 933 | "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" 934 | }, 935 | "node_modules/jsonparse": { 936 | "version": "1.3.1", 937 | "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", 938 | "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", 939 | "engines": [ 940 | "node >= 0.2.0" 941 | ] 942 | }, 943 | "node_modules/JSONStream": { 944 | "version": "1.3.5", 945 | "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", 946 | "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", 947 | "dependencies": { 948 | "jsonparse": "^1.2.0", 949 | "through": ">=2.2.7 <3" 950 | }, 951 | "bin": { 952 | "JSONStream": "bin.js" 953 | }, 954 | "engines": { 955 | "node": "*" 956 | } 957 | }, 958 | "node_modules/jsprim": { 959 | "version": "1.4.2", 960 | "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", 961 | "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", 962 | "dependencies": { 963 | "assert-plus": "1.0.0", 964 | "extsprintf": "1.3.0", 965 | "json-schema": "0.4.0", 966 | "verror": "1.10.0" 967 | }, 968 | "engines": { 969 | "node": ">=0.6.0" 970 | } 971 | }, 972 | "node_modules/loads": { 973 | "version": "0.0.4", 974 | "resolved": "https://registry.npmjs.org/loads/-/loads-0.0.4.tgz", 975 | "integrity": "sha512-XjPzzYIHkuMNqYyvh6AECQAHi682nyKO9TMdMYnaz7QbPDI/KIeSIjRhAlXIbRMPYAgtLUYgPlD3mtKZ4Q8SYA==", 976 | "dependencies": { 977 | "failure": "1.1.x", 978 | "one-time": "0.0.x", 979 | "xhr-response": "1.0.x", 980 | "xhr-status": "1.0.x" 981 | } 982 | }, 983 | "node_modules/lodash": { 984 | "version": "4.17.21", 985 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", 986 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" 987 | }, 988 | "node_modules/mime-db": { 989 | "version": "1.52.0", 990 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 991 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", 992 | "engines": { 993 | "node": ">= 0.6" 994 | } 995 | }, 996 | "node_modules/mime-types": { 997 | "version": "2.1.35", 998 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 999 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 1000 | "dependencies": { 1001 | "mime-db": "1.52.0" 1002 | }, 1003 | "engines": { 1004 | "node": ">= 0.6" 1005 | } 1006 | }, 1007 | "node_modules/moment": { 1008 | "version": "2.29.4", 1009 | "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", 1010 | "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==", 1011 | "engines": { 1012 | "node": "*" 1013 | } 1014 | }, 1015 | "node_modules/ms": { 1016 | "version": "2.1.2", 1017 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 1018 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 1019 | }, 1020 | "node_modules/node-fetch": { 1021 | "version": "2.6.11", 1022 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", 1023 | "integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==", 1024 | "dependencies": { 1025 | "whatwg-url": "^5.0.0" 1026 | }, 1027 | "engines": { 1028 | "node": "4.x || >=6.0.0" 1029 | }, 1030 | "peerDependencies": { 1031 | "encoding": "^0.1.0" 1032 | }, 1033 | "peerDependenciesMeta": { 1034 | "encoding": { 1035 | "optional": true 1036 | } 1037 | } 1038 | }, 1039 | "node_modules/node-gyp-build": { 1040 | "version": "4.6.0", 1041 | "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz", 1042 | "integrity": "sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==", 1043 | "optional": true, 1044 | "bin": { 1045 | "node-gyp-build": "bin.js", 1046 | "node-gyp-build-optional": "optional.js", 1047 | "node-gyp-build-test": "build-test.js" 1048 | } 1049 | }, 1050 | "node_modules/node-http-xhr": { 1051 | "version": "1.3.4", 1052 | "resolved": "https://registry.npmjs.org/node-http-xhr/-/node-http-xhr-1.3.4.tgz", 1053 | "integrity": "sha512-0bA08/2RKWxw6pMkOVd3KP+0F5+ifQLMMTDxrCgxlgkoU1N8DhCbCSAYEqpgaVYM2smvbVVewiXjW+8AyoLfxQ==" 1054 | }, 1055 | "node_modules/oauth-sign": { 1056 | "version": "0.9.0", 1057 | "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", 1058 | "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", 1059 | "engines": { 1060 | "node": "*" 1061 | } 1062 | }, 1063 | "node_modules/one-time": { 1064 | "version": "0.0.4", 1065 | "resolved": "https://registry.npmjs.org/one-time/-/one-time-0.0.4.tgz", 1066 | "integrity": "sha512-qAMrwuk2xLEutlASoiPiAMW3EN3K96Ka/ilSXYr6qR1zSVXw2j7+yDSqGTC4T9apfLYxM3tLLjKvgPdAUK7kYQ==" 1067 | }, 1068 | "node_modules/performance-now": { 1069 | "version": "2.1.0", 1070 | "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", 1071 | "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" 1072 | }, 1073 | "node_modules/proxy-from-env": { 1074 | "version": "1.1.0", 1075 | "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", 1076 | "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" 1077 | }, 1078 | "node_modules/psl": { 1079 | "version": "1.9.0", 1080 | "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", 1081 | "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" 1082 | }, 1083 | "node_modules/punycode": { 1084 | "version": "2.3.0", 1085 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", 1086 | "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", 1087 | "engines": { 1088 | "node": ">=6" 1089 | } 1090 | }, 1091 | "node_modules/qs": { 1092 | "version": "6.5.3", 1093 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", 1094 | "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", 1095 | "engines": { 1096 | "node": ">=0.6" 1097 | } 1098 | }, 1099 | "node_modules/regenerator-runtime": { 1100 | "version": "0.13.11", 1101 | "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", 1102 | "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" 1103 | }, 1104 | "node_modules/request": { 1105 | "version": "2.88.2", 1106 | "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", 1107 | "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", 1108 | "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", 1109 | "dependencies": { 1110 | "aws-sign2": "~0.7.0", 1111 | "aws4": "^1.8.0", 1112 | "caseless": "~0.12.0", 1113 | "combined-stream": "~1.0.6", 1114 | "extend": "~3.0.2", 1115 | "forever-agent": "~0.6.1", 1116 | "form-data": "~2.3.2", 1117 | "har-validator": "~5.1.3", 1118 | "http-signature": "~1.2.0", 1119 | "is-typedarray": "~1.0.0", 1120 | "isstream": "~0.1.2", 1121 | "json-stringify-safe": "~5.0.1", 1122 | "mime-types": "~2.1.19", 1123 | "oauth-sign": "~0.9.0", 1124 | "performance-now": "^2.1.0", 1125 | "qs": "~6.5.2", 1126 | "safe-buffer": "^5.1.2", 1127 | "tough-cookie": "~2.5.0", 1128 | "tunnel-agent": "^0.6.0", 1129 | "uuid": "^3.3.2" 1130 | }, 1131 | "engines": { 1132 | "node": ">= 6" 1133 | } 1134 | }, 1135 | "node_modules/request/node_modules/form-data": { 1136 | "version": "2.3.3", 1137 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", 1138 | "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", 1139 | "dependencies": { 1140 | "asynckit": "^0.4.0", 1141 | "combined-stream": "^1.0.6", 1142 | "mime-types": "^2.1.12" 1143 | }, 1144 | "engines": { 1145 | "node": ">= 0.12" 1146 | } 1147 | }, 1148 | "node_modules/requests": { 1149 | "version": "0.3.0", 1150 | "resolved": "https://registry.npmjs.org/requests/-/requests-0.3.0.tgz", 1151 | "integrity": "sha512-1B6nkiHjC1O1cSgFhEwkc+xd8vuj04h7xSmCg5yI8nmhCIKbPkX47od8erQ2pokBt5qxUO7dwP4jplXD6k6ISA==", 1152 | "dependencies": { 1153 | "axo": "0.0.x", 1154 | "eventemitter3": "~4.0.0", 1155 | "extendible": "0.1.x", 1156 | "hang": "1.0.x", 1157 | "loads": "0.0.x", 1158 | "node-http-xhr": "~1.3.0", 1159 | "xhr-send": "1.0.x" 1160 | } 1161 | }, 1162 | "node_modules/rpc-websockets": { 1163 | "version": "7.5.1", 1164 | "resolved": "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-7.5.1.tgz", 1165 | "integrity": "sha512-kGFkeTsmd37pHPMaHIgN1LVKXMi0JD782v4Ds9ZKtLlwdTKjn+CxM9A9/gLT2LaOuEcEFGL98h1QWQtlOIdW0w==", 1166 | "dependencies": { 1167 | "@babel/runtime": "^7.17.2", 1168 | "eventemitter3": "^4.0.7", 1169 | "uuid": "^8.3.2", 1170 | "ws": "^8.5.0" 1171 | }, 1172 | "funding": { 1173 | "type": "paypal", 1174 | "url": "https://paypal.me/kozjak" 1175 | }, 1176 | "optionalDependencies": { 1177 | "bufferutil": "^4.0.1", 1178 | "utf-8-validate": "^5.0.2" 1179 | } 1180 | }, 1181 | "node_modules/rpc-websockets/node_modules/uuid": { 1182 | "version": "8.3.2", 1183 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", 1184 | "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", 1185 | "bin": { 1186 | "uuid": "dist/bin/uuid" 1187 | } 1188 | }, 1189 | "node_modules/rpc-websockets/node_modules/ws": { 1190 | "version": "8.13.0", 1191 | "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", 1192 | "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", 1193 | "engines": { 1194 | "node": ">=10.0.0" 1195 | }, 1196 | "peerDependencies": { 1197 | "bufferutil": "^4.0.1", 1198 | "utf-8-validate": ">=5.0.2" 1199 | }, 1200 | "peerDependenciesMeta": { 1201 | "bufferutil": { 1202 | "optional": true 1203 | }, 1204 | "utf-8-validate": { 1205 | "optional": true 1206 | } 1207 | } 1208 | }, 1209 | "node_modules/safe-buffer": { 1210 | "version": "5.2.1", 1211 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 1212 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 1213 | "funding": [ 1214 | { 1215 | "type": "github", 1216 | "url": "https://github.com/sponsors/feross" 1217 | }, 1218 | { 1219 | "type": "patreon", 1220 | "url": "https://www.patreon.com/feross" 1221 | }, 1222 | { 1223 | "type": "consulting", 1224 | "url": "https://feross.org/support" 1225 | } 1226 | ] 1227 | }, 1228 | "node_modules/safer-buffer": { 1229 | "version": "2.1.2", 1230 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 1231 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 1232 | }, 1233 | "node_modules/sshpk": { 1234 | "version": "1.17.0", 1235 | "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", 1236 | "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", 1237 | "dependencies": { 1238 | "asn1": "~0.2.3", 1239 | "assert-plus": "^1.0.0", 1240 | "bcrypt-pbkdf": "^1.0.0", 1241 | "dashdash": "^1.12.0", 1242 | "ecc-jsbn": "~0.1.1", 1243 | "getpass": "^0.1.1", 1244 | "jsbn": "~0.1.0", 1245 | "safer-buffer": "^2.0.2", 1246 | "tweetnacl": "~0.14.0" 1247 | }, 1248 | "bin": { 1249 | "sshpk-conv": "bin/sshpk-conv", 1250 | "sshpk-sign": "bin/sshpk-sign", 1251 | "sshpk-verify": "bin/sshpk-verify" 1252 | }, 1253 | "engines": { 1254 | "node": ">=0.10.0" 1255 | } 1256 | }, 1257 | "node_modules/superstruct": { 1258 | "version": "0.14.2", 1259 | "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-0.14.2.tgz", 1260 | "integrity": "sha512-nPewA6m9mR3d6k7WkZ8N8zpTWfenFH3q9pA2PkuiZxINr9DKB2+40wEQf0ixn8VaGuJ78AB6iWOtStI+/4FKZQ==" 1261 | }, 1262 | "node_modules/supports-color": { 1263 | "version": "7.2.0", 1264 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 1265 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 1266 | "dependencies": { 1267 | "has-flag": "^4.0.0" 1268 | }, 1269 | "engines": { 1270 | "node": ">=8" 1271 | } 1272 | }, 1273 | "node_modules/text-encoding-utf-8": { 1274 | "version": "1.0.2", 1275 | "resolved": "https://registry.npmjs.org/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz", 1276 | "integrity": "sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg==" 1277 | }, 1278 | "node_modules/through": { 1279 | "version": "2.3.8", 1280 | "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", 1281 | "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==" 1282 | }, 1283 | "node_modules/toformat": { 1284 | "version": "2.0.0", 1285 | "resolved": "https://registry.npmjs.org/toformat/-/toformat-2.0.0.tgz", 1286 | "integrity": "sha512-03SWBVop6nU8bpyZCx7SodpYznbZF5R4ljwNLBcTQzKOD9xuihRo/psX58llS1BMFhhAI08H3luot5GoXJz2pQ==" 1287 | }, 1288 | "node_modules/tough-cookie": { 1289 | "version": "2.5.0", 1290 | "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", 1291 | "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", 1292 | "dependencies": { 1293 | "psl": "^1.1.28", 1294 | "punycode": "^2.1.1" 1295 | }, 1296 | "engines": { 1297 | "node": ">=0.8" 1298 | } 1299 | }, 1300 | "node_modules/tr46": { 1301 | "version": "0.0.3", 1302 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", 1303 | "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" 1304 | }, 1305 | "node_modules/tslib": { 1306 | "version": "2.5.2", 1307 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.2.tgz", 1308 | "integrity": "sha512-5svOrSA2w3iGFDs1HibEVBGbDrAY82bFQ3HZ3ixB+88nsbsWQoKqDRb5UBYAUPEzbBn6dAp5gRNXglySbx1MlA==" 1309 | }, 1310 | "node_modules/tunnel-agent": { 1311 | "version": "0.6.0", 1312 | "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", 1313 | "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", 1314 | "dependencies": { 1315 | "safe-buffer": "^5.0.1" 1316 | }, 1317 | "engines": { 1318 | "node": "*" 1319 | } 1320 | }, 1321 | "node_modules/tweetnacl": { 1322 | "version": "0.14.5", 1323 | "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", 1324 | "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" 1325 | }, 1326 | "node_modules/uri-js": { 1327 | "version": "4.4.1", 1328 | "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", 1329 | "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", 1330 | "dependencies": { 1331 | "punycode": "^2.1.0" 1332 | } 1333 | }, 1334 | "node_modules/utf-8-validate": { 1335 | "version": "5.0.10", 1336 | "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", 1337 | "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", 1338 | "hasInstallScript": true, 1339 | "optional": true, 1340 | "dependencies": { 1341 | "node-gyp-build": "^4.3.0" 1342 | }, 1343 | "engines": { 1344 | "node": ">=6.14.2" 1345 | } 1346 | }, 1347 | "node_modules/uuid": { 1348 | "version": "3.4.0", 1349 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", 1350 | "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", 1351 | "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", 1352 | "bin": { 1353 | "uuid": "bin/uuid" 1354 | } 1355 | }, 1356 | "node_modules/verror": { 1357 | "version": "1.10.0", 1358 | "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", 1359 | "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", 1360 | "engines": [ 1361 | "node >=0.6.0" 1362 | ], 1363 | "dependencies": { 1364 | "assert-plus": "^1.0.0", 1365 | "core-util-is": "1.0.2", 1366 | "extsprintf": "^1.2.0" 1367 | } 1368 | }, 1369 | "node_modules/webidl-conversions": { 1370 | "version": "3.0.1", 1371 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", 1372 | "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" 1373 | }, 1374 | "node_modules/whatwg-url": { 1375 | "version": "5.0.0", 1376 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", 1377 | "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", 1378 | "dependencies": { 1379 | "tr46": "~0.0.3", 1380 | "webidl-conversions": "^3.0.0" 1381 | } 1382 | }, 1383 | "node_modules/winreg": { 1384 | "version": "1.2.4", 1385 | "resolved": "https://registry.npmjs.org/winreg/-/winreg-1.2.4.tgz", 1386 | "integrity": "sha512-IHpzORub7kYlb8A43Iig3reOvlcBJGX9gZ0WycHhghHtA65X0LYnMRuJs+aH1abVnMJztQkvQNlltnbPi5aGIA==" 1387 | }, 1388 | "node_modules/ws": { 1389 | "version": "7.5.9", 1390 | "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", 1391 | "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", 1392 | "engines": { 1393 | "node": ">=8.3.0" 1394 | }, 1395 | "peerDependencies": { 1396 | "bufferutil": "^4.0.1", 1397 | "utf-8-validate": "^5.0.2" 1398 | }, 1399 | "peerDependenciesMeta": { 1400 | "bufferutil": { 1401 | "optional": true 1402 | }, 1403 | "utf-8-validate": { 1404 | "optional": true 1405 | } 1406 | } 1407 | }, 1408 | "node_modules/xhr-response": { 1409 | "version": "1.0.1", 1410 | "resolved": "https://registry.npmjs.org/xhr-response/-/xhr-response-1.0.1.tgz", 1411 | "integrity": "sha512-m2FlVRCl3VqDcpc8UaWZJpwuHpFR2vYeXv6ipXU2Uuu4vNKFYVEFI0emuJN370Fge+JCbiAnS+JJmSoWVmWrjQ==" 1412 | }, 1413 | "node_modules/xhr-send": { 1414 | "version": "1.0.0", 1415 | "resolved": "https://registry.npmjs.org/xhr-send/-/xhr-send-1.0.0.tgz", 1416 | "integrity": "sha512-789EG4qW6Z0nPvG74AV3WWQCnBG5HxJXNiBsnEivZ8OpbvVA0amH0+g+MNT99o5kt/XLdRezm5KS1wJzcGJztw==" 1417 | }, 1418 | "node_modules/xhr-status": { 1419 | "version": "1.0.1", 1420 | "resolved": "https://registry.npmjs.org/xhr-status/-/xhr-status-1.0.1.tgz", 1421 | "integrity": "sha512-VF0WSqtmkf56OmF26LCWsWvRb1a+WYGdHDoQnPPCVUQTM8CVUAOBcUDsm7nP7SQcgEEdrvF4DmhEADuXdGieyw==" 1422 | } 1423 | } 1424 | } 1425 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dexspyder_v1_cli", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "@raydium-io/raydium-sdk": "^1.3.0-beta.18", 14 | "@solana/spl-token": "^0.3.7", 15 | "@solana/web3.js": "^1.77.2", 16 | "axios": "^1.4.0", 17 | "bs58": "^5.0.0", 18 | "chalk": "^4.1.2", 19 | "clear": "^0.1.0", 20 | "cli-spinners": "^2.9.0", 21 | "hwid": "^0.3.0", 22 | "moment": "^2.29.4", 23 | "request": "^2.88.2", 24 | "requests": "^0.3.0" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/auth/KeyAuth.js: -------------------------------------------------------------------------------- 1 | //* Importing ExecSync from "child_process" *// 2 | const { execSync } = require('child_process') 3 | 4 | //* Importing Axios *// 5 | const axios = require('axios') 6 | 7 | //* Importing OS *// 8 | const os = require('os') 9 | 10 | //* Import FS *// 11 | const fs = require("fs") 12 | 13 | //* KeyAuth Class *// 14 | class KeyAuth { 15 | /** 16 | * @param {string} [name] - The name of the application 17 | * @param {string} [ownerId] - The ownerId of the application 18 | * @param {string} [secret] - The secret of the application 19 | * @param {string} [version] - The version of the application 20 | **/ 21 | constructor(name, ownerId, secret, version) { 22 | if (!(name && ownerId && secret && version)) { 23 | Misc.error('Application not setup correctly.') 24 | } 25 | 26 | this.name = name 27 | this.ownerId = ownerId 28 | this.secret = secret 29 | this.version = version 30 | this.responseTime = null; 31 | }; 32 | 33 | /** 34 | * Initializes the connection with KeyAuth in order to use any of the functions 35 | **/ 36 | Initialize = () => new Promise(async (resolve) => { 37 | const post_data = { 38 | type: 'init', 39 | ver: this.version, 40 | name: this.name, 41 | ownerid: this.ownerId 42 | } 43 | 44 | const Json = await this.make_request(post_data) 45 | 46 | if (Json === 'KeyAuth_Invalid') { 47 | Misc.error('Invalid Application, please check your application details.') 48 | } 49 | 50 | if (!Json.success || Json.success == false) { 51 | return resolve(false) 52 | } 53 | 54 | this.app_data = Json.appinfo 55 | 56 | this.sessionid = Json.sessionid 57 | this.initialized = true 58 | 59 | resolve(true) 60 | }) 61 | 62 | /** 63 | * Registers the user using a license and gives the user a subscription that matches their license level 64 | * @param {string} [username] - The username for the user 65 | * @param {string} [password] - The password for the user 66 | * @param {string} [license] - The License Key for the sub 67 | **/ 68 | register = (user, password, license, email = "") => new Promise(async (resolve) => { 69 | this.check_initialize() 70 | 71 | let hwId 72 | if (!hwId) { 73 | hwId = Misc.GetCurrentHardwareId() 74 | } 75 | 76 | const post_data = { 77 | type: 'register', 78 | username: user, 79 | pass: password, 80 | email, 81 | key: license, 82 | hwid: hwId, 83 | sessionid: this.sessionid, 84 | name: this.name, 85 | ownerid: this.ownerId 86 | } 87 | 88 | const Json = await this.make_request(post_data) 89 | 90 | this.Load_Response_Struct(Json) 91 | if (Json.success) { 92 | this.Load_User_Data(Json.info) 93 | return resolve(Json.message) 94 | } else { 95 | Misc.error(Json.message) 96 | } 97 | }) 98 | 99 | forgot = (username, email) => new Promise(async (resolve) => { 100 | this.check_initialize() 101 | 102 | const post_data = { 103 | type: 'forgot', 104 | username, 105 | email, 106 | sessionid: this.sessionid, 107 | name: this.name, 108 | ownerid: this.ownerId 109 | } 110 | 111 | const Json = await this.make_request(post_data) 112 | 113 | this.Load_Response_Struct(Json) 114 | }); 115 | 116 | /** 117 | * Authenticates the user using their username and password 118 | * @param {string} [username] - The username for the user 119 | * @param {string} [password] - The password for the user 120 | **/ 121 | login = (username, password) => new Promise(async (resolve) => { 122 | this.check_initialize() 123 | 124 | let hwId 125 | if (!hwId) { 126 | hwId = Misc.GetCurrentHardwareId() 127 | } 128 | 129 | const post_data = { 130 | type: 'login', 131 | username, 132 | pass: password, 133 | hwid: hwId, 134 | sessionid: this.sessionid, 135 | name: this.name, 136 | ownerid: this.ownerId 137 | } 138 | 139 | const Json = await this.make_request(post_data) 140 | 141 | this.Load_Response_Struct(Json) 142 | if (Json.success && Json.success == true) { 143 | this.Load_User_Data(Json.info) 144 | return resolve(Json) 145 | } else { 146 | Misc.error(Json.message) 147 | } 148 | }) 149 | 150 | /** 151 | * Authenticate without using usernames and passwords 152 | * @param {string} [key] - Licence used to login with 153 | **/ 154 | license = (key) => new Promise(async (resolve) => { 155 | this.check_initialize() 156 | 157 | let hwId 158 | if (!hwId) { 159 | hwId = Misc.GetCurrentHardwareId() 160 | } 161 | 162 | const post_data = { 163 | type: 'license', 164 | key, 165 | hwid: hwId, 166 | sessionid: this.sessionid, 167 | name: this.name, 168 | ownerid: this.ownerId 169 | } 170 | 171 | const Json = await this.make_request(post_data) 172 | 173 | this.Load_Response_Struct(Json) 174 | if (Json.success && Json.success == true) { 175 | this.Load_User_Data(Json.info) 176 | return resolve(Json) 177 | } else { 178 | Misc.error(Json.message) 179 | } 180 | }) 181 | 182 | /** 183 | * Gives the user a subscription that has the same level as the key 184 | * @param {string} [username] - Username of the user thats going to get upgraded 185 | * @param {string} [license] - License with the same level as the subscription you want to give the user 186 | **/ 187 | upgrade = (username, license) => new Promise(async (resolve) => { 188 | this.check_initialize() 189 | 190 | const post_data = { 191 | type: 'upgrade', 192 | username, 193 | key: license, 194 | sessionid: this.sessionid, 195 | name: this.name, 196 | ownerid: this.ownerId 197 | } 198 | 199 | const Json = await this.make_request(post_data) 200 | 201 | this.Load_Response_Struct(Json) 202 | if (!Json.success || Json.success == false) { 203 | return resolve(Json.message) 204 | } else { 205 | // Don't let them yet for dashboard. 206 | Misc.error(Json.message) 207 | } 208 | }) 209 | 210 | /** 211 | * Gets an existing global variable 212 | * @param {string} [VarId] - Name of the variable / Variable ID 213 | * returns {string} - The value of the variable / The content of the variable 214 | **/ 215 | var = (VarId) => new Promise(async (resolve) => { 216 | this.check_initialize() 217 | 218 | const post_data = { 219 | type: 'var', 220 | varid: VarId, 221 | sessionid: this.sessionid, 222 | name: this.name, 223 | ownerid: this.ownerId 224 | } 225 | 226 | const Json = await this.make_request(post_data) 227 | 228 | this.Load_Response_Struct(Json) 229 | if (Json.success && Json.success == true) { 230 | return resolve(Json) 231 | } 232 | 233 | resolve(Json.message) 234 | }) 235 | 236 | /** 237 | * Gets the an existing user variable 238 | * @Param {string} [VarId] - User Variable Name 239 | * returns {string} - The value of the variable / The content of the user variable 240 | **/ 241 | GetVar = (VarId) => new Promise(async (resolve) => { 242 | this.check_initialize() 243 | 244 | const post_data = { 245 | type: 'getvar', 246 | var: VarId, 247 | sessionid: this.sessionid, 248 | name: this.name, 249 | ownerid: this.ownerId 250 | } 251 | 252 | const Json = await this.make_request(post_data) 253 | 254 | this.Load_Response_Struct(Json) 255 | if (Json.success && Json.success == true) { 256 | return resolve(Json) 257 | } 258 | 259 | resolve(Json.message) 260 | }) 261 | 262 | /** 263 | * Change the data of an existing user variable, *User must be logged in* 264 | * @Param {string} [VarId] - User variable name 265 | * @Param {string} [VarData] - The content of the variable 266 | **/ 267 | SetVar = (VarId, VarData) => new Promise(async (resolve) => { 268 | this.check_initialize() 269 | 270 | const post_data = { 271 | type: 'setvar', 272 | var: VarId, 273 | data: VarData, 274 | sessionid: this.sessionid, 275 | name: this.name, 276 | ownerid: this.ownerId 277 | } 278 | 279 | const Json = await this.make_request(post_data) 280 | 281 | this.Load_Response_Struct(Json) 282 | if (Json.success && Json.success == true) { 283 | return resolve(Json) 284 | } 285 | 286 | resolve(Json.message) 287 | }) 288 | 289 | /** 290 | * Bans the current logged in user 291 | **/ 292 | ban = () => new Promise(async (resolve) => { 293 | this.check_initialize() 294 | 295 | const post_data = { 296 | type: 'ban', 297 | sessionid: this.sessionid, 298 | name: this.name, 299 | ownerid: this.ownerId 300 | } 301 | 302 | const Json = await this.make_request(post_data) 303 | 304 | this.Load_Response_Struct(Json) 305 | if (Json.success && Json.success == true) { 306 | return resolve(true) 307 | } 308 | 309 | resolve(Json.message) 310 | }) 311 | 312 | /** 313 | * KeyAuth acts as proxy and downlods the file in a secure way 314 | * @Param {string} [fileId] - File ID 315 | * @Param {string} [path] - Path to save the file 316 | * @Param {boolean} [execute] - Execute the file after download - Windows Only Requires path for file! 317 | * returns {byte} - Returns The bytes of the download file 318 | **/ 319 | file = (fileId, path = null, execute = false) => new Promise(async (resolve) => { 320 | this.check_initialize() 321 | 322 | const post_data = { 323 | type: 'file', 324 | fileid: fileId.toString(), 325 | sessionid: this.sessionid, 326 | name: this.name, 327 | ownerid: this.ownerId 328 | } 329 | 330 | const Json = await this.make_request(post_data) 331 | 332 | this.Load_Response_Struct(Json) 333 | if (Json.success && Json.success == true) { 334 | 335 | if (path != null) { 336 | var bytes = await this.strToByteArray(Json.contents); 337 | fs.writeFile(path, bytes, async (err) => { 338 | if (err) throw err; 339 | 340 | if (execute) { 341 | var exec = require('child_process').exec; 342 | await exec(path, function (error, stdout, stderr) { 343 | if (error) { 344 | console.error(error); 345 | return; 346 | } 347 | }); 348 | 349 | return resolve(true); 350 | } else { 351 | return resolve(true); 352 | } 353 | }); 354 | } else { 355 | return resolve(this.strToByteArray(Json.contents)) 356 | } 357 | } 358 | 359 | resolve(Json.message) 360 | }) 361 | 362 | 363 | /** 364 | * Sends a request to a webhook that you've added in the dashboard in a safe way without it being showed for example a http debugger 365 | * @Param {string} [webId] - Webhook ID 366 | * @Param {string} [Params] - Webhook Parameters 367 | * @Param {string} [message] - Body of the request, empty by default 368 | * @Param {string} [username] - Content type, empty by default 369 | * Returns {string} - Returns the response of the webhook 370 | **/ 371 | webhook = (webId, Params, body = '', contType = '') => new Promise(async (resolve) => { // havent tested 372 | this.check_initialize() 373 | 374 | const post_data = { 375 | type: 'webhook', 376 | webid: webId, 377 | params: Params, 378 | body, 379 | conttype: contType, 380 | sessionid: this.sessionid, 381 | name: this.name, 382 | ownerid: this.ownerId 383 | } 384 | 385 | const Json = await this.make_request(post_data) 386 | 387 | this.Load_Response_Struct(Json) 388 | if (Json.success && Json.success == true) { 389 | return resolve(Json.response) 390 | } 391 | 392 | resolve(Json.message) 393 | }) 394 | 395 | /** 396 | * Check if the current session is validated or not 397 | * Returns {string} - Returns if the session is valid or not 398 | **/ 399 | check = () => new Promise(async (resolve) => { 400 | this.check_initialize() 401 | 402 | const post_data = { 403 | type: 'check', 404 | sessionid: this.sessionid, 405 | name: this.name, 406 | ownerid: this.ownerId 407 | } 408 | 409 | const Json = await this.make_request(post_data) 410 | 411 | this.Load_Response_Struct(Json) 412 | if (Json.success && Json.success == true) { 413 | return resolve(Json) 414 | }; 415 | 416 | resolve(Json.message) 417 | }) 418 | 419 | /** 420 | * Checks if the current IP Address/HardwareId is blacklisted 421 | * returns {boolean} - Returns true if the IP Address/HardwareId is blacklisted, otherwise false 422 | **/ 423 | checkBlack = () => new Promise(async (resolve) => { 424 | this.check_initialize() 425 | 426 | const hwId = Misc.GetCurrentHardwareId() 427 | 428 | const post_data = { 429 | type: 'checkblacklist', 430 | hwid: hwId, 431 | sessionid: this.sessionid, 432 | name: this.name, 433 | ownerid: this.ownerId 434 | } 435 | 436 | const Json = await this.make_request(post_data) 437 | 438 | this.Load_Response_Struct(Json) 439 | if (Json.success && Json.success == true) { 440 | return resolve(true) 441 | } 442 | 443 | resolve(false) 444 | }) 445 | 446 | /** 447 | * Fetch usernames of online users 448 | * Returns {array} - Returns an array of usernames 449 | **/ 450 | fetchOnline = () => new Promise(async (resolve) => { 451 | this.check_initialize() 452 | 453 | const post_data = { 454 | type: 'fetchOnline', 455 | sessionid: this.sessionid, 456 | name: this.name, 457 | ownerid: this.ownerId 458 | } 459 | 460 | const Json = await this.make_request(post_data) 461 | 462 | this.Load_Response_Struct(Json) 463 | if (Json.success && Json.success == true) { 464 | return resolve(Json.users) 465 | } else { 466 | return resolve(Json.message) 467 | } 468 | }) 469 | 470 | /** 471 | * Gets the last 20 sent messages of that channel 472 | * @param {string} [ChannelName] - The name of the channel, where you want the messages 473 | * Returns {array} the last 20 sent messages of that channel 474 | **/ 475 | ChatGet = (ChannelName) => new Promise(async (resolve) => { 476 | this.check_initialize() 477 | 478 | const post_data = { 479 | type: 'chatget', 480 | channel: ChannelName, 481 | sessionid: this.sessionid, 482 | name: this.name, 483 | ownerid: this.ownerId 484 | } 485 | 486 | const Json = await this.make_request(post_data) 487 | 488 | this.Load_Response_Struct(Json) 489 | if (Json.success && Json.success == true) { 490 | if (Json.messages[0].message == 'not_found') { 491 | return resolve([]) 492 | } else { 493 | return resolve(Json.messages) 494 | } 495 | } else { 496 | return resolve([]) 497 | } 498 | }) 499 | 500 | /** 501 | * Sends a message to the given channel name 502 | * @param {string} [ChannelName] - Channel Name where the message will be sent to 503 | * @param {string} [Message] - Message what will be sent to [ChannelName] 504 | * Returns {bool} - Returns true if the message was sent, otherwise false 505 | **/ 506 | ChatSend = (ChannelName, Message) => new Promise(async (resolve) => { 507 | this.check_initialize() 508 | 509 | const post_data = { 510 | type: 'fetchOnline', 511 | message: Message, 512 | channel: ChannelName, 513 | sessionid: this.sessionid, 514 | name: this.name, 515 | ownerid: this.ownerId 516 | } 517 | 518 | const Json = await this.make_request(post_data) 519 | 520 | this.Load_Response_Struct(Json) 521 | if (Json.success && Json.success == true) { 522 | return resolve(true) 523 | } else { 524 | return resolve(false) 525 | } 526 | }) 527 | 528 | /** 529 | * Logs the IP address,PC Name with a message, if a discord webhook is set up in the app settings, the log will get sent there and the dashboard if not set up it will only be in the dashboard 530 | * @param {string} [message] - Message / Discord Embed Title Message 531 | * Returns None 532 | **/ 533 | log = (message) => new Promise(async (resolve) => { 534 | this.check_initialize() 535 | 536 | const post_data = { 537 | type: 'log', 538 | pcuser: os.userInfo().username, 539 | message, 540 | sessionid: this.sessionid, 541 | name: this.name, 542 | ownerid: this.ownerId 543 | } 544 | 545 | await this.make_request(post_data) 546 | resolve(true) 547 | }) 548 | 549 | 550 | strToByteArray = (hex) => new Promise(async (resolve) => { 551 | try { 552 | const numberChars = hex.length; 553 | const bytes = new Uint8Array(numberChars / 2); 554 | for (let i = 0; i < numberChars; i += 2) { 555 | bytes[i / 2] = parseInt(hex.substr(i, 2), 16); 556 | } 557 | resolve(bytes) 558 | } catch (err) { 559 | console.error('The session has ended, open program again.'); 560 | process.exit(0); 561 | } 562 | }) 563 | 564 | /** 565 | * Check if the current session is initialized 566 | * @returns [true] if client is Initialized. 567 | **/ 568 | check_initialize() { 569 | if (!this.initialized) { 570 | Misc.error('You must initialize the API before using it!') 571 | } 572 | return true 573 | }; 574 | 575 | /** 576 | * Load the response struct for Response of Request 577 | **/ 578 | Load_Response_Struct(data) { 579 | this.response = { 580 | success: data.success, 581 | message: data.message 582 | } 583 | }; 584 | 585 | /** 586 | * Load the response struct for User Data 587 | **/ 588 | Load_User_Data(data) { 589 | this.user_data = { 590 | username: data.username, 591 | ip: data.ip, 592 | hwid: data.hwid, 593 | createdate: data.createdate, 594 | lastlogin: data.lastlogin, 595 | subscriptions: data.subscriptions 596 | } 597 | }; 598 | 599 | /** 600 | * Change Console Application Title 601 | * @param {string} [title] - Your new Title for the App 602 | * Returns Promise Timeout 603 | **/ 604 | setTitle(title) { 605 | process.stdout.write( 606 | String.fromCharCode(27) + ']0;' + title + String.fromCharCode(7) 607 | ) 608 | }; 609 | 610 | /** 611 | * Sleeping / Timeout Function 612 | * @param {number} [ms] - Time in milliseconds 613 | * Returns Promise Timeout 614 | **/ 615 | sleep(ms) { 616 | return new Promise((resolve) => { 617 | setTimeout(resolve, ms) 618 | }) 619 | }; 620 | 621 | /** 622 | * Request the API with the POST Data 623 | * @param {string} [data] - Post Data Array 624 | * Returns {array} - Returns the API Response [NON-ENCRYPTED] 625 | **/ 626 | make_request(data) { 627 | const startTime = Date.now(); // Start the stopwatch 628 | 629 | return new Promise(async (resolve) => { 630 | const request = await axios({ 631 | method: 'POST', 632 | url: 'https://keyauth.win/api/1.1/', 633 | data: new URLSearchParams(data).toString() 634 | }).catch((err) => { 635 | Misc.error(err) 636 | }) 637 | 638 | const endTime = Date.now(); // Stop the stopwatch 639 | 640 | this.responseTime = `${endTime - startTime} ms`; 641 | 642 | if (request && request.data) { 643 | resolve(request.data) 644 | } else { 645 | resolve(null) 646 | }; 647 | }) 648 | } 649 | 650 | 651 | } 652 | 653 | class Misc { 654 | /** 655 | * Get the current user HardwareId 656 | * @returns {string} - Returns user HardwareID 657 | **/ 658 | static GetCurrentHardwareId() { 659 | if (os.platform() != 'win32') return false 660 | 661 | const cmd = execSync('wmic useraccount where name="%username%" get sid').toString('utf-8') 662 | 663 | const system_id = cmd.split('\n')[1].trim() 664 | return system_id 665 | }; 666 | 667 | /** 668 | * Error Print Function 669 | * @param {string} [message] - Message to Show and then exit app. 670 | **/ 671 | static error(message) { 672 | console.log(message) 673 | return process.exit(0) 674 | } 675 | } 676 | 677 | /** 678 | * Export KeyAuth Class to be used in other files 679 | **/ 680 | module.exports = KeyAuth 681 | -------------------------------------------------------------------------------- /src/auth/checkKey.js: -------------------------------------------------------------------------------- 1 | const KeyAuth = require('./KeyAuth'); 2 | const readline = require("readline"); 3 | const moment = require("moment"); 4 | const CRL = readline.createInterface({ input: process.stdin, output: process.stdout }); 5 | 6 | const KeyAuthApp = new KeyAuth( 7 | "DexSpyder", 8 | "8d7VumkIWc", 9 | "86342a655b33a96164cf9899837d05e20b8e568bacbd414c3a3839c21dab7eab", // Application Secret 10 | "1.0" 11 | ); 12 | 13 | 14 | (async () => { 15 | await KeyAuthApp.Initialize(); 16 | await KeyAuthApp.check(); 17 | await KeyAuthApp.sleep(1200); 18 | var license = ""; 19 | 20 | await CRL.question("License : ", async (lic) => { 21 | license = lic; 22 | await KeyAuthApp.license(license); 23 | if (KeyAuthApp.response.status == "failed") { 24 | console.log(KeyAuthApp.response.message); 25 | process.exit(0); 26 | } 27 | console.log(KeyAuthApp.response.message); 28 | await CRL.question("Press any key to continue...", async () => { 29 | console.clear(); 30 | }); 31 | }); 32 | })(); -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import readline from 'readline'; 2 | import graph_menu from './utils'; 3 | import chalk from 'chalk'; 4 | import {update_slippage,update_rpc,update_wallet,show_config, config} from "./modules/config" 5 | import fs from "fs"; 6 | import spinner from "cli-spinners"; 7 | import {get_token_amount} from "./modules/fetch_token" 8 | import {get_wallet} from "./modules/get_keypair" 9 | import { Connection, Keypair, PublicKey } from '@solana/web3.js'; 10 | import { fetchPoolKeys } from './modules/pool_keys'; 11 | import {compute} from "./modules/compute"; 12 | import {swap} from "./modules/swap"; 13 | import { getTokenAccountsByOwner } from "./modules/get_accounts"; 14 | 15 | 16 | //control variables 17 | var choice = 0; 18 | 19 | //key auth instance 20 | 21 | //spinner function 22 | 23 | const Spinner = spinner.dots4; 24 | let i = 0; 25 | let animationInterval; 26 | 27 | const updateSpinner = () => { 28 | const frame = Spinner.frames[i % Spinner.frames.length]; 29 | process.stdout.cursorTo(0); 30 | process.stdout.write('\t'+frame); 31 | i++; 32 | }; 33 | 34 | 35 | const startSpinner = () => { 36 | animationInterval = setInterval(updateSpinner, Spinner.interval); 37 | }; 38 | 39 | const stopSpinner = () => { 40 | clearInterval(animationInterval); 41 | process.stdout.clearLine(0); 42 | process.stdout.cursorTo(0); 43 | }; 44 | 45 | //creating interface 46 | const rl = readline.createInterface({ 47 | input: process.stdin, 48 | output: process.stdout 49 | }); 50 | 51 | //clearing-resetting screen 52 | function clear_screen() { 53 | console.clear(); 54 | } 55 | 56 | //sleep function 57 | function sleep(ms:number) { 58 | return new Promise(resolve => setTimeout(resolve, ms)); 59 | } 60 | 61 | 62 | //program start 63 | 64 | //initial authentication 65 | 66 | //(async () => { 67 | // 68 | // startSpinner() 69 | // stopSpinner() 70 | // 71 | // var config_txt = fs.readFileSync('config.json','utf8'); 72 | // var config_obj:config = JSON.parse(config_txt); 73 | // const license = config_obj.license; 74 | // if (license != ''){ 75 | // await verify_license(license) 76 | // }else{ 77 | // rl.question("\tLicense : ", async (lic) => { 78 | // await verify_license(lic); 79 | // }); 80 | // } 81 | //})(); 82 | 83 | main() 84 | 85 | 86 | async function start_swapping( 87 | connection:Connection, 88 | is_snipe:boolean, 89 | amount_in:number, 90 | pool:string, 91 | slip:number, 92 | owner:Keypair 93 | ) 94 | { 95 | 96 | console.log(chalk.greenBright('\tinputs valid\n')); 97 | console.log(chalk.white(`\t[1] - ${chalk.blueBright(is_snipe?'Snipe':'Sell')}`)); 98 | console.log(chalk.white('\t[2] - Return')); 99 | 100 | rl.question(`\n\t${is_snipe?'[Sniper]':'[Exit Position]'} - choice: `, async (answer) => { 101 | 102 | const ans = parseInt(answer); 103 | if (ans == 1){ 104 | finished = false; 105 | const SwapSpinner = spinner.dots4; 106 | let i = 0; 107 | let animationInterval; 108 | 109 | const updateSwapSpinner = () => { 110 | const frame = Spinner.frames[i % Spinner.frames.length]; 111 | process.stdout.cursorTo(0); 112 | process.stdout.write(chalk.blueBright('\tSwapping'+frame)); 113 | i++; 114 | }; 115 | 116 | 117 | const startSwapSpinner = () => { 118 | animationInterval = setInterval(updateSwapSpinner, SwapSpinner.interval); 119 | }; 120 | 121 | const stopSwapSpinner = () => { 122 | clearInterval(animationInterval); 123 | process.stdout.clearLine(0); 124 | process.stdout.cursorTo(0); 125 | }; 126 | 127 | startSpinner(); 128 | var finished:boolean = false; 129 | const pool_keys = await fetchPoolKeys(connection, new PublicKey(pool)); 130 | 131 | var token_in_key:PublicKey; 132 | var token_out_key:PublicKey; 133 | 134 | if(is_snipe){ 135 | token_in_key = pool_keys.quoteMint; 136 | token_out_key = pool_keys.baseMint; 137 | }else{ 138 | token_in_key = pool_keys.baseMint; 139 | token_out_key = pool_keys.quoteMint; 140 | } 141 | 142 | while(!finished){ 143 | 144 | const computation:any = await compute(connection,pool_keys,token_in_key,token_out_key,amount_in,slip); 145 | 146 | const amountOut = computation[0]; 147 | 148 | const minAmountOut = computation[1]; 149 | 150 | const currentPrice = computation[2]; 151 | 152 | const executionPrice = computation[3]; 153 | 154 | const priceImpact = computation[4]; 155 | 156 | const fee = computation[5]; 157 | 158 | const amountIn = computation[6]; 159 | 160 | stopSpinner(); 161 | 162 | 163 | console.log(`\n\tAmount out: ${amountOut.toFixed()},\n\tMin Amount out: ${minAmountOut.toFixed()}`) 164 | if (priceImpact.toFixed() > 5){ 165 | console.log(chalk.red(`\tpriceImpact: ${priceImpact.toFixed()}`)) 166 | }else if(priceImpact.toFixed() < 5 && priceImpact.toFixed() > 1){ 167 | console.log(chalk.yellowBright(`\tpriceImpact: ${priceImpact.toFixed()}`)) 168 | }else{ 169 | console.log(chalk.green(`\tpriceImpact: ${priceImpact.toFixed()}`)) 170 | } 171 | 172 | 173 | console.log('\n') 174 | 175 | startSwapSpinner() 176 | const token_accounts = await getTokenAccountsByOwner(connection, owner.publicKey); 177 | 178 | const swap_status = await swap(connection,pool_keys,owner,token_accounts,is_snipe,amountIn,minAmountOut); 179 | stopSwapSpinner() 180 | 181 | if (swap_status == 0){ 182 | console.log(chalk.greenBright('\tSwap successful!')) 183 | rl.question("\tpress enter to return..", async () => { 184 | snipe_menu(); 185 | }); 186 | break 187 | }else{ 188 | console.log(chalk.red('\tSwap failed, retrying...')) 189 | continue 190 | } 191 | } 192 | 193 | }else if(ans == 2){ 194 | snipe_menu(); 195 | }else{ 196 | console.log(chalk.red("\n\tInvalid choice")); 197 | await sleep(1000); 198 | snipe_menu(); 199 | } 200 | 201 | }) 202 | } 203 | 204 | async function snipe_choice(){ 205 | clear_screen(); 206 | graph_menu.aff_logo(); 207 | graph_menu.aff_title(); 208 | graph_menu.aff_snipe_option(); 209 | 210 | const owner = get_wallet('config.json'); 211 | var config_txt = fs.readFileSync('config.json','utf8'); 212 | var config_obj:config = JSON.parse(config_txt); 213 | const slip = config_obj.slippage; 214 | const connection = new Connection(config_obj.rpc_endpoint); 215 | 216 | rl.question("\n\tPool ID: ", async (answer) => { 217 | 218 | const pool:string = answer; 219 | 220 | rl.question("\n\tAmount in(enter 'MAX' for max amount): ", async(answer)=>{ 221 | 222 | console.log('\n\t'); 223 | startSpinner(); 224 | 225 | 226 | var res:number; 227 | const amount_in = parseFloat(answer); 228 | const is_max = answer; 229 | const token_amount= await get_token_amount(pool,true); 230 | 231 | stopSpinner() 232 | 233 | if (token_amount == -1){ 234 | console.log(chalk.red("\n\tInvalid Pool ID or an error has occured.")); 235 | await sleep(1000); 236 | snipe_menu(); 237 | }else if(token_amount == -2){ 238 | console.log(chalk.red("\n\tSol Balance less than 0.01")); 239 | await sleep(1000); 240 | snipe_menu(); 241 | }else if(token_amount == 0){ 242 | console.log(chalk.red("\n\tNo balance found.")); 243 | await sleep(1000); 244 | snipe_menu(); 245 | }else{ 246 | if (is_max.toUpperCase() == 'MAX'){ 247 | if (token_amount < 0.00001){ 248 | console.log(chalk.red("\n\tInput too small.")); 249 | await sleep(1000); 250 | snipe_menu(); 251 | }else{ 252 | await start_swapping(connection,true,token_amount,pool,slip,owner); 253 | } 254 | }else if(isNaN(amount_in)){ 255 | console.log(chalk.red("\n\tInvalid Input.")); 256 | await sleep(1000); 257 | snipe_menu(); 258 | }else{ 259 | if (amount_in > token_amount){ 260 | console.log(chalk.red("\n\tinsufficient balance.")); 261 | await sleep(1000); 262 | snipe_menu(); 263 | }else{ 264 | if (amount_in < 0.00001){ 265 | console.log(chalk.red("\n\tInput too small.")); 266 | await sleep(1000); 267 | snipe_menu(); 268 | }else{ 269 | await start_swapping(connection,true,amount_in,pool,slip,owner); 270 | } 271 | } 272 | } 273 | } 274 | }) 275 | }); 276 | } 277 | 278 | 279 | async function sell_choice(){ 280 | clear_screen(); 281 | graph_menu.aff_logo(); 282 | graph_menu.aff_title(); 283 | graph_menu.aff_sell_option(); 284 | 285 | const owner = get_wallet('config.json'); 286 | var config_txt = fs.readFileSync('config.json','utf8'); 287 | var config_obj:config = JSON.parse(config_txt); 288 | const slip = config_obj.slippage; 289 | const connection = new Connection(config_obj.rpc_endpoint); 290 | 291 | rl.question("\n\tPool ID: ", async (answer) => { 292 | 293 | const pool:string = answer; 294 | 295 | rl.question("\n\tAmount in(enter 'MAX' for max amount): ", async(answer)=>{ 296 | 297 | console.log('\n\t'); 298 | startSpinner(); 299 | 300 | 301 | var res:number; 302 | const amount_in = parseFloat(answer); 303 | const is_max = answer; 304 | const token_amount= await get_token_amount(pool,false); 305 | 306 | stopSpinner() 307 | 308 | if (token_amount == -1){ 309 | console.log(chalk.red("\n\tInvalid Pool ID or an error has occured.")); 310 | await sleep(1000); 311 | snipe_menu(); 312 | }else if(token_amount == -2){ 313 | console.log(chalk.red("\n\tSol Balance less than 0.01")); 314 | await sleep(1000); 315 | snipe_menu() 316 | }else if(token_amount == 0){ 317 | console.log(chalk.red("\n\tNo balance found.")); 318 | await sleep(1000); 319 | snipe_menu() 320 | }else{ 321 | if (is_max.toUpperCase() == 'MAX'){ 322 | await start_swapping(connection,false,token_amount,pool,slip,owner); 323 | }else if(isNaN(amount_in)){ 324 | console.log(chalk.red("\n\tInvalid Input.")); 325 | await sleep(1000); 326 | snipe_menu() 327 | }else{ 328 | if (amount_in > token_amount){ 329 | console.log(chalk.red("\n\tinsufficient balance.")); 330 | await sleep(1000); 331 | snipe_menu() 332 | }else{ 333 | await start_swapping(connection,false,amount_in,pool,slip,owner); 334 | } 335 | } 336 | } 337 | }) 338 | }); 339 | } 340 | 341 | function usage(){ 342 | clear_screen(); 343 | graph_menu.aff_logo(); 344 | graph_menu.aff_title(); 345 | graph_menu.aff_guide() 346 | 347 | rl.question("\n\tpress enter to return..", async () => { 348 | snipe_menu(); 349 | }); 350 | } 351 | 352 | //sniper menu’t miss your chance to claim the title and make history! Join us at Keymasters 2023: 353 | 354 | 355 | async function snipe_menu(){ 356 | var config_txt = fs.readFileSync('config.json','utf8'); 357 | var config_obj:config = JSON.parse(config_txt); 358 | 359 | const wallet = config_obj.wallet; 360 | if (wallet === 'None'){ 361 | console.log(chalk.red("\n\tPlease add a wallet in settings")); 362 | await sleep(1500); 363 | main(); 364 | }else{ 365 | clear_screen(); 366 | graph_menu.aff_logo(); 367 | graph_menu.aff_title(); 368 | graph_menu.aff_sniper_menu(); 369 | 370 | rl.question(chalk.white('\t[Sniper Mode] - Choice: '), async(answer) => { 371 | choice = parseInt(answer); 372 | if (choice == 1){ 373 | snipe_choice(); 374 | }else if(choice == 2 ){ 375 | sell_choice(); 376 | }else if(choice == 3 ){ 377 | usage(); 378 | }else if (choice == 4){ 379 | main(); 380 | }else{ 381 | console.log(chalk.red("\tInvalid choice.")); 382 | await sleep(1500); 383 | snipe_menu(); 384 | } 385 | }) 386 | } 387 | 388 | } 389 | 390 | //settings menu 391 | function settings_menu(){ 392 | clear_screen(); 393 | graph_menu.aff_logo(); 394 | graph_menu.aff_title(); 395 | graph_menu.aff_settings_menu(); 396 | rl.question(chalk.white('\t[Settings] - Choice: '), async(answer) => { 397 | choice = parseInt(answer); 398 | if (choice == 1) { 399 | 400 | rl.question(chalk.white('\t[Settings] - New RPC Endpoint: '),async (answer)=>{ 401 | 402 | const res = await update_rpc(answer); 403 | await sleep(1000); 404 | 405 | if (res === 1){ 406 | console.log(chalk.red('\tInvalid RPC Value')); 407 | await sleep(1000); 408 | settings_menu(); 409 | }else{ 410 | console.log('\tRPC Updated'); 411 | await sleep(1000); 412 | settings_menu(); 413 | } 414 | 415 | }) 416 | } else if (choice == 2) { 417 | 418 | } else if (choice == 3) { 419 | 420 | rl.question(chalk.white('\t[Settings] - New Slippage(0-100): '),async (answer)=>{ 421 | 422 | const res = update_slippage(answer); 423 | 424 | if (res === 1){ 425 | console.log(chalk.red('\tInvalid Slippage Value')); 426 | await sleep(1000); 427 | settings_menu(); 428 | }else{ 429 | console.log('\tSlippage Updated!'); 430 | await sleep(1000); 431 | settings_menu(); 432 | } 433 | 434 | }) 435 | 436 | } else if (choice == 4) { 437 | rl.question(chalk.white('\t[Settings] - Enter Private Key: '),async (answer)=>{ 438 | 439 | const res = update_wallet(answer); 440 | 441 | if (res === 1){ 442 | console.log(chalk.red('\tInvalid Input or Wallet Not Found')); 443 | await sleep(1000); 444 | settings_menu(); 445 | }else{ 446 | console.log('\tWallet Updated!'); 447 | await sleep(1000); 448 | settings_menu(); 449 | } 450 | }) 451 | 452 | } else if(choice == 5){ 453 | clear_screen(); 454 | graph_menu.aff_logo(); 455 | graph_menu.aff_title(); 456 | show_config() 457 | rl.question(chalk.white('\n\tpress enter to return..'),(answer)=>{ 458 | settings_menu(); 459 | }) 460 | 461 | 462 | }else if(choice == 6){ 463 | main(); 464 | 465 | }else { 466 | console.log(chalk.red("\tInvalid choice.")); 467 | await sleep(1500); 468 | settings_menu(); 469 | } 470 | }); 471 | } 472 | 473 | 474 | //main menu 475 | function main() { 476 | console.clear(); 477 | graph_menu.aff_logo(); 478 | graph_menu.aff_title(); 479 | graph_menu.aff_main_menu(); 480 | rl.question(chalk.white('\t[Main] - Choice: '), async (answer) => { 481 | choice = parseInt(answer); 482 | if (choice == 1) { 483 | snipe_menu(); 484 | } else if (choice == 2) { 485 | settings_menu(); 486 | } else if (choice == 3) { 487 | process.exit(); 488 | } else { 489 | console.log(chalk.red("\tInvalid choice.")); 490 | await sleep(1500); 491 | main(); 492 | } 493 | }); 494 | } 495 | 496 | 497 | module.exports = { 498 | main 499 | } -------------------------------------------------------------------------------- /src/modules/compute.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Connection, PublicKey } from "@solana/web3.js"; 3 | import { Liquidity, Percent, Token, TokenAmount,CurrencyAmount, LiquidityPoolInfo } from "@raydium-io/raydium-sdk"; 4 | 5 | 6 | 7 | //computes live estimates of the swap and returns details for transaction building or display on UI. 8 | //returns a list containing trade details (fees,price impact,expected amount out etc..) 9 | 10 | export async function compute( 11 | 12 | connection: Connection, poolKeys: any, 13 | curr_in:PublicKey , curr_out:PublicKey, 14 | amount_in:number, slip:number 15 | ){ 16 | try{ 17 | 18 | const poolInfo = await Liquidity.fetchInfo({connection,poolKeys}) 19 | 20 | //setting up decimals 21 | var in_decimal:number; 22 | var out_decimal:number; 23 | 24 | if(curr_in.toBase58() === poolKeys.baseMint.toBase58()){ 25 | in_decimal = poolInfo.baseDecimals 26 | out_decimal = poolInfo.quoteDecimals 27 | }else{ 28 | out_decimal = poolInfo.baseDecimals; 29 | in_decimal = poolInfo.quoteDecimals; 30 | } 31 | 32 | 33 | //priming and computing 34 | const amountIn = new TokenAmount(new Token(curr_in, in_decimal), amount_in, false); 35 | 36 | const currencyOut = new Token(curr_out, out_decimal); 37 | 38 | const slippage = new Percent(slip, 100) 39 | 40 | const { 41 | amountOut, 42 | minAmountOut, 43 | currentPrice, 44 | executionPrice, 45 | priceImpact, 46 | fee, 47 | } = Liquidity.computeAmountOut({ poolKeys, poolInfo, amountIn, currencyOut, slippage}) 48 | 49 | return [ 50 | amountOut, 51 | minAmountOut, 52 | currentPrice, 53 | executionPrice, 54 | priceImpact, 55 | fee, 56 | amountIn, 57 | ] 58 | 59 | }catch(e){ 60 | console.log(e); 61 | return 1 62 | } 63 | } -------------------------------------------------------------------------------- /src/modules/config.ts: -------------------------------------------------------------------------------- 1 | import { Connection, Keypair, PublicKey } from "@solana/web3.js"; 2 | import bs58 from "bs58"; 3 | import fs from "fs"; 4 | 5 | const hash_key = "pleasedonotlookatstringsincodethanks" 6 | 7 | //config interface | type 8 | export interface config { 9 | webhook_url : string, 10 | rpc_endpoint : string, 11 | wallet : string, 12 | slippage : number, 13 | license: string, 14 | } 15 | 16 | 17 | //fetching from config 18 | export function show_config(){ 19 | 20 | var config_txt = fs.readFileSync('config.json','utf8'); 21 | var config_obj:config = JSON.parse(config_txt); 22 | 23 | var pubkey:string; 24 | try{ 25 | const secretkey = bs58.decode(config_obj.wallet); 26 | const ownerKeypair = Keypair.fromSecretKey(secretkey); 27 | var pubkey = ownerKeypair.publicKey.toBase58(); 28 | }catch(e){ 29 | pubkey = config_obj.wallet 30 | } 31 | 32 | console.log(`\tWallet Address: ${pubkey}`) 33 | console.log(`\tRPC URL: ${config_obj.rpc_endpoint}`) 34 | console.log(`\tWebhook URL: ${config_obj.webhook_url}`) 35 | console.log(`\tSlippage: ${config_obj.slippage}%`) 36 | 37 | } 38 | 39 | 40 | //updating config 41 | //returns 0 for success and 1 for failure 42 | 43 | 44 | export async function update_rpc(rpc:string){ 45 | try{ 46 | const connection = new Connection(rpc); 47 | const balance = await connection.getBalance(new PublicKey('TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA')) 48 | if (balance){ 49 | 50 | //reading config file 51 | var config_txt = fs.readFileSync('config.json','utf8'); 52 | var config_obj:config = JSON.parse(config_txt); 53 | 54 | //updating config 55 | config_obj.rpc_endpoint = rpc; 56 | 57 | //writing new config 58 | const new_config = JSON.stringify(config_obj); 59 | fs.writeFileSync('config.json',new_config) 60 | return 0 61 | }else{ 62 | return 1 63 | } 64 | }catch(e){ 65 | return 1 66 | } 67 | } 68 | 69 | export function update_slippage(slip:string){ 70 | try{ 71 | const parsedSlippage = parseInt(slip); 72 | if (isNaN(parsedSlippage)){ 73 | return 1 74 | } else if(parsedSlippage > 100 || parsedSlippage < 0){ 75 | return 1 76 | } else{ 77 | 78 | //reading config file 79 | var config_txt = fs.readFileSync('config.json','utf8'); 80 | var config_obj:config = JSON.parse(config_txt); 81 | 82 | //updating config 83 | config_obj.slippage = parsedSlippage; 84 | 85 | //writing new config 86 | const new_config = JSON.stringify(config_obj); 87 | fs.writeFileSync('config.json',new_config); 88 | return 0 89 | 90 | } 91 | }catch(e){ 92 | return 1 93 | } 94 | } 95 | 96 | 97 | export function update_wallet(wallet:string){ 98 | var config_txt = fs.readFileSync('config.json','utf8'); 99 | var config_obj:config = JSON.parse(config_txt); 100 | try{ 101 | 102 | const secretkey = bs58.decode(wallet); 103 | const ownerKeypair = Keypair.fromSecretKey(secretkey); 104 | 105 | //updating config 106 | config_obj.wallet = wallet; 107 | //writing new config 108 | const new_config = JSON.stringify(config_obj); 109 | fs.writeFileSync('config.json',new_config); 110 | return 0; 111 | 112 | }catch(e){ 113 | return 1 114 | } 115 | } -------------------------------------------------------------------------------- /src/modules/fetch_token.ts: -------------------------------------------------------------------------------- 1 | import { Connection,Keypair,PublicKey } from "@solana/web3.js"; 2 | import fs from "fs"; 3 | import {config} from "./config"; 4 | import bs58 from "bs58"; 5 | import { Liquidity} from "@raydium-io/raydium-sdk"; 6 | 7 | 8 | export async function get_token_amount(poolId:string, buying:boolean){ 9 | 10 | try{ 11 | 12 | //fetching pool data 13 | var config_txt = fs.readFileSync('config.json','utf8'); 14 | var config_obj:config = JSON.parse(config_txt); 15 | 16 | const rpc_url = config_obj.rpc_endpoint; 17 | 18 | 19 | const version : 4 | 5 = 4 20 | 21 | 22 | const connection = new Connection(rpc_url); 23 | 24 | const account = await connection.getAccountInfo(new PublicKey(poolId)); 25 | const { state: LiquidityStateLayout } = Liquidity.getLayouts(version) 26 | 27 | //@ts-ignore 28 | const fields = LiquidityStateLayout.decode(account?.data); 29 | 30 | const { status, baseMint, quoteMint, lpMint, openOrders, targetOrders, baseVault, quoteVault, marketId, baseDecimal, quoteDecimal, } = fields; 31 | 32 | var is_valid:boolean = false; 33 | 34 | [quoteMint,baseMint,lpMint].forEach((e)=>{ 35 | if (e.toBase58() != '11111111111111111111111111111111'){ 36 | is_valid = true; 37 | } 38 | }) 39 | if (!is_valid){return -1} 40 | 41 | //fetching token data 42 | const secretkey = bs58.decode(config_obj.wallet); 43 | const ownerKeypair = Keypair.fromSecretKey(secretkey); 44 | 45 | const owner_address = ownerKeypair.publicKey; 46 | 47 | 48 | const tokenAddress = buying?quoteMint:baseMint 49 | 50 | //console.log(tokenAddress.toBase58()); 51 | 52 | const bal = await connection.getBalance(new PublicKey(owner_address.toBase58())); 53 | 54 | if (bal < 0.01){ 55 | return -2 56 | } 57 | 58 | if (tokenAddress.toBase58() == 'So11111111111111111111111111111111111111112'){ 59 | return (bal / 1000000000) - 0.0099 60 | }else{ 61 | 62 | const tokenAccounts = await connection.getParsedTokenAccountsByOwner(owner_address, { programId: new PublicKey('TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA')}); 63 | 64 | for (var cand in tokenAccounts.value){ 65 | if (tokenAccounts.value[cand].account.data.parsed.info.mint === tokenAddress.toBase58()){ 66 | const tokenAccount = tokenAccounts.value[cand]; 67 | const tokenBalance:number = tokenAccount.account.data.parsed.info.tokenAmount.uiAmount; 68 | return tokenBalance 69 | } 70 | } 71 | return 0 72 | 73 | } 74 | 75 | }catch(e){ 76 | return -1 77 | } 78 | 79 | } 80 | 81 | 82 | async function test(){ 83 | const res = await get_token_amount('AZqjt9vYMGZMuNfzSmFjMFgcMHnkBPndpTn1uprKLrq2',false); 84 | console.log(res); 85 | } 86 | 87 | //test(); 88 | -------------------------------------------------------------------------------- /src/modules/get_accounts.ts: -------------------------------------------------------------------------------- 1 | import { SPL_ACCOUNT_LAYOUT, TOKEN_PROGRAM_ID, TokenAccount } from "@raydium-io/raydium-sdk"; 2 | import { Connection, PublicKey } from "@solana/web3.js"; 3 | 4 | //fetching token accounts 5 | export async function getTokenAccountsByOwner( 6 | connection: Connection, 7 | owner: PublicKey, 8 | ) { 9 | const tokenResp = await connection.getTokenAccountsByOwner( 10 | owner, 11 | { 12 | programId: TOKEN_PROGRAM_ID 13 | }, 14 | ); 15 | 16 | const accounts: TokenAccount[] = []; 17 | 18 | for (const { pubkey, account } of tokenResp.value) { 19 | accounts.push({ 20 | pubkey, 21 | accountInfo:SPL_ACCOUNT_LAYOUT.decode(account.data) 22 | }); 23 | } 24 | 25 | return accounts; 26 | } -------------------------------------------------------------------------------- /src/modules/get_keypair.ts: -------------------------------------------------------------------------------- 1 | import { Keypair } from "@solana/web3.js"; 2 | import { config } from "./config"; 3 | import bs58 from "bs58"; 4 | import fs from "fs" 5 | 6 | //function to fetch the owners keypair object from config 7 | //returns Keypair instance if valid or undefined if not 8 | export function get_wallet(config_path:string):Keypair|undefined{ 9 | 10 | var config_txt = fs.readFileSync(config_path,'utf8'); 11 | var config_obj:config = JSON.parse(config_txt); 12 | try{ 13 | 14 | const secretkey = bs58.decode(config_obj.wallet); 15 | const ownerKeypair = Keypair.fromSecretKey(secretkey); 16 | 17 | return ownerKeypair 18 | }catch{ 19 | 20 | } 21 | 22 | } -------------------------------------------------------------------------------- /src/modules/pool_keys.ts: -------------------------------------------------------------------------------- 1 | import { Liquidity, Market } from "@raydium-io/raydium-sdk"; 2 | import { Connection, PublicKey } from "@solana/web3.js"; 3 | 4 | 5 | //returns the pool keys (info and required params/program id's) 6 | //neccessary to interact with the liquidity pool program and compute live prices and estimates. 7 | export async function fetchPoolKeys( 8 | connection: Connection, 9 | poolId: PublicKey, 10 | version : 4 | 5 = 4 11 | ) { 12 | 13 | const serumVersion = 10 14 | const marketVersion:3 = 3 15 | 16 | const programId = new PublicKey('675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8'); 17 | const serumProgramId = new PublicKey('srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX') 18 | 19 | const account = await connection.getAccountInfo(poolId) 20 | const { state: LiquidityStateLayout } = Liquidity.getLayouts(version) 21 | 22 | //@ts-ignore 23 | const fields = LiquidityStateLayout.decode(account?.data); 24 | const { status, baseMint, quoteMint, lpMint, openOrders, targetOrders, baseVault, quoteVault, marketId, baseDecimal, quoteDecimal, } = fields; 25 | 26 | let withdrawQueue, lpVault; 27 | if (Liquidity.isV4(fields)) { 28 | withdrawQueue = fields.withdrawQueue; 29 | lpVault = fields.lpVault; 30 | } else { 31 | withdrawQueue = PublicKey.default; 32 | lpVault = PublicKey.default; 33 | } 34 | 35 | // uninitialized 36 | // if (status.isZero()) { 37 | // return ; 38 | // } 39 | 40 | const associatedPoolKeys = Liquidity.getAssociatedPoolKeys({ 41 | version:version, 42 | marketVersion, 43 | marketId, 44 | baseMint: baseMint, 45 | quoteMint:quoteMint, 46 | baseDecimals: baseDecimal.toNumber(), 47 | quoteDecimals: quoteDecimal.toNumber(), 48 | programId, 49 | marketProgramId:serumProgramId, 50 | }); 51 | 52 | const poolKeys = { 53 | id: poolId, 54 | baseMint, 55 | quoteMint, 56 | lpMint, 57 | version, 58 | programId, 59 | 60 | authority: associatedPoolKeys.authority, 61 | openOrders, 62 | targetOrders, 63 | baseVault, 64 | quoteVault, 65 | withdrawQueue, 66 | lpVault, 67 | marketVersion: serumVersion, 68 | marketProgramId: serumProgramId, 69 | marketId, 70 | marketAuthority: associatedPoolKeys.marketAuthority, 71 | }; 72 | 73 | const marketInfo = await connection.getAccountInfo(marketId); 74 | const { state: MARKET_STATE_LAYOUT } = Market.getLayouts(marketVersion); 75 | //@ts-ignore 76 | const market = MARKET_STATE_LAYOUT.decode(marketInfo.data); 77 | 78 | const { 79 | baseVault: marketBaseVault, 80 | quoteVault: marketQuoteVault, 81 | bids: marketBids, 82 | asks: marketAsks, 83 | eventQueue: marketEventQueue, 84 | } = market; 85 | 86 | // const poolKeys: LiquidityPoolKeys; 87 | return { 88 | ...poolKeys, 89 | ...{ 90 | marketBaseVault, 91 | marketQuoteVault, 92 | marketBids, 93 | marketAsks, 94 | marketEventQueue, 95 | }, 96 | }; 97 | } -------------------------------------------------------------------------------- /src/modules/send_transaction.ts: -------------------------------------------------------------------------------- 1 | 2 | import {Connection, Signer, Transaction} from "@solana/web3.js"; 3 | 4 | 5 | 6 | //sleep function 7 | function sleep(ms:number) { 8 | return new Promise(resolve => setTimeout(resolve, ms)); 9 | } 10 | 11 | //sending a transaction 12 | export async function sendTx(connection: Connection, transaction: Transaction, signers: Array){ 13 | 14 | const hash_info = (await connection.getLatestBlockhashAndContext()).value; 15 | 16 | transaction.recentBlockhash = hash_info.blockhash 17 | transaction.lastValidBlockHeight = hash_info.lastValidBlockHeight 18 | transaction.feePayer = signers[0].publicKey 19 | 20 | 21 | transaction.sign(...signers); 22 | const rawTransaction = transaction.serialize(); 23 | 24 | 25 | var txid:string; 26 | try{ 27 | txid = await connection.sendRawTransaction(rawTransaction,{skipPreflight: true,}) 28 | } 29 | catch(e){ 30 | return 1 31 | } 32 | 33 | while (true){ 34 | const ret = await connection.getSignatureStatus(txid, {searchTransactionHistory:true}) 35 | try { 36 | //@ts-ignore 37 | if (ret){ 38 | if (ret.value && ret.value.err == null){ 39 | return 0 40 | } else if (ret.value && ret.value.err != null){ 41 | return 1 42 | }else{ 43 | continue 44 | } 45 | } 46 | } catch(e){ 47 | return 1 48 | } 49 | 50 | } 51 | 52 | } -------------------------------------------------------------------------------- /src/modules/swap.ts: -------------------------------------------------------------------------------- 1 | import { Liquidity, Percent, Token, TokenAccount, TokenAmount } from "@raydium-io/raydium-sdk"; 2 | import {Connection,Keypair,Transaction,} from "@solana/web3.js"; 3 | import { sendTx } from "./send_transaction"; 4 | 5 | 6 | export async function swap(connection: Connection, poolKeys: any, ownerKeypair: Keypair, tokenAccounts: TokenAccount[],is_snipe:boolean,amountIn:any,minAmountOut:any){ 7 | 8 | const owner = ownerKeypair.publicKey 9 | 10 | const inst = await Liquidity.makeSwapInstructionSimple({ 11 | connection:connection, 12 | poolKeys:poolKeys, 13 | userKeys:{ 14 | tokenAccounts, 15 | owner, 16 | }, 17 | amountIn, 18 | amountOut:minAmountOut, 19 | fixedSide:'in', 20 | config:{} 21 | }) 22 | 23 | 24 | //@ts-ignore 25 | //const instructions = inst.innerTransactions[0].instructions[0]; 26 | //console.log(inst.innerTransactions); 27 | //console.log(inst.innerTransactions[0]); 28 | //console.log(inst.innerTransactions[0].signers) 29 | 30 | const tx = new Transaction() 31 | const signers:Keypair[] = [ownerKeypair] 32 | 33 | inst.innerTransactions[0].instructions.forEach(e=>{ 34 | tx.add(e); 35 | }) 36 | 37 | inst.innerTransactions[0].signers.forEach(e=>{ 38 | signers.push(e); 39 | }) 40 | 41 | 42 | const res:number = await sendTx(connection, tx, signers); 43 | return res; 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /src/utils.ts: -------------------------------------------------------------------------------- 1 | import chalk from 'chalk'; 2 | 3 | const logo = ` 4 | \t 5 | \t 6 | \t ( & 7 | \t % % 8 | \t & % & 9 | \t &&/ &****& & 10 | \t % % (*****./ .( 11 | \t % ./ ((((((,( *( 12 | \t % % %///( ( 13 | \t &&&.*//////**// % * .,/ ./ * / /,,/((# / 14 | \t * (//*.. & / */( .# ,.*/(( 15 | \t *** , /&( / *(( 16 | \t , .,*,./, .,*,/%#//(# #*# 17 | \t */*# &*, /( &/ .( * 18 | \t ./ * /% (&, (#/ 19 | \t ( (,( / /( %,/# 20 | \t ,/% /,/ 21 | \t ( .( 22 | \t (( , 23 | \t , 24 | \t ( / 25 | \t 26 | ` 27 | 28 | const title = ` 29 | \t▓█████▄ ▓█████ ▒██ ██▒ ██████ ██▓███ ▓██ ██▓▓█████▄ ▓█████ ██▀███ 30 | \t▒██▀ ██▌▓█ ▀ ▒▒ █ █ ▒░▒██ ▒ ▓██░ ██▒▒██ ██▒▒██▀ ██▌▓█ ▀ ▓██ ▒ ██▒ 31 | \t░██ █▌▒███ ░░ █ ░░ ▓██▄ ▓██░ ██▓▒ ▒██ ██░░██ █▌▒███ ▓██ ░▄█ ▒ 32 | \t░▓█▄ ▌▒▓█ ▄ ░ █ █ ▒ ▒ ██▒▒██▄█▓▒ ▒ ░ ▐██▓░░▓█▄ ▌▒▓█ ▄ ▒██▀▀█▄ 33 | \t░▒████▓ ░▒████▒▒██▒ ▒██▒▒██████▒▒▒██▒ ░ ░ ░ ██▒▓░░▒████▓ ░▒████▒░██▓ ▒██▒ 34 | \t ▒▒▓ ▒ ░░ ▒░ ░▒▒ ░ ░▓ ░▒ ▒▓▒ ▒ ░▒▓▒░ ░ ░ ██▒▒▒ ▒▒▓ ▒ ░░ ▒░ ░░ ▒▓ ░▒▓░ 35 | \t ░ ▒ ▒ ░ ░ ░░░ ░▒ ░░ ░▒ ░ ░░▒ ░ ▓██ ░▒░ ░ ▒ ▒ ░ ░ ░ ░▒ ░ ▒░ 36 | \t ░ ░ ░ ░ ░ ░ ░ ░ ░ ░░ ▒ ▒ ░░ ░ ░ ░ ░ ░░ ░ 37 | \t ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ 38 | \t ░ ░ ░ ░ 39 | 40 | 41 | ` 42 | 43 | 44 | export function aff_logo() { 45 | for (let i = 0; i < logo.length; i++) { 46 | if (logo[i] == '@') { 47 | process.stdout.write(chalk.black(logo[i])); 48 | } else { 49 | process.stdout.write(chalk.magenta(logo[i])); 50 | } 51 | } 52 | } 53 | 54 | export function aff_title(){ 55 | for (let i = 0; i < title.length; i++) { 56 | if (title[i] == '▓') { 57 | process.stdout.write(chalk.black(title[i])); 58 | } else { 59 | process.stdout.write(chalk.magenta(title[i])); 60 | } 61 | } 62 | } 63 | 64 | export function aff_snipe_option(){ 65 | console.log(chalk.cyanBright('\tDisclaimer: \t- the tool will start sniping if all inputs are valid!')); 66 | console.log(chalk.cyanBright('\t \t- double check the amount and pool details in the monitor')); 67 | console.log(chalk.cyanBright('\t \t to avoid miss-inputs and big price impact')); 68 | } 69 | 70 | export function aff_sell_option(){ 71 | console.log(chalk.cyanBright('\tDisclaimer: \t- the tool will sell supplied balance if all inputs are valid!')); 72 | console.log(chalk.cyanBright('\t \t- double check the held balance and pool details in the monitor')); 73 | console.log(chalk.cyanBright('\t \t to avoid miss-inputs and big price impact')); 74 | } 75 | 76 | export function aff_guide(){ 77 | console.log(chalk.white('\tUSAGE: ')) 78 | console.log(chalk.white('\n')) 79 | console.log(chalk.white('\tsniper option \t - requires AMM pool ID and amount of token in as input')); 80 | console.log(chalk.white('\t \t - Amount in should be the Quote of the pair (from on-chain monitor)')); 81 | console.log(chalk.white('\t \t - make sure to have the supplied amount of token in or the transaction will not go through')); 82 | console.log(chalk.white('\n')); 83 | console.log(chalk.white('\texit position option\t - requires AMM pool ID and amount of token out as input')); 84 | console.log(chalk.white('\t \t - Amount in should be the Base of the pair (from on-chain monitor)')); 85 | console.log(chalk.white('\t \t - make sure to have the supplied amount of token out or the transactions will not got through')); 86 | console.log(chalk.white('\n')); 87 | console.log(chalk.white('\tdefault slippage \t - 10%')); 88 | console.log(chalk.white('\tsuggested slippage \t - between 10% and 30%')); 89 | console.log(chalk.white("\tRPCs \t - Custom RPC's are highly suggested for fast transaction commitment speed")); 90 | console.log(chalk.white('\n')); 91 | } 92 | 93 | export function aff_main_menu(){ 94 | console.log(chalk.white('\t[1] - Sniper Mode')); 95 | console.log(chalk.white('\t[2] - Settings')); 96 | console.log(chalk.white('\t[3] - Exit')); 97 | console.log("\n"); 98 | } 99 | 100 | export function aff_sniper_menu(){ 101 | console.log(chalk.blueBright('\t[1] - Snipe')); 102 | console.log(chalk.greenBright('\t[2] - Exit Position')); 103 | console.log(chalk.white('\t[3] - Usage')); 104 | console.log(chalk.white('\t[4] - return')); 105 | console.log("\n"); 106 | } 107 | 108 | export function aff_settings_menu() { 109 | console.log(chalk.white('\t[1] - Change RPC')); 110 | console.log(chalk.white('\t[2] - Change Webhook')); 111 | console.log(chalk.white('\t[3] - Change Slippage')); 112 | console.log(chalk.white('\t[4] - Change Wallet')); 113 | console.log(chalk.white('\t[5] - Show Current Settings')); 114 | console.log(chalk.white('\t[6] - Back')); 115 | console.log("\n"); 116 | } 117 | 118 | const default_export = { 119 | aff_logo, 120 | aff_title, 121 | aff_main_menu, 122 | aff_settings_menu, 123 | aff_sniper_menu, 124 | aff_snipe_option, 125 | aff_sell_option, 126 | aff_guide, 127 | } 128 | 129 | export default default_export 130 | 131 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Visit https://aka.ms/tsconfig to read more about this file */ 4 | 5 | /* Projects */ 6 | // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ 7 | // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ 8 | // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ 9 | // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ 10 | // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ 11 | // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ 12 | 13 | /* Language and Environment */ 14 | "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ 15 | "lib": ["es6"], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ 16 | // "jsx": "preserve", /* Specify what JSX code is generated. */ 17 | // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ 18 | // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ 19 | // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ 20 | // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ 21 | // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ 22 | // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ 23 | // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ 24 | // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ 25 | // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ 26 | 27 | /* Modules */ 28 | "module": "commonjs", /* Specify what module code is generated. */ 29 | "rootDir": "src", /* Specify the root folder within your source files. */ 30 | "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ 31 | // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ 32 | // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ 33 | // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ 34 | // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ 35 | // "types": [], /* Specify type package names to be included without being referenced in a source file. */ 36 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 37 | // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ 38 | "resolveJsonModule": true, /* Enable importing .json files. */ 39 | // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ 40 | 41 | /* JavaScript Support */ 42 | "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ 43 | // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ 44 | // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ 45 | 46 | /* Emit */ 47 | // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ 48 | // "declarationMap": true, /* Create sourcemaps for d.ts files. */ 49 | // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ 50 | // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ 51 | // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ 52 | "outDir": "build", /* Specify an output folder for all emitted files. */ 53 | // "removeComments": true, /* Disable emitting comments. */ 54 | // "noEmit": true, /* Disable emitting files from a compilation. */ 55 | // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ 56 | // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ 57 | // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ 58 | // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ 59 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 60 | // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ 61 | // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ 62 | // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ 63 | // "newLine": "crlf", /* Set the newline character for emitting files. */ 64 | // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ 65 | // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ 66 | // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ 67 | // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ 68 | // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ 69 | // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ 70 | 71 | /* Interop Constraints */ 72 | // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ 73 | // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ 74 | "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ 75 | // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ 76 | "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ 77 | 78 | /* Type Checking */ 79 | "strict": false, /* Enable all strict type-checking options. */ 80 | "noImplicitAny": false, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ 81 | // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ 82 | // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ 83 | // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ 84 | // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ 85 | // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ 86 | // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ 87 | // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ 88 | // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ 89 | // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ 90 | // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ 91 | // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ 92 | // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ 93 | // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ 94 | // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ 95 | // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ 96 | // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ 97 | // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ 98 | 99 | /* Completeness */ 100 | // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ 101 | "skipLibCheck": true /* Skip type checking all .d.ts files. */ 102 | } 103 | } 104 | --------------------------------------------------------------------------------