@hyperbridge/sdk 2.8.3 → 2.8.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.
@@ -5289,11 +5289,21 @@ var ChainConfigService = class {
5289
5289
  * it, so a new asset is added once in `chain.ts` and nowhere else.
5290
5290
  */
5291
5291
  getAssetBySymbol(chain, symbol) {
5292
- const assets = this.getConfig(chain)?.assets;
5292
+ return this.getAssetMetadataBySymbol(chain, symbol)?.address;
5293
+ }
5294
+ /** Resolves a configured token symbol case-insensitively on a specific chain. */
5295
+ getAssetMetadataBySymbol(chain, symbol) {
5296
+ const config = this.getConfig(chain);
5297
+ const assets = config?.assets;
5293
5298
  if (!assets) return void 0;
5294
5299
  const target = symbol.trim().toUpperCase();
5295
5300
  for (const [key, address] of Object.entries(assets)) {
5296
- if (key.toUpperCase() === target) return address;
5301
+ if (key.toUpperCase() !== target) continue;
5302
+ return {
5303
+ symbol: key,
5304
+ address,
5305
+ decimals: config.tokenDecimals?.[key]
5306
+ };
5297
5307
  }
5298
5308
  return void 0;
5299
5309
  }
@@ -7864,6 +7874,7 @@ var HYPERBRIDGE_TYPES_BUNDLE = {
7864
7874
  };
7865
7875
  var BASE_TIP = 1000000000n;
7866
7876
  var HTTP_CONNECT_TIMEOUT_MS = 2e4;
7877
+ var INCLUSION_TIMEOUT_MS = 2e4;
7867
7878
  var PHANTOM_POLL_INTERVAL_MS = 15e3;
7868
7879
  var GARGANTUA_PHANTOM_POLL_INTERVAL_MS = 6e3;
7869
7880
  function rejectAfter(ms, message) {
@@ -8082,14 +8093,16 @@ var IntentsCoprocessor = class _IntentsCoprocessor {
8082
8093
  /**
8083
8094
  * Signs and sends an extrinsic. Submissions are serialised through {@link submissionQueue} so
8084
8095
  * concurrent calls never collide on the substrate account nonce — each extrinsic reaches a block
8085
- * (or is confirmed still pooled and returned as `pending`) before the next is signed; auto-nonce
8086
- * via `system.accountNextIndex` counts pooled extrinsics, so a pending one is never re-used.
8096
+ * (or is confirmed still pooled and returned as `pending`) before the next is signed. The
8097
+ * auto-nonce is the account's on-chain nonce, so a still-pooled extrinsic does not advance it: a
8098
+ * submission signed behind a pending one bounces off it (1013/1014) and is reported as pending
8099
+ * too, rather than landing as a second copy.
8087
8100
  *
8088
8101
  * The extrinsic is built rather than passed in because the api it is built on decides where it
8089
8102
  * is signed and sent: a websocket that is down when the queue reaches this submission diverts it
8090
8103
  * to {@link sendViaHttp}, which needs the call bound to the HTTP api instead.
8091
8104
  */
8092
- async signAndSendExtrinsic(build, maxRetries = 3, timeoutMs = 3e4) {
8105
+ async signAndSendExtrinsic(build, maxRetries = 3, timeoutMs = INCLUSION_TIMEOUT_MS) {
8093
8106
  const result = await this.submissionQueue.add(async () => {
8094
8107
  if (!this.api.isConnected) {
8095
8108
  try {
@@ -8127,36 +8140,72 @@ var IntentsCoprocessor = class _IntentsCoprocessor {
8127
8140
  * Signs and sends an extrinsic, handling status updates and errors.
8128
8141
  * Implements retry logic with progressive tip increases for stuck transactions.
8129
8142
  *
8130
- * A retry only happens when the previous attempt verifiably went nowhere. Once an attempt's
8131
- * extrinsic is known to be pooled (`pending`), re-signing the same call would race our own
8132
- * submission: the copy either bounces off the pool (1014, same nonce below the replacement
8133
- * priority bump) or if the original lands first, freeing the nonce — executes as a duplicate
8134
- * and fails on-chain (e.g. `BidNotFound` for a retraction). Neither can succeed, so the pending
8135
- * result is returned for the caller to confirm later.
8143
+ * Two kinds of failure are retried, and the difference is the nonce.
8144
+ *
8145
+ * An attempt that verifiably went nowhere (rejected before the pool, dropped, invalid) leaves
8146
+ * the account nonce free, so the next attempt simply re-signs with the auto-nonce.
8147
+ *
8148
+ * An attempt that reached the pool and was still there when the watch timed out (`stalled`) is
8149
+ * retried as a *replacement*: the same nonce it was signed with, and double the tip. Substrate's
8150
+ * pool evicts a pooled extrinsic in favour of a higher-priority one at the same (account, nonce),
8151
+ * so exactly one of the two can ever execute. This matters for a bid, which is worth nothing once
8152
+ * its window closes — waiting out a stalled extrinsic usually means not bidding at all.
8153
+ *
8154
+ * Re-signing without pinning the nonce is what must never happen here. The auto-nonce is read
8155
+ * from on-chain state, so it is only the stalled extrinsic's nonce for as long as that extrinsic
8156
+ * stays out of a block — and a stall is precisely the case where it may land at any moment. Once
8157
+ * it does, an unpinned retry takes the *next* nonce and both execute: a duplicate `placeBid` that
8158
+ * fails on-chain, and a second `retractBid` that pulls the bid just placed. When the signed nonce
8159
+ * cannot be read, the stalled result is returned rather than guessed at.
8160
+ *
8161
+ * A rejection that bounced off a copy already pooled (1013/1014) is likewise left alone: that
8162
+ * copy is in flight and its outcome is unknown here, so the `pending` result goes back to the
8163
+ * caller to confirm later.
8136
8164
  */
8137
8165
  async sendExtrinsicWithRetries(extrinsic, maxRetries, timeoutMs) {
8138
8166
  const keyPair = this.getKeyPair();
8139
8167
  let attempt = 0;
8168
+ let nonce;
8169
+ let stalled;
8140
8170
  while (attempt < maxRetries) {
8141
8171
  const currentTip = BASE_TIP * BigInt(2 ** attempt);
8142
8172
  attempt++;
8143
8173
  try {
8144
- const result = await this.sendWithTimeout(extrinsic, keyPair, currentTip, timeoutMs);
8145
- if (result.success || result.pending || result.error?.includes("Dispatch error")) {
8174
+ const result = await this.sendWithTimeout(extrinsic, keyPair, currentTip, timeoutMs, nonce);
8175
+ if (result.success || result.error?.includes("Dispatch error")) {
8146
8176
  return result;
8147
8177
  }
8178
+ if (result.stalled) {
8179
+ stalled = result;
8180
+ nonce ??= this.signedNonce(extrinsic);
8181
+ if (nonce === void 0) return result;
8182
+ continue;
8183
+ }
8184
+ if (result.pending) return stalled ?? result;
8148
8185
  } catch (err) {
8149
- return {
8186
+ return stalled ?? {
8150
8187
  success: false,
8151
8188
  error: err instanceof Error ? err.message : "Unknown error"
8152
8189
  };
8153
8190
  }
8154
8191
  }
8155
- return {
8192
+ return stalled ?? {
8156
8193
  success: false,
8157
8194
  error: `Transaction failed after ${maxRetries} attempts`
8158
8195
  };
8159
8196
  }
8197
+ /**
8198
+ * The nonce an extrinsic was signed with, or undefined if it carries no readable one — which is
8199
+ * the case before it has ever been signed, and for a stub api in tests.
8200
+ */
8201
+ signedNonce(extrinsic) {
8202
+ try {
8203
+ const nonce = extrinsic.nonce?.toNumber?.();
8204
+ return typeof nonce === "number" && Number.isFinite(nonce) ? nonce : void 0;
8205
+ } catch {
8206
+ return void 0;
8207
+ }
8208
+ }
8160
8209
  /**
8161
8210
  * Classifies a submission rejection. Codes 1013 ("already imported") and 1014 ("priority is
8162
8211
  * too low") both mean a copy of this account+nonce is already in the pool — almost always our
@@ -8174,10 +8223,15 @@ var IntentsCoprocessor = class _IntentsCoprocessor {
8174
8223
  *
8175
8224
  * A timeout is only a failure when the extrinsic never made it into the transaction pool.
8176
8225
  * Once a pool-entry status (Future/Ready/Broadcast/Retracted) has been seen, the extrinsic is
8177
- * in flight and may well execute after the watch is abandoned — the result is then `pending`,
8178
- * telling the caller to confirm the outcome later instead of re-signing the same call.
8226
+ * in flight and may well execute after the watch is abandoned — the result is then `pending`
8227
+ * and `stalled`, telling the caller to replace it under the same nonce or confirm it later,
8228
+ * never to re-sign the same call under a fresh one.
8229
+ *
8230
+ * `nonce` pins the submission to a specific account nonce, which is what makes a retry a pool
8231
+ * replacement rather than a second extrinsic queued behind the first. Left undefined on the
8232
+ * first attempt, where the api's auto-nonce is correct.
8179
8233
  */
8180
- async sendWithTimeout(extrinsic, keyPair, tip, timeoutMs) {
8234
+ async sendWithTimeout(extrinsic, keyPair, tip, timeoutMs, nonce) {
8181
8235
  return new Promise((resolve) => {
8182
8236
  let resolved = false;
8183
8237
  let unsubscribe = null;
@@ -8191,12 +8245,13 @@ var IntentsCoprocessor = class _IntentsCoprocessor {
8191
8245
  resolve({
8192
8246
  success: false,
8193
8247
  pending: enteredPool || void 0,
8248
+ stalled: enteredPool || void 0,
8194
8249
  extrinsicHash: enteredPool ? extrinsic.hash.toHex() : void 0,
8195
8250
  error: `Transaction timed out after ${timeoutMs}ms${enteredPool ? " while in the transaction pool" : ""}`
8196
8251
  });
8197
8252
  }
8198
8253
  }, timeoutMs);
8199
- extrinsic.signAndSend(keyPair, { tip }, (result) => {
8254
+ extrinsic.signAndSend(keyPair, nonce === void 0 ? { tip } : { tip, nonce }, (result) => {
8200
8255
  if (resolved) return;
8201
8256
  if (result.status.isFuture || result.status.isReady || result.status.isBroadcast || result.status.isRetracted) {
8202
8257
  enteredPool = true;
@@ -12033,52 +12088,85 @@ query LatestPhantomOrderPriceSnapshot($tokenA: String!, $tokenB: String!) {
12033
12088
  }
12034
12089
  }
12035
12090
  }`;
12036
- var LATEST_PHANTOM_ORDER_LIQUIDITY_SNAPSHOT = `
12037
- query LatestPhantomOrderLiquiditySnapshot($tokenA: String!, $tokenB: String!) {
12038
- phantomOrderPriceSnapshots(
12091
+ var AVAILABLE_LIQUIDITY = `
12092
+ query AvailableLiquidity(
12093
+ $poolId: String!
12094
+ $sourceChain: String!
12095
+ $destinationChain: String!
12096
+ $direction: String!
12097
+ ) {
12098
+ poolChainLiquidities(
12039
12099
  filter: {
12040
12100
  and: [
12041
- { tokenA: { equalTo: $tokenA } }
12042
- { tokenB: { equalTo: $tokenB } }
12101
+ { poolId: { equalToInsensitive: $poolId } }
12102
+ { chain: { equalTo: $destinationChain } }
12103
+ { direction: { equalTo: $direction } }
12043
12104
  ]
12044
12105
  }
12045
- orderBy: SNAPSHOT_TIME_DESC
12046
12106
  first: 1
12047
12107
  ) {
12048
12108
  nodes {
12049
- commitment
12050
- tokenA
12051
- tokenB
12052
- snapshotTime
12109
+ depth
12110
+ bidCount
12111
+ unrestrictedDepth
12112
+ unrestrictedBidCount
12113
+ lastUpdatedAt
12114
+ }
12115
+ }
12116
+ poolRoutes(
12117
+ filter: {
12118
+ and: [
12119
+ { poolId: { equalToInsensitive: $poolId } }
12120
+ { sourceChain: { equalTo: $sourceChain } }
12121
+ { chain: { equalTo: $destinationChain } }
12122
+ { direction: { equalTo: $direction } }
12123
+ ]
12124
+ }
12125
+ first: 1
12126
+ ) {
12127
+ nodes {
12128
+ depth
12129
+ bidCount
12130
+ lastUpdatedAt
12053
12131
  }
12054
12132
  }
12055
12133
  }`;
12056
- var LIQUIDITY_PROVIDER_BALANCES = `
12057
- query LiquidityProviderBalanceAggregates($commitment: String!, $tokenAddress: String!) {
12058
- liquidityProviderBalances(
12134
+ var BUY_AND_SELL_RATES = `
12135
+ query BuyAndSellRates(
12136
+ $poolId: String!
12137
+ $directChain: String!
12138
+ $directDirection: String!
12139
+ $reverseChain: String!
12140
+ $reverseDirection: String!
12141
+ ) {
12142
+ direct: poolChainLiquidities(
12059
12143
  filter: {
12060
12144
  and: [
12061
- { commitment: { equalTo: $commitment } }
12062
- { tokenAddress: { equalTo: $tokenAddress } }
12145
+ { poolId: { equalToInsensitive: $poolId } }
12146
+ { chain: { equalTo: $directChain } }
12147
+ { direction: { equalTo: $directDirection } }
12063
12148
  ]
12064
12149
  }
12150
+ first: 1
12065
12151
  ) {
12066
- aggregates {
12067
- sum {
12068
- balance
12069
- }
12070
- distinctCount {
12071
- providerId
12072
- }
12152
+ nodes {
12153
+ rate
12154
+ lastUpdatedAt
12073
12155
  }
12074
- groupedAggregates(groupBy: [CHAIN, TOKEN_ADDRESS]) {
12075
- keys
12076
- sum {
12077
- balance
12078
- }
12079
- distinctCount {
12080
- providerId
12081
- }
12156
+ }
12157
+ reverse: poolChainLiquidities(
12158
+ filter: {
12159
+ and: [
12160
+ { poolId: { equalToInsensitive: $poolId } }
12161
+ { chain: { equalTo: $reverseChain } }
12162
+ { direction: { equalTo: $reverseDirection } }
12163
+ ]
12164
+ }
12165
+ first: 1
12166
+ ) {
12167
+ nodes {
12168
+ rate
12169
+ lastUpdatedAt
12082
12170
  }
12083
12171
  }
12084
12172
  }`;
@@ -16358,12 +16446,9 @@ var OrderCanceller = class _OrderCanceller {
16358
16446
  static DEFAULT_MAX_RECOVERY_RESTARTS = 1;
16359
16447
  static PROOF_FRESHNESS_MAX_RETRIES = 3;
16360
16448
  static PROOF_FRESHNESS_BACKOFF_MS = 500;
16361
- /**
16362
- * Gas budget used to size the relayer fee for a cross-chain cancellation
16363
- * message (the GET response or RefundEscrow POST executed on the source
16364
- * chain), priced at the source chain's gas price.
16365
- */
16366
- static CANCEL_MESSAGE_GAS = 800000n;
16449
+ /** Gas budgets used to price cancellation delivery on the source chain. */
16450
+ static SOURCE_GET_RESPONSE_GAS = 1000000n;
16451
+ static REFUND_POST_GAS = 1000000n;
16367
16452
  logger = createConsola({
16368
16453
  level: LogLevels.info,
16369
16454
  formatOptions: { columns: 80, colors: true, compact: true, date: false }
@@ -16401,9 +16486,7 @@ var OrderCanceller = class _OrderCanceller {
16401
16486
  return { nativeValue: 0n, relayerFee: 0n };
16402
16487
  }
16403
16488
  const height = order.deadline + 1n;
16404
- const destIntentGateway = this.ctx.dest.configService.getIntentGatewayAddress(
16405
- destStateMachine
16406
- );
16489
+ const destIntentGateway = this.ctx.dest.configService.getIntentGatewayAddress(destStateMachine);
16407
16490
  const slotHash = await this.ctx.dest.client.readContract({
16408
16491
  abi: ABI3,
16409
16492
  address: destIntentGateway,
@@ -16424,7 +16507,7 @@ var OrderCanceller = class _OrderCanceller {
16424
16507
  };
16425
16508
  const feeInSourceFeeToken = await convertGasToFeeToken(
16426
16509
  this.ctx,
16427
- _OrderCanceller.CANCEL_MESSAGE_GAS,
16510
+ _OrderCanceller.SOURCE_GET_RESPONSE_GAS,
16428
16511
  "source",
16429
16512
  sourceStateMachine
16430
16513
  );
@@ -16970,9 +17053,7 @@ var OrderCanceller = class _OrderCanceller {
16970
17053
  return null;
16971
17054
  }
16972
17055
  async removeRecoveryItems(...keys) {
16973
- await Promise.all(
16974
- [...new Set(keys)].map((key) => this.ctx.cancellationStorage.removeItem(key))
16975
- );
17056
+ await Promise.all([...new Set(keys)].map((key) => this.ctx.cancellationStorage.removeItem(key)));
16976
17057
  }
16977
17058
  /**
16978
17059
  * Returns the order identifier required to persist or clear recovery state.
@@ -17020,7 +17101,7 @@ var OrderCanceller = class _OrderCanceller {
17020
17101
  async estimateRelayerFee(sourceChainId, destChainId) {
17021
17102
  const feeInSourceFeeToken = await convertGasToFeeToken(
17022
17103
  this.ctx,
17023
- _OrderCanceller.CANCEL_MESSAGE_GAS,
17104
+ _OrderCanceller.REFUND_POST_GAS,
17024
17105
  "source",
17025
17106
  sourceChainId
17026
17107
  );
@@ -17302,8 +17383,7 @@ var BidManager = class {
17302
17383
  );
17303
17384
  }
17304
17385
  const solverSignature = await solverSigner.signTypedData(
17305
- CryptoUtils.packedUserOpTypedData(userOp, entryPointAddress, chainId),
17306
- Number(chainId)
17386
+ CryptoUtils.packedUserOpTypedData(userOp, entryPointAddress, chainId)
17307
17387
  );
17308
17388
  const signature = concat([order.id, solverSignature]);
17309
17389
  return { ...userOp, signature };
@@ -18232,178 +18312,191 @@ var OrderStatusChecker = class {
18232
18312
  return true;
18233
18313
  }
18234
18314
  };
18235
- var COMMITMENT_PATTERN = /^0x[0-9a-f]{64}$/i;
18315
+
18316
+ // src/protocols/intents/liquidity-pool.ts
18317
+ function sortPoolSymbols(symbolA, symbolB) {
18318
+ return symbolA.toLowerCase() <= symbolB.toLowerCase() ? [symbolA, symbolB] : [symbolB, symbolA];
18319
+ }
18320
+ function poolSlug(symbolA, symbolB) {
18321
+ return sortPoolSymbols(symbolA, symbolB).join("-");
18322
+ }
18323
+ function resolveLiquidityPool(symbolA, symbolB) {
18324
+ const [token0Symbol, token1Symbol] = sortPoolSymbols(symbolA, symbolB);
18325
+ return {
18326
+ poolId: `${token0Symbol}-${token1Symbol}`,
18327
+ token0Symbol,
18328
+ token1Symbol
18329
+ };
18330
+ }
18331
+
18332
+ // src/protocols/intents/LiquidityEngine.ts
18333
+ var INDEXER_FIXED_POINT_DECIMALS = 18;
18334
+ var POOL_RATE_SCALE = 10n ** 18n;
18335
+ var SELL = "SELL";
18336
+ var BUY = "BUY";
18337
+ var USD_STABLE_SYMBOLS = /* @__PURE__ */ new Set(["USDC", "USDT"]);
18236
18338
  var LiquidityEngine = class {
18237
- /**
18238
- * @param queryClient - Nexus GraphQL client attached to the gateway.
18239
- * @param chainConfigService - Resolves token decimals for formatted results.
18240
- */
18241
- constructor(queryClient, chainConfigService) {
18339
+ constructor(queryClient) {
18242
18340
  this.queryClient = queryClient;
18243
- this.chainConfigService = chainConfigService;
18244
18341
  }
18245
18342
  queryClient;
18246
- chainConfigService;
18247
18343
  /**
18248
- * Retrieves the newest directional Phantom snapshot for a pair and its
18249
- * indexed output-token liquidity.
18344
+ * Returns liquidity reachable from one source chain on one destination.
18250
18345
  *
18251
- * Nexus filters balances to the canonical output token, then aggregates them
18252
- * overall and by chain. The returned amounts are decimal strings: the total
18253
- * uses the canonical Base output-token decimals, while each chain group uses
18254
- * that chain's token decimals. They describe `snapshotTime`, not live
18255
- * reservations or fill guarantees.
18346
+ * The caller resolves chain-specific token addresses through chain
18347
+ * configuration; this layer only maps those configured symbols onto the
18348
+ * indexer's canonical pool and route fields.
18256
18349
  *
18257
- * @param params - Canonical Phantom-market input and output token addresses.
18258
- * @returns The latest snapshot, or `undefined` if Nexus has no snapshot for
18259
- * the directional pair.
18260
- * @throws {InvalidAvailableLiquiditySnapshotError} If Nexus returns malformed
18261
- * or internally inconsistent snapshot data.
18262
- */
18263
- async getAvailableLiquiditySnapshot(params) {
18264
- const tokenIn = normalizeEvmAddress(params.tokenIn, "tokenIn");
18265
- const tokenOut = normalizeEvmAddress(params.tokenOut, "tokenOut");
18266
- const response = await this.queryClient.request(
18267
- LATEST_PHANTOM_ORDER_LIQUIDITY_SNAPSHOT,
18268
- { tokenA: tokenIn, tokenB: tokenOut }
18269
- );
18270
- const node = response?.phantomOrderPriceSnapshots?.nodes?.[0];
18271
- if (!node) return;
18272
- const commitment = node.commitment.toLowerCase();
18273
- if (!COMMITMENT_PATTERN.test(commitment)) {
18274
- throw new InvalidAvailableLiquiditySnapshotError(commitment || "<missing>", "commitment is not bytes32 hex");
18275
- }
18276
- if (node.tokenA.toLowerCase() !== tokenIn || node.tokenB.toLowerCase() !== tokenOut) {
18277
- throw new InvalidAvailableLiquiditySnapshotError(commitment, "snapshot token pair does not match the query");
18278
- }
18279
- const snapshotTime = new Date(dateStringtoTimestamp(node.snapshotTime));
18280
- if (Number.isNaN(snapshotTime.getTime())) {
18281
- throw new InvalidAvailableLiquiditySnapshotError(commitment, "snapshotTime is invalid");
18350
+ * Destination, unrestricted, and explicit-route capacity are returned as
18351
+ * separate values so callers can apply their own source-chain policy.
18352
+ *
18353
+ * @returns `undefined` only when the indexer has not published a destination
18354
+ * pool sample yet.
18355
+ */
18356
+ async getAvailableLiquidity(params) {
18357
+ const pool = resolveLiquidityPool(params.source.symbol, params.destination.symbol);
18358
+ const direction = params.source.symbol.toLowerCase() === pool.token0Symbol.toLowerCase() ? SELL : BUY;
18359
+ const variables = {
18360
+ poolId: pool.poolId,
18361
+ sourceChain: params.source.chain,
18362
+ destinationChain: params.destination.chain,
18363
+ direction
18364
+ };
18365
+ const response = await this.queryClient.request(AVAILABLE_LIQUIDITY, variables);
18366
+ if (!response?.poolChainLiquidities?.nodes || !response?.poolRoutes?.nodes) {
18367
+ throw new InvalidLiquidityIndexerResponseError("liquidity connections are missing");
18282
18368
  }
18283
- const { totalLiquidity, providerCount, liquidityByChain } = await this.querySnapshotLiquidityAggregates({
18284
- commitment,
18285
- tokenAddress: tokenOut
18286
- });
18369
+ const chainLiquidity = response.poolChainLiquidities.nodes[0];
18370
+ if (!chainLiquidity) return void 0;
18371
+ const route = response.poolRoutes.nodes[0];
18287
18372
  return {
18288
- totalLiquidity: this.formatLiquidity(totalLiquidity, "EVM-8453" /* BASE_MAINNET */, tokenOut, commitment),
18289
- providerCount,
18290
- tokenAddress: tokenOut,
18291
- snapshotTime,
18292
- liquidityByChain: liquidityByChain.map((group) => ({
18293
- ...group,
18294
- totalLiquidity: this.formatLiquidity(group.totalLiquidity, group.chain, group.tokenAddress, commitment)
18295
- }))
18373
+ sourceChain: params.source.chain,
18374
+ destinationChain: params.destination.chain,
18375
+ tokenAddress: normalizeEvmAddress(params.destination.address, "destination token"),
18376
+ updatedAt: readIndexerDate(chainLiquidity.lastUpdatedAt, "destination lastUpdatedAt"),
18377
+ destination: readLiquiditySlice(chainLiquidity.depth, chainLiquidity.bidCount, "destination"),
18378
+ unrestricted: readLiquiditySlice(
18379
+ chainLiquidity.unrestrictedDepth,
18380
+ chainLiquidity.unrestrictedBidCount,
18381
+ "unrestricted"
18382
+ ),
18383
+ explicitRoute: route ? {
18384
+ ...readLiquiditySlice(route.depth, route.bidCount, "explicit route"),
18385
+ updatedAt: readIndexerDate(route.lastUpdatedAt, "route lastUpdatedAt")
18386
+ } : null
18296
18387
  };
18297
18388
  }
18298
18389
  /**
18299
- * Requests server-side sums and distinct provider counts for one immutable
18300
- * snapshot/output-token pair, including chain-level aggregate groups.
18390
+ * Returns chain-specific buy and sell rates in less-valued quote-token units
18391
+ * per one base token.
18301
18392
  *
18302
- * `commitment` uniquely identifies the selected snapshot
18303
- */
18304
- async querySnapshotLiquidityAggregates(params) {
18305
- const response = await this.queryClient.request(
18306
- LIQUIDITY_PROVIDER_BALANCES,
18307
- { commitment: params.commitment, tokenAddress: params.tokenAddress }
18308
- );
18309
- const connection = response?.liquidityProviderBalances;
18310
- const aggregates = connection?.aggregates;
18311
- if (!connection || !aggregates) {
18312
- throw new InvalidAvailableLiquiditySnapshotError(
18313
- params.commitment,
18314
- "liquidityProviderBalances aggregates are missing"
18315
- );
18316
- }
18317
- const totalLiquidity = parseSnapshotBigInt(aggregates.sum.balance ?? "0", params.commitment, "total balance");
18318
- const providerCount = parseProviderCount(aggregates.distinctCount.providerId, params.commitment, "total");
18319
- const liquidityByChain = connection.groupedAggregates.map((group, index) => {
18320
- const [chain, tokenAddress] = group.keys;
18321
- if (!chain?.trim() || !tokenAddress) {
18322
- throw new InvalidAvailableLiquiditySnapshotError(
18323
- params.commitment,
18324
- `liquidity group ${index} has invalid keys`
18325
- );
18326
- }
18327
- const normalizedTokenAddress = normalizeIndexedLiquidityAddress(
18328
- tokenAddress,
18329
- params.commitment,
18330
- `liquidity group ${index} tokenAddress`
18331
- );
18332
- if (normalizedTokenAddress !== params.tokenAddress) {
18333
- throw new InvalidAvailableLiquiditySnapshotError(
18334
- params.commitment,
18335
- `liquidity group ${index} tokenAddress does not match the snapshot output token`
18336
- );
18337
- }
18338
- return {
18339
- chain: chain.trim(),
18340
- tokenAddress: normalizedTokenAddress,
18341
- totalLiquidity: parseSnapshotBigInt(
18342
- group.sum.balance ?? "0",
18343
- params.commitment,
18344
- `liquidity group ${index} balance`
18345
- ),
18346
- providerCount: parseProviderCount(
18347
- group.distinctCount.providerId,
18348
- params.commitment,
18349
- `liquidity group ${index}`
18350
- )
18351
- };
18393
+ * The requested direction is read on the destination chain; its reverse is
18394
+ * read on the source chain. This mirrors where each direction's output token
18395
+ * must be delivered for a cross-chain trade.
18396
+ */
18397
+ async getBuyAndSellRates(params) {
18398
+ const pool = resolveLiquidityPool(params.tokenInSymbol, params.tokenOutSymbol);
18399
+ const directDirection = params.tokenInSymbol.toLowerCase() === pool.token0Symbol.toLowerCase() ? SELL : BUY;
18400
+ const reverseDirection = directDirection === SELL ? BUY : SELL;
18401
+ const response = await this.queryClient.request(BUY_AND_SELL_RATES, {
18402
+ poolId: pool.poolId,
18403
+ directChain: params.destinationChain,
18404
+ directDirection,
18405
+ reverseChain: params.sourceChain,
18406
+ reverseDirection
18352
18407
  });
18353
- const groupedTotal = liquidityByChain.reduce((sum, group) => sum + group.totalLiquidity, 0n);
18354
- if (groupedTotal !== totalLiquidity) {
18355
- throw new InvalidAvailableLiquiditySnapshotError(
18356
- params.commitment,
18357
- "grouped liquidity does not match the total liquidity"
18358
- );
18359
- }
18360
- return { totalLiquidity, providerCount, liquidityByChain };
18408
+ if (!response?.direct?.nodes || !response?.reverse?.nodes) {
18409
+ throw new InvalidLiquidityIndexerResponseError("rate connections are missing");
18410
+ }
18411
+ const direct = readIndexedRate(response.direct.nodes[0], "direct rate");
18412
+ const reverse = readIndexedRate(response.reverse.nodes[0], "reverse rate");
18413
+ if (!direct && !reverse) return void 0;
18414
+ const quoteTokenSymbol = resolveQuoteTokenSymbol(
18415
+ params.tokenInSymbol,
18416
+ params.tokenOutSymbol,
18417
+ direct?.scaledRate,
18418
+ reverse?.scaledRate
18419
+ );
18420
+ const quoteIsTokenOut = quoteTokenSymbol === params.tokenOutSymbol;
18421
+ const buy = quoteIsTokenOut ? direct : reverse;
18422
+ const sell = quoteIsTokenOut ? reverse : direct;
18423
+ return {
18424
+ baseTokenSymbol: quoteIsTokenOut ? params.tokenInSymbol : params.tokenOutSymbol,
18425
+ quoteTokenSymbol,
18426
+ sourceChain: params.sourceChain,
18427
+ destinationChain: params.destinationChain,
18428
+ buyRate: buy ? formatUnits(buy.scaledRate, INDEXER_FIXED_POINT_DECIMALS) : null,
18429
+ sellRate: sell ? formatUnits(reciprocalRate(sell.scaledRate, "sell rate"), INDEXER_FIXED_POINT_DECIMALS) : null,
18430
+ buyRateUpdatedAt: buy?.updatedAt ?? null,
18431
+ sellRateUpdatedAt: sell?.updatedAt ?? null
18432
+ };
18361
18433
  }
18362
- /** Formats a raw amount using the configured decimals for its chain/token. */
18363
- formatLiquidity(amount, chain, tokenAddress, commitment) {
18364
- const decimals = this.chainConfigService.getAssetMetadataByAddress(chain, tokenAddress)?.decimals;
18365
- if (decimals === void 0) {
18366
- throw new InvalidAvailableLiquiditySnapshotError(
18367
- commitment,
18368
- `token decimals are not configured for ${tokenAddress} on ${chain}`
18369
- );
18370
- }
18371
- return formatUnits(amount, decimals);
18434
+ };
18435
+ var InvalidLiquidityIndexerResponseError = class extends Error {
18436
+ constructor(reason) {
18437
+ super(`Invalid liquidity indexer response: ${reason}`);
18438
+ this.name = "InvalidLiquidityIndexerResponseError";
18372
18439
  }
18373
18440
  };
18374
- var InvalidAvailableLiquiditySnapshotError = class extends Error {
18375
- /** Creates an error that identifies the invalid snapshot and field/reason. */
18376
- constructor(commitment, reason) {
18377
- super(`Invalid available-liquidity snapshot ${commitment}: ${reason}`);
18378
- this.name = "InvalidAvailableLiquiditySnapshotError";
18441
+ var UnsupportedLiquidityAssetError = class extends Error {
18442
+ constructor(chain, asset) {
18443
+ super(`No configured liquidity asset found for ${asset} on ${chain}`);
18444
+ this.name = "UnsupportedLiquidityAssetError";
18445
+ }
18446
+ };
18447
+ var UnsupportedLiquidityChainError = class extends Error {
18448
+ constructor(chainId) {
18449
+ super(`No configured liquidity chain found for chain ID ${chainId}`);
18450
+ this.name = "UnsupportedLiquidityChainError";
18379
18451
  }
18380
18452
  };
18381
- function parseSnapshotBigInt(value, commitment, field) {
18453
+ function readLiquiditySlice(depth, providerCount, label) {
18454
+ if (!Number.isSafeInteger(providerCount) || providerCount < 0) {
18455
+ throw new InvalidLiquidityIndexerResponseError(`${label} provider count is invalid`);
18456
+ }
18457
+ return { totalLiquidity: formatIndexerAmount(depth, `${label} depth`), providerCount };
18458
+ }
18459
+ function formatIndexerAmount(value, label) {
18382
18460
  try {
18383
18461
  const amount = BigInt(value);
18384
- if (amount < 0n) {
18385
- throw new InvalidAvailableLiquiditySnapshotError(commitment, `${field} cannot be negative`);
18386
- }
18387
- return amount;
18388
- } catch (error) {
18389
- if (error instanceof InvalidAvailableLiquiditySnapshotError) throw error;
18390
- throw new InvalidAvailableLiquiditySnapshotError(commitment, `${field} is not an integer`);
18462
+ if (amount < 0n) throw new Error();
18463
+ return formatUnits(amount, INDEXER_FIXED_POINT_DECIMALS);
18464
+ } catch {
18465
+ throw new InvalidLiquidityIndexerResponseError(`${label} is not a non-negative integer`);
18391
18466
  }
18392
18467
  }
18393
- function parseProviderCount(value, commitment, field) {
18394
- const count = Number(value);
18395
- if (!Number.isSafeInteger(count) || count < 0) {
18396
- throw new InvalidAvailableLiquiditySnapshotError(commitment, `${field} provider count is invalid`);
18397
- }
18398
- return count;
18468
+ function readIndexerDate(value, label) {
18469
+ const date = new Date(dateStringtoTimestamp(value));
18470
+ if (Number.isNaN(date.getTime())) throw new InvalidLiquidityIndexerResponseError(`${label} is invalid`);
18471
+ return date;
18399
18472
  }
18400
- function normalizeIndexedLiquidityAddress(address, commitment, field) {
18473
+ function readIndexedRate(node, label) {
18474
+ if (!node) return void 0;
18401
18475
  try {
18402
- return normalizeEvmAddress(address, field);
18403
- } catch {
18404
- throw new InvalidAvailableLiquiditySnapshotError(commitment, `${field} is not a valid EVM address`);
18476
+ const scaledRate = BigInt(node.rate);
18477
+ if (scaledRate <= 0n) throw new Error();
18478
+ return {
18479
+ scaledRate,
18480
+ updatedAt: readIndexerDate(node.lastUpdatedAt, `${label} lastUpdatedAt`)
18481
+ };
18482
+ } catch (error) {
18483
+ if (error instanceof InvalidLiquidityIndexerResponseError) throw error;
18484
+ throw new InvalidLiquidityIndexerResponseError(`${label} is not a positive integer`);
18405
18485
  }
18406
18486
  }
18487
+ function resolveQuoteTokenSymbol(tokenInSymbol, tokenOutSymbol, directRate, reverseRate) {
18488
+ const inputIsUsdStable = USD_STABLE_SYMBOLS.has(tokenInSymbol);
18489
+ const outputIsUsdStable = USD_STABLE_SYMBOLS.has(tokenOutSymbol);
18490
+ if (inputIsUsdStable !== outputIsUsdStable) return inputIsUsdStable ? tokenOutSymbol : tokenInSymbol;
18491
+ if (directRate !== void 0) return directRate >= POOL_RATE_SCALE ? tokenOutSymbol : tokenInSymbol;
18492
+ if (reverseRate !== void 0) return reverseRate >= POOL_RATE_SCALE ? tokenInSymbol : tokenOutSymbol;
18493
+ throw new InvalidLiquidityIndexerResponseError("cannot orient an empty rate pair");
18494
+ }
18495
+ function reciprocalRate(rate, label) {
18496
+ const reciprocal = POOL_RATE_SCALE * POOL_RATE_SCALE / rate;
18497
+ if (reciprocal <= 0n) throw new InvalidLiquidityIndexerResponseError(`${label} reciprocal underflowed`);
18498
+ return reciprocal;
18499
+ }
18407
18500
 
18408
18501
  // src/protocols/intents/quote/types.ts
18409
18502
  var UnsupportedIntentQuoteStrategyError = class extends Error {
@@ -18828,8 +18921,6 @@ var IntentGateway = class _IntentGateway {
18828
18921
  gasEstimator;
18829
18922
  /** Quote strategies for pricing orders before placement, keyed by strategy name. */
18830
18923
  quoteStrategies;
18831
- /** Resolves order tokens to canonical Phantom snapshot market pairs. */
18832
- phantomSnapshotPairResolver;
18833
18924
  /**
18834
18925
  * Private constructor — use {@link IntentGateway.create} instead.
18835
18926
  *
@@ -18873,7 +18964,6 @@ var IntentGateway = class _IntentGateway {
18873
18964
  this.bidManager = bidManager;
18874
18965
  this.gasEstimator = gasEstimator;
18875
18966
  this._crypto = crypto;
18876
- this.phantomSnapshotPairResolver = new PhantomSnapshotPairResolver(dest.configService);
18877
18967
  this.quoteStrategies = {
18878
18968
  phantom_snapshot: new PhantomSnapshotIntentQuoteStrategy(
18879
18969
  dest.configService,
@@ -18953,33 +19043,62 @@ var IntentGateway = class _IntentGateway {
18953
19043
  return handler.quote({ ...params, strategy }, source, destination);
18954
19044
  }
18955
19045
  /**
18956
- * Returns the output-token liquidity measured in the latest directional
18957
- * Phantom snapshot for this gateway's source and destination.
19046
+ * Returns indexed destination liquidity and its source-routing slices.
18958
19047
  *
18959
- * Pair resolution uses the same canonical Base market as {@link quoteIntent}.
18960
- * The snapshot itself determines the output token and chain to aggregate. The
18961
- * amount is in the token's smallest unit and reflects the indexer's
18962
- * `snapshotTime`; it is not a live reservation or fill guarantee.
19048
+ * Destination, unrestricted, and explicit-route capacity come exclusively
19049
+ * from the indexer's pair-centric liquidity entities. The SDK does not decide
19050
+ * whether unrestricted bidders cover the source chain. Amounts reflect the
19051
+ * latest rolling sample; they are not reservations or fill guarantees.
18963
19052
  *
18964
19053
  * Requires a prior call to {@link withQueryClient}.
18965
19054
  */
18966
19055
  async queryAvailableLiquidity(params) {
18967
19056
  const { queryClient } = this.requireIndexer();
18968
- const sourceStateMachineId = this.source.config.stateMachineId;
18969
- const destinationStateMachineId = this.dest.config.stateMachineId;
18970
- const pair = this.phantomSnapshotPairResolver.resolve(params, sourceStateMachineId, destinationStateMachineId);
18971
- if (!pair) {
18972
- throw new UnsupportedIntentQuotePairError({
18973
- source: sourceStateMachineId,
18974
- destination: destinationStateMachineId,
18975
- tokenIn: params.tokenIn,
18976
- tokenOut: params.tokenOut,
18977
- quoteSource: "Phantom snapshot pair"
18978
- });
18979
- }
18980
- return new LiquidityEngine(queryClient, this.dest.configService).getAvailableLiquiditySnapshot({
18981
- tokenIn: pair.tokenA,
18982
- tokenOut: pair.tokenB
19057
+ const sourceStateMachineId = getConfigByStateMachineId(this.source.config.stateMachineId)?.stateMachineId;
19058
+ const destinationStateMachineId = getConfigByStateMachineId(this.dest.config.stateMachineId)?.stateMachineId;
19059
+ if (!sourceStateMachineId) throw new UnsupportedLiquidityChainError(this.source.config.stateMachineId);
19060
+ if (!destinationStateMachineId) throw new UnsupportedLiquidityChainError(this.dest.config.stateMachineId);
19061
+ const sourceToken = this.source.configService.getAssetMetadataByAddress(sourceStateMachineId, params.tokenIn);
19062
+ const destinationToken = this.dest.configService.getAssetMetadataByAddress(
19063
+ destinationStateMachineId,
19064
+ params.tokenOut
19065
+ );
19066
+ if (!sourceToken) throw new UnsupportedLiquidityAssetError(sourceStateMachineId, params.tokenIn);
19067
+ if (!destinationToken) throw new UnsupportedLiquidityAssetError(destinationStateMachineId, params.tokenOut);
19068
+ return new LiquidityEngine(queryClient).getAvailableLiquidity({
19069
+ source: {
19070
+ chain: sourceStateMachineId,
19071
+ ...sourceToken
19072
+ },
19073
+ destination: {
19074
+ chain: destinationStateMachineId,
19075
+ ...destinationToken
19076
+ }
19077
+ });
19078
+ }
19079
+ /**
19080
+ * Returns chain-specific buy and sell rates in less-valued quote-token units
19081
+ * without requiring token addresses. Symbols are matched case-insensitively;
19082
+ * chain IDs are numeric IDs for chains configured in the SDK.
19083
+ */
19084
+ async queryBuyAndSellRates(params) {
19085
+ const { queryClient } = this.requireIndexer();
19086
+ const sourceChain = chainConfigs[params.sourceChainId]?.stateMachineId;
19087
+ const destinationChain = chainConfigs[params.destinationChainId]?.stateMachineId;
19088
+ if (!sourceChain) throw new UnsupportedLiquidityChainError(params.sourceChainId);
19089
+ if (!destinationChain) throw new UnsupportedLiquidityChainError(params.destinationChainId);
19090
+ const sourceToken = this.source.configService.getAssetMetadataBySymbol(sourceChain, params.tokenInSymbol);
19091
+ const destinationToken = this.dest.configService.getAssetMetadataBySymbol(
19092
+ destinationChain,
19093
+ params.tokenOutSymbol
19094
+ );
19095
+ if (!sourceToken) throw new UnsupportedLiquidityAssetError(sourceChain, params.tokenInSymbol);
19096
+ if (!destinationToken) throw new UnsupportedLiquidityAssetError(destinationChain, params.tokenOutSymbol);
19097
+ return new LiquidityEngine(queryClient).getBuyAndSellRates({
19098
+ sourceChain,
19099
+ destinationChain,
19100
+ tokenInSymbol: sourceToken.symbol,
19101
+ tokenOutSymbol: destinationToken.symbol
18983
19102
  });
18984
19103
  }
18985
19104
  /**
@@ -24081,6 +24200,6 @@ async function teleportDot(param_) {
24081
24200
  return stream;
24082
24201
  }
24083
24202
 
24084
- export { ADDRESS_ZERO2 as ADDRESS_ZERO, BundlerMethod, ChainConfigService, Chains, CryptoUtils, DEFAULT_ADDRESS, DEFAULT_GRAFFITI, DOMAIN_TYPEHASH, DUMMY_PRIVATE_KEY, ERC20Method, ERC7821_BATCH_MODE, EvmChain, ABI as EvmHostABI, EvmLanguage, HyperClientStatus, HyperFungibleToken, HyperFungibleTokenABI, IntentGateway, ABI3 as IntentGatewayABI, IntentOrderStatus, IntentsCoprocessor, InvalidPhantomSnapshotError, IsmpClient, MOCK_ADDRESS, ORDER_V2_PARAM_TYPE, OrderStatus, OrderStatusChecker, PACKED_USEROP_TYPEHASH, PLACE_ORDER_SELECTOR, PhantomSnapshotUnavailableError, PharosChain, PolkadotHubChain, REQUEST_COMMITMENTS_SLOT, REQUEST_RECEIPTS_SLOT, RESPONSE_COMMITMENTS_SLOT, RESPONSE_RECEIPTS_SLOT, RequestKind, RequestStatus, SELECT_SOLVER_TYPEHASH, STATE_COMMITMENTS_SLOT, SubstrateChain, Swap, TESTNET_CHAINS, TeleportStatus, TimeoutStatus, TokenGateway, TronChain, USE_ETHERSCAN_CHAINS, UnsupportedIntentQuotePairError, UnsupportedIntentQuoteStrategyError, WrappedHyperFungibleTokenABI, __test, adjustDecimals, bytes20ToBytes32, bytes32ToBytes20, calculateAllowanceMappingLocation, calculateBalanceMappingLocation, chainConfigs, constructRedeemEscrowRequestBody, constructRefundEscrowRequestBody, convertCodecToIGetRequest, convertCodecToIProof, convertIGetRequestToCodec, convertIProofToCodec, convertStateIdToStateMachineId, convertStateMachineEnumToString, convertStateMachineIdToEnum, createEvmChain, createQueryClient, decodeAcceptedSourceChains, decodeERC7821ExecuteBatch, decodePhantomBidDeclaration, decodeUserOpScale, deriveHttpUrl, encodeAcceptedSourceChains, encodeERC7821ExecuteBatch, encodeISMPMessage, encodePhantomBidDeclaration, encodeStateMachineId, encodeUserOpScale, encodeWithdrawalRequest, estimateGasForPost, fetchPrice, fetchSourceProof, generateRootWithProof, getChainId, getConfigByStateMachineId, getContractCallInput, getContractCallInputs, getGasPriceFromEtherscan, getOrFetchStorageSlot, getOrderPlacedFromTx, getPostRequestEventFromTx, getPostResponseEventFromTx, getRequestCommitment, getStateCommitmentFieldSlot, getStateCommitmentSlot, getStorageSlot, getViemChain, hexToString, hyperbridgeAddress, maxBigInt, normalizeAddressForEvmBytes32, normalizeAddressForStateMachine, normalizeEvmAddress, normalizeEvmChainId, normalizeStateMachineId, orderCommitment, parseStateMachineId, pharosAtlantic, pharosMainnet, polkadotAssetHubPaseo, polkadotHubMainnet, postRequestCommitment, queryAssetTeleported, queryGetRequest, queryPostRequest, quoteUniswap, requestCommitmentKey, responseCommitmentKey, retryPromise, teleport, teleportDot, transformOrderForContract, tronChainIds, tronNile };
24203
+ export { ADDRESS_ZERO2 as ADDRESS_ZERO, BundlerMethod, ChainConfigService, Chains, CryptoUtils, DEFAULT_ADDRESS, DEFAULT_GRAFFITI, DOMAIN_TYPEHASH, DUMMY_PRIVATE_KEY, ERC20Method, ERC7821_BATCH_MODE, EvmChain, ABI as EvmHostABI, EvmLanguage, HyperClientStatus, HyperFungibleToken, HyperFungibleTokenABI, INCLUSION_TIMEOUT_MS, IntentGateway, ABI3 as IntentGatewayABI, IntentOrderStatus, IntentsCoprocessor, InvalidLiquidityIndexerResponseError, InvalidPhantomSnapshotError, IsmpClient, MOCK_ADDRESS, ORDER_V2_PARAM_TYPE, OrderStatus, OrderStatusChecker, PACKED_USEROP_TYPEHASH, PLACE_ORDER_SELECTOR, PhantomSnapshotUnavailableError, PharosChain, PolkadotHubChain, REQUEST_COMMITMENTS_SLOT, REQUEST_RECEIPTS_SLOT, RESPONSE_COMMITMENTS_SLOT, RESPONSE_RECEIPTS_SLOT, RequestKind, RequestStatus, SELECT_SOLVER_TYPEHASH, STATE_COMMITMENTS_SLOT, SubstrateChain, Swap, TESTNET_CHAINS, TeleportStatus, TimeoutStatus, TokenGateway, TronChain, USE_ETHERSCAN_CHAINS, UnsupportedIntentQuotePairError, UnsupportedIntentQuoteStrategyError, UnsupportedLiquidityAssetError, UnsupportedLiquidityChainError, WrappedHyperFungibleTokenABI, __test, adjustDecimals, bytes20ToBytes32, bytes32ToBytes20, calculateAllowanceMappingLocation, calculateBalanceMappingLocation, chainConfigs, constructRedeemEscrowRequestBody, constructRefundEscrowRequestBody, convertCodecToIGetRequest, convertCodecToIProof, convertIGetRequestToCodec, convertIProofToCodec, convertStateIdToStateMachineId, convertStateMachineEnumToString, convertStateMachineIdToEnum, createEvmChain, createQueryClient, decodeAcceptedSourceChains, decodeERC7821ExecuteBatch, decodePhantomBidDeclaration, decodeUserOpScale, deriveHttpUrl, encodeAcceptedSourceChains, encodeERC7821ExecuteBatch, encodeISMPMessage, encodePhantomBidDeclaration, encodeStateMachineId, encodeUserOpScale, encodeWithdrawalRequest, estimateGasForPost, fetchPrice, fetchSourceProof, generateRootWithProof, getChainId, getConfigByStateMachineId, getContractCallInput, getContractCallInputs, getGasPriceFromEtherscan, getOrFetchStorageSlot, getOrderPlacedFromTx, getPostRequestEventFromTx, getPostResponseEventFromTx, getRequestCommitment, getStateCommitmentFieldSlot, getStateCommitmentSlot, getStorageSlot, getViemChain, hexToString, hyperbridgeAddress, maxBigInt, normalizeAddressForEvmBytes32, normalizeAddressForStateMachine, normalizeEvmAddress, normalizeEvmChainId, normalizeStateMachineId, orderCommitment, parseStateMachineId, pharosAtlantic, pharosMainnet, polkadotAssetHubPaseo, polkadotHubMainnet, poolSlug, postRequestCommitment, queryAssetTeleported, queryGetRequest, queryPostRequest, quoteUniswap, requestCommitmentKey, responseCommitmentKey, retryPromise, sortPoolSymbols, teleport, teleportDot, transformOrderForContract, tronChainIds, tronNile };
24085
24204
  //# sourceMappingURL=index.js.map
24086
24205
  //# sourceMappingURL=index.js.map