aftermath-ts-sdk 2.2.0-abort.0 → 2.2.0-dev.b524aa9

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.js CHANGED
@@ -1868,148 +1868,6 @@ var init_helpers = __esm({
1868
1868
  }
1869
1869
  });
1870
1870
 
1871
- // src/general/utils/transportError.ts
1872
- function defaultMessage(kind, status) {
1873
- if (kind === "http") {
1874
- return status === void 0 ? "Aftermath HTTP request failed" : `Aftermath HTTP request failed with status ${status}`;
1875
- }
1876
- if (kind === "network") {
1877
- return "Aftermath network request failed";
1878
- }
1879
- if (kind === "abort") {
1880
- return "Aftermath request was aborted";
1881
- }
1882
- if (kind === "timeout") {
1883
- return "Aftermath request timed out";
1884
- }
1885
- return "Aftermath response could not be decoded";
1886
- }
1887
- function isAftermathTransportError(error) {
1888
- return error instanceof AftermathTransportError;
1889
- }
1890
- function getProperty(value, property) {
1891
- if (value === null || typeof value !== "object" && typeof value !== "function") {
1892
- return void 0;
1893
- }
1894
- try {
1895
- return value[property];
1896
- } catch {
1897
- return void 0;
1898
- }
1899
- }
1900
- function getStringProperty(value, property) {
1901
- const propertyValue = getProperty(value, property);
1902
- return typeof propertyValue === "string" ? propertyValue : void 0;
1903
- }
1904
- function getStringCode(value) {
1905
- return getStringProperty(value, "code");
1906
- }
1907
- function isTimeoutCode(code) {
1908
- return code !== void 0 && TIMEOUT_CODES.has(code);
1909
- }
1910
- function isTimeoutReason(reason) {
1911
- if (isAftermathTransportError(reason) && (reason.kind === "timeout" || reason.abortSource === "timeout")) {
1912
- return true;
1913
- }
1914
- return getProperty(reason, "name") === "TimeoutError" || isTimeoutCode(getStringCode(reason));
1915
- }
1916
- function parseRetryAfter(headerValue, nowMs = Date.now()) {
1917
- if (headerValue === null) {
1918
- return void 0;
1919
- }
1920
- const value = headerValue.trim();
1921
- if (value === "") {
1922
- return void 0;
1923
- }
1924
- if (DELTA_SECONDS_REGEX.test(value)) {
1925
- const milliseconds = BigInt(value) * 1000n;
1926
- return milliseconds <= MAX_SAFE_INTEGER_BIGINT ? Number(milliseconds) : void 0;
1927
- }
1928
- if (!HTTP_DATE_REGEX.test(value)) {
1929
- return void 0;
1930
- }
1931
- const dateMs = Date.parse(value);
1932
- if (!Number.isFinite(dateMs)) {
1933
- return void 0;
1934
- }
1935
- const retryAfterMs = dateMs - nowMs;
1936
- return retryAfterMs >= 0 && Number.isSafeInteger(retryAfterMs) ? retryAfterMs : void 0;
1937
- }
1938
- function normalizeAftermathTransportError(error, signal) {
1939
- if (isAftermathTransportError(error)) {
1940
- return error;
1941
- }
1942
- const errorCode = getStringCode(error);
1943
- const signalReason = signal?.aborted ? signal.reason : void 0;
1944
- const signalReasonCode = getStringCode(signalReason);
1945
- const code = errorCode ?? signalReasonCode;
1946
- if (signal?.aborted) {
1947
- const timeout = isTimeoutReason(signalReason) || isTimeoutReason(error);
1948
- return new AftermathTransportError(timeout ? "timeout" : "abort", {
1949
- abortSource: timeout ? "timeout" : "caller",
1950
- cause: error,
1951
- code
1952
- });
1953
- }
1954
- if (isTimeoutReason(error)) {
1955
- return new AftermathTransportError("timeout", {
1956
- abortSource: "timeout",
1957
- cause: error,
1958
- code: errorCode
1959
- });
1960
- }
1961
- return new AftermathTransportError("network", {
1962
- cause: error,
1963
- code: errorCode
1964
- });
1965
- }
1966
- var MAX_SAFE_INTEGER_BIGINT, DELTA_SECONDS_REGEX, HTTP_DATE_REGEX, TIMEOUT_CODES, AftermathTransportError;
1967
- var init_transportError = __esm({
1968
- "src/general/utils/transportError.ts"() {
1969
- "use strict";
1970
- MAX_SAFE_INTEGER_BIGINT = BigInt(Number.MAX_SAFE_INTEGER);
1971
- DELTA_SECONDS_REGEX = /^\d+$/;
1972
- HTTP_DATE_REGEX = /^(?:[A-Za-z]{3}, \d{2} [A-Za-z]{3} \d{4} \d{2}:\d{2}:\d{2} GMT|[A-Za-z]+, \d{2}-[A-Za-z]{3}-\d{2} \d{2}:\d{2}:\d{2} GMT|[A-Za-z]{3} [A-Za-z]{3} {1,2}\d{1,2} \d{2}:\d{2}:\d{2} \d{4})$/;
1973
- TIMEOUT_CODES = /* @__PURE__ */ new Set([
1974
- "UND_ERR_BODY_TIMEOUT",
1975
- "UND_ERR_CONNECT_TIMEOUT",
1976
- "UND_ERR_HEADERS_TIMEOUT",
1977
- "ETIMEDOUT"
1978
- ]);
1979
- AftermathTransportError = class extends Error {
1980
- constructor(kind, options = {}) {
1981
- const causeMessage = getStringProperty(options.cause, "message");
1982
- super(
1983
- options.message ?? causeMessage ?? defaultMessage(kind, options.status)
1984
- );
1985
- Object.setPrototypeOf(this, new.target.prototype);
1986
- this.name = options.name ?? getStringProperty(options.cause, "name") ?? "AftermathTransportError";
1987
- this.kind = kind;
1988
- if (options.status !== void 0) {
1989
- this.status = options.status;
1990
- }
1991
- if (options.retryAfterMs !== void 0) {
1992
- this.retryAfterMs = options.retryAfterMs;
1993
- }
1994
- if (options.code !== void 0) {
1995
- this.code = options.code;
1996
- }
1997
- if (options.abortSource !== void 0) {
1998
- this.abortSource = options.abortSource;
1999
- }
2000
- if (options.cause !== void 0) {
2001
- Object.defineProperty(this, "cause", {
2002
- configurable: true,
2003
- enumerable: false,
2004
- value: options.cause,
2005
- writable: false
2006
- });
2007
- }
2008
- }
2009
- };
2010
- }
2011
- });
2012
-
2013
1871
  // src/general/utils/caller.ts
