@sentio/runtime 4.0.0-rc.6 → 4.0.0-rc.8
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/lib/{chunk-Q4CE6IMV.js → chunk-7JGO6QCN.js} +12 -5
- package/lib/{chunk-Q4CE6IMV.js.map → chunk-7JGO6QCN.js.map} +1 -1
- package/lib/index.d.ts +18 -3
- package/lib/index.js +3 -3
- package/lib/index.js.map +1 -1
- package/lib/processor-runner.js +1 -1
- package/package.json +1 -1
- package/src/chain-config.ts +6 -1
- package/src/endpoints.ts +22 -4
- package/src/provider.ts +2 -2
|
@@ -11681,8 +11681,12 @@ var Endpoints = class _Endpoints {
|
|
|
11681
11681
|
static INSTANCE = new _Endpoints();
|
|
11682
11682
|
concurrency = 8;
|
|
11683
11683
|
priceFeedAPI = "";
|
|
11684
|
-
|
|
11684
|
+
chainRpc = /* @__PURE__ */ new Map();
|
|
11685
11685
|
batchCount = 1;
|
|
11686
|
+
/** Convenience accessor for callers that only need the endpoint URL. */
|
|
11687
|
+
getChainRpcUrl(chainId) {
|
|
11688
|
+
return this.chainRpc.get(chainId)?.url;
|
|
11689
|
+
}
|
|
11686
11690
|
};
|
|
11687
11691
|
function configureEndpoints(options) {
|
|
11688
11692
|
const fullPath = path2.resolve(options.chainsConfig);
|
|
@@ -11694,12 +11698,15 @@ function configureEndpoints(options) {
|
|
|
11694
11698
|
Endpoints.INSTANCE.priceFeedAPI = options.pricefeedServer;
|
|
11695
11699
|
for (const [id, config] of Object.entries(chainsConfig)) {
|
|
11696
11700
|
const chainConfig = config;
|
|
11697
|
-
if (chainConfig.
|
|
11698
|
-
Endpoints.INSTANCE.
|
|
11701
|
+
if (chainConfig.Rpc?.Url) {
|
|
11702
|
+
Endpoints.INSTANCE.chainRpc.set(id, {
|
|
11703
|
+
url: chainConfig.Rpc.Url,
|
|
11704
|
+
meta: chainConfig.Rpc.Meta
|
|
11705
|
+
});
|
|
11699
11706
|
} else {
|
|
11700
11707
|
const http = chainConfig.Https?.[0];
|
|
11701
11708
|
if (http) {
|
|
11702
|
-
Endpoints.INSTANCE.
|
|
11709
|
+
Endpoints.INSTANCE.chainRpc.set(id, { url: http });
|
|
11703
11710
|
} else {
|
|
11704
11711
|
console.error("not valid config for chain", id);
|
|
11705
11712
|
}
|
|
@@ -15164,4 +15171,4 @@ export {
|
|
|
15164
15171
|
GLOBAL_CONFIG,
|
|
15165
15172
|
ProcessorServiceImplV3
|
|
15166
15173
|
};
|
|
15167
|
-
//# sourceMappingURL=chunk-
|
|
15174
|
+
//# sourceMappingURL=chunk-7JGO6QCN.js.map
|