@sentio/runtime 3.0.0-rc-next.3 → 3.0.0-rc-next.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.
@@ -36097,12 +36097,14 @@ var require_eventemitter3 = __commonJS({
36097
36097
  }
36098
36098
  });
36099
36099
 
36100
- // ../../node_modules/.pnpm/@sentio+chain@3.4.7/node_modules/@sentio/chain/dist/chain-id.js
36100
+ // ../../node_modules/.pnpm/@sentio+chain@3.4.11/node_modules/@sentio/chain/dist/chain-id.js
36101
36101
  var require_chain_id = __commonJS({
36102
- "../../node_modules/.pnpm/@sentio+chain@3.4.7/node_modules/@sentio/chain/dist/chain-id.js"(exports) {
36102
+ "../../node_modules/.pnpm/@sentio+chain@3.4.11/node_modules/@sentio/chain/dist/chain-id.js"(exports) {
36103
36103
  "use strict";
36104
36104
  Object.defineProperty(exports, "__esModule", { value: true });
36105
- exports.isChainType = exports.getChainType = exports.ChainIdToType = exports.ChainTypeToChainId = exports.ChainId = exports.NonEthChainId = exports.BTCChainId = exports.StarknetChainId = exports.CosmosChainId = exports.FuelChainId = exports.SolanaChainId = exports.SuiChainId = exports.AptosChainId = exports.EthChainId = exports.ChainType = void 0;
36105
+ exports.ChainIdToType = exports.ChainTypeToChainId = exports.ChainId = exports.NonEthChainId = exports.BTCChainId = exports.StarknetChainId = exports.CosmosChainId = exports.FuelChainId = exports.SolanaChainId = exports.SuiChainId = exports.AptosChainId = exports.EthChainId = exports.ChainType = void 0;
36106
+ exports.getChainType = getChainType;
36107
+ exports.isChainType = isChainType;
36106
36108
  var ChainType;
36107
36109
  (function(ChainType2) {
36108
36110
  ChainType2["SOLANA"] = "solana";
@@ -36128,7 +36130,7 @@ var require_chain_id = __commonJS({
36128
36130
  EthChainId3["XLAYER_MAINNET"] = "196";
36129
36131
  EthChainId3["OP_BNB_MAINNET"] = "204";
36130
36132
  EthChainId3["SONIC_MAINNET"] = "146";
36131
- EthChainId3["SONIC_TESTNET"] = "57054";
36133
+ EthChainId3["SONIC_TESTNET"] = "14601";
36132
36134
  EthChainId3["B2_MAINNET"] = "223";
36133
36135
  EthChainId3["FRAXTAL"] = "252";
36134
36136
  EthChainId3["KUCOIN"] = "321";
@@ -36156,6 +36158,8 @@ var require_chain_id = __commonJS({
36156
36158
  EthChainId3["MANTLE"] = "5000";
36157
36159
  EthChainId3["BASE"] = "8453";
36158
36160
  EthChainId3["MEV_COMMIT"] = "8855";
36161
+ EthChainId3["PLASMA_MAINNET"] = "9745";
36162
+ EthChainId3["PLASMA_TESTNET"] = "9746";
36159
36163
  EthChainId3["MONAD_TESTNET"] = "10143";
36160
36164
  EthChainId3["HOLESKY"] = "17000";
36161
36165
  EthChainId3["HOODI"] = "560048";
@@ -36181,6 +36185,7 @@ var require_chain_id = __commonJS({
36181
36185
  EthChainId3["AURORA"] = "1313161554";
36182
36186
  EthChainId3["BLAST_SEPOLIA"] = "168587773";
36183
36187
  EthChainId3["ABSTRACT"] = "2741";
36188
+ EthChainId3["GOAT_MAINNET"] = "2345";
36184
36189
  EthChainId3["CUSTOM"] = "customized";
36185
36190
  })(EthChainId2 || (exports.EthChainId = EthChainId2 = {}));
36186
36191
  var AptosChainId;
@@ -36261,7 +36266,6 @@ var require_chain_id = __commonJS({
36261
36266
  }
36262
36267
  return chainType;
36263
36268
  }
36264
- exports.getChainType = getChainType;
36265
36269
  function isChainType(chainId, targetChainType) {
36266
36270
  const id2 = String(chainId).toLowerCase();
36267
36271
  const chainType = exports.ChainIdToType.get(id2);
@@ -36270,16 +36274,20 @@ var require_chain_id = __commonJS({
36270
36274
  }
36271
36275
  return chainType === targetChainType;
36272
36276
  }
36273
- exports.isChainType = isChainType;
36274
36277
  }
36275
36278
  });
36276
36279
 
36277
- // ../../node_modules/.pnpm/@sentio+chain@3.4.7/node_modules/@sentio/chain/dist/chain-info.js
36280
+ // ../../node_modules/.pnpm/@sentio+chain@3.4.11/node_modules/@sentio/chain/dist/chain-info.js
36278
36281
  var require_chain_info = __commonJS({
36279
- "../../node_modules/.pnpm/@sentio+chain@3.4.7/node_modules/@sentio/chain/dist/chain-info.js"(exports) {
36282
+ "../../node_modules/.pnpm/@sentio+chain@3.4.11/node_modules/@sentio/chain/dist/chain-info.js"(exports) {
36280
36283
  "use strict";
36281
36284
  Object.defineProperty(exports, "__esModule", { value: true });
36282
- exports.getMainnetChain = exports.getChainLogo = exports.getSuiscanUrl = exports.getChainBlockscoutUrl = exports.getChainExternalUrl = exports.ChainInfo = exports.NonEthChainInfo = exports.CosmosChainInfo = exports.StarknetChainInfo = exports.FuelChainInfo = exports.SuiChainInfo = exports.SolanaChainInfo = exports.AptosChainInfo = exports.BTCChainInfo = exports.EthChainInfo = exports.EthVariation = exports.ExplorerApiType = void 0;
36285
+ exports.ChainInfo = exports.NonEthChainInfo = exports.CosmosChainInfo = exports.StarknetChainInfo = exports.FuelChainInfo = exports.SuiChainInfo = exports.SolanaChainInfo = exports.AptosChainInfo = exports.BTCChainInfo = exports.EthChainInfo = exports.EthVariation = exports.ExplorerApiType = void 0;
36286
+ exports.getChainExternalUrl = getChainExternalUrl;
36287
+ exports.getChainBlockscoutUrl = getChainBlockscoutUrl;
36288
+ exports.getSuiscanUrl = getSuiscanUrl;
36289
+ exports.getChainLogo = getChainLogo;
36290
+ exports.getMainnetChain = getMainnetChain;
36283
36291
  var chain_id_1 = require_chain_id();
36284
36292
  var ExplorerApiType;
36285
36293
  (function(ExplorerApiType2) {
@@ -36425,8 +36433,10 @@ var require_chain_info = __commonJS({
36425
36433
  chainId: chain_id_1.EthChainId.POLYGON,
36426
36434
  variation: EthVariation.DEFAULT,
36427
36435
  priceTokenAddress: "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",
36436
+ // WMATIC
36428
36437
  tokenAddress: "0x0000000000000000000000000000000000000000",
36429
36438
  wrappedTokenAddress: "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",
36439
+ // WMATIC
36430
36440
  tokenSymbol: "MATIC",
36431
36441
  tokenDecimals: 18,
36432
36442
  explorerApiType: ExplorerApiType.ETHERSCAN_V2,
@@ -36487,6 +36497,7 @@ var require_chain_info = __commonJS({
36487
36497
  chainId: chain_id_1.EthChainId.MOONBEAM,
36488
36498
  variation: EthVariation.SUBSTRATE,
36489
36499
  priceTokenAddress: "0xacc15dc74880c9944775448304b263d191c6077f",
36500
+ // WGLMR
36490
36501
  tokenAddress: "0x0000000000000000000000000000000000000000",
36491
36502
  wrappedTokenAddress: "0xacc15dc74880c9944775448304b263d191c6077f",
36492
36503
  tokenSymbol: "GLMR",
@@ -36502,6 +36513,7 @@ var require_chain_info = __commonJS({
36502
36513
  chainId: chain_id_1.EthChainId.ASTAR,
36503
36514
  variation: EthVariation.SUBSTRATE,
36504
36515
  priceTokenAddress: "0xaeaaf0e2c81af264101b9129c00f4440ccf0f720",
36516
+ // WASTR
36505
36517
  tokenAddress: "0x0000000000000000000000000000000000000000",
36506
36518
  wrappedTokenAddress: "0xaeaaf0e2c81af264101b9129c00f4440ccf0f720",
36507
36519
  tokenSymbol: "ASTR",
@@ -36517,6 +36529,7 @@ var require_chain_info = __commonJS({
36517
36529
  chainId: chain_id_1.EthChainId.LINEA,
36518
36530
  variation: EthVariation.DEFAULT,
36519
36531
  priceTokenAddress: "0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f",
36532
+ // WETH
36520
36533
  tokenAddress: "0x0000000000000000000000000000000000000000",
36521
36534
  wrappedTokenAddress: "0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f",
36522
36535
  tokenSymbol: "ETH",
@@ -36535,6 +36548,7 @@ var require_chain_info = __commonJS({
36535
36548
  priceTokenAddress: "0x0000000000000000000000000000000000000000",
36536
36549
  tokenAddress: "0x0000000000000000000000000000000000000000",
36537
36550
  wrappedTokenAddress: "0x5300000000000000000000000000000000000004",
36551
+ // TODO questionable
36538
36552
  tokenSymbol: "ETH",
36539
36553
  tokenDecimals: 18,
36540
36554
  explorerUrl: "https://scrollscan.com",
@@ -36761,11 +36775,12 @@ var require_chain_info = __commonJS({
36761
36775
  chainId: chain_id_1.EthChainId.CRONOS,
36762
36776
  variation: EthVariation.DEFAULT,
36763
36777
  priceTokenAddress: "0x5c7f8a570d578ed84e63fdfa7b1ee72deae1ae23",
36778
+ // WCRO
36764
36779
  tokenAddress: "0x0000000000000000000000000000000000000000",
36765
36780
  wrappedTokenAddress: "0x5c7f8a570d578ed84e63fdfa7b1ee72deae1ae23",
36766
36781
  tokenSymbol: "CRO",
36767
36782
  tokenDecimals: 18,
36768
- explorerUrl: "https://cronoscan.com",
36783
+ explorerUrl: "https://explorer.cronos.org",
36769
36784
  explorerApiType: ExplorerApiType.ETHERSCAN_V2,
36770
36785
  explorerApi: "https://api.etherscan.io/v2",
36771
36786
  lightIcon: "https://assets.sentio.xyz/chains/cronos.svg",
@@ -36778,6 +36793,7 @@ var require_chain_info = __commonJS({
36778
36793
  mainnetChainId: chain_id_1.EthChainId.CRONOS,
36779
36794
  variation: EthVariation.DEFAULT,
36780
36795
  priceTokenAddress: "0x6a3173618859c7cd40faf6921b5e9eb6a76f1fd4",
36796
+ // WCRO
36781
36797
  tokenAddress: "0x0000000000000000000000000000000000000000",
36782
36798
  wrappedTokenAddress: "0x6a3173618859c7cd40faf6921b5e9eb6a76f1fd4",
36783
36799
  tokenSymbol: "CRO",
@@ -36794,6 +36810,7 @@ var require_chain_info = __commonJS({
36794
36810
  chainId: chain_id_1.EthChainId.BITLAYER,
36795
36811
  variation: EthVariation.DEFAULT,
36796
36812
  priceTokenAddress: "0xff204e2681a6fa0e2c3fade68a1b28fb90e4fc5f",
36813
+ // WBTC
36797
36814
  tokenAddress: "0x0000000000000000000000000000000000000000",
36798
36815
  wrappedTokenAddress: "0xff204e2681a6fa0e2c3fade68a1b28fb90e4fc5f",
36799
36816
  tokenSymbol: "BTC",
@@ -36824,6 +36841,7 @@ var require_chain_info = __commonJS({
36824
36841
  chainId: chain_id_1.EthChainId.MANTLE,
36825
36842
  variation: EthVariation.OPTIMISM,
36826
36843
  priceTokenAddress: "0x78c1b0c915c4faa5fffa6cabf0219da63d7f4cb8",
36844
+ // WMNT
36827
36845
  tokenAddress: "0x0000000000000000000000000000000000000000",
36828
36846
  wrappedTokenAddress: "0x78c1b0c915c4faa5fffa6cabf0219da63d7f4cb8",
36829
36847
  tokenSymbol: "MNT",
@@ -36840,6 +36858,7 @@ var require_chain_info = __commonJS({
36840
36858
  chainId: chain_id_1.EthChainId.B2_MAINNET,
36841
36859
  variation: EthVariation.OPTIMISM,
36842
36860
  priceTokenAddress: "0x4200000000000000000000000000000000000006",
36861
+ // WBTC
36843
36862
  tokenAddress: "0x0000000000000000000000000000000000000000",
36844
36863
  wrappedTokenAddress: "0x4200000000000000000000000000000000000006",
36845
36864
  tokenSymbol: "BTC",
@@ -36886,6 +36905,7 @@ var require_chain_info = __commonJS({
36886
36905
  chainId: chain_id_1.EthChainId.FRAXTAL,
36887
36906
  variation: EthVariation.OPTIMISM,
36888
36907
  priceTokenAddress: "0x0000000000000000000000000000000000000000",
36908
+ // wfrxETH
36889
36909
  tokenAddress: "0x0000000000000000000000000000000000000000",
36890
36910
  wrappedTokenAddress: "0xFC00000000000000000000000000000000000006",
36891
36911
  tokenSymbol: "ETH",
@@ -36895,12 +36915,28 @@ var require_chain_info = __commonJS({
36895
36915
  explorerApi: "https://api.etherscan.io/v2",
36896
36916
  lightIcon: "https://assets.sentio.xyz/chains/fraxtal.svg"
36897
36917
  },
36918
+ [chain_id_1.EthChainId.GOAT_MAINNET]: {
36919
+ name: "Goat Network",
36920
+ slug: "goat",
36921
+ chainId: chain_id_1.EthChainId.GOAT_MAINNET,
36922
+ variation: EthVariation.DEFAULT,
36923
+ priceTokenAddress: "0x0000000000000000000000000000000000000000",
36924
+ tokenAddress: "0x0000000000000000000000000000000000000000",
36925
+ wrappedTokenAddress: "0xbC10000000000000000000000000000000000000",
36926
+ tokenSymbol: "BTC",
36927
+ tokenDecimals: 18,
36928
+ explorerUrl: "https://explorer.goat.network",
36929
+ explorerApiType: ExplorerApiType.BLOCKSCOUT,
36930
+ lightIcon: "https://assets.sentio.xyz/chains/goat.svg",
36931
+ darkIcon: "https://assets.sentio.xyz/chains/goat-dark.svg"
36932
+ },
36898
36933
  [chain_id_1.EthChainId.KUCOIN]: {
36899
36934
  name: "KCC Mainnet",
36900
36935
  slug: "kucoin",
36901
36936
  chainId: chain_id_1.EthChainId.KUCOIN,
36902
36937
  variation: EthVariation.DEFAULT,
36903
36938
  priceTokenAddress: "0x4446Fc4eb47f2f6586f9fAAb68B3498F86C07521",
36939
+ // WCCS
36904
36940
  tokenAddress: "0x0000000000000000000000000000000000000000",
36905
36941
  wrappedTokenAddress: "0x4446Fc4eb47f2f6586f9fAAb68B3498F86C07521",
36906
36942
  tokenSymbol: "KCS",
@@ -36916,6 +36952,7 @@ var require_chain_info = __commonJS({
36916
36952
  chainId: chain_id_1.EthChainId.CONFLUX,
36917
36953
  variation: EthVariation.DEFAULT,
36918
36954
  priceTokenAddress: "0x14b2d3bc65e74dae1030eafd8ac30c533c976a9b",
36955
+ // WCFX
36919
36956
  tokenAddress: "0x0000000000000000000000000000000000000000",
36920
36957
  wrappedTokenAddress: "0x14b2d3bc65e74dae1030eafd8ac30c533c976a9b",
36921
36958
  tokenSymbol: "CFX",
@@ -36932,6 +36969,7 @@ var require_chain_info = __commonJS({
36932
36969
  chainId: chain_id_1.EthChainId.METIS,
36933
36970
  variation: EthVariation.DEFAULT,
36934
36971
  priceTokenAddress: "0x75cb093E4D61d2A2e65D8e0BBb01DE8d89b53481",
36972
+ // WMETIS
36935
36973
  tokenAddress: "0x0000000000000000000000000000000000000000",
36936
36974
  wrappedTokenAddress: "0x75cb093E4D61d2A2e65D8e0BBb01DE8d89b53481",
36937
36975
  tokenSymbol: "METIS",
@@ -36947,6 +36985,7 @@ var require_chain_info = __commonJS({
36947
36985
  chainId: chain_id_1.EthChainId.BEVM,
36948
36986
  variation: EthVariation.SUBSTRATE,
36949
36987
  priceTokenAddress: "0xB5136FEba197f5fF4B765E5b50c74db717796dcD",
36988
+ // WBTC
36950
36989
  tokenAddress: "0x0000000000000000000000000000000000000000",
36951
36990
  wrappedTokenAddress: "0xB5136FEba197f5fF4B765E5b50c74db717796dcD",
36952
36991
  tokenSymbol: "BTC",
@@ -36962,6 +37001,7 @@ var require_chain_info = __commonJS({
36962
37001
  chainId: chain_id_1.EthChainId.MERLIN_MAINNET,
36963
37002
  variation: EthVariation.POLYGON_ZKEVM,
36964
37003
  priceTokenAddress: "0xF6D226f9Dc15d9bB51182815b320D3fBE324e1bA",
37004
+ // WBTC
36965
37005
  tokenAddress: "0x0000000000000000000000000000000000000000",
36966
37006
  wrappedTokenAddress: "0xF6D226f9Dc15d9bB51182815b320D3fBE324e1bA",
36967
37007
  tokenSymbol: "BTC",
@@ -36979,6 +37019,7 @@ var require_chain_info = __commonJS({
36979
37019
  priceTokenAddress: "0x721EF6871f1c4Efe730Dce047D40D1743B886946",
36980
37020
  tokenAddress: "0x0000000000000000000000000000000000000000",
36981
37021
  wrappedTokenAddress: "0x721EF6871f1c4Efe730Dce047D40D1743B886946",
37022
+ // WCHZ
36982
37023
  tokenSymbol: "CHZ",
36983
37024
  tokenDecimals: 18,
36984
37025
  explorerUrl: "https://chiliscan.com",
@@ -36993,6 +37034,7 @@ var require_chain_info = __commonJS({
36993
37034
  variation: EthVariation.ZKSYNC,
36994
37035
  priceTokenAddress: "0x000000000000000000000000000000000000800A",
36995
37036
  tokenAddress: "0x000000000000000000000000000000000000800A",
37037
+ //special
36996
37038
  wrappedTokenAddress: "0x000000000000000000000000000000000000800A",
36997
37039
  tokenSymbol: "ETH",
36998
37040
  tokenDecimals: 18,
@@ -37271,7 +37313,7 @@ var require_chain_info = __commonJS({
37271
37313
  wrappedTokenAddress: "0x0000000000000000000000000000000000000000",
37272
37314
  tokenSymbol: "HYPE",
37273
37315
  tokenDecimals: 18,
37274
- explorerUrl: "https://hyperevmscan.io/",
37316
+ explorerUrl: "https://hyperevmscan.io",
37275
37317
  explorerApi: "https://hyperevmscan.io/v2",
37276
37318
  explorerApiType: ExplorerApiType.ETHERSCAN_V2,
37277
37319
  lightIcon: "https://assets.sentio.xyz/chains/hype.svg",
@@ -37302,7 +37344,7 @@ var require_chain_info = __commonJS({
37302
37344
  wrappedTokenAddress: "0x0000000000000000000000000000000000000000",
37303
37345
  tokenSymbol: "ETH",
37304
37346
  tokenDecimals: 18,
37305
- explorerUrl: "https://www.mev-commit.xyz/",
37347
+ explorerUrl: "https://www.mev-commit.xyz",
37306
37348
  lightIcon: "https://assets.sentio.xyz/chains/mev-commit-dark.svg",
37307
37349
  darkIcon: "https://assets.sentio.xyz/chains/mev-commit.svg"
37308
37350
  },
@@ -37336,6 +37378,39 @@ var require_chain_info = __commonJS({
37336
37378
  lightIcon: "https://assets.sentio.xyz/chains/abstract.svg",
37337
37379
  darkIcon: "https://assets.sentio.xyz/chains/abstract.svg"
37338
37380
  },
37381
+ [chain_id_1.EthChainId.PLASMA_MAINNET]: {
37382
+ name: "Plasma Mainnet",
37383
+ slug: "plasma-mainnet",
37384
+ chainId: chain_id_1.EthChainId.PLASMA_MAINNET,
37385
+ variation: EthVariation.DEFAULT,
37386
+ priceTokenAddress: "0x0000000000000000000000000000000000000000",
37387
+ tokenAddress: "0x0000000000000000000000000000000000000000",
37388
+ wrappedTokenAddress: "0x6100E367285b01F48D07953803A2d8dCA5D19873",
37389
+ tokenSymbol: "XPL",
37390
+ tokenDecimals: 18,
37391
+ explorerUrl: "https://plasmascan.to",
37392
+ explorerApi: "https://api.routescan.io/v2/network/mainnet/evm/9745/etherscan",
37393
+ explorerApiType: ExplorerApiType.ETHERSCAN,
37394
+ lightIcon: "https://assets.sentio.xyz/chains/plasma.svg",
37395
+ darkIcon: "https://assets.sentio.xyz/chains/plasma-dark.svg"
37396
+ },
37397
+ [chain_id_1.EthChainId.PLASMA_TESTNET]: {
37398
+ name: "Plasma Testnet",
37399
+ slug: "plasma-testnet",
37400
+ chainId: chain_id_1.EthChainId.PLASMA_TESTNET,
37401
+ mainnetChainId: chain_id_1.EthChainId.PLASMA_MAINNET,
37402
+ variation: EthVariation.DEFAULT,
37403
+ priceTokenAddress: "0x0000000000000000000000000000000000000000",
37404
+ tokenAddress: "0x0000000000000000000000000000000000000000",
37405
+ wrappedTokenAddress: "0x6100E367285b01F48D07953803A2d8dCA5D19873",
37406
+ tokenSymbol: "XPL",
37407
+ tokenDecimals: 18,
37408
+ explorerUrl: "https://testnet.plasmascan.to",
37409
+ explorerApi: "https://api.routescan.io/v2/network/mainnet/evm/9746/etherscan",
37410
+ explorerApiType: ExplorerApiType.ETHERSCAN,
37411
+ lightIcon: "https://assets.sentio.xyz/chains/plasma.svg",
37412
+ darkIcon: "https://assets.sentio.xyz/chains/plasma-dark.svg"
37413
+ },
37339
37414
  [chain_id_1.EthChainId.CUSTOM]: {
37340
37415
  name: "Custom",
37341
37416
  slug: "custom",
@@ -37676,7 +37751,6 @@ var require_chain_info = __commonJS({
37676
37751
  }
37677
37752
  return;
37678
37753
  }
37679
- exports.getChainExternalUrl = getChainExternalUrl;
37680
37754
  function getChainBlockscoutUrl(chainId, hash2, subtype) {
37681
37755
  if (!chainId || !hash2 || !subtype) {
37682
37756
  return;
@@ -37690,14 +37764,12 @@ var require_chain_info = __commonJS({
37690
37764
  }
37691
37765
  return `${supportedChain.blockscoutUrl}/${subtype}/${hash2}`;
37692
37766
  }
37693
- exports.getChainBlockscoutUrl = getChainBlockscoutUrl;
37694
37767
  function getSuiscanUrl(chainId, hash2, subtype) {
37695
37768
  if (!chainId || !hash2 || !subtype) {
37696
37769
  return;
37697
37770
  }
37698
37771
  return getSuiChainScanUrl(chainId, hash2, subtype);
37699
37772
  }
37700
- exports.getSuiscanUrl = getSuiscanUrl;
37701
37773
  function getLogoUrl(info, dark) {
37702
37774
  const defaultUrl = "https://assets.sentio.xyz/chains/chain-unknown.webp";
37703
37775
  if (!info) {
@@ -37718,7 +37790,6 @@ var require_chain_info = __commonJS({
37718
37790
  const chainInfo = exports.ChainInfo[chainId.toString()];
37719
37791
  return getLogoUrl(chainInfo, dark);
37720
37792
  }
37721
- exports.getChainLogo = getChainLogo;
37722
37793
  function getMainnetChain(chainId) {
37723
37794
  const chainInfo = exports.ChainInfo[chainId.toString()];
37724
37795
  if (!chainInfo) {
@@ -37726,16 +37797,15 @@ var require_chain_info = __commonJS({
37726
37797
  }
37727
37798
  return chainInfo.mainnetChainId || chainId;
37728
37799
  }
37729
- exports.getMainnetChain = getMainnetChain;
37730
37800
  }
37731
37801
  });
37732
37802
 
37733
- // ../../node_modules/.pnpm/@sentio+chain@3.4.7/node_modules/@sentio/chain/dist/chain-name.js
37803
+ // ../../node_modules/.pnpm/@sentio+chain@3.4.11/node_modules/@sentio/chain/dist/chain-name.js
37734
37804
  var require_chain_name = __commonJS({
37735
- "../../node_modules/.pnpm/@sentio+chain@3.4.7/node_modules/@sentio/chain/dist/chain-name.js"(exports) {
37805
+ "../../node_modules/.pnpm/@sentio+chain@3.4.11/node_modules/@sentio/chain/dist/chain-name.js"(exports) {
37736
37806
  "use strict";
37737
37807
  Object.defineProperty(exports, "__esModule", { value: true });
37738
- exports.getChainName = void 0;
37808
+ exports.getChainName = getChainName;
37739
37809
  var chain_info_1 = require_chain_info();
37740
37810
  function getChainName(chainId) {
37741
37811
  if (typeof chainId === "number") {
@@ -37757,13 +37827,12 @@ var require_chain_name = __commonJS({
37757
37827
  }
37758
37828
  return chainId || "";
37759
37829
  }
37760
- exports.getChainName = getChainName;
37761
37830
  }
37762
37831
  });
37763
37832
 
37764
- // ../../node_modules/.pnpm/@sentio+chain@3.4.7/node_modules/@sentio/chain/dist/index.js
37833
+ // ../../node_modules/.pnpm/@sentio+chain@3.4.11/node_modules/@sentio/chain/dist/index.js
37765
37834
  var require_dist = __commonJS({
37766
- "../../node_modules/.pnpm/@sentio+chain@3.4.7/node_modules/@sentio/chain/dist/index.js"(exports) {
37835
+ "../../node_modules/.pnpm/@sentio+chain@3.4.11/node_modules/@sentio/chain/dist/index.js"(exports) {
37767
37836
  "use strict";
37768
37837
  var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
37769
37838
  if (k2 === void 0) k2 = k;
@@ -55162,52 +55231,45 @@ function spelunkMessage(value) {
55162
55231
  // ../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.mjs
55163
55232
  var import_index = __toESM(require_eventemitter3(), 1);
55164
55233
 
55165
- // ../../node_modules/.pnpm/p-timeout@6.1.2/node_modules/p-timeout/index.js
55166
- var TimeoutError = class extends Error {
55167
- constructor(message) {
55168
- super(message);
55169
- this.name = "TimeoutError";
55170
- }
55171
- };
55172
- var AbortError2 = class extends Error {
55173
- constructor(message) {
55174
- super();
55175
- this.name = "AbortError";
55176
- this.message = message;
55234
+ // ../../node_modules/.pnpm/p-timeout@7.0.0/node_modules/p-timeout/index.js
55235
+ var TimeoutError = class _TimeoutError extends Error {
55236
+ name = "TimeoutError";
55237
+ constructor(message, options) {
55238
+ super(message, options);
55239
+ Error.captureStackTrace?.(this, _TimeoutError);
55177
55240
  }
55178
55241
  };
55179
- var getDOMException = (errorMessage) => globalThis.DOMException === void 0 ? new AbortError2(errorMessage) : new DOMException(errorMessage);
55180
- var getAbortedReason = (signal) => {
55181
- const reason = signal.reason === void 0 ? getDOMException("This operation was aborted.") : signal.reason;
55182
- return reason instanceof Error ? reason : getDOMException(reason);
55183
- };
55242
+ var getAbortedReason = (signal) => signal.reason ?? new DOMException("This operation was aborted.", "AbortError");
55184
55243
  function pTimeout(promise, options) {
55185
55244
  const {
55186
55245
  milliseconds,
55187
55246
  fallback,
55188
55247
  message,
55189
- customTimers = { setTimeout, clearTimeout }
55248
+ customTimers = { setTimeout, clearTimeout },
55249
+ signal
55190
55250
  } = options;
55191
55251
  let timer;
55252
+ let abortHandler;
55192
55253
  const wrappedPromise = new Promise((resolve, reject) => {
55193
55254
  if (typeof milliseconds !== "number" || Math.sign(milliseconds) !== 1) {
55194
55255
  throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${milliseconds}\``);
55195
55256
  }
55196
- if (options.signal) {
55197
- const { signal } = options;
55198
- if (signal.aborted) {
55199
- reject(getAbortedReason(signal));
55200
- }
55201
- signal.addEventListener("abort", () => {
55257
+ if (signal?.aborted) {
55258
+ reject(getAbortedReason(signal));
55259
+ return;
55260
+ }
55261
+ if (signal) {
55262
+ abortHandler = () => {
55202
55263
  reject(getAbortedReason(signal));
55203
- });
55264
+ };
55265
+ signal.addEventListener("abort", abortHandler, { once: true });
55204
55266
  }
55267
+ promise.then(resolve, reject);
55205
55268
  if (milliseconds === Number.POSITIVE_INFINITY) {
55206
- promise.then(resolve, reject);
55207
55269
  return;
55208
55270
  }
55209
55271
  const timeoutError2 = new TimeoutError();
55210
- timer = customTimers.setTimeout.call(void 0, () => {
55272
+ timer = customTimers.setTimeout(() => {
55211
55273
  if (fallback) {
55212
55274
  try {
55213
55275
  resolve(fallback());
@@ -55228,25 +55290,21 @@ function pTimeout(promise, options) {
55228
55290
  reject(timeoutError2);
55229
55291
  }
55230
55292
  }, milliseconds);
55231
- (async () => {
55232
- try {
55233
- resolve(await promise);
55234
- } catch (error) {
55235
- reject(error);
55236
- }
55237
- })();
55238
55293
  });
55239
55294
  const cancelablePromise = wrappedPromise.finally(() => {
55240
55295
  cancelablePromise.clear();
55296
+ if (abortHandler && signal) {
55297
+ signal.removeEventListener("abort", abortHandler);
55298
+ }
55241
55299
  });
55242
55300
  cancelablePromise.clear = () => {
55243
- customTimers.clearTimeout.call(void 0, timer);
55301
+ customTimers.clearTimeout(timer);
55244
55302
  timer = void 0;
55245
55303
  };
55246
55304
  return cancelablePromise;
55247
55305
  }
55248
55306
 
55249
- // ../../node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/lower-bound.js
55307
+ // ../../node_modules/.pnpm/p-queue@9.0.0/node_modules/p-queue/dist/lower-bound.js
55250
55308
  function lowerBound(array, value, comparator) {
55251
55309
  let first = 0;
55252
55310
  let count = array.length;
@@ -55263,25 +55321,31 @@ function lowerBound(array, value, comparator) {
55263
55321
  return first;
55264
55322
  }
55265
55323
 
55266
- // ../../node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/priority-queue.js
55324
+ // ../../node_modules/.pnpm/p-queue@9.0.0/node_modules/p-queue/dist/priority-queue.js
55267
55325
  var PriorityQueue = class {
55268
55326
  #queue = [];
55269
55327
  enqueue(run2, options) {
55270
- options = {
55271
- priority: 0,
55272
- ...options
55273
- };
55328
+ const { priority = 0, id: id2 } = options ?? {};
55274
55329
  const element = {
55275
- priority: options.priority,
55330
+ priority,
55331
+ id: id2,
55276
55332
  run: run2
55277
55333
  };
55278
- if (this.size && this.#queue[this.size - 1].priority >= options.priority) {
55334
+ if (this.size === 0 || this.#queue[this.size - 1].priority >= priority) {
55279
55335
  this.#queue.push(element);
55280
55336
  return;
55281
55337
  }
55282
55338
  const index = lowerBound(this.#queue, element, (a, b2) => b2.priority - a.priority);
55283
55339
  this.#queue.splice(index, 0, element);
55284
55340
  }
55341
+ setPriority(id2, priority) {
55342
+ const index = this.#queue.findIndex((element) => element.id === id2);
55343
+ if (index === -1) {
55344
+ throw new ReferenceError(`No promise function with the id "${id2}" exists in the queue.`);
55345
+ }
55346
+ const [item] = this.#queue.splice(index, 1);
55347
+ this.enqueue(item.run, { priority, id: id2 });
55348
+ }
55285
55349
  dequeue() {
55286
55350
  const item = this.#queue.shift();
55287
55351
  return item?.run;
@@ -55294,14 +55358,17 @@ var PriorityQueue = class {
55294
55358
  }
55295
55359
  };
55296
55360
 
55297
- // ../../node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/index.js
55361
+ // ../../node_modules/.pnpm/p-queue@9.0.0/node_modules/p-queue/dist/index.js
55298
55362
  var PQueue = class extends import_index.default {
55299
- #carryoverConcurrencyCount;
55363
+ #carryoverIntervalCount;
55300
55364
  #isIntervalIgnored;
55301
55365
  #intervalCount = 0;
55302
55366
  #intervalCap;
55367
+ #rateLimitedInInterval = false;
55368
+ #rateLimitFlushScheduled = false;
55303
55369
  #interval;
55304
55370
  #intervalEnd = 0;
55371
+ #lastExecutionTime = 0;
55305
55372
  #intervalId;
55306
55373
  #timeoutId;
55307
55374
  #queue;
@@ -55310,18 +55377,30 @@ var PQueue = class extends import_index.default {
55310
55377
  // The `!` is needed because of https://github.com/microsoft/TypeScript/issues/32194
55311
55378
  #concurrency;
55312
55379
  #isPaused;
55313
- #throwOnTimeout;
55380
+ // Use to assign a unique identifier to a promise function, if not explicitly specified
55381
+ #idAssigner = 1n;
55382
+ // Track currently running tasks for debugging
55383
+ #runningTasks = /* @__PURE__ */ new Map();
55314
55384
  /**
55315
- Per-operation timeout in milliseconds. Operations fulfill once `timeout` elapses if they haven't already.
55385
+ Get or set the default timeout for all tasks. Can be changed at runtime.
55386
+
55387
+ Operations will throw a `TimeoutError` if they don't complete within the specified time.
55316
55388
 
55317
- Applies to each future operation.
55389
+ The timeout begins when the operation is dequeued and starts execution, not while it's waiting in the queue.
55390
+
55391
+ @example
55392
+ ```
55393
+ const queue = new PQueue({timeout: 5000});
55394
+
55395
+ // Change timeout for all future tasks
55396
+ queue.timeout = 10000;
55397
+ ```
55318
55398
  */
55319
55399
  timeout;
55320
- // TODO: The `throwOnTimeout` option should affect the return types of `add()` and `addAll()`
55321
55400
  constructor(options) {
55322
55401
  super();
55323
55402
  options = {
55324
- carryoverConcurrencyCount: false,
55403
+ carryoverIntervalCount: false,
55325
55404
  intervalCap: Number.POSITIVE_INFINITY,
55326
55405
  interval: 0,
55327
55406
  concurrency: Number.POSITIVE_INFINITY,
@@ -55335,16 +55414,19 @@ var PQueue = class extends import_index.default {
55335
55414
  if (options.interval === void 0 || !(Number.isFinite(options.interval) && options.interval >= 0)) {
55336
55415
  throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${options.interval?.toString() ?? ""}\` (${typeof options.interval})`);
55337
55416
  }
55338
- this.#carryoverConcurrencyCount = options.carryoverConcurrencyCount;
55417
+ this.#carryoverIntervalCount = options.carryoverIntervalCount ?? options.carryoverConcurrencyCount ?? false;
55339
55418
  this.#isIntervalIgnored = options.intervalCap === Number.POSITIVE_INFINITY || options.interval === 0;
55340
55419
  this.#intervalCap = options.intervalCap;
55341
55420
  this.#interval = options.interval;
55342
55421
  this.#queue = new options.queueClass();
55343
55422
  this.#queueClass = options.queueClass;
55344
55423
  this.concurrency = options.concurrency;
55424
+ if (options.timeout !== void 0 && !(Number.isFinite(options.timeout) && options.timeout > 0)) {
55425
+ throw new TypeError(`Expected \`timeout\` to be a positive finite number, got \`${options.timeout}\` (${typeof options.timeout})`);
55426
+ }
55345
55427
  this.timeout = options.timeout;
55346
- this.#throwOnTimeout = options.throwOnTimeout === true;
55347
55428
  this.#isPaused = options.autoStart === false;
55429
+ this.#setupRateLimitTracking();
55348
55430
  }
55349
55431
  get #doesIntervalAllowAnother() {
55350
55432
  return this.#isIntervalIgnored || this.#intervalCount < this.#intervalCap;
@@ -55354,6 +55436,9 @@ var PQueue = class extends import_index.default {
55354
55436
  }
55355
55437
  #next() {
55356
55438
  this.#pending--;
55439
+ if (this.#pending === 0) {
55440
+ this.emit("pendingZero");
55441
+ }
55357
55442
  this.#tryToStartAnother();
55358
55443
  this.emit("next");
55359
55444
  }
@@ -55367,46 +55452,70 @@ var PQueue = class extends import_index.default {
55367
55452
  if (this.#intervalId === void 0) {
55368
55453
  const delay2 = this.#intervalEnd - now;
55369
55454
  if (delay2 < 0) {
55370
- this.#intervalCount = this.#carryoverConcurrencyCount ? this.#pending : 0;
55371
- } else {
55372
- if (this.#timeoutId === void 0) {
55373
- this.#timeoutId = setTimeout(() => {
55374
- this.#onResumeInterval();
55375
- }, delay2);
55455
+ if (this.#lastExecutionTime > 0) {
55456
+ const timeSinceLastExecution = now - this.#lastExecutionTime;
55457
+ if (timeSinceLastExecution < this.#interval) {
55458
+ this.#createIntervalTimeout(this.#interval - timeSinceLastExecution);
55459
+ return true;
55460
+ }
55376
55461
  }
55462
+ this.#intervalCount = this.#carryoverIntervalCount ? this.#pending : 0;
55463
+ } else {
55464
+ this.#createIntervalTimeout(delay2);
55377
55465
  return true;
55378
55466
  }
55379
55467
  }
55380
55468
  return false;
55381
55469
  }
55470
+ #createIntervalTimeout(delay2) {
55471
+ if (this.#timeoutId !== void 0) {
55472
+ return;
55473
+ }
55474
+ this.#timeoutId = setTimeout(() => {
55475
+ this.#onResumeInterval();
55476
+ }, delay2);
55477
+ }
55478
+ #clearIntervalTimer() {
55479
+ if (this.#intervalId) {
55480
+ clearInterval(this.#intervalId);
55481
+ this.#intervalId = void 0;
55482
+ }
55483
+ }
55484
+ #clearTimeoutTimer() {
55485
+ if (this.#timeoutId) {
55486
+ clearTimeout(this.#timeoutId);
55487
+ this.#timeoutId = void 0;
55488
+ }
55489
+ }
55382
55490
  #tryToStartAnother() {
55383
55491
  if (this.#queue.size === 0) {
55384
- if (this.#intervalId) {
55385
- clearInterval(this.#intervalId);
55386
- }
55387
- this.#intervalId = void 0;
55492
+ this.#clearIntervalTimer();
55388
55493
  this.emit("empty");
55389
55494
  if (this.#pending === 0) {
55495
+ this.#clearTimeoutTimer();
55390
55496
  this.emit("idle");
55391
55497
  }
55392
55498
  return false;
55393
55499
  }
55500
+ let taskStarted = false;
55394
55501
  if (!this.#isPaused) {
55395
55502
  const canInitializeInterval = !this.#isIntervalPaused;
55396
55503
  if (this.#doesIntervalAllowAnother && this.#doesConcurrentAllowAnother) {
55397
55504
  const job = this.#queue.dequeue();
55398
- if (!job) {
55399
- return false;
55505
+ if (!this.#isIntervalIgnored) {
55506
+ this.#intervalCount++;
55507
+ this.#scheduleRateLimitUpdate();
55400
55508
  }
55401
55509
  this.emit("active");
55510
+ this.#lastExecutionTime = Date.now();
55402
55511
  job();
55403
55512
  if (canInitializeInterval) {
55404
55513
  this.#initializeIntervalIfNeeded();
55405
55514
  }
55406
- return true;
55515
+ taskStarted = true;
55407
55516
  }
55408
55517
  }
55409
- return false;
55518
+ return taskStarted;
55410
55519
  }
55411
55520
  #initializeIntervalIfNeeded() {
55412
55521
  if (this.#isIntervalIgnored || this.#intervalId !== void 0) {
@@ -55419,11 +55528,11 @@ var PQueue = class extends import_index.default {
55419
55528
  }
55420
55529
  #onInterval() {
55421
55530
  if (this.#intervalCount === 0 && this.#pending === 0 && this.#intervalId) {
55422
- clearInterval(this.#intervalId);
55423
- this.#intervalId = void 0;
55531
+ this.#clearIntervalTimer();
55424
55532
  }
55425
- this.#intervalCount = this.#carryoverConcurrencyCount ? this.#pending : 0;
55533
+ this.#intervalCount = this.#carryoverIntervalCount ? this.#pending : 0;
55426
55534
  this.#processQueue();
55535
+ this.#scheduleRateLimitUpdate();
55427
55536
  }
55428
55537
  /**
55429
55538
  Executes all queued functions until it reaches the limit.
@@ -55449,21 +55558,81 @@ var PQueue = class extends import_index.default {
55449
55558
  }, { once: true });
55450
55559
  });
55451
55560
  }
55561
+ /**
55562
+ Updates the priority of a promise function by its id, affecting its execution order. Requires a defined concurrency limit to take effect.
55563
+
55564
+ For example, this can be used to prioritize a promise function to run earlier.
55565
+
55566
+ ```js
55567
+ import PQueue from 'p-queue';
55568
+
55569
+ const queue = new PQueue({concurrency: 1});
55570
+
55571
+ queue.add(async () => '🦄', {priority: 1});
55572
+ queue.add(async () => '🦀', {priority: 0, id: '🦀'});
55573
+ queue.add(async () => '🦄', {priority: 1});
55574
+ queue.add(async () => '🦄', {priority: 1});
55575
+
55576
+ queue.setPriority('🦀', 2);
55577
+ ```
55578
+
55579
+ In this case, the promise function with `id: '🦀'` runs second.
55580
+
55581
+ You can also deprioritize a promise function to delay its execution:
55582
+
55583
+ ```js
55584
+ import PQueue from 'p-queue';
55585
+
55586
+ const queue = new PQueue({concurrency: 1});
55587
+
55588
+ queue.add(async () => '🦄', {priority: 1});
55589
+ queue.add(async () => '🦀', {priority: 1, id: '🦀'});
55590
+ queue.add(async () => '🦄');
55591
+ queue.add(async () => '🦄', {priority: 0});
55592
+
55593
+ queue.setPriority('🦀', -1);
55594
+ ```
55595
+ Here, the promise function with `id: '🦀'` executes last.
55596
+ */
55597
+ setPriority(id2, priority) {
55598
+ if (typeof priority !== "number" || !Number.isFinite(priority)) {
55599
+ throw new TypeError(`Expected \`priority\` to be a finite number, got \`${priority}\` (${typeof priority})`);
55600
+ }
55601
+ this.#queue.setPriority(id2, priority);
55602
+ }
55452
55603
  async add(function_, options = {}) {
55604
+ options.id ??= (this.#idAssigner++).toString();
55453
55605
  options = {
55454
55606
  timeout: this.timeout,
55455
- throwOnTimeout: this.#throwOnTimeout,
55456
55607
  ...options
55457
55608
  };
55458
55609
  return new Promise((resolve, reject) => {
55610
+ const taskSymbol = Symbol(`task-${options.id}`);
55459
55611
  this.#queue.enqueue(async () => {
55460
55612
  this.#pending++;
55461
- this.#intervalCount++;
55613
+ this.#runningTasks.set(taskSymbol, {
55614
+ id: options.id,
55615
+ priority: options.priority ?? 0,
55616
+ // Match priority-queue default
55617
+ startTime: Date.now(),
55618
+ timeout: options.timeout
55619
+ });
55462
55620
  try {
55463
- options.signal?.throwIfAborted();
55621
+ try {
55622
+ options.signal?.throwIfAborted();
55623
+ } catch (error) {
55624
+ if (!this.#isIntervalIgnored) {
55625
+ this.#intervalCount--;
55626
+ }
55627
+ this.#runningTasks.delete(taskSymbol);
55628
+ throw error;
55629
+ }
55464
55630
  let operation = function_({ signal: options.signal });
55465
55631
  if (options.timeout) {
55466
- operation = pTimeout(Promise.resolve(operation), { milliseconds: options.timeout });
55632
+ operation = pTimeout(Promise.resolve(operation), {
55633
+ milliseconds: options.timeout,
55634
+ message: `Task timed out after ${options.timeout}ms (queue has ${this.#pending} running, ${this.#queue.size} waiting)`
55635
+ });
55467
55636
  }
55468
55637
  if (options.signal) {
55469
55638
  operation = Promise.race([operation, this.#throwOnAbort(options.signal)]);
@@ -55472,14 +55641,13 @@ var PQueue = class extends import_index.default {
55472
55641
  resolve(result);
55473
55642
  this.emit("completed", result);
55474
55643
  } catch (error) {
55475
- if (error instanceof TimeoutError && !options.throwOnTimeout) {
55476
- resolve();
55477
- return;
55478
- }
55479
55644
  reject(error);
55480
55645
  this.emit("error", error);
55481
55646
  } finally {
55482
- this.#next();
55647
+ this.#runningTasks.delete(taskSymbol);
55648
+ queueMicrotask(() => {
55649
+ this.#next();
55650
+ });
55483
55651
  }
55484
55652
  }, options);
55485
55653
  this.emit("add");
@@ -55511,6 +55679,7 @@ var PQueue = class extends import_index.default {
55511
55679
  */
55512
55680
  clear() {
55513
55681
  this.#queue = new this.#queueClass();
55682
+ this.#updateRateLimitState();
55514
55683
  }
55515
55684
  /**
55516
55685
  Can be called multiple times. Useful if you for example add additional items at a later time.
@@ -55547,6 +55716,74 @@ var PQueue = class extends import_index.default {
55547
55716
  }
55548
55717
  await this.#onEvent("idle");
55549
55718
  }
55719
+ /**
55720
+ The difference with `.onIdle` is that `.onPendingZero` only waits for currently running tasks to finish, ignoring queued tasks.
55721
+
55722
+ @returns A promise that settles when all currently running tasks have completed; `queue.pending === 0`.
55723
+ */
55724
+ async onPendingZero() {
55725
+ if (this.#pending === 0) {
55726
+ return;
55727
+ }
55728
+ await this.#onEvent("pendingZero");
55729
+ }
55730
+ /**
55731
+ @returns A promise that settles when the queue becomes rate-limited due to intervalCap.
55732
+ */
55733
+ async onRateLimit() {
55734
+ if (this.isRateLimited) {
55735
+ return;
55736
+ }
55737
+ await this.#onEvent("rateLimit");
55738
+ }
55739
+ /**
55740
+ @returns A promise that settles when the queue is no longer rate-limited.
55741
+ */
55742
+ async onRateLimitCleared() {
55743
+ if (!this.isRateLimited) {
55744
+ return;
55745
+ }
55746
+ await this.#onEvent("rateLimitCleared");
55747
+ }
55748
+ /**
55749
+ @returns A promise that rejects when any task in the queue errors.
55750
+
55751
+ Use with `Promise.race([queue.onError(), queue.onIdle()])` to fail fast on the first error while still resolving normally when the queue goes idle.
55752
+
55753
+ Important: The promise returned by `add()` still rejects. You must handle each `add()` promise (for example, `.catch(() => {})`) to avoid unhandled rejections.
55754
+
55755
+ @example
55756
+ ```
55757
+ import PQueue from 'p-queue';
55758
+
55759
+ const queue = new PQueue({concurrency: 2});
55760
+
55761
+ queue.add(() => fetchData(1)).catch(() => {});
55762
+ queue.add(() => fetchData(2)).catch(() => {});
55763
+ queue.add(() => fetchData(3)).catch(() => {});
55764
+
55765
+ // Stop processing on first error
55766
+ try {
55767
+ await Promise.race([
55768
+ queue.onError(),
55769
+ queue.onIdle()
55770
+ ]);
55771
+ } catch (error) {
55772
+ queue.pause(); // Stop processing remaining tasks
55773
+ console.error('Queue failed:', error);
55774
+ }
55775
+ ```
55776
+ */
55777
+ // eslint-disable-next-line @typescript-eslint/promise-function-async
55778
+ async onError() {
55779
+ return new Promise((_resolve, reject) => {
55780
+ const handleError = (error) => {
55781
+ this.off("error", handleError);
55782
+ reject(error);
55783
+ };
55784
+ this.on("error", handleError);
55785
+ });
55786
+ }
55550
55787
  async #onEvent(event, filter) {
55551
55788
  return new Promise((resolve) => {
55552
55789
  const listener = () => {
@@ -55585,6 +55822,104 @@ var PQueue = class extends import_index.default {
55585
55822
  get isPaused() {
55586
55823
  return this.#isPaused;
55587
55824
  }
55825
+ #setupRateLimitTracking() {
55826
+ if (this.#isIntervalIgnored) {
55827
+ return;
55828
+ }
55829
+ this.on("add", () => {
55830
+ if (this.#queue.size > 0) {
55831
+ this.#scheduleRateLimitUpdate();
55832
+ }
55833
+ });
55834
+ this.on("next", () => {
55835
+ this.#scheduleRateLimitUpdate();
55836
+ });
55837
+ }
55838
+ #scheduleRateLimitUpdate() {
55839
+ if (this.#isIntervalIgnored || this.#rateLimitFlushScheduled) {
55840
+ return;
55841
+ }
55842
+ this.#rateLimitFlushScheduled = true;
55843
+ queueMicrotask(() => {
55844
+ this.#rateLimitFlushScheduled = false;
55845
+ this.#updateRateLimitState();
55846
+ });
55847
+ }
55848
+ #updateRateLimitState() {
55849
+ const previous = this.#rateLimitedInInterval;
55850
+ const shouldBeRateLimited = !this.#isIntervalIgnored && this.#intervalCount >= this.#intervalCap && this.#queue.size > 0;
55851
+ if (shouldBeRateLimited !== previous) {
55852
+ this.#rateLimitedInInterval = shouldBeRateLimited;
55853
+ this.emit(shouldBeRateLimited ? "rateLimit" : "rateLimitCleared");
55854
+ }
55855
+ }
55856
+ /**
55857
+ Whether the queue is currently rate-limited due to intervalCap.
55858
+ */
55859
+ get isRateLimited() {
55860
+ return this.#rateLimitedInInterval;
55861
+ }
55862
+ /**
55863
+ Whether the queue is saturated. Returns `true` when:
55864
+ - All concurrency slots are occupied and tasks are waiting, OR
55865
+ - The queue is rate-limited and tasks are waiting
55866
+
55867
+ Useful for detecting backpressure and potential hanging tasks.
55868
+
55869
+ ```js
55870
+ import PQueue from 'p-queue';
55871
+
55872
+ const queue = new PQueue({concurrency: 2});
55873
+
55874
+ // Backpressure handling
55875
+ if (queue.isSaturated) {
55876
+ console.log('Queue is saturated, waiting for capacity...');
55877
+ await queue.onSizeLessThan(queue.concurrency);
55878
+ }
55879
+
55880
+ // Monitoring for stuck tasks
55881
+ setInterval(() => {
55882
+ if (queue.isSaturated) {
55883
+ console.warn(`Queue saturated: ${queue.pending} running, ${queue.size} waiting`);
55884
+ }
55885
+ }, 60000);
55886
+ ```
55887
+ */
55888
+ get isSaturated() {
55889
+ return this.#pending === this.#concurrency && this.#queue.size > 0 || this.isRateLimited && this.#queue.size > 0;
55890
+ }
55891
+ /**
55892
+ The tasks currently being executed. Each task includes its `id`, `priority`, `startTime`, and `timeout` (if set).
55893
+
55894
+ Returns an array of task info objects.
55895
+
55896
+ ```js
55897
+ import PQueue from 'p-queue';
55898
+
55899
+ const queue = new PQueue({concurrency: 2});
55900
+
55901
+ // Add tasks with IDs for better debugging
55902
+ queue.add(() => fetchUser(123), {id: 'user-123'});
55903
+ queue.add(() => fetchPosts(456), {id: 'posts-456', priority: 1});
55904
+
55905
+ // Check what's running
55906
+ console.log(queue.runningTasks);
55907
+ // => [{
55908
+ // id: 'user-123',
55909
+ // priority: 0,
55910
+ // startTime: 1759253001716,
55911
+ // timeout: undefined
55912
+ // }, {
55913
+ // id: 'posts-456',
55914
+ // priority: 1,
55915
+ // startTime: 1759253001916,
55916
+ // timeout: undefined
55917
+ // }]
55918
+ ```
55919
+ */
55920
+ get runningTasks() {
55921
+ return [...this.#runningTasks.values()].map((task) => ({ ...task }));
55922
+ }
55588
55923
  };
55589
55924
 
55590
55925
  // src/provider.ts
@@ -57329,7 +57664,7 @@ function toLength(value) {
57329
57664
  }
57330
57665
 
57331
57666
  // ../../node_modules/.pnpm/ix@7.0.0/node_modules/ix/aborterror.mjs
57332
- var AbortError3 = class _AbortError extends Error {
57667
+ var AbortError2 = class _AbortError extends Error {
57333
57668
  constructor(message = "The operation has been aborted") {
57334
57669
  super(message);
57335
57670
  Object.setPrototypeOf(this, _AbortError.prototype);
@@ -57342,10 +57677,10 @@ var AbortError3 = class _AbortError extends Error {
57342
57677
  };
57343
57678
  function throwIfAborted2(signal) {
57344
57679
  if (signal && signal.aborted) {
57345
- throw new AbortError3();
57680
+ throw new AbortError2();
57346
57681
  }
57347
57682
  }
57348
- Object.defineProperty(AbortError3, Symbol.hasInstance, {
57683
+ Object.defineProperty(AbortError2, Symbol.hasInstance, {
57349
57684
  writable: true,
57350
57685
  configurable: true,
57351
57686
  value(x) {
@@ -57603,7 +57938,7 @@ var FromObservableAsyncIterable = class extends AsyncIterableX {
57603
57938
  }
57604
57939
  });
57605
57940
  function onAbort() {
57606
- sink.error(new AbortError3());
57941
+ sink.error(new AbortError2());
57607
57942
  }
57608
57943
  if (signal) {
57609
57944
  signal.addEventListener("abort", onAbort);
@@ -59780,4 +60115,4 @@ long/umd/index.js:
59780
60115
  @noble/curves/esm/secp256k1.js:
59781
60116
  (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
59782
60117
  */
59783
- //# sourceMappingURL=chunk-BIFWYVK4.js.map
60118
+ //# sourceMappingURL=chunk-3QIPRNAH.js.map