2014
1872
  import { Transaction as Transaction3 } from "@mysten/sui/transactions";
2015
1873
  function bigIntReplacer(_key, value) {
@@ -2023,7 +1881,6 @@ var init_caller = __esm({
2023
1881
  "src/general/utils/caller.ts"() {
2024
1882
  "use strict";
2025
1883
  init_helpers();
2026
- init_transportError();
2027
1884
  _Caller = class _Caller {
2028
1885
  // =========================================================================
2029
1886
  // Constructor
@@ -2051,26 +1908,11 @@ var init_caller = __esm({
2051
1908
  static async fetchResponseToType(response, disableBigIntJsonParsing) {
2052
1909
  if (!response.ok) {
2053
1910
  const status = response.status;
2054
- const retryAfterMs = parseRetryAfter(response.headers.get("Retry-After"));
2055
- const statusText = response.statusText;
2056
1911
  const body = await response.text();
2057
- throw new AftermathTransportError("http", {
2058
- message: `HTTP ${status} ${statusText}: ${body}`,
2059
- name: "Error",
2060
- retryAfterMs,
2061
- status
2062
- });
1912
+ throw new Error(`HTTP ${status} ${response.statusText}: ${body}`);
2063
1913
  }
2064
1914
  const text = await response.text();
2065
- let output;
2066
- try {
2067
- output = disableBigIntJsonParsing ? JSON.parse(
2068
- text,
2069
- (_key, value) => value === null ? void 0 : value
2070
- ) : Helpers.parseJsonWithBigint(text);
2071
- } catch (cause) {
2072
- throw new AftermathTransportError("decode", { cause });
2073
- }
1915
+ const output = disableBigIntJsonParsing ? JSON.parse(text, (_key, value) => value === null ? void 0 : value) : Helpers.parseJsonWithBigint(text);
2074
1916
  return output ?? void 0;
2075
1917
  }
2076
1918
  /**
@@ -2095,25 +1937,21 @@ var init_caller = __esm({
2095
1937
  // Api Calling
2096
1938
  // =========================================================================
2097
1939
  async fetchApi(url, body, signal, options) {
2098
- try {
2099
- const apiCallUrl = this.urlForApiCall(url);
2100
- const headers = {
2101
- "Content-Type": "application/json",
2102
- ...this.config.accessToken ? { Authorization: `Bearer ${this.config.accessToken}` } : {}
2103
- };
2104
- const uncastResponse = await (body === void 0 ? fetch(apiCallUrl, { headers, signal }) : fetch(apiCallUrl, {
2105
- method: "POST",
2106
- body: JSON.stringify(body, bigIntReplacer),
2107
- headers,
2108
- signal
2109
- }));
2110
- return await _Caller.fetchResponseToType(
2111
- uncastResponse,
2112
- !!options?.disableBigIntJsonParsing
2113
- );
2114
- } catch (error) {
2115
- throw normalizeAftermathTransportError(error, signal);
2116
- }
1940
+ const apiCallUrl = this.urlForApiCall(url);
1941
+ const headers = {
1942
+ "Content-Type": "application/json",
1943
+ ...this.config.accessToken ? { Authorization: `Bearer ${this.config.accessToken}` } : {}
1944
+ };
1945
+ const uncastResponse = await (body === void 0 ? fetch(apiCallUrl, { headers, signal }) : fetch(apiCallUrl, {
1946
+ method: "POST",
1947
+ body: JSON.stringify(body, bigIntReplacer),
1948
+ headers,
1949
+ signal
1950
+ }));
1951
+ return _Caller.fetchResponseToType(
1952
+ uncastResponse,
1953
+ !!options?.disableBigIntJsonParsing
1954
+ );
2117
1955
  }
2118
1956
  async fetchApiTransaction(url, body, signal, options) {
2119
1957
  const txKind = await this.fetchApi(
@@ -2279,13 +2117,10 @@ var init_prices = __esm({
2279
2117
  * console.log(suiPriceInfo.price, suiPriceInfo.priceChange24HoursPercentage);
2280
2118
  * ```
2281
2119
  */
2282
- async getCoinPriceInfo(inputs, abortSignal) {
2283
- const coinsToPriceInfo = await this.getCoinsToPriceInfo(
2284
- {
2285
- coins: [inputs.coin]
2286
- },
2287
- abortSignal
2288
- );
2120
+ async getCoinPriceInfo(inputs) {
2121
+ const coinsToPriceInfo = await this.getCoinsToPriceInfo({
2122
+ coins: [inputs.coin]
2123
+ });
2289
2124
  return Object.values(coinsToPriceInfo)[0];
2290
2125
  }
2291
2126
  /**
@@ -2304,8 +2139,8 @@ var init_prices = __esm({
2304
2139
  * console.log(info);
2305
2140
  * ```
2306
2141
  */
2307
- async getCoinsToPriceInfo(inputs, abortSignal) {
2308
- return this.fetchApi("", inputs, abortSignal);
2142
+ async getCoinsToPriceInfo(inputs) {
2143
+ return this.fetchApi("", inputs);
2309
2144
  }
2310
2145
  /**
2311
2146
  * Fetches only the current price in USD for a single coin.
@@ -2320,8 +2155,8 @@ var init_prices = __esm({
2320
2155
  * console.log("SUI price in USD:", suiPrice);
2321
2156
  * ```
2322
2157
  */
2323
- async getCoinPrice(inputs, abortSignal) {
2324
- const priceInfo = await this.getCoinPriceInfo(inputs, abortSignal);
2158
+ async getCoinPrice(inputs) {
2159
+ const priceInfo = await this.getCoinPriceInfo(inputs);
2325
2160
  return priceInfo.price;
2326
2161
  }
2327
2162
  /**
@@ -2337,11 +2172,8 @@ var init_prices = __esm({
2337
2172
  * console.log(multiPrices["0x2::sui::SUI"]); // e.g. 1.23
2338
2173
  * ```
2339
2174
  */
2340
- async getCoinsToPrice(inputs, abortSignal) {
2341
- const coinsToPriceInfo = await this.getCoinsToPriceInfo(
2342
- inputs,
2343
- abortSignal
2344
- );
2175
+ async getCoinsToPrice(inputs) {
2176
+ const coinsToPriceInfo = await this.getCoinsToPriceInfo(inputs);
2345
2177
  const coinsToPrice = Object.entries(coinsToPriceInfo).reduce(
2346
2178
  (acc, [coinType, info]) => ({
2347
2179
  ...acc,
@@ -2402,9 +2234,9 @@ var init_coin = __esm({
2402
2234
  * console.log(decimals); // { "0x2::sui::SUI": 9, "0x<...>": 6 }
2403
2235
  * ```
2404
2236
  */
2405
- async getCoinsToDecimals(inputs, abortSignal) {
2237
+ async getCoinsToDecimals(inputs) {
2406
2238
  const { coins } = inputs;
2407
- const metadatas = await this.getCoinMetadatas(inputs, abortSignal);
2239
+ const metadatas = await this.getCoinMetadatas(inputs);
2408
2240
  const coinsToDecimals = metadatas.map((data) => data.decimals).reduce((acc, decimals, index) => {
2409
2241
  return { ...acc, [coins[index]]: decimals };
2410
2242
  }, {});
@@ -2424,7 +2256,7 @@ var init_coin = __esm({
2424
2256
  * console.log(metadata.name, metadata.symbol, metadata.decimals);
2425
2257
  * ```
2426
2258
  */
2427
- async getCoinMetadata(coin, abortSignal) {
2259
+ async getCoinMetadata(coin) {
2428
2260
  if (this.metadata) {
2429
2261
  return this.metadata;
2430
2262
  }
@@ -2432,10 +2264,7 @@ var init_coin = __esm({
2432
2264
  if (!coinType) {
2433
2265
  throw new Error("no valid coin type");
2434
2266
  }
2435
- const [metadata] = await this.getCoinMetadatas(
2436
- { coins: [coinType] },
2437
- abortSignal
2438
- );
2267
+ const [metadata] = await this.getCoinMetadatas({ coins: [coinType] });
2439
2268
  this.setCoinMetadata(metadata);
2440
2269
  return metadata;
2441
2270
  }
@@ -2454,13 +2283,12 @@ var init_coin = __esm({
2454
2283
  * console.log(metas[0].symbol, metas[1].symbol);
2455
2284
  * ```
2456
2285
  */
2457
- async getCoinMetadatas(inputs, abortSignal) {
2286
+ async getCoinMetadatas(inputs) {
2458
2287
  return this.fetchApi(
2459
2288
  "metadata",
2460
2289
  {
2461
2290
  coins: inputs.coins.map((coin) => Helpers.addLeadingZeroesToType(coin))
2462
- },
2463
- abortSignal
2291
+ }
2464
2292
  );
2465
2293
  }
2466
2294
  /**
@@ -2485,7 +2313,7 @@ var init_coin = __esm({
2485
2313
  * console.log(priceInfo.price, priceInfo.priceChange24HoursPercentage);
2486
2314
  * ```
2487
2315
  */
2488
- async getPrice(coin, abortSignal) {
2316
+ async getPrice(coin) {
2489
2317
  if (this.priceInfo !== void 0) {
2490
2318
  return this.priceInfo;
2491
2319
  }
@@ -2493,12 +2321,9 @@ var init_coin = __esm({
2493
2321
  if (!coinType) {
2494
2322
  throw new Error("no valid coin type");
2495
2323
  }
2496
- const priceInfo = await new Prices(this.config).getCoinPriceInfo(
2497
- {
2498
- coin: coinType
2499
- },
2500
- abortSignal
2501
- );
2324
+ const priceInfo = await new Prices(this.config).getCoinPriceInfo({
2325
+ coin: coinType
2326
+ });
2502
2327
  this.setPriceInfo(priceInfo);
2503
2328
  return priceInfo;
2504
2329
  }
@@ -4969,7 +4794,6 @@ var init_utils = __esm({
4969
4794
  init_casting();
4970
4795
  init_grpcCasting();
4971
4796
  init_helpers();
4972
- init_transportError();
4973
4797
  }
4974
4798
  });
4975
4799
 
@@ -5468,13 +5292,10 @@ var init_farmsStakingPool = __esm({
5468
5292
  * console.log(poolTvl);
5469
5293
  * ```
5470
5294
  */
5471
- async getTVL(abortSignal) {
5472
- return new Farms(this.config, this.api).getTVL(
5473
- {
5474
- farmIds: [this.stakingPool.objectId]
5475
- },
5476
- abortSignal
5477
- );
5295
+ async getTVL() {
5296
+ return new Farms(this.config, this.api).getTVL({
5297
+ farmIds: [this.stakingPool.objectId]
5298
+ });
5478
5299
  }
5479
5300
  /**
5480
5301
  * Fetches the total value locked (TVL) of the reward coins in this specific staking pool.
@@ -5487,13 +5308,10 @@ var init_farmsStakingPool = __esm({
5487
5308
  * console.log(rewardTvl);
5488
5309
  * ```
5489
5310
  */
5490
- async getRewardsTVL(abortSignal) {
5491
- return new Farms(this.config, this.api).getRewardsTVL(
5492
- {
5493
- farmIds: [this.stakingPool.objectId]
5494
- },
5495
- abortSignal
5496
- );
5311
+ async getRewardsTVL() {
5312
+ return new Farms(this.config, this.api).getRewardsTVL({
5313
+ farmIds: [this.stakingPool.objectId]
5314
+ });
5497
5315
  }
5498
5316
  // =========================================================================
5499
5317
  // Transactions
@@ -6213,11 +6031,9 @@ var init_farms = __esm({
6213
6031
  * console.log(pool.stakingPool);
6214
6032
  * ```
6215
6033
  */
6216
- async getStakingPool(inputs, abortSignal) {
6034
+ async getStakingPool(inputs) {
6217
6035
  const stakingPool = await this.fetchApi(
6218
- inputs.objectId,
6219
- void 0,
6220
- abortSignal
6036
+ inputs.objectId
6221
6037
  );
6222
6038
  return new FarmsStakingPool(stakingPool, this.config, this.api);
6223
6039
  }
@@ -6235,14 +6051,10 @@ var init_farms = __esm({
6235
6051
  * console.log(pools[0].stakingPool, pools[1].stakingPool);
6236
6052
  * ```
6237
6053
  */
6238
- async getStakingPools(inputs, abortSignal) {
6239
- const stakingPools = await this.fetchApi(
6240
- "",
6241
- {
6242
- farmIds: inputs.objectIds
6243
- },
6244
- abortSignal
6245
- );
6054
+ async getStakingPools(inputs) {
6055
+ const stakingPools = await this.fetchApi("", {
6056
+ farmIds: inputs.objectIds
6057
+ });
6246
6058
  return stakingPools.map(
6247
6059
  (stakingPool) => new FarmsStakingPool(stakingPool, this.config, this.api)
6248
6060
  );
@@ -6258,12 +6070,8 @@ var init_farms = __esm({
6258
6070
  * console.log(allPools.map(pool => pool.stakingPool));
6259
6071
  * ```
6260
6072
  */
6261
- async getAllStakingPools(abortSignal) {
6262
- const stakingPools = await this.fetchApi(
6263
- "",
6264
- {},
6265
- abortSignal
6266
- );
6073
+ async getAllStakingPools() {
6074
+ const stakingPools = await this.fetchApi("", {});
6267
6075
  return stakingPools.map(
6268
6076
  (pool) => new FarmsStakingPool(pool, this.config, this.api)
6269
6077
  );
@@ -6342,8 +6150,8 @@ var init_farms = __esm({
6342
6150
  * console.log("Specific farm's TVL:", tvlForSpecificFarm);
6343
6151
  * ```
6344
6152
  */
6345
- async getTVL(inputs, abortSignal) {
6346
- return this.fetchApi("tvl", inputs ?? {}, abortSignal);
6153
+ async getTVL(inputs) {
6154
+ return this.fetchApi("tvl", inputs ?? {});
6347
6155
  }
6348
6156
  /**
6349
6157
  * Retrieves the total value locked (TVL) of reward coins across specified farm IDs or all farms if none are specified.
@@ -6360,8 +6168,8 @@ var init_farms = __esm({
6360
6168
  * console.log("Single farm's rewards TVL:", singleFarmRewardsTvl);
6361
6169
  * ```
6362
6170
  */
6363
- async getRewardsTVL(inputs, abortSignal) {
6364
- return this.fetchApi("rewards-tvl", inputs ?? {}, abortSignal);
6171
+ async getRewardsTVL(inputs) {
6172
+ return this.fetchApi("rewards-tvl", inputs ?? {});
6365
6173
  }
6366
6174
  // =========================================================================
6367
6175
  // Transactions
@@ -8761,13 +8569,10 @@ var init_pools = __esm({
8761
8569
  * console.log(poolId);
8762
8570
  * ```
8763
8571
  */
8764
- this.getPoolObjectIdForLpCoinType = (inputs, abortSignal) => {
8765
- return this.getPoolObjectIdsForLpCoinTypes(
8766
- {
8767
- lpCoinTypes: [inputs.lpCoinType]
8768
- },
8769
- abortSignal
8770
- );
8572
+ this.getPoolObjectIdForLpCoinType = (inputs) => {
8573
+ return this.getPoolObjectIdsForLpCoinTypes({
8574
+ lpCoinTypes: [inputs.lpCoinType]
8575
+ });
8771
8576
  };
8772
8577
  /**
8773
8578
  * Checks if a given coin type is recognized as an LP coin.
@@ -8776,8 +8581,8 @@ var init_pools = __esm({
8776
8581
  * @param inputs - Contains the `lpCoinType` to check.
8777
8582
  * @returns `true` if the coin is an LP token, `false` otherwise.
8778
8583
  */
8779
- this.isLpCoinType = async (inputs, abortSignal) => {
8780
- const result = await this.getPoolObjectIdForLpCoinType(inputs, abortSignal);
8584
+ this.isLpCoinType = async (inputs) => {
8585
+ const result = await this.getPoolObjectIdForLpCoinType(inputs);
8781
8586
  return result.some((id) => id !== void 0);
8782
8587
  };
8783
8588
  /**
@@ -8827,12 +8632,8 @@ var init_pools = __esm({
8827
8632
  * console.log(pool.pool.lpCoinType, pool.pool.name);
8828
8633
  * ```
8829
8634
  */
8830
- async getPool(inputs, abortSignal) {
8831
- const pool = await this.fetchApi(
8832
- inputs.objectId,
8833
- void 0,
8834
- abortSignal
8835
- );
8635
+ async getPool(inputs) {
8636
+ const pool = await this.fetchApi(inputs.objectId);
8836
8637
  return new Pool(pool, this.config, this.api);
8837
8638
  }
8838
8639
  /**
@@ -8847,14 +8648,10 @@ var init_pools = __esm({
8847
8648
  * console.log(poolArray.length);
8848
8649
  * ```
8849
8650
  */
8850
- async getPools(inputs, abortSignal) {
8851
- const pools = await this.fetchApi(
8852
- "",
8853
- {
8854
- poolIds: inputs.objectIds
8855
- },
8856
- abortSignal
8857
- );
8651
+ async getPools(inputs) {
8652
+ const pools = await this.fetchApi("", {
8653
+ poolIds: inputs.objectIds
8654
+ });
8858
8655
  return pools.map((pool) => new Pool(pool, this.config, this.api));
8859
8656
  }
8860
8657
  /**
@@ -8868,8 +8665,8 @@ var init_pools = __esm({
8868
8665
  * console.log(allPools.map(p => p.pool.name));
8869
8666
  * ```
8870
8667
  */
8871
- async getAllPools(abortSignal) {
8872
- const pools = await this.fetchApi("", {}, abortSignal);
8668
+ async getAllPools() {
8669
+ const pools = await this.fetchApi("", {});
8873
8670
  return pools.map((pool) => new Pool(pool, this.config, this.api));
8874
8671
  }
8875
8672
  /**
@@ -8959,8 +8756,8 @@ var init_pools = __esm({
8959
8756
  * console.log(poolIds);
8960
8757
  * ```
8961
8758
  */
8962
- async getPoolObjectIdsForLpCoinTypes(inputs, abortSignal) {
8963
- return this.fetchApi("pool-object-ids", inputs, abortSignal);
8759
+ async getPoolObjectIdsForLpCoinTypes(inputs) {
8760
+ return this.fetchApi("pool-object-ids", inputs);
8964
8761
  }
8965
8762
  /**
8966
8763
  * Retrieves the total value locked (TVL) across all or specific pool IDs.
@@ -8990,8 +8787,8 @@ var init_pools = __esm({
8990
8787
  * console.log(stats[0].volume, stats[1].tvl);
8991
8788
  * ```
8992
8789
  */
8993
- async getPoolsStats(inputs, abortSignal) {
8994
- return this.fetchApi("stats", inputs, abortSignal);
8790
+ async getPoolsStats(inputs) {
8791
+ return this.fetchApi("stats", inputs);
8995
8792
  }
8996
8793
  /**
8997
8794
  * Returns all DAO fee pool owner capabilities owned by a particular user.
@@ -15599,11 +15396,11 @@ var init_rewards = __esm({
15599
15396
  /**
15600
15397
  * Preview a single account's expected rewards for an epoch, broken down by
15601
15398
  * domain (trading, referral, AFLP, integrator) plus totals. Backed by the
15602
- * newer `rewards/expectedRewards` endpoint. Provide exactly one of `address`
15399
+ * newer `rewards/expected-rewards` endpoint. Provide exactly one of `address`
15603
15400
  * or `accountId`; omit `epoch` for the current epoch.
15604
15401
  */
15605
15402
  async getExpectedRewards(inputs) {
15606
- return this.fetchApi("expectedRewards", inputs);
15403
+ return this.fetchApi("expected-rewards", inputs);
15607
15404
  }
15608
15405
  // =========================================================================
15609
15406
  // Transactions
@@ -23755,22 +23552,22 @@ var init_aftermath = __esm({
23755
23552
  * returns a ready-to-use instance. Pass `addresses` or `api` to skip
23756
23553
  * the corresponding bootstrap steps.
23757
23554
  */
23758
- static async create(options = {}, abortSignal) {
23555
+ static async create(options = {}) {
23759
23556
  const af = new _Aftermath(options);
23760
- await af.bootstrap(abortSignal);
23557
+ await af.bootstrap();
23761
23558
  return af;
23762
23559
  }
23763
23560
  /**
23764
23561
  * Resolves addresses and wires up the internal `AftermathApi`. Called
23765
23562
  * exactly once by the {@link Aftermath.create} factory.
23766
23563
  */
23767
- async bootstrap(abortSignal) {
23564
+ async bootstrap() {
23768
23565
  if (this.options.api) {
23769
23566
  this.api = this.options.api;
23770
23567
  return;
23771
23568
  }
23772
23569
  const network = this.network;
23773
- const addresses = this.options.addresses ?? await this.getAddresses(abortSignal);
23570
+ const addresses = this.options.addresses ?? await this.getAddresses();
23774
23571
  const fullnodeUrl = this.options.fullnodeUrl ?? Caller.defaultFullnodeUrl(network);
23775
23572
  const client = new SuiGrpcClient({
23776
23573
  network: network.toLowerCase(),
@@ -23802,8 +23599,8 @@ var init_aftermath = __esm({
23802
23599
  * directly from the API. Typically you don't need to call this — the
23803
23600
  * `create` factory handles it. Useful for cache warmers or tooling.
23804
23601
  */
23805
- getAddresses(abortSignal) {
23806
- return this.fetchApi("addresses", void 0, abortSignal);
23602
+ getAddresses() {
23603
+ return this.fetchApi("addresses");
23807
23604
  }
23808
23605
  /**
23809
23606
  * Attempts to decode a raw Move abort/error string into a structured
@@ -23850,7 +23647,6 @@ init_index();
23850
23647
  export {
23851
23648
  Aftermath,
23852
23649
  AftermathApi,
23853
- AftermathTransportError,
23854
23650
  Auth,
23855
23651
  Casting,
23856
23652
  Coin,
@@ -23880,7 +23676,6 @@ export {
23880
23676
  SuiFren,
23881
23677
  SuiFrens,
23882
23678
  SuiFrensSortOption,
23883
- isAftermathTransportError,
23884
23679
  isAllocatedCollateralEvent,
23885
23680
  isCanceledOrderEvent,
23886
23681
  isDeallocatedCollateralEvent,