├── .gitignore ├── README.md ├── package-lock.json ├── package.json ├── strategy1 ├── formatAmmKeysById.js ├── start1.js └── swap1.js ├── strategy2 ├── derivePoolKeys.js ├── start2.js └── swap2.js └── utils ├── config.js ├── decoderaylog.js └── util.js /.gitignore: -------------------------------------------------------------------------------- 1 | **/node_modules 2 | .DS_Store -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Solana SPL-Token Sniper 2 | ## Overview 3 | This project is Solana SPL-Token sniper which aims to swap (purchase) new Raydium liquidity pairs within the first price candle by scanning Solana blockchain transactions. 4 | ## How the program works 5 | * Scans the Solana blockchain for an "initialize market" transaction which is decoded for all necessary liquidity pool keys and related information. 6 | * Begins sending/retrying the "swap" transaction until the liquidity pool is live, minimizing the time between the transaction and the creation of the LP. 7 | * Upon sending a valid transaction, begins to track the users position with current price/percent gain by scanning and decoding on-chain liquidity pool information in order to get the most accurate data. 8 | ## Setup 9 | Use the following instructions to install and run the program (assume node is installed): 10 | 1. Create a Solana wallet and obtain public and private keys (Phantom wallet recommended). 11 | 2. Obtain a Solana RPC/websocket connection, can use `https://api.mainnet-beta.solana.com` and `wss://api.mainnet-beta.solana.com` for testing purposes. 12 | 3. Run `npm install`. 13 | 4. Inside the `utils/config.js` file, enter public key, private key, and both RPC connections. Also include amount of SOL to use per swap. 14 | ## Running the scripts 15 | This project contains two different strategies for sniping new liquidity pairs:\ 16 | ### **Strategy #1:** 17 | * The first strategy obtains necessary liquidity pool keys from the transaction which creates the LP. To run this script with `node strategy1/start1.js`. The transaction may fail multiple times before succeeding as Solana transactions can be dropped with certain RPC nodes. 18 | * **NOTE:** this script is slower as it must wait for the "add liquidity" transaction to reach "confirmed" status before obtaining pool data. This results in ~30 seconds between the pool creation and swap transaction. 19 | ### **Strategy #2:** 20 | * The second strategy obtains necessary liquidity pool keys from the "initialize market" transaction which typically occurs ~2 minutes before the LP is live on Raydium. This allows for all pool keys to be precomputed. This script also retries the swap transaction multiple times per second which allows for the swap to be sent during the "processed" state of the "add liquidity" transaction instead of "confirmed", greatly reducing the time between the creation of the LP and the swap transaction. This script can be run with `node strategy2/start2.js`. 21 | *Both scripts utilize the same swapping/position management system found in `./swap/swap1.js` and `/swap/swap2.js`.* 22 | ### **Additional Notes:** 23 | * Once the program is started, an output will only be displayed once a new market id/pool is found. 24 | * "the amm account owner is not match with this program + error 0x1b": This error occurs when the program sends a swap tx to a pool that doesn't have liquidity yet. The tx spam is part of the sniping strategy and the error will occur until the swap to the pool goes through (moment liquidity is added). 25 | ## Future improvements 26 | 1. **Automatic position exit strategy:** Implementing an automatic exit strategy based on user-specified parameters. Currently have to manually swap the tokens back to SOL. 27 | 2. **Rugpull prevention:** SPL-Token are often rugpulled after launch, prevent the purchase of tokens with low-liquidity and no social media pages. 28 | 3. **Reducing tx time:** Reduce time between LP creation and swap tx by utilizing a faster RPC connection and minimizing RPC calls before sending swap tx. 29 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "solana", 3 | "version": "1.0.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "solana", 9 | "version": "1.0.0", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@openbook-dex/openbook": "^0.0.9", 13 | "@raydium-io/raydium-sdk": "^1.3.1-beta.46", 14 | "@solana/spl-token": "^0.3.11", 15 | "@solana/web3.js": "^1.87.6", 16 | "borsh": "^2.0.0", 17 | "bs64": "^0.1.0", 18 | "node": "^21.2.0" 19 | } 20 | }, 21 | "node_modules/@babel/runtime": { 22 | "version": "7.23.7", 23 | "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.7.tgz", 24 | "integrity": "sha512-w06OXVOFso7LcbzMiDGt+3X7Rh7Ho8MmgPoWU3rarH+8upf+wSU/grlGbWzQyr3DkdN6ZeuMFjpdwW0Q+HxobA==", 25 | "dependencies": { 26 | "regenerator-runtime": "^0.14.0" 27 | }, 28 | "engines": { 29 | "node": ">=6.9.0" 30 | } 31 | }, 32 | "node_modules/@noble/curves": { 33 | "version": "1.3.0", 34 | "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz", 35 | "integrity": "sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==", 36 | "dependencies": { 37 | "@noble/hashes": "1.3.3" 38 | }, 39 | "funding": { 40 | "url": "https://paulmillr.com/funding/" 41 | } 42 | }, 43 | "node_modules/@noble/hashes": { 44 | "version": "1.3.3", 45 | "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", 46 | "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", 47 | "engines": { 48 | "node": ">= 16" 49 | }, 50 | "funding": { 51 | "url": "https://paulmillr.com/funding/" 52 | } 53 | }, 54 | "node_modules/@openbook-dex/openbook": { 55 | "version": "0.0.9", 56 | "resolved": "https://registry.npmjs.org/@openbook-dex/openbook/-/openbook-0.0.9.tgz", 57 | "integrity": "sha512-tJPqHS7Tp/Gu3MC/MAZQBUm62WhdBPLzCcId3p62eHV6cRwNqflr0j+eKDh0Lfd5CAnkB1a9wZoVte074+zB5A==", 58 | "dependencies": { 59 | "@project-serum/anchor": "^0.11.1", 60 | "@solana/spl-token": "^0.1.6", 61 | "@solana/web3.js": "^1.70.0", 62 | "bn.js": "^5.2.1", 63 | "buffer-layout": "^1.2.0" 64 | }, 65 | "engines": { 66 | "node": ">=10" 67 | } 68 | }, 69 | "node_modules/@openbook-dex/openbook/node_modules/@solana/spl-token": { 70 | "version": "0.1.8", 71 | "resolved": "https://registry.npmjs.org/@solana/spl-token/-/spl-token-0.1.8.tgz", 72 | "integrity": "sha512-LZmYCKcPQDtJgecvWOgT/cnoIQPWjdH+QVyzPcFvyDUiT0DiRjZaam4aqNUyvchLFhzgunv3d9xOoyE34ofdoQ==", 73 | "dependencies": { 74 | "@babel/runtime": "^7.10.5", 75 | "@solana/web3.js": "^1.21.0", 76 | "bn.js": "^5.1.0", 77 | "buffer": "6.0.3", 78 | "buffer-layout": "^1.2.0", 79 | "dotenv": "10.0.0" 80 | }, 81 | "engines": { 82 | "node": ">= 10" 83 | } 84 | }, 85 | "node_modules/@project-serum/anchor": { 86 | "version": "0.11.1", 87 | "resolved": "https://registry.npmjs.org/@project-serum/anchor/-/anchor-0.11.1.tgz", 88 | "integrity": "sha512-oIdm4vTJkUy6GmE6JgqDAuQPKI7XM4TPJkjtoIzp69RZe0iAD9JP2XHx7lV1jLdYXeYHqDXfBt3zcq7W91K6PA==", 89 | "dependencies": { 90 | "@project-serum/borsh": "^0.2.2", 91 | "@solana/web3.js": "^1.17.0", 92 | "base64-js": "^1.5.1", 93 | "bn.js": "^5.1.2", 94 | "bs58": "^4.0.1", 95 | "buffer-layout": "^1.2.0", 96 | "camelcase": "^5.3.1", 97 | "crypto-hash": "^1.3.0", 98 | "eventemitter3": "^4.0.7", 99 | "find": "^0.3.0", 100 | "js-sha256": "^0.9.0", 101 | "pako": "^2.0.3", 102 | "snake-case": "^3.0.4", 103 | "toml": "^3.0.0" 104 | }, 105 | "engines": { 106 | "node": ">=11" 107 | } 108 | }, 109 | "node_modules/@project-serum/borsh": { 110 | "version": "0.2.5", 111 | "resolved": "https://registry.npmjs.org/@project-serum/borsh/-/borsh-0.2.5.tgz", 112 | "integrity": "sha512-UmeUkUoKdQ7rhx6Leve1SssMR/Ghv8qrEiyywyxSWg7ooV7StdpPBhciiy5eB3T0qU1BXvdRNC8TdrkxK7WC5Q==", 113 | "dependencies": { 114 | "bn.js": "^5.1.2", 115 | "buffer-layout": "^1.2.0" 116 | }, 117 | "engines": { 118 | "node": ">=10" 119 | }, 120 | "peerDependencies": { 121 | "@solana/web3.js": "^1.2.0" 122 | } 123 | }, 124 | "node_modules/@raydium-io/raydium-sdk": { 125 | "version": "1.3.1-beta.46", 126 | "resolved": "https://registry.npmjs.org/@raydium-io/raydium-sdk/-/raydium-sdk-1.3.1-beta.46.tgz", 127 | "integrity": "sha512-hGieqaCeqszEJGRBbNNveXlZk8EIsjV9PTwodx8SWABu1ZZODE8SGRe5Vuq9Jtv1LZzL7jY3+P5UnQxrdQLQUA==", 128 | "dependencies": { 129 | "@solana/buffer-layout": "^4.0.1", 130 | "@solana/spl-token": "^0.3.9", 131 | "axios": "^1.6.2", 132 | "big.js": "^6.2.1", 133 | "bn.js": "^5.2.1", 134 | "decimal.js": "^10.4.3", 135 | "decimal.js-light": "^2.5.1", 136 | "fecha": "^4.2.3", 137 | "lodash": "^4.17.21", 138 | "toformat": "^2.0.0" 139 | }, 140 | "peerDependencies": { 141 | "@solana/web3.js": "^1.73.0" 142 | } 143 | }, 144 | "node_modules/@solana/buffer-layout": { 145 | "version": "4.0.1", 146 | "resolved": "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz", 147 | "integrity": "sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA==", 148 | "dependencies": { 149 | "buffer": "~6.0.3" 150 | }, 151 | "engines": { 152 | "node": ">=5.10" 153 | } 154 | }, 155 | "node_modules/@solana/buffer-layout-utils": { 156 | "version": "0.2.0", 157 | "resolved": "https://registry.npmjs.org/@solana/buffer-layout-utils/-/buffer-layout-utils-0.2.0.tgz", 158 | "integrity": "sha512-szG4sxgJGktbuZYDg2FfNmkMi0DYQoVjN2h7ta1W1hPrwzarcFLBq9UpX1UjNXsNpT9dn+chgprtWGioUAr4/g==", 159 | "dependencies": { 160 | "@solana/buffer-layout": "^4.0.0", 161 | "@solana/web3.js": "^1.32.0", 162 | "bigint-buffer": "^1.1.5", 163 | "bignumber.js": "^9.0.1" 164 | }, 165 | "engines": { 166 | "node": ">= 10" 167 | } 168 | }, 169 | "node_modules/@solana/codecs-core": { 170 | "version": "2.0.0-experimental.8618508", 171 | "resolved": "https://registry.npmjs.org/@solana/codecs-core/-/codecs-core-2.0.0-experimental.8618508.tgz", 172 | "integrity": "sha512-JCz7mKjVKtfZxkuDtwMAUgA7YvJcA2BwpZaA1NOLcted4OMC4Prwa3DUe3f3181ixPYaRyptbF0Ikq2MbDkYEA==" 173 | }, 174 | "node_modules/@solana/codecs-data-structures": { 175 | "version": "2.0.0-experimental.8618508", 176 | "resolved": "https://registry.npmjs.org/@solana/codecs-data-structures/-/codecs-data-structures-2.0.0-experimental.8618508.tgz", 177 | "integrity": "sha512-sLpjL9sqzaDdkloBPV61Rht1tgaKq98BCtIKRuyscIrmVPu3wu0Bavk2n/QekmUzaTsj7K1pVSniM0YqCdnEBw==", 178 | "dependencies": { 179 | "@solana/codecs-core": "2.0.0-experimental.8618508", 180 | "@solana/codecs-numbers": "2.0.0-experimental.8618508" 181 | } 182 | }, 183 | "node_modules/@solana/codecs-numbers": { 184 | "version": "2.0.0-experimental.8618508", 185 | "resolved": "https://registry.npmjs.org/@solana/codecs-numbers/-/codecs-numbers-2.0.0-experimental.8618508.tgz", 186 | "integrity": "sha512-EXQKfzFr3CkKKNzKSZPOOOzchXsFe90TVONWsSnVkonO9z+nGKALE0/L9uBmIFGgdzhhU9QQVFvxBMclIDJo2Q==", 187 | "dependencies": { 188 | "@solana/codecs-core": "2.0.0-experimental.8618508" 189 | } 190 | }, 191 | "node_modules/@solana/codecs-strings": { 192 | "version": "2.0.0-experimental.8618508", 193 | "resolved": "https://registry.npmjs.org/@solana/codecs-strings/-/codecs-strings-2.0.0-experimental.8618508.tgz", 194 | "integrity": "sha512-b2yhinr1+oe+JDmnnsV0641KQqqDG8AQ16Z/x7GVWO+AWHMpRlHWVXOq8U1yhPMA4VXxl7i+D+C6ql0VGFp0GA==", 195 | "dependencies": { 196 | "@solana/codecs-core": "2.0.0-experimental.8618508", 197 | "@solana/codecs-numbers": "2.0.0-experimental.8618508" 198 | }, 199 | "peerDependencies": { 200 | "fastestsmallesttextencoderdecoder": "^1.0.22" 201 | } 202 | }, 203 | "node_modules/@solana/options": { 204 | "version": "2.0.0-experimental.8618508", 205 | "resolved": "https://registry.npmjs.org/@solana/options/-/options-2.0.0-experimental.8618508.tgz", 206 | "integrity": "sha512-fy/nIRAMC3QHvnKi63KEd86Xr/zFBVxNW4nEpVEU2OT0gCEKwHY4Z55YHf7XujhyuM3PNpiBKg/YYw5QlRU4vg==", 207 | "dependencies": { 208 | "@solana/codecs-core": "2.0.0-experimental.8618508", 209 | "@solana/codecs-numbers": "2.0.0-experimental.8618508" 210 | } 211 | }, 212 | "node_modules/@solana/spl-token": { 213 | "version": "0.3.11", 214 | "resolved": "https://registry.npmjs.org/@solana/spl-token/-/spl-token-0.3.11.tgz", 215 | "integrity": "sha512-bvohO3rIMSVL24Pb+I4EYTJ6cL82eFpInEXD/I8K8upOGjpqHsKUoAempR/RnUlI1qSFNyFlWJfu6MNUgfbCQQ==", 216 | "dependencies": { 217 | "@solana/buffer-layout": "^4.0.0", 218 | "@solana/buffer-layout-utils": "^0.2.0", 219 | "@solana/spl-token-metadata": "^0.1.2", 220 | "buffer": "^6.0.3" 221 | }, 222 | "engines": { 223 | "node": ">=16" 224 | }, 225 | "peerDependencies": { 226 | "@solana/web3.js": "^1.88.0" 227 | } 228 | }, 229 | "node_modules/@solana/spl-token-metadata": { 230 | "version": "0.1.2", 231 | "resolved": "https://registry.npmjs.org/@solana/spl-token-metadata/-/spl-token-metadata-0.1.2.tgz", 232 | "integrity": "sha512-hJYnAJNkDrtkE2Q41YZhCpeOGU/0JgRFXbtrtOuGGeKc3pkEUHB9DDoxZAxx+XRno13GozUleyBi0qypz4c3bw==", 233 | "dependencies": { 234 | "@solana/codecs-core": "2.0.0-experimental.8618508", 235 | "@solana/codecs-data-structures": "2.0.0-experimental.8618508", 236 | "@solana/codecs-numbers": "2.0.0-experimental.8618508", 237 | "@solana/codecs-strings": "2.0.0-experimental.8618508", 238 | "@solana/options": "2.0.0-experimental.8618508", 239 | "@solana/spl-type-length-value": "0.1.0" 240 | }, 241 | "engines": { 242 | "node": ">=16" 243 | }, 244 | "peerDependencies": { 245 | "@solana/web3.js": "^1.87.6" 246 | } 247 | }, 248 | "node_modules/@solana/spl-type-length-value": { 249 | "version": "0.1.0", 250 | "resolved": "https://registry.npmjs.org/@solana/spl-type-length-value/-/spl-type-length-value-0.1.0.tgz", 251 | "integrity": "sha512-JBMGB0oR4lPttOZ5XiUGyvylwLQjt1CPJa6qQ5oM+MBCndfjz2TKKkw0eATlLLcYmq1jBVsNlJ2cD6ns2GR7lA==", 252 | "dependencies": { 253 | "buffer": "^6.0.3" 254 | }, 255 | "engines": { 256 | "node": ">=16" 257 | } 258 | }, 259 | "node_modules/@solana/web3.js": { 260 | "version": "1.89.1", 261 | "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.89.1.tgz", 262 | "integrity": "sha512-t9TTLtPQxtQB3SAf/5E8xPXfVDsC6WGOsgKY02l2cbe0HLymT7ynE8Hu48Lk5qynHCquj6nhISfEHcjMkYpu/A==", 263 | "dependencies": { 264 | "@babel/runtime": "^7.23.4", 265 | "@noble/curves": "^1.2.0", 266 | "@noble/hashes": "^1.3.2", 267 | "@solana/buffer-layout": "^4.0.1", 268 | "agentkeepalive": "^4.5.0", 269 | "bigint-buffer": "^1.1.5", 270 | "bn.js": "^5.2.1", 271 | "borsh": "^0.7.0", 272 | "bs58": "^4.0.1", 273 | "buffer": "6.0.3", 274 | "fast-stable-stringify": "^1.0.0", 275 | "jayson": "^4.1.0", 276 | "node-fetch": "^2.7.0", 277 | "rpc-websockets": "^7.5.1", 278 | "superstruct": "^0.14.2" 279 | } 280 | }, 281 | "node_modules/@solana/web3.js/node_modules/borsh": { 282 | "version": "0.7.0", 283 | "resolved": "https://registry.npmjs.org/borsh/-/borsh-0.7.0.tgz", 284 | "integrity": "sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA==", 285 | "dependencies": { 286 | "bn.js": "^5.2.0", 287 | "bs58": "^4.0.0", 288 | "text-encoding-utf-8": "^1.0.2" 289 | } 290 | }, 291 | "node_modules/@types/connect": { 292 | "version": "3.4.38", 293 | "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", 294 | "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", 295 | "dependencies": { 296 | "@types/node": "*" 297 | } 298 | }, 299 | "node_modules/@types/node": { 300 | "version": "12.20.55", 301 | "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", 302 | "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" 303 | }, 304 | "node_modules/@types/ws": { 305 | "version": "7.4.7", 306 | "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", 307 | "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==", 308 | "dependencies": { 309 | "@types/node": "*" 310 | } 311 | }, 312 | "node_modules/agentkeepalive": { 313 | "version": "4.5.0", 314 | "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz", 315 | "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==", 316 | "dependencies": { 317 | "humanize-ms": "^1.2.1" 318 | }, 319 | "engines": { 320 | "node": ">= 8.0.0" 321 | } 322 | }, 323 | "node_modules/asynckit": { 324 | "version": "0.4.0", 325 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 326 | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" 327 | }, 328 | "node_modules/axios": { 329 | "version": "1.6.4", 330 | "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.4.tgz", 331 | "integrity": "sha512-heJnIs6N4aa1eSthhN9M5ioILu8Wi8vmQW9iHQ9NUvfkJb0lEEDUiIdQNAuBtfUt3FxReaKdpQA5DbmMOqzF/A==", 332 | "dependencies": { 333 | "follow-redirects": "^1.15.4", 334 | "form-data": "^4.0.0", 335 | "proxy-from-env": "^1.1.0" 336 | } 337 | }, 338 | "node_modules/base-x": { 339 | "version": "3.0.9", 340 | "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", 341 | "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", 342 | "dependencies": { 343 | "safe-buffer": "^5.0.1" 344 | } 345 | }, 346 | "node_modules/base64-js": { 347 | "version": "1.5.1", 348 | "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", 349 | "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", 350 | "funding": [ 351 | { 352 | "type": "github", 353 | "url": "https://github.com/sponsors/feross" 354 | }, 355 | { 356 | "type": "patreon", 357 | "url": "https://www.patreon.com/feross" 358 | }, 359 | { 360 | "type": "consulting", 361 | "url": "https://feross.org/support" 362 | } 363 | ] 364 | }, 365 | "node_modules/big.js": { 366 | "version": "6.2.1", 367 | "resolved": "https://registry.npmjs.org/big.js/-/big.js-6.2.1.tgz", 368 | "integrity": "sha512-bCtHMwL9LeDIozFn+oNhhFoq+yQ3BNdnsLSASUxLciOb1vgvpHsIO1dsENiGMgbb4SkP5TrzWzRiLddn8ahVOQ==", 369 | "engines": { 370 | "node": "*" 371 | }, 372 | "funding": { 373 | "type": "opencollective", 374 | "url": "https://opencollective.com/bigjs" 375 | } 376 | }, 377 | "node_modules/bigint-buffer": { 378 | "version": "1.1.5", 379 | "resolved": "https://registry.npmjs.org/bigint-buffer/-/bigint-buffer-1.1.5.tgz", 380 | "integrity": "sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA==", 381 | "hasInstallScript": true, 382 | "dependencies": { 383 | "bindings": "^1.3.0" 384 | }, 385 | "engines": { 386 | "node": ">= 10.0.0" 387 | } 388 | }, 389 | "node_modules/bignumber.js": { 390 | "version": "9.1.2", 391 | "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", 392 | "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", 393 | "engines": { 394 | "node": "*" 395 | } 396 | }, 397 | "node_modules/bindings": { 398 | "version": "1.5.0", 399 | "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", 400 | "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", 401 | "dependencies": { 402 | "file-uri-to-path": "1.0.0" 403 | } 404 | }, 405 | "node_modules/bn.js": { 406 | "version": "5.2.1", 407 | "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", 408 | "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" 409 | }, 410 | "node_modules/borsh": { 411 | "version": "2.0.0", 412 | "resolved": "https://registry.npmjs.org/borsh/-/borsh-2.0.0.tgz", 413 | "integrity": "sha512-kc9+BgR3zz9+cjbwM8ODoUB4fs3X3I5A/HtX7LZKxCLaMrEeDFoBpnhZY//DTS1VZBSs6S5v46RZRbZjRFspEg==" 414 | }, 415 | "node_modules/bs58": { 416 | "version": "4.0.1", 417 | "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", 418 | "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", 419 | "dependencies": { 420 | "base-x": "^3.0.2" 421 | } 422 | }, 423 | "node_modules/bs64": { 424 | "version": "0.1.0", 425 | "resolved": "https://registry.npmjs.org/bs64/-/bs64-0.1.0.tgz", 426 | "integrity": "sha512-0rK20fzECR6FFR2VRhvDOUTlPmWFS8PddRtk9KNqsfj9S8++WHSDKzf0f9S/89sthwBg+bEgFitRLEC6COTi8Q==", 427 | "dependencies": { 428 | "convert-string": "~0.1.0" 429 | } 430 | }, 431 | "node_modules/buffer": { 432 | "version": "6.0.3", 433 | "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", 434 | "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", 435 | "funding": [ 436 | { 437 | "type": "github", 438 | "url": "https://github.com/sponsors/feross" 439 | }, 440 | { 441 | "type": "patreon", 442 | "url": "https://www.patreon.com/feross" 443 | }, 444 | { 445 | "type": "consulting", 446 | "url": "https://feross.org/support" 447 | } 448 | ], 449 | "dependencies": { 450 | "base64-js": "^1.3.1", 451 | "ieee754": "^1.2.1" 452 | } 453 | }, 454 | "node_modules/buffer-layout": { 455 | "version": "1.2.2", 456 | "resolved": "https://registry.npmjs.org/buffer-layout/-/buffer-layout-1.2.2.tgz", 457 | "integrity": "sha512-kWSuLN694+KTk8SrYvCqwP2WcgQjoRCiF5b4QDvkkz8EmgD+aWAIceGFKMIAdmF/pH+vpgNV3d3kAKorcdAmWA==", 458 | "engines": { 459 | "node": ">=4.5" 460 | } 461 | }, 462 | "node_modules/bufferutil": { 463 | "version": "4.0.8", 464 | "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz", 465 | "integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==", 466 | "hasInstallScript": true, 467 | "optional": true, 468 | "dependencies": { 469 | "node-gyp-build": "^4.3.0" 470 | }, 471 | "engines": { 472 | "node": ">=6.14.2" 473 | } 474 | }, 475 | "node_modules/camelcase": { 476 | "version": "5.3.1", 477 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", 478 | "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", 479 | "engines": { 480 | "node": ">=6" 481 | } 482 | }, 483 | "node_modules/combined-stream": { 484 | "version": "1.0.8", 485 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 486 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 487 | "dependencies": { 488 | "delayed-stream": "~1.0.0" 489 | }, 490 | "engines": { 491 | "node": ">= 0.8" 492 | } 493 | }, 494 | "node_modules/commander": { 495 | "version": "2.20.3", 496 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", 497 | "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" 498 | }, 499 | "node_modules/convert-string": { 500 | "version": "0.1.0", 501 | "resolved": "https://registry.npmjs.org/convert-string/-/convert-string-0.1.0.tgz", 502 | "integrity": "sha512-1KX9ESmtl8xpT2LN2tFnKSbV4NiarbVi8DVb39ZriijvtTklyrT+4dT1wsGMHKD3CJUjXgvJzstm9qL9ICojGA==" 503 | }, 504 | "node_modules/crypto-hash": { 505 | "version": "1.3.0", 506 | "resolved": "https://registry.npmjs.org/crypto-hash/-/crypto-hash-1.3.0.tgz", 507 | "integrity": "sha512-lyAZ0EMyjDkVvz8WOeVnuCPvKVBXcMv1l5SVqO1yC7PzTwrD/pPje/BIRbWhMoPe436U+Y2nD7f5bFx0kt+Sbg==", 508 | "engines": { 509 | "node": ">=8" 510 | }, 511 | "funding": { 512 | "url": "https://github.com/sponsors/sindresorhus" 513 | } 514 | }, 515 | "node_modules/decimal.js": { 516 | "version": "10.4.3", 517 | "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", 518 | "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==" 519 | }, 520 | "node_modules/decimal.js-light": { 521 | "version": "2.5.1", 522 | "resolved": "https://registry.npmjs.org/decimal.js-light/-/decimal.js-light-2.5.1.tgz", 523 | "integrity": "sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg==" 524 | }, 525 | "node_modules/delay": { 526 | "version": "5.0.0", 527 | "resolved": "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz", 528 | "integrity": "sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==", 529 | "engines": { 530 | "node": ">=10" 531 | }, 532 | "funding": { 533 | "url": "https://github.com/sponsors/sindresorhus" 534 | } 535 | }, 536 | "node_modules/delayed-stream": { 537 | "version": "1.0.0", 538 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 539 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", 540 | "engines": { 541 | "node": ">=0.4.0" 542 | } 543 | }, 544 | "node_modules/dot-case": { 545 | "version": "3.0.4", 546 | "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", 547 | "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", 548 | "dependencies": { 549 | "no-case": "^3.0.4", 550 | "tslib": "^2.0.3" 551 | } 552 | }, 553 | "node_modules/dotenv": { 554 | "version": "10.0.0", 555 | "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", 556 | "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==", 557 | "engines": { 558 | "node": ">=10" 559 | } 560 | }, 561 | "node_modules/es6-promise": { 562 | "version": "4.2.8", 563 | "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", 564 | "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" 565 | }, 566 | "node_modules/es6-promisify": { 567 | "version": "5.0.0", 568 | "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", 569 | "integrity": "sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==", 570 | "dependencies": { 571 | "es6-promise": "^4.0.3" 572 | } 573 | }, 574 | "node_modules/eventemitter3": { 575 | "version": "4.0.7", 576 | "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", 577 | "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" 578 | }, 579 | "node_modules/eyes": { 580 | "version": "0.1.8", 581 | "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", 582 | "integrity": "sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==", 583 | "engines": { 584 | "node": "> 0.1.90" 585 | } 586 | }, 587 | "node_modules/fast-stable-stringify": { 588 | "version": "1.0.0", 589 | "resolved": "https://registry.npmjs.org/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz", 590 | "integrity": "sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag==" 591 | }, 592 | "node_modules/fastestsmallesttextencoderdecoder": { 593 | "version": "1.0.22", 594 | "resolved": "https://registry.npmjs.org/fastestsmallesttextencoderdecoder/-/fastestsmallesttextencoderdecoder-1.0.22.tgz", 595 | "integrity": "sha512-Pb8d48e+oIuY4MaM64Cd7OW1gt4nxCHs7/ddPPZ/Ic3sg8yVGM7O9wDvZ7us6ScaUupzM+pfBolwtYhN1IxBIw==", 596 | "peer": true 597 | }, 598 | "node_modules/fecha": { 599 | "version": "4.2.3", 600 | "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.3.tgz", 601 | "integrity": "sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==" 602 | }, 603 | "node_modules/file-uri-to-path": { 604 | "version": "1.0.0", 605 | "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", 606 | "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" 607 | }, 608 | "node_modules/find": { 609 | "version": "0.3.0", 610 | "resolved": "https://registry.npmjs.org/find/-/find-0.3.0.tgz", 611 | "integrity": "sha512-iSd+O4OEYV/I36Zl8MdYJO0xD82wH528SaCieTVHhclgiYNe9y+yPKSwK+A7/WsmHL1EZ+pYUJBXWTL5qofksw==", 612 | "dependencies": { 613 | "traverse-chain": "~0.1.0" 614 | } 615 | }, 616 | "node_modules/follow-redirects": { 617 | "version": "1.15.4", 618 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz", 619 | "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==", 620 | "funding": [ 621 | { 622 | "type": "individual", 623 | "url": "https://github.com/sponsors/RubenVerborgh" 624 | } 625 | ], 626 | "engines": { 627 | "node": ">=4.0" 628 | }, 629 | "peerDependenciesMeta": { 630 | "debug": { 631 | "optional": true 632 | } 633 | } 634 | }, 635 | "node_modules/form-data": { 636 | "version": "4.0.0", 637 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", 638 | "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", 639 | "dependencies": { 640 | "asynckit": "^0.4.0", 641 | "combined-stream": "^1.0.8", 642 | "mime-types": "^2.1.12" 643 | }, 644 | "engines": { 645 | "node": ">= 6" 646 | } 647 | }, 648 | "node_modules/humanize-ms": { 649 | "version": "1.2.1", 650 | "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", 651 | "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", 652 | "dependencies": { 653 | "ms": "^2.0.0" 654 | } 655 | }, 656 | "node_modules/ieee754": { 657 | "version": "1.2.1", 658 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", 659 | "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", 660 | "funding": [ 661 | { 662 | "type": "github", 663 | "url": "https://github.com/sponsors/feross" 664 | }, 665 | { 666 | "type": "patreon", 667 | "url": "https://www.patreon.com/feross" 668 | }, 669 | { 670 | "type": "consulting", 671 | "url": "https://feross.org/support" 672 | } 673 | ] 674 | }, 675 | "node_modules/isomorphic-ws": { 676 | "version": "4.0.1", 677 | "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", 678 | "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==", 679 | "peerDependencies": { 680 | "ws": "*" 681 | } 682 | }, 683 | "node_modules/jayson": { 684 | "version": "4.1.0", 685 | "resolved": "https://registry.npmjs.org/jayson/-/jayson-4.1.0.tgz", 686 | "integrity": "sha512-R6JlbyLN53Mjku329XoRT2zJAE6ZgOQ8f91ucYdMCD4nkGCF9kZSrcGXpHIU4jeKj58zUZke2p+cdQchU7Ly7A==", 687 | "dependencies": { 688 | "@types/connect": "^3.4.33", 689 | "@types/node": "^12.12.54", 690 | "@types/ws": "^7.4.4", 691 | "commander": "^2.20.3", 692 | "delay": "^5.0.0", 693 | "es6-promisify": "^5.0.0", 694 | "eyes": "^0.1.8", 695 | "isomorphic-ws": "^4.0.1", 696 | "json-stringify-safe": "^5.0.1", 697 | "JSONStream": "^1.3.5", 698 | "uuid": "^8.3.2", 699 | "ws": "^7.4.5" 700 | }, 701 | "bin": { 702 | "jayson": "bin/jayson.js" 703 | }, 704 | "engines": { 705 | "node": ">=8" 706 | } 707 | }, 708 | "node_modules/js-sha256": { 709 | "version": "0.9.0", 710 | "resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.9.0.tgz", 711 | "integrity": "sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA==" 712 | }, 713 | "node_modules/json-stringify-safe": { 714 | "version": "5.0.1", 715 | "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", 716 | "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" 717 | }, 718 | "node_modules/jsonparse": { 719 | "version": "1.3.1", 720 | "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", 721 | "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", 722 | "engines": [ 723 | "node >= 0.2.0" 724 | ] 725 | }, 726 | "node_modules/JSONStream": { 727 | "version": "1.3.5", 728 | "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", 729 | "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", 730 | "dependencies": { 731 | "jsonparse": "^1.2.0", 732 | "through": ">=2.2.7 <3" 733 | }, 734 | "bin": { 735 | "JSONStream": "bin.js" 736 | }, 737 | "engines": { 738 | "node": "*" 739 | } 740 | }, 741 | "node_modules/lodash": { 742 | "version": "4.17.21", 743 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", 744 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" 745 | }, 746 | "node_modules/lower-case": { 747 | "version": "2.0.2", 748 | "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", 749 | "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", 750 | "dependencies": { 751 | "tslib": "^2.0.3" 752 | } 753 | }, 754 | "node_modules/mime-db": { 755 | "version": "1.52.0", 756 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 757 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", 758 | "engines": { 759 | "node": ">= 0.6" 760 | } 761 | }, 762 | "node_modules/mime-types": { 763 | "version": "2.1.35", 764 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 765 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 766 | "dependencies": { 767 | "mime-db": "1.52.0" 768 | }, 769 | "engines": { 770 | "node": ">= 0.6" 771 | } 772 | }, 773 | "node_modules/ms": { 774 | "version": "2.1.3", 775 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 776 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" 777 | }, 778 | "node_modules/no-case": { 779 | "version": "3.0.4", 780 | "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", 781 | "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", 782 | "dependencies": { 783 | "lower-case": "^2.0.2", 784 | "tslib": "^2.0.3" 785 | } 786 | }, 787 | "node_modules/node": { 788 | "version": "21.2.0", 789 | "resolved": "https://registry.npmjs.org/node/-/node-21.2.0.tgz", 790 | "integrity": "sha512-oiHX7SXGdO1wyg0/lZ1ZMy1iS7GgumsT5Ptt5BOye1WniC8OJ2TtYRuWfqNoKrUlYzI4+Bv1+NH5eDgxuThU2A==", 791 | "hasInstallScript": true, 792 | "dependencies": { 793 | "node-bin-setup": "^1.0.0" 794 | }, 795 | "bin": { 796 | "node": "bin/node" 797 | }, 798 | "engines": { 799 | "npm": ">=5.0.0" 800 | } 801 | }, 802 | "node_modules/node-bin-setup": { 803 | "version": "1.1.3", 804 | "resolved": "https://registry.npmjs.org/node-bin-setup/-/node-bin-setup-1.1.3.tgz", 805 | "integrity": "sha512-opgw9iSCAzT2+6wJOETCpeRYAQxSopqQ2z+N6BXwIMsQQ7Zj5M8MaafQY8JMlolRR6R1UXg2WmhKp0p9lSOivg==" 806 | }, 807 | "node_modules/node-fetch": { 808 | "version": "2.7.0", 809 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", 810 | "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", 811 | "dependencies": { 812 | "whatwg-url": "^5.0.0" 813 | }, 814 | "engines": { 815 | "node": "4.x || >=6.0.0" 816 | }, 817 | "peerDependencies": { 818 | "encoding": "^0.1.0" 819 | }, 820 | "peerDependenciesMeta": { 821 | "encoding": { 822 | "optional": true 823 | } 824 | } 825 | }, 826 | "node_modules/node-gyp-build": { 827 | "version": "4.7.1", 828 | "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.7.1.tgz", 829 | "integrity": "sha512-wTSrZ+8lsRRa3I3H8Xr65dLWSgCvY2l4AOnaeKdPA9TB/WYMPaTcrzf3rXvFoVvjKNVnu0CcWSx54qq9GKRUYg==", 830 | "optional": true, 831 | "bin": { 832 | "node-gyp-build": "bin.js", 833 | "node-gyp-build-optional": "optional.js", 834 | "node-gyp-build-test": "build-test.js" 835 | } 836 | }, 837 | "node_modules/pako": { 838 | "version": "2.1.0", 839 | "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", 840 | "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==" 841 | }, 842 | "node_modules/proxy-from-env": { 843 | "version": "1.1.0", 844 | "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", 845 | "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" 846 | }, 847 | "node_modules/regenerator-runtime": { 848 | "version": "0.14.1", 849 | "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", 850 | "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" 851 | }, 852 | "node_modules/rpc-websockets": { 853 | "version": "7.9.0", 854 | "resolved": "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-7.9.0.tgz", 855 | "integrity": "sha512-DwKewQz1IUA5wfLvgM8wDpPRcr+nWSxuFxx5CbrI2z/MyyZ4nXLM86TvIA+cI1ZAdqC8JIBR1mZR55dzaLU+Hw==", 856 | "dependencies": { 857 | "@babel/runtime": "^7.17.2", 858 | "eventemitter3": "^4.0.7", 859 | "uuid": "^8.3.2", 860 | "ws": "^8.5.0" 861 | }, 862 | "funding": { 863 | "type": "paypal", 864 | "url": "https://paypal.me/kozjak" 865 | }, 866 | "optionalDependencies": { 867 | "bufferutil": "^4.0.1", 868 | "utf-8-validate": "^5.0.2" 869 | } 870 | }, 871 | "node_modules/rpc-websockets/node_modules/ws": { 872 | "version": "8.16.0", 873 | "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", 874 | "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", 875 | "engines": { 876 | "node": ">=10.0.0" 877 | }, 878 | "peerDependencies": { 879 | "bufferutil": "^4.0.1", 880 | "utf-8-validate": ">=5.0.2" 881 | }, 882 | "peerDependenciesMeta": { 883 | "bufferutil": { 884 | "optional": true 885 | }, 886 | "utf-8-validate": { 887 | "optional": true 888 | } 889 | } 890 | }, 891 | "node_modules/safe-buffer": { 892 | "version": "5.2.1", 893 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 894 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 895 | "funding": [ 896 | { 897 | "type": "github", 898 | "url": "https://github.com/sponsors/feross" 899 | }, 900 | { 901 | "type": "patreon", 902 | "url": "https://www.patreon.com/feross" 903 | }, 904 | { 905 | "type": "consulting", 906 | "url": "https://feross.org/support" 907 | } 908 | ] 909 | }, 910 | "node_modules/snake-case": { 911 | "version": "3.0.4", 912 | "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz", 913 | "integrity": "sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==", 914 | "dependencies": { 915 | "dot-case": "^3.0.4", 916 | "tslib": "^2.0.3" 917 | } 918 | }, 919 | "node_modules/superstruct": { 920 | "version": "0.14.2", 921 | "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-0.14.2.tgz", 922 | "integrity": "sha512-nPewA6m9mR3d6k7WkZ8N8zpTWfenFH3q9pA2PkuiZxINr9DKB2+40wEQf0ixn8VaGuJ78AB6iWOtStI+/4FKZQ==" 923 | }, 924 | "node_modules/text-encoding-utf-8": { 925 | "version": "1.0.2", 926 | "resolved": "https://registry.npmjs.org/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz", 927 | "integrity": "sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg==" 928 | }, 929 | "node_modules/through": { 930 | "version": "2.3.8", 931 | "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", 932 | "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==" 933 | }, 934 | "node_modules/toformat": { 935 | "version": "2.0.0", 936 | "resolved": "https://registry.npmjs.org/toformat/-/toformat-2.0.0.tgz", 937 | "integrity": "sha512-03SWBVop6nU8bpyZCx7SodpYznbZF5R4ljwNLBcTQzKOD9xuihRo/psX58llS1BMFhhAI08H3luot5GoXJz2pQ==" 938 | }, 939 | "node_modules/toml": { 940 | "version": "3.0.0", 941 | "resolved": "https://registry.npmjs.org/toml/-/toml-3.0.0.tgz", 942 | "integrity": "sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==" 943 | }, 944 | "node_modules/tr46": { 945 | "version": "0.0.3", 946 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", 947 | "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" 948 | }, 949 | "node_modules/traverse-chain": { 950 | "version": "0.1.0", 951 | "resolved": "https://registry.npmjs.org/traverse-chain/-/traverse-chain-0.1.0.tgz", 952 | "integrity": "sha512-up6Yvai4PYKhpNp5PkYtx50m3KbwQrqDwbuZP/ItyL64YEWHAvH6Md83LFLV/GRSk/BoUVwwgUzX6SOQSbsfAg==" 953 | }, 954 | "node_modules/tslib": { 955 | "version": "2.6.2", 956 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", 957 | "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" 958 | }, 959 | "node_modules/utf-8-validate": { 960 | "version": "5.0.10", 961 | "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", 962 | "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", 963 | "hasInstallScript": true, 964 | "optional": true, 965 | "dependencies": { 966 | "node-gyp-build": "^4.3.0" 967 | }, 968 | "engines": { 969 | "node": ">=6.14.2" 970 | } 971 | }, 972 | "node_modules/uuid": { 973 | "version": "8.3.2", 974 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", 975 | "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", 976 | "bin": { 977 | "uuid": "dist/bin/uuid" 978 | } 979 | }, 980 | "node_modules/webidl-conversions": { 981 | "version": "3.0.1", 982 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", 983 | "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" 984 | }, 985 | "node_modules/whatwg-url": { 986 | "version": "5.0.0", 987 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", 988 | "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", 989 | "dependencies": { 990 | "tr46": "~0.0.3", 991 | "webidl-conversions": "^3.0.0" 992 | } 993 | }, 994 | "node_modules/ws": { 995 | "version": "7.5.9", 996 | "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", 997 | "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", 998 | "engines": { 999 | "node": ">=8.3.0" 1000 | }, 1001 | "peerDependencies": { 1002 | "bufferutil": "^4.0.1", 1003 | "utf-8-validate": "^5.0.2" 1004 | }, 1005 | "peerDependenciesMeta": { 1006 | "bufferutil": { 1007 | "optional": true 1008 | }, 1009 | "utf-8-validate": { 1010 | "optional": true 1011 | } 1012 | } 1013 | } 1014 | }, 1015 | "dependencies": { 1016 | "@babel/runtime": { 1017 | "version": "7.23.7", 1018 | "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.7.tgz", 1019 | "integrity": "sha512-w06OXVOFso7LcbzMiDGt+3X7Rh7Ho8MmgPoWU3rarH+8upf+wSU/grlGbWzQyr3DkdN6ZeuMFjpdwW0Q+HxobA==", 1020 | "requires": { 1021 | "regenerator-runtime": "^0.14.0" 1022 | } 1023 | }, 1024 | "@noble/curves": { 1025 | "version": "1.3.0", 1026 | "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz", 1027 | "integrity": "sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==", 1028 | "requires": { 1029 | "@noble/hashes": "1.3.3" 1030 | } 1031 | }, 1032 | "@noble/hashes": { 1033 | "version": "1.3.3", 1034 | "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", 1035 | "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==" 1036 | }, 1037 | "@openbook-dex/openbook": { 1038 | "version": "0.0.9", 1039 | "resolved": "https://registry.npmjs.org/@openbook-dex/openbook/-/openbook-0.0.9.tgz", 1040 | "integrity": "sha512-tJPqHS7Tp/Gu3MC/MAZQBUm62WhdBPLzCcId3p62eHV6cRwNqflr0j+eKDh0Lfd5CAnkB1a9wZoVte074+zB5A==", 1041 | "requires": { 1042 | "@project-serum/anchor": "^0.11.1", 1043 | "@solana/spl-token": "^0.1.6", 1044 | "@solana/web3.js": "^1.70.0", 1045 | "bn.js": "^5.2.1", 1046 | "buffer-layout": "^1.2.0" 1047 | }, 1048 | "dependencies": { 1049 | "@solana/spl-token": { 1050 | "version": "0.1.8", 1051 | "resolved": "https://registry.npmjs.org/@solana/spl-token/-/spl-token-0.1.8.tgz", 1052 | "integrity": "sha512-LZmYCKcPQDtJgecvWOgT/cnoIQPWjdH+QVyzPcFvyDUiT0DiRjZaam4aqNUyvchLFhzgunv3d9xOoyE34ofdoQ==", 1053 | "requires": { 1054 | "@babel/runtime": "^7.10.5", 1055 | "@solana/web3.js": "^1.21.0", 1056 | "bn.js": "^5.1.0", 1057 | "buffer": "6.0.3", 1058 | "buffer-layout": "^1.2.0", 1059 | "dotenv": "10.0.0" 1060 | } 1061 | } 1062 | } 1063 | }, 1064 | "@project-serum/anchor": { 1065 | "version": "0.11.1", 1066 | "resolved": "https://registry.npmjs.org/@project-serum/anchor/-/anchor-0.11.1.tgz", 1067 | "integrity": "sha512-oIdm4vTJkUy6GmE6JgqDAuQPKI7XM4TPJkjtoIzp69RZe0iAD9JP2XHx7lV1jLdYXeYHqDXfBt3zcq7W91K6PA==", 1068 | "requires": { 1069 | "@project-serum/borsh": "^0.2.2", 1070 | "@solana/web3.js": "^1.17.0", 1071 | "base64-js": "^1.5.1", 1072 | "bn.js": "^5.1.2", 1073 | "bs58": "^4.0.1", 1074 | "buffer-layout": "^1.2.0", 1075 | "camelcase": "^5.3.1", 1076 | "crypto-hash": "^1.3.0", 1077 | "eventemitter3": "^4.0.7", 1078 | "find": "^0.3.0", 1079 | "js-sha256": "^0.9.0", 1080 | "pako": "^2.0.3", 1081 | "snake-case": "^3.0.4", 1082 | "toml": "^3.0.0" 1083 | } 1084 | }, 1085 | "@project-serum/borsh": { 1086 | "version": "0.2.5", 1087 | "resolved": "https://registry.npmjs.org/@project-serum/borsh/-/borsh-0.2.5.tgz", 1088 | "integrity": "sha512-UmeUkUoKdQ7rhx6Leve1SssMR/Ghv8qrEiyywyxSWg7ooV7StdpPBhciiy5eB3T0qU1BXvdRNC8TdrkxK7WC5Q==", 1089 | "requires": { 1090 | "bn.js": "^5.1.2", 1091 | "buffer-layout": "^1.2.0" 1092 | } 1093 | }, 1094 | "@raydium-io/raydium-sdk": { 1095 | "version": "1.3.1-beta.46", 1096 | "resolved": "https://registry.npmjs.org/@raydium-io/raydium-sdk/-/raydium-sdk-1.3.1-beta.46.tgz", 1097 | "integrity": "sha512-hGieqaCeqszEJGRBbNNveXlZk8EIsjV9PTwodx8SWABu1ZZODE8SGRe5Vuq9Jtv1LZzL7jY3+P5UnQxrdQLQUA==", 1098 | "requires": { 1099 | "@solana/buffer-layout": "^4.0.1", 1100 | "@solana/spl-token": "^0.3.9", 1101 | "axios": "^1.6.2", 1102 | "big.js": "^6.2.1", 1103 | "bn.js": "^5.2.1", 1104 | "decimal.js": "^10.4.3", 1105 | "decimal.js-light": "^2.5.1", 1106 | "fecha": "^4.2.3", 1107 | "lodash": "^4.17.21", 1108 | "toformat": "^2.0.0" 1109 | } 1110 | }, 1111 | "@solana/buffer-layout": { 1112 | "version": "4.0.1", 1113 | "resolved": "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz", 1114 | "integrity": "sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA==", 1115 | "requires": { 1116 | "buffer": "~6.0.3" 1117 | } 1118 | }, 1119 | "@solana/buffer-layout-utils": { 1120 | "version": "0.2.0", 1121 | "resolved": "https://registry.npmjs.org/@solana/buffer-layout-utils/-/buffer-layout-utils-0.2.0.tgz", 1122 | "integrity": "sha512-szG4sxgJGktbuZYDg2FfNmkMi0DYQoVjN2h7ta1W1hPrwzarcFLBq9UpX1UjNXsNpT9dn+chgprtWGioUAr4/g==", 1123 | "requires": { 1124 | "@solana/buffer-layout": "^4.0.0", 1125 | "@solana/web3.js": "^1.32.0", 1126 | "bigint-buffer": "^1.1.5", 1127 | "bignumber.js": "^9.0.1" 1128 | } 1129 | }, 1130 | "@solana/codecs-core": { 1131 | "version": "2.0.0-experimental.8618508", 1132 | "resolved": "https://registry.npmjs.org/@solana/codecs-core/-/codecs-core-2.0.0-experimental.8618508.tgz", 1133 | "integrity": "sha512-JCz7mKjVKtfZxkuDtwMAUgA7YvJcA2BwpZaA1NOLcted4OMC4Prwa3DUe3f3181ixPYaRyptbF0Ikq2MbDkYEA==" 1134 | }, 1135 | "@solana/codecs-data-structures": { 1136 | "version": "2.0.0-experimental.8618508", 1137 | "resolved": "https://registry.npmjs.org/@solana/codecs-data-structures/-/codecs-data-structures-2.0.0-experimental.8618508.tgz", 1138 | "integrity": "sha512-sLpjL9sqzaDdkloBPV61Rht1tgaKq98BCtIKRuyscIrmVPu3wu0Bavk2n/QekmUzaTsj7K1pVSniM0YqCdnEBw==", 1139 | "requires": { 1140 | "@solana/codecs-core": "2.0.0-experimental.8618508", 1141 | "@solana/codecs-numbers": "2.0.0-experimental.8618508" 1142 | } 1143 | }, 1144 | "@solana/codecs-numbers": { 1145 | "version": "2.0.0-experimental.8618508", 1146 | "resolved": "https://registry.npmjs.org/@solana/codecs-numbers/-/codecs-numbers-2.0.0-experimental.8618508.tgz", 1147 | "integrity": "sha512-EXQKfzFr3CkKKNzKSZPOOOzchXsFe90TVONWsSnVkonO9z+nGKALE0/L9uBmIFGgdzhhU9QQVFvxBMclIDJo2Q==", 1148 | "requires": { 1149 | "@solana/codecs-core": "2.0.0-experimental.8618508" 1150 | } 1151 | }, 1152 | "@solana/codecs-strings": { 1153 | "version": "2.0.0-experimental.8618508", 1154 | "resolved": "https://registry.npmjs.org/@solana/codecs-strings/-/codecs-strings-2.0.0-experimental.8618508.tgz", 1155 | "integrity": "sha512-b2yhinr1+oe+JDmnnsV0641KQqqDG8AQ16Z/x7GVWO+AWHMpRlHWVXOq8U1yhPMA4VXxl7i+D+C6ql0VGFp0GA==", 1156 | "requires": { 1157 | "@solana/codecs-core": "2.0.0-experimental.8618508", 1158 | "@solana/codecs-numbers": "2.0.0-experimental.8618508" 1159 | } 1160 | }, 1161 | "@solana/options": { 1162 | "version": "2.0.0-experimental.8618508", 1163 | "resolved": "https://registry.npmjs.org/@solana/options/-/options-2.0.0-experimental.8618508.tgz", 1164 | "integrity": "sha512-fy/nIRAMC3QHvnKi63KEd86Xr/zFBVxNW4nEpVEU2OT0gCEKwHY4Z55YHf7XujhyuM3PNpiBKg/YYw5QlRU4vg==", 1165 | "requires": { 1166 | "@solana/codecs-core": "2.0.0-experimental.8618508", 1167 | "@solana/codecs-numbers": "2.0.0-experimental.8618508" 1168 | } 1169 | }, 1170 | "@solana/spl-token": { 1171 | "version": "0.3.11", 1172 | "resolved": "https://registry.npmjs.org/@solana/spl-token/-/spl-token-0.3.11.tgz", 1173 | "integrity": "sha512-bvohO3rIMSVL24Pb+I4EYTJ6cL82eFpInEXD/I8K8upOGjpqHsKUoAempR/RnUlI1qSFNyFlWJfu6MNUgfbCQQ==", 1174 | "requires": { 1175 | "@solana/buffer-layout": "^4.0.0", 1176 | "@solana/buffer-layout-utils": "^0.2.0", 1177 | "@solana/spl-token-metadata": "^0.1.2", 1178 | "buffer": "^6.0.3" 1179 | } 1180 | }, 1181 | "@solana/spl-token-metadata": { 1182 | "version": "0.1.2", 1183 | "resolved": "https://registry.npmjs.org/@solana/spl-token-metadata/-/spl-token-metadata-0.1.2.tgz", 1184 | "integrity": "sha512-hJYnAJNkDrtkE2Q41YZhCpeOGU/0JgRFXbtrtOuGGeKc3pkEUHB9DDoxZAxx+XRno13GozUleyBi0qypz4c3bw==", 1185 | "requires": { 1186 | "@solana/codecs-core": "2.0.0-experimental.8618508", 1187 | "@solana/codecs-data-structures": "2.0.0-experimental.8618508", 1188 | "@solana/codecs-numbers": "2.0.0-experimental.8618508", 1189 | "@solana/codecs-strings": "2.0.0-experimental.8618508", 1190 | "@solana/options": "2.0.0-experimental.8618508", 1191 | "@solana/spl-type-length-value": "0.1.0" 1192 | } 1193 | }, 1194 | "@solana/spl-type-length-value": { 1195 | "version": "0.1.0", 1196 | "resolved": "https://registry.npmjs.org/@solana/spl-type-length-value/-/spl-type-length-value-0.1.0.tgz", 1197 | "integrity": "sha512-JBMGB0oR4lPttOZ5XiUGyvylwLQjt1CPJa6qQ5oM+MBCndfjz2TKKkw0eATlLLcYmq1jBVsNlJ2cD6ns2GR7lA==", 1198 | "requires": { 1199 | "buffer": "^6.0.3" 1200 | } 1201 | }, 1202 | "@solana/web3.js": { 1203 | "version": "1.89.1", 1204 | "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.89.1.tgz", 1205 | "integrity": "sha512-t9TTLtPQxtQB3SAf/5E8xPXfVDsC6WGOsgKY02l2cbe0HLymT7ynE8Hu48Lk5qynHCquj6nhISfEHcjMkYpu/A==", 1206 | "requires": { 1207 | "@babel/runtime": "^7.23.4", 1208 | "@noble/curves": "^1.2.0", 1209 | "@noble/hashes": "^1.3.2", 1210 | "@solana/buffer-layout": "^4.0.1", 1211 | "agentkeepalive": "^4.5.0", 1212 | "bigint-buffer": "^1.1.5", 1213 | "bn.js": "^5.2.1", 1214 | "borsh": "^0.7.0", 1215 | "bs58": "^4.0.1", 1216 | "buffer": "6.0.3", 1217 | "fast-stable-stringify": "^1.0.0", 1218 | "jayson": "^4.1.0", 1219 | "node-fetch": "^2.7.0", 1220 | "rpc-websockets": "^7.5.1", 1221 | "superstruct": "^0.14.2" 1222 | }, 1223 | "dependencies": { 1224 | "borsh": { 1225 | "version": "0.7.0", 1226 | "resolved": "https://registry.npmjs.org/borsh/-/borsh-0.7.0.tgz", 1227 | "integrity": "sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA==", 1228 | "requires": { 1229 | "bn.js": "^5.2.0", 1230 | "bs58": "^4.0.0", 1231 | "text-encoding-utf-8": "^1.0.2" 1232 | } 1233 | } 1234 | } 1235 | }, 1236 | "@types/connect": { 1237 | "version": "3.4.38", 1238 | "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", 1239 | "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", 1240 | "requires": { 1241 | "@types/node": "*" 1242 | } 1243 | }, 1244 | "@types/node": { 1245 | "version": "12.20.55", 1246 | "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", 1247 | "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" 1248 | }, 1249 | "@types/ws": { 1250 | "version": "7.4.7", 1251 | "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", 1252 | "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==", 1253 | "requires": { 1254 | "@types/node": "*" 1255 | } 1256 | }, 1257 | "agentkeepalive": { 1258 | "version": "4.5.0", 1259 | "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz", 1260 | "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==", 1261 | "requires": { 1262 | "humanize-ms": "^1.2.1" 1263 | } 1264 | }, 1265 | "asynckit": { 1266 | "version": "0.4.0", 1267 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 1268 | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" 1269 | }, 1270 | "axios": { 1271 | "version": "1.6.4", 1272 | "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.4.tgz", 1273 | "integrity": "sha512-heJnIs6N4aa1eSthhN9M5ioILu8Wi8vmQW9iHQ9NUvfkJb0lEEDUiIdQNAuBtfUt3FxReaKdpQA5DbmMOqzF/A==", 1274 | "requires": { 1275 | "follow-redirects": "^1.15.4", 1276 | "form-data": "^4.0.0", 1277 | "proxy-from-env": "^1.1.0" 1278 | } 1279 | }, 1280 | "base-x": { 1281 | "version": "3.0.9", 1282 | "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", 1283 | "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", 1284 | "requires": { 1285 | "safe-buffer": "^5.0.1" 1286 | } 1287 | }, 1288 | "base64-js": { 1289 | "version": "1.5.1", 1290 | "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", 1291 | "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" 1292 | }, 1293 | "big.js": { 1294 | "version": "6.2.1", 1295 | "resolved": "https://registry.npmjs.org/big.js/-/big.js-6.2.1.tgz", 1296 | "integrity": "sha512-bCtHMwL9LeDIozFn+oNhhFoq+yQ3BNdnsLSASUxLciOb1vgvpHsIO1dsENiGMgbb4SkP5TrzWzRiLddn8ahVOQ==" 1297 | }, 1298 | "bigint-buffer": { 1299 | "version": "1.1.5", 1300 | "resolved": "https://registry.npmjs.org/bigint-buffer/-/bigint-buffer-1.1.5.tgz", 1301 | "integrity": "sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA==", 1302 | "requires": { 1303 | "bindings": "^1.3.0" 1304 | } 1305 | }, 1306 | "bignumber.js": { 1307 | "version": "9.1.2", 1308 | "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", 1309 | "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==" 1310 | }, 1311 | "bindings": { 1312 | "version": "1.5.0", 1313 | "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", 1314 | "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", 1315 | "requires": { 1316 | "file-uri-to-path": "1.0.0" 1317 | } 1318 | }, 1319 | "bn.js": { 1320 | "version": "5.2.1", 1321 | "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", 1322 | "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" 1323 | }, 1324 | "borsh": { 1325 | "version": "2.0.0", 1326 | "resolved": "https://registry.npmjs.org/borsh/-/borsh-2.0.0.tgz", 1327 | "integrity": "sha512-kc9+BgR3zz9+cjbwM8ODoUB4fs3X3I5A/HtX7LZKxCLaMrEeDFoBpnhZY//DTS1VZBSs6S5v46RZRbZjRFspEg==" 1328 | }, 1329 | "bs58": { 1330 | "version": "4.0.1", 1331 | "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", 1332 | "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", 1333 | "requires": { 1334 | "base-x": "^3.0.2" 1335 | } 1336 | }, 1337 | "bs64": { 1338 | "version": "0.1.0", 1339 | "resolved": "https://registry.npmjs.org/bs64/-/bs64-0.1.0.tgz", 1340 | "integrity": "sha512-0rK20fzECR6FFR2VRhvDOUTlPmWFS8PddRtk9KNqsfj9S8++WHSDKzf0f9S/89sthwBg+bEgFitRLEC6COTi8Q==", 1341 | "requires": { 1342 | "convert-string": "~0.1.0" 1343 | } 1344 | }, 1345 | "buffer": { 1346 | "version": "6.0.3", 1347 | "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", 1348 | "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", 1349 | "requires": { 1350 | "base64-js": "^1.3.1", 1351 | "ieee754": "^1.2.1" 1352 | } 1353 | }, 1354 | "buffer-layout": { 1355 | "version": "1.2.2", 1356 | "resolved": "https://registry.npmjs.org/buffer-layout/-/buffer-layout-1.2.2.tgz", 1357 | "integrity": "sha512-kWSuLN694+KTk8SrYvCqwP2WcgQjoRCiF5b4QDvkkz8EmgD+aWAIceGFKMIAdmF/pH+vpgNV3d3kAKorcdAmWA==" 1358 | }, 1359 | "bufferutil": { 1360 | "version": "4.0.8", 1361 | "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz", 1362 | "integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==", 1363 | "optional": true, 1364 | "requires": { 1365 | "node-gyp-build": "^4.3.0" 1366 | } 1367 | }, 1368 | "camelcase": { 1369 | "version": "5.3.1", 1370 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", 1371 | "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" 1372 | }, 1373 | "combined-stream": { 1374 | "version": "1.0.8", 1375 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 1376 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 1377 | "requires": { 1378 | "delayed-stream": "~1.0.0" 1379 | } 1380 | }, 1381 | "commander": { 1382 | "version": "2.20.3", 1383 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", 1384 | "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" 1385 | }, 1386 | "convert-string": { 1387 | "version": "0.1.0", 1388 | "resolved": "https://registry.npmjs.org/convert-string/-/convert-string-0.1.0.tgz", 1389 | "integrity": "sha512-1KX9ESmtl8xpT2LN2tFnKSbV4NiarbVi8DVb39ZriijvtTklyrT+4dT1wsGMHKD3CJUjXgvJzstm9qL9ICojGA==" 1390 | }, 1391 | "crypto-hash": { 1392 | "version": "1.3.0", 1393 | "resolved": "https://registry.npmjs.org/crypto-hash/-/crypto-hash-1.3.0.tgz", 1394 | "integrity": "sha512-lyAZ0EMyjDkVvz8WOeVnuCPvKVBXcMv1l5SVqO1yC7PzTwrD/pPje/BIRbWhMoPe436U+Y2nD7f5bFx0kt+Sbg==" 1395 | }, 1396 | "decimal.js": { 1397 | "version": "10.4.3", 1398 | "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", 1399 | "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==" 1400 | }, 1401 | "decimal.js-light": { 1402 | "version": "2.5.1", 1403 | "resolved": "https://registry.npmjs.org/decimal.js-light/-/decimal.js-light-2.5.1.tgz", 1404 | "integrity": "sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg==" 1405 | }, 1406 | "delay": { 1407 | "version": "5.0.0", 1408 | "resolved": "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz", 1409 | "integrity": "sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==" 1410 | }, 1411 | "delayed-stream": { 1412 | "version": "1.0.0", 1413 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 1414 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" 1415 | }, 1416 | "dot-case": { 1417 | "version": "3.0.4", 1418 | "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", 1419 | "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", 1420 | "requires": { 1421 | "no-case": "^3.0.4", 1422 | "tslib": "^2.0.3" 1423 | } 1424 | }, 1425 | "dotenv": { 1426 | "version": "10.0.0", 1427 | "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", 1428 | "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==" 1429 | }, 1430 | "es6-promise": { 1431 | "version": "4.2.8", 1432 | "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", 1433 | "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" 1434 | }, 1435 | "es6-promisify": { 1436 | "version": "5.0.0", 1437 | "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", 1438 | "integrity": "sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==", 1439 | "requires": { 1440 | "es6-promise": "^4.0.3" 1441 | } 1442 | }, 1443 | "eventemitter3": { 1444 | "version": "4.0.7", 1445 | "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", 1446 | "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" 1447 | }, 1448 | "eyes": { 1449 | "version": "0.1.8", 1450 | "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", 1451 | "integrity": "sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==" 1452 | }, 1453 | "fast-stable-stringify": { 1454 | "version": "1.0.0", 1455 | "resolved": "https://registry.npmjs.org/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz", 1456 | "integrity": "sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag==" 1457 | }, 1458 | "fastestsmallesttextencoderdecoder": { 1459 | "version": "1.0.22", 1460 | "resolved": "https://registry.npmjs.org/fastestsmallesttextencoderdecoder/-/fastestsmallesttextencoderdecoder-1.0.22.tgz", 1461 | "integrity": "sha512-Pb8d48e+oIuY4MaM64Cd7OW1gt4nxCHs7/ddPPZ/Ic3sg8yVGM7O9wDvZ7us6ScaUupzM+pfBolwtYhN1IxBIw==", 1462 | "peer": true 1463 | }, 1464 | "fecha": { 1465 | "version": "4.2.3", 1466 | "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.3.tgz", 1467 | "integrity": "sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==" 1468 | }, 1469 | "file-uri-to-path": { 1470 | "version": "1.0.0", 1471 | "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", 1472 | "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" 1473 | }, 1474 | "find": { 1475 | "version": "0.3.0", 1476 | "resolved": "https://registry.npmjs.org/find/-/find-0.3.0.tgz", 1477 | "integrity": "sha512-iSd+O4OEYV/I36Zl8MdYJO0xD82wH528SaCieTVHhclgiYNe9y+yPKSwK+A7/WsmHL1EZ+pYUJBXWTL5qofksw==", 1478 | "requires": { 1479 | "traverse-chain": "~0.1.0" 1480 | } 1481 | }, 1482 | "follow-redirects": { 1483 | "version": "1.15.4", 1484 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz", 1485 | "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==" 1486 | }, 1487 | "form-data": { 1488 | "version": "4.0.0", 1489 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", 1490 | "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", 1491 | "requires": { 1492 | "asynckit": "^0.4.0", 1493 | "combined-stream": "^1.0.8", 1494 | "mime-types": "^2.1.12" 1495 | } 1496 | }, 1497 | "humanize-ms": { 1498 | "version": "1.2.1", 1499 | "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", 1500 | "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", 1501 | "requires": { 1502 | "ms": "^2.0.0" 1503 | } 1504 | }, 1505 | "ieee754": { 1506 | "version": "1.2.1", 1507 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", 1508 | "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" 1509 | }, 1510 | "isomorphic-ws": { 1511 | "version": "4.0.1", 1512 | "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", 1513 | "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==", 1514 | "requires": {} 1515 | }, 1516 | "jayson": { 1517 | "version": "4.1.0", 1518 | "resolved": "https://registry.npmjs.org/jayson/-/jayson-4.1.0.tgz", 1519 | "integrity": "sha512-R6JlbyLN53Mjku329XoRT2zJAE6ZgOQ8f91ucYdMCD4nkGCF9kZSrcGXpHIU4jeKj58zUZke2p+cdQchU7Ly7A==", 1520 | "requires": { 1521 | "@types/connect": "^3.4.33", 1522 | "@types/node": "^12.12.54", 1523 | "@types/ws": "^7.4.4", 1524 | "commander": "^2.20.3", 1525 | "delay": "^5.0.0", 1526 | "es6-promisify": "^5.0.0", 1527 | "eyes": "^0.1.8", 1528 | "isomorphic-ws": "^4.0.1", 1529 | "json-stringify-safe": "^5.0.1", 1530 | "JSONStream": "^1.3.5", 1531 | "uuid": "^8.3.2", 1532 | "ws": "^7.4.5" 1533 | } 1534 | }, 1535 | "js-sha256": { 1536 | "version": "0.9.0", 1537 | "resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.9.0.tgz", 1538 | "integrity": "sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA==" 1539 | }, 1540 | "json-stringify-safe": { 1541 | "version": "5.0.1", 1542 | "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", 1543 | "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" 1544 | }, 1545 | "jsonparse": { 1546 | "version": "1.3.1", 1547 | "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", 1548 | "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==" 1549 | }, 1550 | "JSONStream": { 1551 | "version": "1.3.5", 1552 | "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", 1553 | "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", 1554 | "requires": { 1555 | "jsonparse": "^1.2.0", 1556 | "through": ">=2.2.7 <3" 1557 | } 1558 | }, 1559 | "lodash": { 1560 | "version": "4.17.21", 1561 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", 1562 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" 1563 | }, 1564 | "lower-case": { 1565 | "version": "2.0.2", 1566 | "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", 1567 | "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", 1568 | "requires": { 1569 | "tslib": "^2.0.3" 1570 | } 1571 | }, 1572 | "mime-db": { 1573 | "version": "1.52.0", 1574 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 1575 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" 1576 | }, 1577 | "mime-types": { 1578 | "version": "2.1.35", 1579 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 1580 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 1581 | "requires": { 1582 | "mime-db": "1.52.0" 1583 | } 1584 | }, 1585 | "ms": { 1586 | "version": "2.1.3", 1587 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 1588 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" 1589 | }, 1590 | "no-case": { 1591 | "version": "3.0.4", 1592 | "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", 1593 | "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", 1594 | "requires": { 1595 | "lower-case": "^2.0.2", 1596 | "tslib": "^2.0.3" 1597 | } 1598 | }, 1599 | "node": { 1600 | "version": "21.2.0", 1601 | "resolved": "https://registry.npmjs.org/node/-/node-21.2.0.tgz", 1602 | "integrity": "sha512-oiHX7SXGdO1wyg0/lZ1ZMy1iS7GgumsT5Ptt5BOye1WniC8OJ2TtYRuWfqNoKrUlYzI4+Bv1+NH5eDgxuThU2A==", 1603 | "requires": { 1604 | "node-bin-setup": "^1.0.0" 1605 | } 1606 | }, 1607 | "node-bin-setup": { 1608 | "version": "1.1.3", 1609 | "resolved": "https://registry.npmjs.org/node-bin-setup/-/node-bin-setup-1.1.3.tgz", 1610 | "integrity": "sha512-opgw9iSCAzT2+6wJOETCpeRYAQxSopqQ2z+N6BXwIMsQQ7Zj5M8MaafQY8JMlolRR6R1UXg2WmhKp0p9lSOivg==" 1611 | }, 1612 | "node-fetch": { 1613 | "version": "2.7.0", 1614 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", 1615 | "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", 1616 | "requires": { 1617 | "whatwg-url": "^5.0.0" 1618 | } 1619 | }, 1620 | "node-gyp-build": { 1621 | "version": "4.7.1", 1622 | "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.7.1.tgz", 1623 | "integrity": "sha512-wTSrZ+8lsRRa3I3H8Xr65dLWSgCvY2l4AOnaeKdPA9TB/WYMPaTcrzf3rXvFoVvjKNVnu0CcWSx54qq9GKRUYg==", 1624 | "optional": true 1625 | }, 1626 | "pako": { 1627 | "version": "2.1.0", 1628 | "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", 1629 | "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==" 1630 | }, 1631 | "proxy-from-env": { 1632 | "version": "1.1.0", 1633 | "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", 1634 | "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" 1635 | }, 1636 | "regenerator-runtime": { 1637 | "version": "0.14.1", 1638 | "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", 1639 | "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" 1640 | }, 1641 | "rpc-websockets": { 1642 | "version": "7.9.0", 1643 | "resolved": "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-7.9.0.tgz", 1644 | "integrity": "sha512-DwKewQz1IUA5wfLvgM8wDpPRcr+nWSxuFxx5CbrI2z/MyyZ4nXLM86TvIA+cI1ZAdqC8JIBR1mZR55dzaLU+Hw==", 1645 | "requires": { 1646 | "@babel/runtime": "^7.17.2", 1647 | "bufferutil": "^4.0.1", 1648 | "eventemitter3": "^4.0.7", 1649 | "utf-8-validate": "^5.0.2", 1650 | "uuid": "^8.3.2", 1651 | "ws": "^8.5.0" 1652 | }, 1653 | "dependencies": { 1654 | "ws": { 1655 | "version": "8.16.0", 1656 | "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", 1657 | "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", 1658 | "requires": {} 1659 | } 1660 | } 1661 | }, 1662 | "safe-buffer": { 1663 | "version": "5.2.1", 1664 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 1665 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" 1666 | }, 1667 | "snake-case": { 1668 | "version": "3.0.4", 1669 | "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz", 1670 | "integrity": "sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==", 1671 | "requires": { 1672 | "dot-case": "^3.0.4", 1673 | "tslib": "^2.0.3" 1674 | } 1675 | }, 1676 | "superstruct": { 1677 | "version": "0.14.2", 1678 | "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-0.14.2.tgz", 1679 | "integrity": "sha512-nPewA6m9mR3d6k7WkZ8N8zpTWfenFH3q9pA2PkuiZxINr9DKB2+40wEQf0ixn8VaGuJ78AB6iWOtStI+/4FKZQ==" 1680 | }, 1681 | "text-encoding-utf-8": { 1682 | "version": "1.0.2", 1683 | "resolved": "https://registry.npmjs.org/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz", 1684 | "integrity": "sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg==" 1685 | }, 1686 | "through": { 1687 | "version": "2.3.8", 1688 | "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", 1689 | "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==" 1690 | }, 1691 | "toformat": { 1692 | "version": "2.0.0", 1693 | "resolved": "https://registry.npmjs.org/toformat/-/toformat-2.0.0.tgz", 1694 | "integrity": "sha512-03SWBVop6nU8bpyZCx7SodpYznbZF5R4ljwNLBcTQzKOD9xuihRo/psX58llS1BMFhhAI08H3luot5GoXJz2pQ==" 1695 | }, 1696 | "toml": { 1697 | "version": "3.0.0", 1698 | "resolved": "https://registry.npmjs.org/toml/-/toml-3.0.0.tgz", 1699 | "integrity": "sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==" 1700 | }, 1701 | "tr46": { 1702 | "version": "0.0.3", 1703 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", 1704 | "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" 1705 | }, 1706 | "traverse-chain": { 1707 | "version": "0.1.0", 1708 | "resolved": "https://registry.npmjs.org/traverse-chain/-/traverse-chain-0.1.0.tgz", 1709 | "integrity": "sha512-up6Yvai4PYKhpNp5PkYtx50m3KbwQrqDwbuZP/ItyL64YEWHAvH6Md83LFLV/GRSk/BoUVwwgUzX6SOQSbsfAg==" 1710 | }, 1711 | "tslib": { 1712 | "version": "2.6.2", 1713 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", 1714 | "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" 1715 | }, 1716 | "utf-8-validate": { 1717 | "version": "5.0.10", 1718 | "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", 1719 | "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", 1720 | "optional": true, 1721 | "requires": { 1722 | "node-gyp-build": "^4.3.0" 1723 | } 1724 | }, 1725 | "uuid": { 1726 | "version": "8.3.2", 1727 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", 1728 | "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" 1729 | }, 1730 | "webidl-conversions": { 1731 | "version": "3.0.1", 1732 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", 1733 | "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" 1734 | }, 1735 | "whatwg-url": { 1736 | "version": "5.0.0", 1737 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", 1738 | "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", 1739 | "requires": { 1740 | "tr46": "~0.0.3", 1741 | "webidl-conversions": "^3.0.0" 1742 | } 1743 | }, 1744 | "ws": { 1745 | "version": "7.5.9", 1746 | "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", 1747 | "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", 1748 | "requires": {} 1749 | } 1750 | } 1751 | } 1752 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@openbook-dex/openbook": "^0.0.9", 4 | "@raydium-io/raydium-sdk": "^1.3.1-beta.46", 5 | "@solana/spl-token": "^0.3.11", 6 | "@solana/web3.js": "^1.87.6", 7 | "borsh": "^2.0.0", 8 | "bs64": "^0.1.0", 9 | "node": "^21.2.0" 10 | }, 11 | "name": "solana", 12 | "version": "1.0.0", 13 | "main": "tx.js", 14 | "scripts": { 15 | "test": "echo \"Error: no test specified\" && exit 1" 16 | }, 17 | "author": "", 18 | "license": "ISC", 19 | "description": "" 20 | } 21 | -------------------------------------------------------------------------------- /strategy1/formatAmmKeysById.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.formatAmmKeysById = void 0; 13 | const raydium_sdk_1 = require("@raydium-io/raydium-sdk"); 14 | const web3_js_1 = require("@solana/web3.js"); 15 | const config_1 = require("../utils/config.js"); 16 | function formatAmmKeysById(id) { 17 | return __awaiter(this, void 0, void 0, function* () { 18 | const account = yield config_1.connection.getAccountInfo(new web3_js_1.PublicKey(id)); 19 | if (account === null) 20 | throw Error(' get id info error '); 21 | const info = raydium_sdk_1.LIQUIDITY_STATE_LAYOUT_V4.decode(account.data); 22 | const marketId = info.marketId; 23 | const marketAccount = yield config_1.connection.getAccountInfo(marketId); 24 | if (marketAccount === null) 25 | throw Error(' get market info error'); 26 | const marketInfo = raydium_sdk_1.MARKET_STATE_LAYOUT_V3.decode(marketAccount.data); 27 | const lpMint = info.lpMint; 28 | const lpMintAccount = yield config_1.connection.getAccountInfo(lpMint); 29 | if (lpMintAccount === null) 30 | throw Error(' get lp mint info error'); 31 | const lpMintInfo = raydium_sdk_1.SPL_MINT_LAYOUT.decode(lpMintAccount.data); 32 | return { 33 | id, 34 | baseMint: info.baseMint.toString(), 35 | quoteMint: info.quoteMint.toString(), 36 | lpMint: info.lpMint.toString(), 37 | baseDecimals: info.baseDecimal.toNumber(), 38 | quoteDecimals: info.quoteDecimal.toNumber(), 39 | // lpDecimals: lpMintInfo.decimals, 40 | lpDecimals: info.baseDecimal.toNumber(), 41 | version: 4, 42 | programId: account.owner.toString(), 43 | authority: raydium_sdk_1.Liquidity.getAssociatedAuthority({ programId: account.owner }).publicKey.toString(), 44 | openOrders: info.openOrders.toString(), 45 | targetOrders: info.targetOrders.toString(), 46 | baseVault: info.baseVault.toString(), 47 | quoteVault: info.quoteVault.toString(), 48 | withdrawQueue: info.withdrawQueue.toString(), 49 | lpVault: info.lpVault.toString(), 50 | marketVersion: 3, 51 | marketProgramId: info.marketProgramId.toString(), 52 | marketId: info.marketId.toString(), 53 | marketAuthority: raydium_sdk_1.Market.getAssociatedAuthority({ programId: info.marketProgramId, marketId: info.marketId }).publicKey.toString(), 54 | marketBaseVault: marketInfo.baseVault.toString(), 55 | marketQuoteVault: marketInfo.quoteVault.toString(), 56 | marketBids: marketInfo.bids.toString(), 57 | marketAsks: marketInfo.asks.toString(), 58 | marketEventQueue: marketInfo.eventQueue.toString(), 59 | lookupTableAccount: web3_js_1.PublicKey.default.toString() 60 | }; 61 | }); 62 | } 63 | exports.formatAmmKeysById = formatAmmKeysById; -------------------------------------------------------------------------------- /strategy1/start1.js: -------------------------------------------------------------------------------- 1 | const web3 = require('@solana/web3.js') 2 | const WebSocket = require('ws') 3 | const swap = require('./swap1.js') 4 | const raydium_sdk_1 = require("@raydium-io/raydium-sdk"); 5 | const config = require('../utils/config.js'); 6 | 7 | const connection = config.connection; 8 | const ws = new WebSocket(config.websocketConnection) 9 | ws.onopen = () => { 10 | ws.send( 11 | JSON.stringify({ 12 | jsonrpc: '2.0', 13 | id: 1, 14 | method: 'blockSubscribe', 15 | params: [{"mentionsAccountOrProgram": "675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8"}, {"commitment": "confirmed", "maxSupportedTransactionVersion": 0, "encoding": "jsonParsed"}] 16 | }) 17 | ) 18 | } 19 | 20 | ws.on('message', (evt) => { 21 | try { 22 | const buffer = evt.toString('utf8'); 23 | parseBlock(JSON.parse(buffer)); 24 | return; 25 | } catch (e) { 26 | console.log(e) 27 | } 28 | }) 29 | 30 | function isStatusError(status){ 31 | if(status.hasOwnProperty('Err')){ 32 | return true; 33 | } 34 | else if(status.hasOwnProperty('Ok')){ 35 | return false; 36 | } 37 | } 38 | 39 | async function getTx(tx){ 40 | return await connection.getTransaction(tx, { 41 | "commitment": "confirmed", 42 | "maxSupportedTransactionVersion": 0, 43 | "encoded": "jsonParsed" 44 | }) 45 | } 46 | 47 | let swapped = false; 48 | function parseBlock(transaction){ 49 | try{ 50 | const tx = transaction.params.result.value.block.transactions; 51 | for(let i = 0; i < tx.length; i++){ 52 | if(tx[i].meta.innerInstructions !== undefined && tx[i].meta.innerInstructions.length !== 0){ 53 | if(tx[i].meta.innerInstructions[0].instructions.length === 32 && !isStatusError(tx[i].meta.status)){ 54 | const signature = tx[i].transaction.signatures[0]; 55 | console.log(tx[i].transaction.signatures); 56 | if(swapped === false){ 57 | swapped = true; 58 | let now = new Date(); 59 | let utcString = now.toUTCString(); 60 | console.log(utcString); 61 | ws.close(); 62 | } 63 | } 64 | } 65 | } 66 | } catch(error){ 67 | console.log("searching...") 68 | } 69 | } 70 | 71 | async function getJsonPoolInfo(tx){ 72 | // market account 73 | const marketAccount = await connection.getAccountInfo(new web3.PublicKey(tx.transaction.message.accountKeys[19].pubkey)); 74 | const marketInfo = raydium_sdk_1.MARKET_STATE_LAYOUT_V3.decode(marketAccount.data); 75 | // get decimals 76 | const getTokenAccount = await connection.getParsedAccountInfo(new web3.PublicKey(tx.transaction.message.accountKeys[17].pubkey)); 77 | const decimals = getTokenAccount.value.data.parsed.info.decimals; 78 | // create poolKeys object 79 | const keys = { 80 | id: tx.transaction.message.accountKeys[2].pubkey, 81 | baseMint: tx.transaction.message.accountKeys[17].pubkey, 82 | quoteMint: 'So11111111111111111111111111111111111111112', 83 | lpMint: tx.transaction.message.accountKeys[4].pubkey, 84 | baseDecimals: decimals, 85 | quoteDecimals: 9, 86 | lpDecimals: decimals, 87 | version: 4, 88 | programId: '675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8', 89 | authority: '5Q544fKrFoe6tsEbD7S8EmxGTJYAKtTVhAW5Q5pge4j1', 90 | openOrders: tx.transaction.message.accountKeys[3].pubkey, 91 | targetOrders: tx.transaction.message.accountKeys[7].pubkey, 92 | baseVault: tx.transaction.message.accountKeys[5].pubkey, 93 | quoteVault: tx.transaction.message.accountKeys[6].pubkey, 94 | withdrawQueue: '11111111111111111111111111111111', 95 | lpVault: '11111111111111111111111111111111', 96 | marketVersion: 3, 97 | marketProgramId: tx.transaction.message.accountKeys[22].pubkey, 98 | marketId: tx.transaction.message.accountKeys[19].pubkey, 99 | marketAuthority: raydium_sdk_1.Market.getAssociatedAuthority({ programId: new web3.PublicKey(tx.transaction.message.accountKeys[22].pubkey), marketId: new web3.PublicKey(tx.transaction.message.accountKeys[19].pubkey) }).publicKey.toString(), 100 | marketBaseVault: marketInfo.baseVault.toString(), 101 | marketQuoteVault: marketInfo.quoteVault.toString(), 102 | marketBids: marketInfo.bids.toString(), 103 | marketAsks: marketInfo.asks.toString(), 104 | marketEventQueue: marketInfo.eventQueue.toString(), 105 | lookupTableAccount: '11111111111111111111111111111111' 106 | } 107 | // convert poolKeys object to JSON 108 | const jsonPoolKeys = raydium_sdk_1.jsonInfo2PoolKeys(keys); 109 | swap.swap(jsonPoolKeys, tx.transaction.message.accountKeys[17].pubkey); 110 | } -------------------------------------------------------------------------------- /strategy1/swap1.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 assert_1 = __importDefault(require("assert")); 16 | const raydium_sdk_1 = require("@raydium-io/raydium-sdk"); 17 | const config_1 = require("../utils/config.js"); 18 | const formatAmmKeysById_1 = require("./formatAmmKeysById.js"); 19 | const util_1 = require("../utils/util.js"); 20 | const { LAMPORTS_PER_SOL } = require("@solana/web3.js"); 21 | const web3 = require("@solana/web3.js"); 22 | const connection = config_1.connection; 23 | function swapOnlyAmm(input) { 24 | return __awaiter(this, void 0, void 0, function* () { 25 | const outputToken = new raydium_sdk_1.Token(raydium_sdk_1.TOKEN_PROGRAM_ID, new web3.PublicKey(input.tokenAddress), input.poolKeys.lpDecimals); 26 | const { innerTransactions } = yield raydium_sdk_1.Liquidity.makeSwapInstructionSimple({ 27 | connection: config_1.connection, 28 | poolKeys: input.poolKeys, 29 | userKeys: { 30 | tokenAccounts: input.walletTokenAccounts, 31 | owner: input.wallet.publicKey, 32 | }, 33 | amountIn: input.inputTokenAmount, 34 | amountOut: new raydium_sdk_1.TokenAmount(outputToken, 1), 35 | fixedSide: 'in', 36 | makeTxVersion: config_1.makeTxVersion, 37 | }); 38 | return { txids: yield (0, util_1.buildAndSendTx)(innerTransactions) }; 39 | }); 40 | } 41 | 42 | const buyAmtSol = config_1.amtBuySol; 43 | function swap(poolKeys, tokenAddress) { 44 | return __awaiter(this, void 0, void 0, function* () { 45 | const ownerAddress = config_1.ownerAddress; 46 | const inputToken = new raydium_sdk_1.Token(raydium_sdk_1.TOKEN_PROGRAM_ID, new web3_js_1.PublicKey('So11111111111111111111111111111111111111112'), 9, 'WSOL', 'WSOL'); // WSOL 47 | const inputTokenAmount = new raydium_sdk_1.TokenAmount(inputToken, LAMPORTS_PER_SOL * buyAmtSol); 48 | const slippage = new raydium_sdk_1.Percent(1, 100); 49 | const walletTokenAccounts = yield (0, util_1.getWalletTokenAccount)(config_1.connection, config_1.wallet.publicKey); 50 | swapOnlyAmm({ 51 | poolKeys, 52 | tokenAddress, 53 | inputTokenAmount, 54 | slippage, 55 | walletTokenAccounts, 56 | wallet: config_1.wallet, 57 | }).then(({ txids }) => { 58 | /** continue with txids */ 59 | console.log('txids', txids); 60 | if(txids.length === 1){ 61 | monitorTokenSell(txids[0], tokenAddress, ownerAddress, poolKeys.baseVault.toString(), poolKeys.quoteVault.toString()); 62 | } 63 | }).catch(error => { 64 | console.log(error); 65 | swap(poolKeys, tokenAddress); 66 | }) 67 | }); 68 | } 69 | exports.swap = swap 70 | 71 | async function getTx(tx){ 72 | return await connection.getTransaction(tx, { 73 | maxSupportedTransactionVersion: 0, 74 | commitment: "confirmed" 75 | }) 76 | } 77 | 78 | async function getBalances(tx, tokenAddress, ownerAddress){ 79 | let validTx = await getTx(tx); 80 | while(validTx === null){ 81 | validTx = await getTx(tx); 82 | if(validTx !== null){ 83 | for(const account of validTx.meta.postTokenBalances){ 84 | if(account.mint === tokenAddress && account.owner === ownerAddress){ 85 | return account.uiTokenAmount.uiAmount; 86 | } 87 | } 88 | } 89 | } 90 | } 91 | 92 | async function getTokenPriceInSol(baseVault, quoteVault){ 93 | const baseVaultAccount = await connection.getTokenAccountBalance(new web3.PublicKey(baseVault)); 94 | const quoteVaultAccount = await connection.getTokenAccountBalance(new web3.PublicKey(quoteVault)); 95 | const baseVaultAccountAmount = baseVaultAccount.value.uiAmount; 96 | const quoteVaultAccountAmount = quoteVaultAccount.value.uiAmount; 97 | return (quoteVaultAccountAmount / baseVaultAccountAmount); 98 | } 99 | 100 | async function monitorTokenSell(tx, tokenAddress, ownerAddress, baseVault, quoteVault){ 101 | const tokenBalance = await getBalances(tx, tokenAddress, ownerAddress); 102 | const buyPrice = (buyAmtSol / tokenBalance); 103 | monitorToken(buyPrice, baseVault, quoteVault); 104 | } 105 | 106 | async function monitorToken(buyPrice, baseVault, quoteVault){ 107 | let interval = setInterval(async () => { 108 | const currentPrice = await getTokenPriceInSol(baseVault, quoteVault); 109 | console.log("buy price: " + buyPrice + " current price: " + currentPrice); 110 | const percentIncrease = ((buyPrice - currentPrice) / buyPrice) * 100; 111 | console.log("percent increase: " + percentIncrease); 112 | }, 500) 113 | } -------------------------------------------------------------------------------- /strategy2/derivePoolKeys.js: -------------------------------------------------------------------------------- 1 | const web3 = require('@solana/web3.js'); 2 | const raydium_sdk_1 = require("@raydium-io/raydium-sdk"); 3 | const spl = require('@solana/spl-token'); 4 | const {Market} = require('@openbook-dex/openbook'); 5 | const config = require('../utils/config.js'); 6 | 7 | const connection = config.connection; 8 | 9 | const wsolAddress = 'So11111111111111111111111111111111111111112'; 10 | const openbookProgramId = new web3.PublicKey('srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX'); 11 | 12 | const rayProgram = new web3.PublicKey('675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8'); 13 | const myAccount = new web3.PublicKey(config.ownerAddress); 14 | 15 | async function derivePoolKeys(id){ 16 | console.log(id); 17 | const marketId = new web3.PublicKey(id); 18 | 19 | const marketInfo = await getMarketInfo(marketId); 20 | const marketDeco = await getDecodedData(marketInfo); 21 | 22 | const baseMint = marketDeco.baseMint; 23 | const baseMintData = await getMintData(baseMint); 24 | const baseDecimals = await getDecimals(baseMintData); 25 | const ownerBaseAta = await getOwnerAta(baseMint, myAccount); 26 | 27 | const quoteMint = marketDeco.quoteMint; 28 | const quoteMintData = await getMintData(quoteMint); 29 | const quoteDecimals = await getDecimals(quoteMintData); 30 | const ownerQuoteAta = await getOwnerAta(quoteMint, myAccount); 31 | 32 | const authority = (raydium_sdk_1.findProgramAddress([Buffer.from([97, 109, 109, 32, 97, 117, 116, 104, 111, 114, 105, 116, 121])], rayProgram))['publicKey']; 33 | // const marketAuthority = getVaultSigner(marketId, marketDeco); 34 | 35 | const poolKeys = { 36 | id: raydium_sdk_1.findProgramAddress([rayProgram.toBuffer(), marketId.toBuffer(), Buffer.from('amm_associated_seed', 'utf-8')], rayProgram)['publicKey'], 37 | baseMint: baseMint, 38 | quoteMint, quoteMint, 39 | lpMint: raydium_sdk_1.findProgramAddress([rayProgram.toBuffer(), marketId.toBuffer(), Buffer.from('lp_mint_associated_seed', 'utf-8')], rayProgram)['publicKey'], 40 | baseDecimals: baseDecimals, 41 | quoteDecimals: quoteDecimals, 42 | lpDecimals: baseDecimals, 43 | version: 4, 44 | programId: rayProgram, 45 | authority: authority, 46 | openOrders: raydium_sdk_1.findProgramAddress([rayProgram.toBuffer(), marketId.toBuffer(), Buffer.from('open_order_associated_seed', 'utf-8')], rayProgram)['publicKey'], 47 | targetOrders: raydium_sdk_1.findProgramAddress([rayProgram.toBuffer(), marketId.toBuffer(), Buffer.from('target_associated_seed', 'utf-8')], rayProgram)['publicKey'], 48 | baseVault: raydium_sdk_1.findProgramAddress([rayProgram.toBuffer(), marketId.toBuffer(), Buffer.from('coin_vault_associated_seed', 'utf-8')], rayProgram)['publicKey'], 49 | quoteVault: raydium_sdk_1.findProgramAddress([rayProgram.toBuffer(), marketId.toBuffer(), Buffer.from('pc_vault_associated_seed', 'utf-8')], rayProgram)['publicKey'], 50 | // withdrawQueue: raydium_sdk_1.findProgramAddress([rayProgram.toBuffer(), marketId.toBuffer(), Buffer.from('withdraw_associated_seed', 'utf-8')], rayProgram)['publicKey'], 51 | // lpVault: raydium_sdk_1.findProgramAddress([rayProgram.toBuffer(), marketId.toBuffer(), Buffer.from('temp_lp_token_associated_seed', 'utf-8')], rayProgram)['publicKey'], 52 | withdrawQueue: new web3.PublicKey('11111111111111111111111111111111'), 53 | lpVault: new web3.PublicKey('11111111111111111111111111111111'), 54 | marketVersion: 3, 55 | marketProgramId: openbookProgramId, 56 | // marketProgramId: new web3.PublicKey('9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin'), 57 | marketId: marketId, 58 | marketAuthority: raydium_sdk_1.Market.getAssociatedAuthority({ programId: new web3.PublicKey('9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin'), marketId: marketId }).publicKey, 59 | marketBaseVault: marketDeco.baseVault, 60 | marketQuoteVault: marketDeco.quoteVault, 61 | marketBids: marketDeco.bids, 62 | marketAsks: marketDeco.asks, 63 | marketEventQueue: marketDeco.eventQueue, 64 | // ownerBaseAta: ownerBaseAta, 65 | // ownerQuoteAta: ownerQuoteAta, 66 | // marketAuthority: marketAuthority, 67 | // coinVault: raydium_sdk_1.findProgramAddress([rayProgram.toBuffer(), marketId.toBuffer(), Buffer.from('pc_vault_associated_seed', 'utf-8')], rayProgram)['publicKey'], 68 | lookupTableAccount: web3.PublicKey.default 69 | }; 70 | return poolKeys; 71 | } 72 | exports.derivePoolKeys = derivePoolKeys; 73 | 74 | async function getMarketInfo(marketId){ 75 | const marketInfo = await connection.getAccountInfo(marketId); 76 | return marketInfo; 77 | } 78 | 79 | async function getDecodedData(marketInfo){ 80 | return await Market.getLayout(openbookProgramId).decode(marketInfo.data); 81 | } 82 | 83 | async function getMintData(mint){ 84 | return await connection.getAccountInfo(mint); 85 | } 86 | 87 | async function getDecimals(mintData){ 88 | return raydium_sdk_1.SPL_MINT_LAYOUT.decode(mintData.data).decimals; 89 | } 90 | 91 | async function getOwnerAta(mint, publicKey){ 92 | const foundAta = web3.PublicKey.findProgramAddressSync([publicKey.toBuffer(), spl.TOKEN_PROGRAM_ID.toBuffer(), mint.toBuffer()], spl.ASSOCIATED_TOKEN_PROGRAM_ID)[0]; 93 | return foundAta; 94 | } 95 | 96 | function getVaultSigner(marketId, marketDeco){ 97 | const seeds = [marketId.toBuffer()]; 98 | const seedsWithNonce = seeds.concat(Buffer.from([Number(marketDeco.vaultSignerNonce.toString())]), Buffer.alloc(7)); 99 | return web3.PublicKey.createProgramAddressSync(seedsWithNonce, openbookProgramId); 100 | } -------------------------------------------------------------------------------- /strategy2/start2.js: -------------------------------------------------------------------------------- 1 | const web3 = require('@solana/web3.js'); 2 | const raydium_sdk_1 = require("@raydium-io/raydium-sdk"); 3 | const WebSocket = require('ws'); 4 | const derivePoolKeys = require('./derivePoolKeys.js'); 5 | const swap = require('./swap2.js'); 6 | const config = require('../utils/config.js'); 7 | 8 | const connection = config.connection; 9 | 10 | const ws = new WebSocket(config.websocketConnection) 11 | ws.onopen = () => { 12 | ws.send( 13 | JSON.stringify({ 14 | jsonrpc: '2.0', 15 | id: 1, 16 | method: 'blockSubscribe', 17 | params: [{"mentionsAccountOrProgram": "srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX"}, {"commitment": "confirmed", "maxSupportedTransactionVersion": 0, "encoding": "jsonParsed"}] 18 | }) 19 | ) 20 | } 21 | 22 | ws.on('message', (evt) => { 23 | try { 24 | const buffer = evt.toString('utf8'); 25 | parseTxs(JSON.parse(buffer)); 26 | return; 27 | } catch (e) { 28 | console.log(e) 29 | } 30 | }) 31 | 32 | function parseTxs(txsFromBlock){ 33 | if(txsFromBlock.params === undefined){ 34 | return; 35 | } 36 | const allTx = txsFromBlock.params.result.value.block.transactions; 37 | for(const tx of allTx){ 38 | if(parseLogs(tx.meta.logMessages) && tx.transaction.message.accountKeys.length === 13 && tx.transaction.message.instructions.length === 6){ 39 | ws.close(); 40 | console.log(tx.transaction.signatures) 41 | parseAccountKeys(tx.transaction.message.accountKeys, tx.transaction.signatures); 42 | } 43 | } 44 | } 45 | 46 | function parseLogs(logs){ 47 | let invoke = 0; 48 | let consumed = 0; 49 | let success = 0; 50 | for(const log of logs){ 51 | if(log.includes("Program srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX invoke")){ 52 | invoke += 1; 53 | } 54 | if(log.includes("Program srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX consumed")){ 55 | consumed += 1; 56 | } 57 | if(log.includes("Program srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX success")){ 58 | success += 1; 59 | } 60 | } 61 | if(invoke === 1 && consumed === 1 && success === 1){ 62 | return true; 63 | } else{ 64 | return false; 65 | } 66 | } 67 | 68 | async function parseAccountKeys(keys, signature){ 69 | let marketId = null; 70 | for(const key of keys){ 71 | console.log(key); 72 | const keyData = await connection.getAccountInfo(new web3.PublicKey(key.pubkey)); 73 | if(keyData !== null && keyData.data.length === 388){ 74 | marketId = key.pubkey; 75 | } 76 | } 77 | if(marketId === null){ 78 | parseAccountKeys(keys); 79 | } else{ 80 | const poolKeys = await derivePoolKeys.derivePoolKeys(marketId); 81 | swap.swap(poolKeys, signature); 82 | } 83 | } -------------------------------------------------------------------------------- /strategy2/swap2.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 assert_1 = __importDefault(require("assert")); 16 | const raydium_sdk_1 = require("@raydium-io/raydium-sdk"); 17 | const config_1 = require("../utils/config.js"); 18 | const util_1 = require("../utils/util.js"); 19 | const { LAMPORTS_PER_SOL } = require("@solana/web3.js"); 20 | const web3 = require("@solana/web3.js"); 21 | const connection = config_1.connection; 22 | function swapOnlyAmm(input) { 23 | return __awaiter(this, void 0, void 0, function* () { 24 | const outputToken = new raydium_sdk_1.Token(raydium_sdk_1.TOKEN_PROGRAM_ID, new web3.PublicKey(input.tokenAddress), input.poolKeys.lpDecimals); 25 | const { innerTransactions } = yield raydium_sdk_1.Liquidity.makeSwapInstructionSimple({ 26 | connection: config_1.connection, 27 | poolKeys: input.poolKeys, 28 | userKeys: { 29 | tokenAccounts: input.walletTokenAccounts, 30 | owner: input.wallet.publicKey, 31 | }, 32 | amountIn: input.inputTokenAmount, 33 | amountOut: new raydium_sdk_1.TokenAmount(outputToken, 1), 34 | fixedSide: 'in', 35 | makeTxVersion: config_1.makeTxVersion, 36 | }); 37 | return { txids: yield (0, util_1.buildAndSendTx)(innerTransactions) }; 38 | }); 39 | } 40 | 41 | const buyAmtSol = config_1.amtBuySol; 42 | function swap(poolKeys, signature) { 43 | return __awaiter(this, void 0, void 0, function* () { 44 | const ownerAddress = config_1.ownerAddress; 45 | const inputToken = new raydium_sdk_1.Token(raydium_sdk_1.TOKEN_PROGRAM_ID, new web3_js_1.PublicKey('So11111111111111111111111111111111111111112'), 9, 'WSOL', 'WSOL'); // WSOL 46 | const inputTokenAmount = new raydium_sdk_1.TokenAmount(inputToken, LAMPORTS_PER_SOL * buyAmtSol); 47 | const slippage = new raydium_sdk_1.Percent(1, 100); 48 | const walletTokenAccounts = yield (0, util_1.getWalletTokenAccount)(config_1.connection, config_1.wallet.publicKey); 49 | swapOnlyAmm({ 50 | poolKeys, 51 | tokenAddress: poolKeys.baseMint.toString(), 52 | inputTokenAmount, 53 | slippage, 54 | walletTokenAccounts, 55 | wallet: config_1.wallet, 56 | }).then(({ txids }) => { 57 | /** continue with txids */ 58 | console.log('txids', txids); 59 | if(txids.length === 1){ 60 | monitorTokenSell(txids[0], poolKeys.baseMint.toString(), ownerAddress, poolKeys.baseVault.toString(), poolKeys.quoteVault.toString()); 61 | } 62 | }).catch(error => { 63 | console.log(signature); 64 | console.log(error); 65 | swap(poolKeys, poolKeys.baseMint.toString()); 66 | }) 67 | }); 68 | } 69 | exports.swap = swap 70 | 71 | async function getTx(tx){ 72 | return await connection.getTransaction(tx, { 73 | maxSupportedTransactionVersion: 0, 74 | commitment: "confirmed" 75 | }) 76 | } 77 | 78 | async function getBalances(tx, tokenAddress, ownerAddress){ 79 | let validTx = await getTx(tx); 80 | while(validTx === null){ 81 | validTx = await getTx(tx); 82 | if(validTx !== null){ 83 | for(const account of validTx.meta.postTokenBalances){ 84 | if(account.mint === tokenAddress && account.owner === ownerAddress){ 85 | return account.uiTokenAmount.uiAmount; 86 | } 87 | } 88 | } 89 | } 90 | } 91 | 92 | async function getTokenPriceInSol(baseVault, quoteVault){ 93 | const baseVaultAccount = await connection.getTokenAccountBalance(new web3.PublicKey(baseVault)); 94 | const quoteVaultAccount = await connection.getTokenAccountBalance(new web3.PublicKey(quoteVault)); 95 | const baseVaultAccountAmount = baseVaultAccount.value.uiAmount; 96 | const quoteVaultAccountAmount = quoteVaultAccount.value.uiAmount; 97 | return (quoteVaultAccountAmount / baseVaultAccountAmount); 98 | } 99 | 100 | async function monitorTokenSell(tx, tokenAddress, ownerAddress, baseVault, quoteVault){ 101 | const tokenBalance = await getBalances(tx, tokenAddress, ownerAddress); 102 | const buyPrice = (buyAmtSol / tokenBalance); 103 | monitorToken(buyPrice, baseVault, quoteVault); 104 | } 105 | 106 | async function monitorToken(buyPrice, baseVault, quoteVault){ 107 | let interval = setInterval(async () => { 108 | const currentPrice = await getTokenPriceInSol(baseVault, quoteVault); 109 | console.log("buy price: " + buyPrice + " current price: " + currentPrice); 110 | const percentIncrease = ((buyPrice - currentPrice) / buyPrice) * 100; 111 | console.log("percent increase: " + percentIncrease); 112 | }, 500) 113 | } -------------------------------------------------------------------------------- /utils/config.js: -------------------------------------------------------------------------------- 1 | const bs58 = require('bs58'); 2 | "use strict"; 3 | Object.defineProperty(exports, "__esModule", { value: true }); 4 | exports.DEFAULT_TOKEN = exports.addLookupTableInfo = exports.makeTxVersion = exports.RAYDIUM_MAINNET_API = exports.ENDPOINT = exports.PROGRAMIDS = exports.connection = exports.wallet = exports.rpcToken = exports.rpcUrl = void 0; 5 | const raydium_sdk_1 = require("@raydium-io/raydium-sdk"); 6 | const web3_js_1 = require("@solana/web3.js"); 7 | exports.ownerAddress = ''; 8 | exports.wallet = web3_js_1.Keypair.fromSecretKey(bs58.decode('')); 9 | exports.connection = new web3_js_1.Connection(''); 10 | exports.websocketConnection = ''; 11 | exports.amtBuySol = ''; 12 | exports.PROGRAMIDS = raydium_sdk_1.MAINNET_PROGRAM_ID; 13 | exports.ENDPOINT = raydium_sdk_1.ENDPOINT; 14 | exports.RAYDIUM_MAINNET_API = raydium_sdk_1.RAYDIUM_MAINNET; 15 | exports.makeTxVersion = raydium_sdk_1.TxVersion.V0; // LEGACY 16 | exports.addLookupTableInfo = raydium_sdk_1.LOOKUP_TABLE_CACHE; 17 | -------------------------------------------------------------------------------- /utils/decoderaylog.js: -------------------------------------------------------------------------------- 1 | const web3 = require('@solana/web3.js'); 2 | const WebSocket = require('ws'); 3 | const raydium_sdk_1 = require("@raydium-io/raydium-sdk"); 4 | const bs64 = require('bs64'); 5 | const config = require('./config'); 6 | 7 | const connection = config.connection; 8 | 9 | const feeAddress = '7YttLkHDoNj9wyDur5pM1ejNaAvT9X4eqaYcHQqtj2G5' 10 | const rayProgram = new web3.PublicKey('675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8'); 11 | 12 | const ws = new WebSocket(config.websocketConnection) 13 | ws.onopen = () => { 14 | ws.send( 15 | JSON.stringify({ 16 | jsonrpc: '2.0', 17 | id: 1, 18 | method: 'logsSubscribe', 19 | params: [{"mentions": [feeAddress]}, {"commitment": "processed"}] 20 | }) 21 | ) 22 | } 23 | 24 | ws.on('message', (evt) => { 25 | try { 26 | const buffer = evt.toString('utf8'); 27 | parseLogs(JSON.parse(buffer)); 28 | return; 29 | } catch (e) { 30 | console.log(e) 31 | } 32 | }) 33 | 34 | function parseLogs(buffer){ 35 | if(buffer.params === undefined){ 36 | return; 37 | } 38 | let now = new Date(); 39 | let utcString = now.toUTCString(); 40 | console.log(utcString); 41 | const allLogs = buffer.params.result.value.logs; 42 | for(const log of allLogs){ 43 | if(log.includes("ray_log")){ 44 | const rayLogSplit = log.split(" "); 45 | const rayLog = rayLogSplit[3]; 46 | const logData = Buffer.from(rayLog, "base64"); 47 | const market = new web3.PublicKey(logData.subarray(75 - 32), 75); 48 | console.log(market) 49 | const pool = raydium_sdk_1.findProgramAddress([rayProgram.toBuffer(), market.toBuffer(), Buffer.from('amm_associated_seed', 'utf-8')], rayProgram)['publicKey']; 50 | console.log(pool); 51 | } 52 | } 53 | } -------------------------------------------------------------------------------- /utils/util.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.sleepTime = exports.getATAAddress = exports.buildAndSendTx = exports.getWalletTokenAccount = exports.sendTx = void 0; 13 | const raydium_sdk_1 = require("@raydium-io/raydium-sdk"); 14 | const web3_js_1 = require("@solana/web3.js"); 15 | const config_1 = require("./config"); 16 | function sendTx(connection, payer, txs, options) { 17 | return __awaiter(this, void 0, void 0, function* () { 18 | const txids = []; 19 | for (const iTx of txs) { 20 | if (iTx instanceof web3_js_1.VersionedTransaction) { 21 | iTx.sign([payer]); 22 | txids.push(yield connection.sendTransaction(iTx, options)); 23 | } 24 | else { 25 | txids.push(yield connection.sendTransaction(iTx, [payer], options)); 26 | } 27 | } 28 | return txids; 29 | }); 30 | } 31 | exports.sendTx = sendTx; 32 | function getWalletTokenAccount(connection, wallet) { 33 | return __awaiter(this, void 0, void 0, function* () { 34 | const walletTokenAccount = yield connection.getTokenAccountsByOwner(wallet, { 35 | programId: raydium_sdk_1.TOKEN_PROGRAM_ID, 36 | }); 37 | return walletTokenAccount.value.map((i) => ({ 38 | pubkey: i.pubkey, 39 | programId: i.account.owner, 40 | accountInfo: raydium_sdk_1.SPL_ACCOUNT_LAYOUT.decode(i.account.data), 41 | })); 42 | }); 43 | } 44 | exports.getWalletTokenAccount = getWalletTokenAccount; 45 | function buildAndSendTx(innerSimpleV0Transaction, options) { 46 | return __awaiter(this, void 0, void 0, function* () { 47 | const willSendTx = yield (0, raydium_sdk_1.buildSimpleTransaction)({ 48 | connection: config_1.connection, 49 | makeTxVersion: config_1.makeTxVersion, 50 | payer: config_1.wallet.publicKey, 51 | innerTransactions: innerSimpleV0Transaction, 52 | addLookupTableInfo: config_1.addLookupTableInfo, 53 | }); 54 | return yield sendTx(config_1.connection, config_1.wallet, willSendTx, options); 55 | }); 56 | } 57 | exports.buildAndSendTx = buildAndSendTx; 58 | function getATAAddress(programId, owner, mint) { 59 | const { publicKey, nonce } = (0, raydium_sdk_1.findProgramAddress)([owner.toBuffer(), programId.toBuffer(), mint.toBuffer()], new web3_js_1.PublicKey("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL")); 60 | return { publicKey, nonce }; 61 | } 62 | exports.getATAAddress = getATAAddress; 63 | function sleepTime(ms) { 64 | return __awaiter(this, void 0, void 0, function* () { 65 | console.log((new Date()).toLocaleString(), 'sleepTime', ms); 66 | return new Promise(resolve => setTimeout(resolve, ms)); 67 | }); 68 | } 69 | exports.sleepTime = sleepTime; 70 | //# sourceMappingURL=util.js.map --------------------------------------------------------------------------------