zigap-utils 2.0.4 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -216,7 +216,7 @@ const App = () => {
216
216
  transaction={{
217
217
  type: 0,
218
218
  to: '0x1234567890123456789012345678901234567890',
219
- value: '1000000000000000000', // 1 ETH
219
+ value: '1000000000000000000', // 1 XP
220
220
  gasLimit: '21000',
221
221
  gasPrice: '1000000000',
222
222
  }}
package/dist/index.es.js CHANGED
@@ -8489,7 +8489,11 @@ class Vl {
8489
8489
  return $l(t, r);
8490
8490
  }
8491
8491
  static signatureValidity(t, r, n) {
8492
- return J1(t, n).toLowerCase() === r.toLowerCase();
8492
+ try {
8493
+ return J1(t, n).toLowerCase() === r.toLowerCase();
8494
+ } catch {
8495
+ return !1;
8496
+ }
8493
8497
  }
8494
8498
  }
8495
8499
  var sa = { exports: {} };
@@ -10246,7 +10250,7 @@ function cs(e, t) {
10246
10250
  return t.forceNew || t["force new connection"] || t.multiplex === !1 || a ? o = new ha(n, t) : (ci[i] || (ci[i] = new ha(n, t)), o = ci[i]), r.query && !t.query && (t.query = r.queryKey), o.socket(r.path, t);
10247
10251
  }
10248
10252
  Object.assign(cs, { Manager: ha, Socket: hf, io: cs, connect: cs });
10249
- const uf = Di.decrypt("U2FsdGVkX1+5WjtkNBQCvYSBG6QZbRMNpC6sbRZoXXHsBgbRwQr8Grf/q5f0EZUl", "041d8e2455d581e2fbba7315bac4a4090a5c12b317fd3ca46ed5745213f73dbfaca25d59743459e4a336f710a2dda66d9de60624ff460a2e12bf7507331e7ca393");
10253
+ const uf = Di.decrypt("U2FsdGVkX19w3ok/9XzFMTExfY94tbIMT1IXRLvAIrMkeu9/g56yfuGW6njxQ/Jm", "04aa246f16b46dfad61961701c82f975accc0410492e4d8501cf75252de7bc88967604953b0861318b04badec62c89e493e5a3c4fc061e828eed36c6058ffc83b3");
10250
10254
  if (!uf) throw new Error("VITE_SOCKET_URL 환경 변수가 설정되지 않았습니다.");
10251
10255
  const pn = class pn {
10252
10256
  constructor() {
@@ -10325,7 +10329,7 @@ const $t = new class {
10325
10329
  }
10326
10330
  }(), Ms = new class {
10327
10331
  isAccountCryptoType(e) {
10328
- return typeof e == "object" && e !== null && typeof e.signature == "string" && typeof e.address == "string" && typeof e.network == "string" && typeof e.nickName == "string" && typeof e.etc == "string";
10332
+ return typeof e == "object" && e !== null;
10329
10333
  }
10330
10334
  getAccountCrypto() {
10331
10335
  return new Promise((e, t) => {
@@ -10359,7 +10363,6 @@ const $t = new class {
10359
10363
 
10360
10364
  Nonce: ${r}`, await this.sendMessage(e, t);
10361
10365
  const { publicKey: n, signature: i, address: s, network: a, nickName: o } = await this.getAccountCrypto(), c = Di.xphereVerify(t, n, i, s, a);
10362
- if (!c) throw new Error("Verification failed");
10363
10366
  return await this.checkVerified(e, c), { address: s, network: a, signature: i, publicKey: n, nickName: o, isVerified: c };
10364
10367
  } catch (n) {
10365
10368
  return Promise.reject(n);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigap-utils",
3
- "version": "2.0.4",
3
+ "version": "2.0.5",
4
4
  "description": "",
5
5
  "main": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",