@hinkal/common 0.1.27 → 0.1.28
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/constants/coingecko.constants.cjs +1 -1
- package/constants/coingecko.constants.mjs +3 -3
- package/crypto/preProcessing.cjs +1 -1
- package/crypto/preProcessing.mjs +3 -3
- package/package.json +1 -1
- package/webworker/utxoWorker/utxoWorkerLauncher.cjs +1 -1
- package/webworker/utxoWorker/utxoWorkerLauncher.mjs +1 -1
- package/webworker/zkProofWorker/zkProofWorkerLauncher.cjs +1 -1
- package/webworker/zkProofWorker/zkProofWorkerLauncher.mjs +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chains.constants.cjs"),t="https://api.coingecko.com/api/v3",c="https://pro-api.coingecko.com/api/v3",
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chains.constants.cjs"),t="https://api.coingecko.com/api/v3",c="https://pro-api.coingecko.com/api/v3",i=typeof window<"u"?"":process.env.COINGECKO_API_KEY,s="x-cg-pro-api-key",a=i?c:t,r=n=>`${a}/simple/price?ids=${n}&vs_currencies=USD,ETH`,h=(n,o)=>`${a}/simple/token_price/${o}?contract_addresses=${n}&vs_currencies=USD`,d=`${c}/coins/list`,l={[e.chainIds.arbMainnet]:"ethereum",[e.chainIds.localhost]:"ethereum",[e.chainIds.ethMainnet]:"ethereum",[e.chainIds.optimism]:"ethereum",[e.chainIds.avalanche]:"avalanche-2",[e.chainIds.polygon]:"matic-network",[e.chainIds.bnbMainnet]:"binancecoin",[e.chainIds.base]:"ethereum"},I=n=>{switch(e.getNonLocalhostChainId(n)){case e.chainIds.ethMainnet:return"ethereum";case e.chainIds.polygon:return"polygon-pos";case e.chainIds.bnbMainnet:return"binance-smart-chain";case e.chainIds.optimism:return"optimistic-ethereum";case e.chainIds.arbMainnet:return"arbitrum-one";case e.chainIds.avalanche:return"avalanche";case e.chainIds.base:return"base";default:return"ethereum"}},p={[e.chainIds.polygon]:"polygon-pos",[e.chainIds.arbMainnet]:"arbitrum-one",[e.chainIds.ethMainnet]:"ethereum",[e.chainIds.avalanche]:"avalanche",[e.chainIds.bnbMainnet]:"binance-smart-chain",[e.chainIds.optimism]:"optimistic-ethereum",[e.chainIds.base]:"base"};exports.COINGECKO_API_KEY=i;exports.CoinGeckoChainLabels=p;exports.coingeckoPriceUrl=r;exports.coingeckoPriceUrl2=h;exports.coingeckoTokenListUrl=d;exports.getCoingeckoIdForNativeTokens=l;exports.getCoingeckoPlatform=I;exports.proCoingeckoUrl=c;exports.proHeader=s;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { chainIds as e, getNonLocalhostChainId as c } from "./chains.constants.mjs";
|
|
2
|
-
const i = "https://api.coingecko.com/api/v3", t = "https://pro-api.coingecko.com/api/v3", r = process.env.COINGECKO_API_KEY, h = "x-cg-pro-api-key", a = r ? t : i,
|
|
2
|
+
const i = "https://api.coingecko.com/api/v3", t = "https://pro-api.coingecko.com/api/v3", r = typeof window < "u" ? "" : process.env.COINGECKO_API_KEY, h = "x-cg-pro-api-key", a = r ? t : i, p = (n) => `${a}/simple/price?ids=${n}&vs_currencies=USD,ETH`, m = (n, o) => `${a}/simple/token_price/${o}?contract_addresses=${n}&vs_currencies=USD`, l = `${t}/coins/list`, u = {
|
|
3
3
|
[e.arbMainnet]: "ethereum",
|
|
4
4
|
[e.localhost]: "ethereum",
|
|
5
5
|
[e.ethMainnet]: "ethereum",
|
|
@@ -39,8 +39,8 @@ const i = "https://api.coingecko.com/api/v3", t = "https://pro-api.coingecko.com
|
|
|
39
39
|
export {
|
|
40
40
|
r as COINGECKO_API_KEY,
|
|
41
41
|
g as CoinGeckoChainLabels,
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
p as coingeckoPriceUrl,
|
|
43
|
+
m as coingeckoPriceUrl2,
|
|
44
44
|
l as coingeckoTokenListUrl,
|
|
45
45
|
u as getCoingeckoIdForNativeTokens,
|
|
46
46
|
b as getCoingeckoPlatform,
|
package/crypto/preProcessing.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./babyJub.cjs"),o=require("./poseidon.cjs"),i=require("libsodium-wrappers"),s=require("process"),n=require("buffer");let e=!1;const t=async()=>{e||(typeof window<"u"&&(window.global=window,globalThis.Buffer=n.Buffer,globalThis.process=s),await Promise.all([i.ready,o.poseidonHolder.init(),r.jubHolder.init()]),e=!0)};exports.preProcessing=t;
|
package/crypto/preProcessing.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jubHolder as r } from "./babyJub.mjs";
|
|
2
|
-
import { poseidonHolder as
|
|
3
|
-
import
|
|
2
|
+
import { poseidonHolder as i } from "./poseidon.mjs";
|
|
3
|
+
import e from "libsodium-wrappers";
|
|
4
4
|
import s from "process";
|
|
5
5
|
import { Buffer as f } from "buffer";
|
|
6
6
|
let o = !1;
|
|
7
7
|
const p = async () => {
|
|
8
|
-
o || (typeof window < "u" && (
|
|
8
|
+
o || (typeof window < "u" && (window.global = window, globalThis.Buffer = f, globalThis.process = s), await Promise.all([e.ready, i.init(), r.init()]), o = !0);
|
|
9
9
|
};
|
|
10
10
|
export {
|
|
11
11
|
p as preProcessing
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=""+(typeof document>"u"?require("url").pathToFileURL(__dirname+"/../../assets/utxoWorkerLauncher-
|
|
1
|
+
"use strict";const e=""+(typeof document>"u"?require("url").pathToFileURL(__dirname+"/../../assets/utxoWorkerLauncher-BhGbepNe.js").href:new URL("../../assets/utxoWorkerLauncher-BhGbepNe.js",document.currentScript&&document.currentScript.src||document.baseURI).href);module.exports=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=""+(typeof document>"u"?require("url").pathToFileURL(__dirname+"/../../assets/zkProofWorkerLauncher-
|
|
1
|
+
"use strict";const e=""+(typeof document>"u"?require("url").pathToFileURL(__dirname+"/../../assets/zkProofWorkerLauncher-BEzJJjOf.js").href:new URL("../../assets/zkProofWorkerLauncher-BEzJJjOf.js",document.currentScript&&document.currentScript.src||document.baseURI).href);module.exports=e;
|