Kaynağa Gözat

initiaFreezeDog

helium3@sina.com 5 ay önce
ebeveyn
işleme
da3881c508
3 değiştirilmiş dosya ile 7 ekleme ve 16 silme
  1. 1 1
      package.json
  2. 2 11
      src/BaseClient.ts
  3. 4 4
      yarn.lock

+ 1 - 1
package.json

@@ -80,7 +80,7 @@
     "shawnlu96-altcha-lib": "0.3.6",
     "stridejs": "^0.10.0-alpha",
     "tslib": "~2.6.2",
-    "useless-helpers": "^0.0.20",
+    "useless-helpers": "^0.0.24",
     "uuid": "^9.0.1",
     "xrpl": "^3.0.0"
   },

+ 2 - 11
src/BaseClient.ts

@@ -14,6 +14,7 @@ import {
 } from '@initia/initia.js'
 import { generateRandomString, getAxiosClient } from './utils'
 import { HttpsProxyAgent } from 'https-proxy-agent'
+import { generateNSTProxyAgent } from 'useless-helpers'
 
 export const rpcUrl = ['https://lcd.testnet.initia.xyz']
 
@@ -36,17 +37,7 @@ export abstract class BaseClient {
     })
     const rpc = rpcUrl[Math.floor(Math.random() * rpcUrl.length)]
     this.rpcUrlUsing = rpc
-    const pass = `test1234_session-${generateRandomString(8)}_lifetime-20m`
-    const proxyAgent = useProxy
-      ? new HttpsProxyAgent(`http://tuxla:${pass}@geo.iproyal.com:12321`)
-      : undefined
-    const username = `u3e4c2852572e05c5-zone-custom-session-${generateRandomString(
-      9,
-    )}-sessTime-20`
-    const password = 'u3e4c2852572e05c5'
-    // const proxyAgent = new HttpsProxyAgent(
-    //   `http://${username}:${password}@43.152.113.55:2334`,
-    // )
+    const proxyAgent = generateNSTProxyAgent('FF6C6D7483C30CC9', 'monad123')
 
     const requester = new APIRequester(rpc, {
       httpsAgent: proxyAgent,

+ 4 - 4
yarn.lock

@@ -5030,10 +5030,10 @@ url@~0.11.0:
     punycode "^1.4.1"
     qs "^6.11.2"
 
-useless-helpers@^0.0.20:
-  version "0.0.20"
-  resolved "https://registry.yarnpkg.com/useless-helpers/-/useless-helpers-0.0.20.tgz#44b6335ce5d1ead9a9aaf3ccc47dc84e5e26b1c2"
-  integrity sha512-L599iqAxMZO4SciloXvIO1XI9EAai13uYyUy0croPciHhhA0Gx1+to6T/WXjaZozXXovz5VJmlTefoROsCVdYA==
+useless-helpers@^0.0.24:
+  version "0.0.24"
+  resolved "https://registry.yarnpkg.com/useless-helpers/-/useless-helpers-0.0.24.tgz#f93a264fb61bf6de14b4d2d398fd2d171f67a77b"
+  integrity sha512-yITVzn4cgc4suukBYDkoYzH0OJnHok/ukeqJ9tbnVTHGTqUyZm/xrkpvNgTucQgYsKSdKQhentigwoOXtWT4Sw==
   dependencies:
     axios "1.7.4"
     axios-retry "^4.5.0"