@sentio/runtime 2.59.5-rc.1 → 2.60.0-rc.10

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.
@@ -21,7 +21,7 @@ import {
21
21
  require_roots,
22
22
  require_rpc,
23
23
  require_writer
24
- } from "./chunk-LCS6SRJY.js";
24
+ } from "./chunk-TC6OWLVA.js";
25
25
 
26
26
  // ../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js
27
27
  var require_universalify = __commonJS({
@@ -36396,12 +36396,12 @@ var require_eventemitter3 = __commonJS({
36396
36396
  }
36397
36397
  });
36398
36398
 
36399
- // ../../node_modules/.pnpm/@sentio+chain@3.1.0/node_modules/@sentio/chain/dist/chain-id.js
36399
+ // ../../node_modules/.pnpm/@sentio+chain@3.2.0/node_modules/@sentio/chain/dist/chain-id.js
36400
36400
  var require_chain_id = __commonJS({
36401
- "../../node_modules/.pnpm/@sentio+chain@3.1.0/node_modules/@sentio/chain/dist/chain-id.js"(exports) {
36401
+ "../../node_modules/.pnpm/@sentio+chain@3.2.0/node_modules/@sentio/chain/dist/chain-id.js"(exports) {
36402
36402
  "use strict";
36403
36403
  Object.defineProperty(exports, "__esModule", { value: true });
36404
- exports.getChainType = exports.ChainId = exports.BTCChainId = exports.StarknetChainId = exports.CosmosChainId = exports.FuelChainId = exports.SolanaChainId = exports.SuiChainId = exports.AptosChainId = exports.EthChainId = exports.ChainType = void 0;
36404
+ exports.isChainType = exports.getChainType = exports.ChainIdToType = exports.ChainTypeToChainId = exports.ChainId = exports.BTCChainId = exports.StarknetChainId = exports.CosmosChainId = exports.FuelChainId = exports.SolanaChainId = exports.SuiChainId = exports.AptosChainId = exports.EthChainId = exports.ChainType = void 0;
36405
36405
  var ChainType;
36406
36406
  (function(ChainType2) {
36407
36407
  ChainType2["SOLANA"] = "solana";
@@ -36409,6 +36409,9 @@ var require_chain_id = __commonJS({
36409
36409
  ChainType2["APTOS"] = "aptos";
36410
36410
  ChainType2["ETH"] = "evm";
36411
36411
  ChainType2["BTC"] = "btc";
36412
+ ChainType2["COSMOS"] = "cosmos";
36413
+ ChainType2["STARKNET"] = "starknet";
36414
+ ChainType2["FUEL"] = "fuel";
36412
36415
  })(ChainType || (exports.ChainType = ChainType = {}));
36413
36416
  var EthChainId2;
36414
36417
  (function(EthChainId3) {
@@ -36488,6 +36491,8 @@ var require_chain_id = __commonJS({
36488
36491
  (function(SuiChainId2) {
36489
36492
  SuiChainId2["SUI_MAINNET"] = "sui_mainnet";
36490
36493
  SuiChainId2["SUI_TESTNET"] = "sui_testnet";
36494
+ SuiChainId2["IOTA_MAINNET"] = "iota_mainnet";
36495
+ SuiChainId2["IOTA_TESTNET"] = "iota_testnet";
36491
36496
  })(SuiChainId || (exports.SuiChainId = SuiChainId = {}));
36492
36497
  var SolanaChainId;
36493
36498
  (function(SolanaChainId2) {
@@ -36526,29 +36531,46 @@ var require_chain_id = __commonJS({
36526
36531
  ...StarknetChainId,
36527
36532
  ...BTCChainId
36528
36533
  };
36534
+ exports.ChainTypeToChainId = {
36535
+ [ChainType.SOLANA]: SolanaChainId,
36536
+ [ChainType.SUI]: SuiChainId,
36537
+ [ChainType.COSMOS]: CosmosChainId,
36538
+ [ChainType.STARKNET]: StarknetChainId,
36539
+ [ChainType.ETH]: EthChainId2,
36540
+ [ChainType.APTOS]: AptosChainId,
36541
+ [ChainType.BTC]: BTCChainId,
36542
+ [ChainType.FUEL]: FuelChainId
36543
+ };
36544
+ exports.ChainIdToType = /* @__PURE__ */ new Map();
36545
+ for (const [chainType, chainId] of Object.entries(exports.ChainTypeToChainId)) {
36546
+ for (const value of Object.values(chainId)) {
36547
+ exports.ChainIdToType.set(value, chainType);
36548
+ }
36549
+ }
36529
36550
  function getChainType(chainId) {
36530
36551
  const id2 = String(chainId).toLowerCase();
36531
- if (id2.startsWith("sol")) {
36532
- return ChainType.SOLANA;
36533
- }
36534
- if (id2.startsWith("sui")) {
36535
- return ChainType.SUI;
36552
+ const chainType = exports.ChainIdToType.get(id2);
36553
+ if (!chainType) {
36554
+ throw new Error(`Invalid chainType: ${id2}`);
36536
36555
  }
36537
- if (id2.startsWith("apt")) {
36538
- return ChainType.APTOS;
36539
- }
36540
- if (id2.startsWith("btc")) {
36541
- return ChainType.BTC;
36542
- }
36543
- return ChainType.ETH;
36556
+ return chainType;
36544
36557
  }
36545
36558
  exports.getChainType = getChainType;
36559
+ function isChainType(chainId, targetChainType) {
36560
+ const id2 = String(chainId).toLowerCase();
36561
+ const chainType = exports.ChainIdToType.get(id2);
36562
+ if (!chainType) {
36563
+ return false;
36564
+ }
36565
+ return chainType === targetChainType;
36566
+ }
36567
+ exports.isChainType = isChainType;
36546
36568
  }
36547
36569
  });
36548
36570
 
36549
- // ../../node_modules/.pnpm/@sentio+chain@3.1.0/node_modules/@sentio/chain/dist/chain-info.js
36571
+ // ../../node_modules/.pnpm/@sentio+chain@3.2.0/node_modules/@sentio/chain/dist/chain-info.js
36550
36572
  var require_chain_info = __commonJS({
36551
- "../../node_modules/.pnpm/@sentio+chain@3.1.0/node_modules/@sentio/chain/dist/chain-info.js"(exports) {
36573
+ "../../node_modules/.pnpm/@sentio+chain@3.2.0/node_modules/@sentio/chain/dist/chain-info.js"(exports) {
36552
36574
  "use strict";
36553
36575
  Object.defineProperty(exports, "__esModule", { value: true });
36554
36576
  exports.getChainLogo = exports.getSuiscanUrl = exports.getChainBlockscoutUrl = exports.getChainExternalUrl = exports.SolanaChainInfo = exports.AptosChainInfo = exports.BTCChainInfo = exports.EthChainInfo = exports.EthVariation = exports.ExplorerApiType = void 0;
@@ -37079,7 +37101,9 @@ var require_chain_info = __commonJS({
37079
37101
  tokenDecimals: 18,
37080
37102
  explorerUrl: "https://modescan.io",
37081
37103
  explorerApiType: ExplorerApiType.ETHERSCAN,
37082
- explorerApi: "https://api.routescan.io/v2/network/mainnet/evm/34443/etherscan"
37104
+ explorerApi: "https://api.routescan.io/v2/network/mainnet/evm/34443/etherscan",
37105
+ lightIcon: "https://sentio.xyz/chains/mode.svg",
37106
+ darkIcon: "https://sentio.xyz/chains/mode-dark.svg"
37083
37107
  },
37084
37108
  [chain_id_1.EthChainId.BOB]: {
37085
37109
  name: "Bob Mainnet",
@@ -37458,7 +37482,8 @@ var require_chain_info = __commonJS({
37458
37482
  tokenSymbol: "MON",
37459
37483
  tokenDecimals: 18,
37460
37484
  explorerUrl: "https://testnet.monadexplorer.com",
37461
- explorerApiType: ExplorerApiType.UNKNOWN
37485
+ explorerApiType: ExplorerApiType.UNKNOWN,
37486
+ lightIcon: "https://sentio.xyz/chains/monad.svg"
37462
37487
  },
37463
37488
  [chain_id_1.EthChainId.BERACHAIN]: {
37464
37489
  name: "Berachain",
@@ -37531,8 +37556,8 @@ var require_chain_info = __commonJS({
37531
37556
  explorerApiType: ExplorerApiType.BLOCKSCOUT,
37532
37557
  explorerUrl: "https://explorer.hemi.xyz",
37533
37558
  explorerApi: "https://explorer.hemi.xyz",
37534
- lightIcon: "https://sentio.xyz/chains/eth.svg",
37535
- darkIcon: "https://sentio.xyz/chains/eth-dark.svg"
37559
+ lightIcon: "https://sentio.xyz/chains/hemi.svg",
37560
+ darkIcon: "https://sentio.xyz/chains/hemi.svg"
37536
37561
  }
37537
37562
  };
37538
37563
  function getEVMChainScanUrl(chainId, hash2, subtype) {
@@ -37821,9 +37846,9 @@ var require_chain_info = __commonJS({
37821
37846
  }
37822
37847
  });
37823
37848
 
37824
- // ../../node_modules/.pnpm/@sentio+chain@3.1.0/node_modules/@sentio/chain/dist/chain-name.js
37849
+ // ../../node_modules/.pnpm/@sentio+chain@3.2.0/node_modules/@sentio/chain/dist/chain-name.js
37825
37850
  var require_chain_name = __commonJS({
37826
- "../../node_modules/.pnpm/@sentio+chain@3.1.0/node_modules/@sentio/chain/dist/chain-name.js"(exports) {
37851
+ "../../node_modules/.pnpm/@sentio+chain@3.2.0/node_modules/@sentio/chain/dist/chain-name.js"(exports) {
37827
37852
  "use strict";
37828
37853
  Object.defineProperty(exports, "__esModule", { value: true });
37829
37854
  exports.getChainScanUrl = exports.getChainName = exports.CHAIN_MAP = void 0;
@@ -37922,9 +37947,9 @@ var require_chain_name = __commonJS({
37922
37947
  }
37923
37948
  });
37924
37949
 
37925
- // ../../node_modules/.pnpm/@sentio+chain@3.1.0/node_modules/@sentio/chain/dist/index.js
37950
+ // ../../node_modules/.pnpm/@sentio+chain@3.2.0/node_modules/@sentio/chain/dist/index.js
37926
37951
  var require_dist = __commonJS({
37927
- "../../node_modules/.pnpm/@sentio+chain@3.1.0/node_modules/@sentio/chain/dist/index.js"(exports) {
37952
+ "../../node_modules/.pnpm/@sentio+chain@3.2.0/node_modules/@sentio/chain/dist/index.js"(exports) {
37928
37953
  "use strict";
37929
37954
  var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
37930
37955
  if (k2 === void 0) k2 = k;
@@ -38464,6 +38489,35 @@ var StoreContext = class extends AbstractStoreContext {
38464
38489
  });
38465
38490
  }
38466
38491
  };
38492
+ var DataBindingContext = class extends AbstractStoreContext {
38493
+ constructor(processId, subject) {
38494
+ super(processId);
38495
+ this.processId = processId;
38496
+ this.subject = subject;
38497
+ }
38498
+ sendTemplateRequest(templates) {
38499
+ this.subject.next({
38500
+ processId: this.processId,
38501
+ tplRequest: {
38502
+ templates
38503
+ }
38504
+ });
38505
+ }
38506
+ sendTimeseriesRequest(timeseries) {
38507
+ this.subject.next({
38508
+ processId: this.processId,
38509
+ tsRequest: {
38510
+ data: timeseries
38511
+ }
38512
+ });
38513
+ }
38514
+ doSend(resp) {
38515
+ this.subject.next({
38516
+ ...resp,
38517
+ processId: this.processId
38518
+ });
38519
+ }
38520
+ };
38467
38521
  import("node:process").then((p) => p.stdout.write(""));
38468
38522
 
38469
38523
  // ../../node_modules/.pnpm/@sentio+ethers@6.13.1-patch.6_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/@sentio/ethers/lib.esm/_version.js
@@ -59779,6 +59833,8 @@ export {
59779
59833
  init_es2 as init_es,
59780
59834
  require_lib3,
59781
59835
  require_lib4,
59836
+ from,
59837
+ withAbort,
59782
59838
  GLOBAL_CONFIG,
59783
59839
  freezeGlobalConfig,
59784
59840
  DiagLogLevel,
@@ -59810,6 +59866,7 @@ export {
59810
59866
  timeoutError,
59811
59867
  AbstractStoreContext,
59812
59868
  StoreContext,
59869
+ DataBindingContext,
59813
59870
  require_cjs,
59814
59871
  LRUCache,
59815
59872
  DummyProvider,
@@ -59900,4 +59957,4 @@ long/umd/index.js:
59900
59957
  @noble/curves/esm/secp256k1.js:
59901
59958
  (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
59902
59959
  */
59903
- //# sourceMappingURL=chunk-L7MQIWIO.js.map
59960
+ //# sourceMappingURL=chunk-BOHR42T4.js.map