@hyperbridge/sdk 2.4.0 → 2.4.2

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.
@@ -2479,30 +2479,30 @@ var handlerV2_default = { ABI: ABI2 };
2479
2479
  function tronAddress(base58) {
2480
2480
  return `0x${TronWeb.address.toHex(base58).slice(2)}`;
2481
2481
  }
2482
- var Chains = /* @__PURE__ */ ((Chains3) => {
2483
- Chains3["BSC_CHAPEL"] = "EVM-97";
2484
- Chains3["GNOSIS_CHIADO"] = "EVM-10200";
2485
- Chains3["HYPERBRIDGE_GARGANTUA"] = "KUSAMA-4009";
2486
- Chains3["SEPOLIA"] = "EVM-11155111";
2487
- Chains3["MAINNET"] = "EVM-1";
2488
- Chains3["BSC_MAINNET"] = "EVM-56";
2489
- Chains3["ARBITRUM_MAINNET"] = "EVM-42161";
2490
- Chains3["ARBITRUM_SEPOLIA"] = "EVM-421614";
2491
- Chains3["BASE_MAINNET"] = "EVM-8453";
2492
- Chains3["BASE_SEPOLIA"] = "EVM-84532";
2493
- Chains3["OPTIMISM_MAINNET"] = "EVM-10";
2494
- Chains3["OPTIMISM_SEPOLIA"] = "EVM-11155420";
2495
- Chains3["GNOSIS_MAINNET"] = "EVM-100";
2496
- Chains3["SONEIUM_MAINNET"] = "EVM-1868";
2497
- Chains3["POLYGON_MAINNET"] = "EVM-137";
2498
- Chains3["POLKADOT_HUB_MAINNET"] = "EVM-420420419";
2499
- Chains3["POLYGON_AMOY"] = "EVM-80002";
2500
- Chains3["POLKADOT_ASSET_HUB_PASEO"] = "EVM-420420417";
2501
- Chains3["TRON_MAINNET"] = "EVM-728126428";
2502
- Chains3["TRON_NILE"] = "EVM-3448148188";
2503
- Chains3["PHAROS_MAINNET"] = "EVM-688600";
2504
- Chains3["PHAROS_ATLANTIC"] = "EVM-688689";
2505
- return Chains3;
2482
+ var Chains = /* @__PURE__ */ ((Chains2) => {
2483
+ Chains2["BSC_CHAPEL"] = "EVM-97";
2484
+ Chains2["GNOSIS_CHIADO"] = "EVM-10200";
2485
+ Chains2["HYPERBRIDGE_GARGANTUA"] = "KUSAMA-4009";
2486
+ Chains2["SEPOLIA"] = "EVM-11155111";
2487
+ Chains2["MAINNET"] = "EVM-1";
2488
+ Chains2["BSC_MAINNET"] = "EVM-56";
2489
+ Chains2["ARBITRUM_MAINNET"] = "EVM-42161";
2490
+ Chains2["ARBITRUM_SEPOLIA"] = "EVM-421614";
2491
+ Chains2["BASE_MAINNET"] = "EVM-8453";
2492
+ Chains2["BASE_SEPOLIA"] = "EVM-84532";
2493
+ Chains2["OPTIMISM_MAINNET"] = "EVM-10";
2494
+ Chains2["OPTIMISM_SEPOLIA"] = "EVM-11155420";
2495
+ Chains2["GNOSIS_MAINNET"] = "EVM-100";
2496
+ Chains2["SONEIUM_MAINNET"] = "EVM-1868";
2497
+ Chains2["POLYGON_MAINNET"] = "EVM-137";
2498
+ Chains2["POLKADOT_HUB_MAINNET"] = "EVM-420420419";
2499
+ Chains2["POLYGON_AMOY"] = "EVM-80002";
2500
+ Chains2["POLKADOT_ASSET_HUB_PASEO"] = "EVM-420420417";
2501
+ Chains2["TRON_MAINNET"] = "EVM-728126428";
2502
+ Chains2["TRON_NILE"] = "EVM-3448148188";
2503
+ Chains2["PHAROS_MAINNET"] = "EVM-688600";
2504
+ Chains2["PHAROS_ATLANTIC"] = "EVM-688689";
2505
+ return Chains2;
2506
2506
  })(Chains || {});
2507
2507
  var polkadotAssetHubPaseo = defineChain({
2508
2508
  id: 420420417,
@@ -2693,7 +2693,7 @@ var chainConfigs = {
2693
2693
  },
2694
2694
  addresses: {
2695
2695
  IntentGateway: "0xAe041F7B0CB581876832830baeB6a2Aa2a3C9716",
2696
- SolverAccount: "0x3bdB532d91F165BeFad5542700205f5BB5152a82",
2696
+ SolverAccount: "0xfCd233b937D7622AAc63ced3C9A1A12F4a6B64E3",
2697
2697
  TokenGateway: "0xFd413e3AFe560182C4471F4d143A96d3e259B6dE",
2698
2698
  Host: "0x620128E2B19193d6Bd244a3AC8D3bBa0541B19c3",
2699
2699
  UniswapRouter02: "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
@@ -2748,7 +2748,7 @@ var chainConfigs = {
2748
2748
  },
2749
2749
  addresses: {
2750
2750
  IntentGateway: "0xAe041F7B0CB581876832830baeB6a2Aa2a3C9716",
2751
- SolverAccount: "0x3bdB532d91F165BeFad5542700205f5BB5152a82",
2751
+ SolverAccount: "0xfCd233b937D7622AAc63ced3C9A1A12F4a6B64E3",
2752
2752
  TokenGateway: "0xFd413e3AFe560182C4471F4d143A96d3e259B6dE",
2753
2753
  Host: "0x620128E2B19193d6Bd244a3AC8D3bBa0541B19c3",
2754
2754
  UniswapRouter02: "0x10ED43C718714eb63d5aA57B78B54704E256024E",
@@ -2804,7 +2804,7 @@ var chainConfigs = {
2804
2804
  },
2805
2805
  addresses: {
2806
2806
  IntentGateway: "0xAe041F7B0CB581876832830baeB6a2Aa2a3C9716",
2807
- SolverAccount: "0x3bdB532d91F165BeFad5542700205f5BB5152a82",
2807
+ SolverAccount: "0xfCd233b937D7622AAc63ced3C9A1A12F4a6B64E3",
2808
2808
  TokenGateway: "0xFd413e3AFe560182C4471F4d143A96d3e259B6dE",
2809
2809
  Host: "0x620128E2B19193d6Bd244a3AC8D3bBa0541B19c3",
2810
2810
  UniswapRouter02: "0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24",
@@ -2861,7 +2861,7 @@ var chainConfigs = {
2861
2861
  },
2862
2862
  addresses: {
2863
2863
  IntentGateway: "0xAe041F7B0CB581876832830baeB6a2Aa2a3C9716",
2864
- SolverAccount: "0x3bdB532d91F165BeFad5542700205f5BB5152a82",
2864
+ SolverAccount: "0xfCd233b937D7622AAc63ced3C9A1A12F4a6B64E3",
2865
2865
  TokenGateway: "0xFd413e3AFe560182C4471F4d143A96d3e259B6dE",
2866
2866
  Host: "0x620128E2B19193d6Bd244a3AC8D3bBa0541B19c3",
2867
2867
  UniswapRouter02: "0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24",
@@ -2920,7 +2920,7 @@ var chainConfigs = {
2920
2920
  },
2921
2921
  addresses: {
2922
2922
  IntentGateway: "0xAe041F7B0CB581876832830baeB6a2Aa2a3C9716",
2923
- SolverAccount: "0x3bdB532d91F165BeFad5542700205f5BB5152a82",
2923
+ SolverAccount: "0xfCd233b937D7622AAc63ced3C9A1A12F4a6B64E3",
2924
2924
  TokenGateway: "0x8b536105b6Fae2aE9199f5146D3C57Dfe53b614E",
2925
2925
  Host: "0x620128E2B19193d6Bd244a3AC8D3bBa0541B19c3",
2926
2926
  UniswapRouter02: "0xd2f9496824951D5237cC71245D659E48d0d5f9E8",
@@ -3031,7 +3031,7 @@ var chainConfigs = {
3031
3031
  },
3032
3032
  addresses: {
3033
3033
  IntentGateway: "0xAe041F7B0CB581876832830baeB6a2Aa2a3C9716",
3034
- SolverAccount: "0x3bdB532d91F165BeFad5542700205f5BB5152a82",
3034
+ SolverAccount: "0xfCd233b937D7622AAc63ced3C9A1A12F4a6B64E3",
3035
3035
  TokenGateway: "0xFd413e3AFe560182C4471F4d143A96d3e259B6dE",
3036
3036
  Host: "0x620128E2B19193d6Bd244a3AC8D3bBa0541B19c3",
3037
3037
  UniswapRouter02: "0x4A7b5Da61326A6379179b40d00F57E5bbDC962c2",
@@ -3066,7 +3066,7 @@ var chainConfigs = {
3066
3066
  },
3067
3067
  addresses: {
3068
3068
  IntentGateway: "0xAe041F7B0CB581876832830baeB6a2Aa2a3C9716",
3069
- SolverAccount: "0x3bdB532d91F165BeFad5542700205f5BB5152a82",
3069
+ SolverAccount: "0xfCd233b937D7622AAc63ced3C9A1A12F4a6B64E3",
3070
3070
  TokenGateway: "0xFd413e3AFe560182C4471F4d143A96d3e259B6dE",
3071
3071
  Host: "0x620128E2B19193d6Bd244a3AC8D3bBa0541B19c3",
3072
3072
  UniswapRouter02: "0xB2e26652e4BAd1e56055A051f922E06760cA0BFE",
@@ -3221,7 +3221,7 @@ var chainConfigs = {
3221
3221
  },
3222
3222
  addresses: {
3223
3223
  IntentGateway: "0xAe041F7B0CB581876832830baeB6a2Aa2a3C9716",
3224
- SolverAccount: "0x3bdB532d91F165BeFad5542700205f5BB5152a82",
3224
+ SolverAccount: "0xfCd233b937D7622AAc63ced3C9A1A12F4a6B64E3",
3225
3225
  Host: "0x620128E2B19193d6Bd244a3AC8D3bBa0541B19c3",
3226
3226
  Calldispatcher: "0xE2C7e576E26E0bE7aC97c6fE925bcDAbD87c4bEd"
3227
3227
  },
@@ -5107,6 +5107,24 @@ var ChainConfigService = class {
5107
5107
  getAssetAddress(chain, symbol) {
5108
5108
  return this.getConfig(chain)?.assets?.[symbol];
5109
5109
  }
5110
+ /**
5111
+ * Resolves configured token metadata from an address on a specific chain.
5112
+ * This is used by SDK helpers that accept token addresses rather than caller-
5113
+ * supplied symbols or decimals.
5114
+ */
5115
+ getAssetMetadataByAddress(chain, address) {
5116
+ const config = this.getConfig(chain);
5117
+ if (!config?.assets) return;
5118
+ const normalizedAddress = address.toLowerCase();
5119
+ for (const [symbol, configuredAddress] of Object.entries(config.assets)) {
5120
+ if (configuredAddress.toLowerCase() !== normalizedAddress) continue;
5121
+ return {
5122
+ symbol,
5123
+ address: configuredAddress,
5124
+ decimals: config.tokenDecimals?.[symbol]
5125
+ };
5126
+ }
5127
+ }
5110
5128
  getUsdtAsset(chain) {
5111
5129
  return this.getConfig(chain)?.assets?.USDT ?? "0x";
5112
5130
  }
@@ -7780,7 +7798,7 @@ var IntentsCoprocessor = class _IntentsCoprocessor {
7780
7798
  */
7781
7799
  async sendExtrinsicWithRetries(extrinsic, maxRetries, timeoutMs) {
7782
7800
  const keyPair = this.getKeyPair();
7783
- let baseTip = 500000000000n;
7801
+ const baseTip = 1000000000n;
7784
7802
  let attempt = 0;
7785
7803
  while (attempt < maxRetries) {
7786
7804
  const currentTip = baseTip * BigInt(2 ** attempt);
@@ -11450,6 +11468,33 @@ query OrderStatus($commitment: String!) {
11450
11468
  }
11451
11469
  }
11452
11470
  }`;
11471
+ var LATEST_PHANTOM_ORDER_PRICE_SNAPSHOT = `
11472
+ query LatestPhantomOrderPriceSnapshot($tokenA: String!, $tokenB: String!) {
11473
+ phantomOrderPriceSnapshots(
11474
+ filter: {
11475
+ and: [
11476
+ { tokenA: { equalTo: $tokenA } }
11477
+ { tokenB: { equalTo: $tokenB } }
11478
+ { medianPrice: { isNull: false } }
11479
+ ]
11480
+ }
11481
+ orderBy: BLOCK_NUMBER_DESC
11482
+ first: 1
11483
+ ) {
11484
+ nodes {
11485
+ commitment
11486
+ tokenA
11487
+ tokenB
11488
+ standardAmount
11489
+ blockNumber
11490
+ medianPrice
11491
+ lowestPrice
11492
+ highestPrice
11493
+ bidCount
11494
+ snapshotTime
11495
+ }
11496
+ }
11497
+ }`;
11453
11498
  var TOKEN_GATEWAY_ASSET_TELEPORTED_STATUS = `
11454
11499
  query TokenGatewayAssetTeleportedStatus($commitment: String!) {
11455
11500
  tokenGatewayAssetTeleportedV2s(
@@ -11511,6 +11556,29 @@ async function queryAssetTeleported(params) {
11511
11556
  function queryGetRequest(params) {
11512
11557
  return _queryGetRequestInternal(params);
11513
11558
  }
11559
+ async function _queryLatestPhantomOrderPriceSnapshot(params) {
11560
+ const response = await params.queryClient.request(
11561
+ LATEST_PHANTOM_ORDER_PRICE_SNAPSHOT,
11562
+ {
11563
+ tokenA: params.tokenA.toLowerCase(),
11564
+ tokenB: params.tokenB.toLowerCase()
11565
+ }
11566
+ );
11567
+ const snapshot = response.phantomOrderPriceSnapshots.nodes[0];
11568
+ if (!snapshot?.medianPrice) return;
11569
+ return {
11570
+ commitment: snapshot.commitment,
11571
+ tokenA: snapshot.tokenA,
11572
+ tokenB: snapshot.tokenB,
11573
+ standardAmount: BigInt(snapshot.standardAmount),
11574
+ blockNumber: BigInt(snapshot.blockNumber),
11575
+ medianPrice: BigInt(snapshot.medianPrice),
11576
+ lowestPrice: snapshot.lowestPrice === null ? void 0 : BigInt(snapshot.lowestPrice),
11577
+ highestPrice: snapshot.highestPrice === null ? void 0 : BigInt(snapshot.highestPrice),
11578
+ bidCount: snapshot.bidCount,
11579
+ snapshotTime: new Date(snapshot.snapshotTime)
11580
+ };
11581
+ }
11514
11582
  async function _queryTokenGatewayAssetTeleportedInternal(params) {
11515
11583
  const { commitmentHash, queryClient: client, logger = DEFAULT_LOGGER } = params;
11516
11584
  const response = await retryPromise(
@@ -17310,15 +17378,67 @@ var UnsupportedIntentQuoteStrategyError = class extends Error {
17310
17378
  var UnsupportedIntentQuotePairError = class extends Error {
17311
17379
  constructor(params) {
17312
17380
  super(
17313
- `No Uniswap v4 pool config found for ${params.tokenIn.symbol ?? params.tokenIn.address} -> ${params.tokenOut.symbol ?? params.tokenOut.address} on ${params.source} -> ${params.destination}`
17381
+ `No ${params.quoteSource ?? "Uniswap v4 pool config"} found for ${params.tokenIn} -> ${params.tokenOut} on ${params.source} -> ${params.destination}`
17314
17382
  );
17315
17383
  this.name = "UnsupportedIntentQuotePairError";
17316
17384
  }
17317
17385
  };
17386
+ var PhantomSnapshotUnavailableError = class extends Error {
17387
+ constructor(tokenA, tokenB) {
17388
+ super(`No Phantom order price snapshot found for ${tokenA} -> ${tokenB}`);
17389
+ this.name = "PhantomSnapshotUnavailableError";
17390
+ }
17391
+ };
17392
+ var InvalidPhantomSnapshotError = class extends Error {
17393
+ constructor(commitment, reason) {
17394
+ super(`Invalid Phantom order price snapshot ${commitment}: ${reason}`);
17395
+ this.name = "InvalidPhantomSnapshotError";
17396
+ }
17397
+ };
17398
+ var BPS_DENOMINATOR = 10000n;
17399
+ function validateQuoteParams(params) {
17400
+ const hasAmountIn = params.amountIn !== void 0;
17401
+ const hasAmountOut = params.amountOut !== void 0;
17402
+ if (hasAmountIn === hasAmountOut) throw new Error("Provide exactly one of amountIn or amountOut");
17403
+ if (params.amountIn !== void 0 && params.amountIn <= 0n) throw new Error("amountIn must be greater than zero");
17404
+ if (params.amountOut !== void 0 && params.amountOut <= 0n) throw new Error("amountOut must be greater than zero");
17405
+ if (params.tokenIn.toLowerCase() === params.tokenOut.toLowerCase()) {
17406
+ throw new Error("tokenIn and tokenOut cannot be the same");
17407
+ }
17408
+ }
17409
+ async function readProtocolFeeBps(chainConfigService, source) {
17410
+ const gatewayAddress = chainConfigService.getIntentGatewayAddress(source.stateMachineId);
17411
+ if (!gatewayAddress || gatewayAddress === "0x" || gatewayAddress === zeroAddress) {
17412
+ throw new Error(`IntentGatewayV2 is not configured for chain ${source.stateMachineId}`);
17413
+ }
17414
+ const gatewayParams = await source.client.readContract({
17415
+ address: gatewayAddress,
17416
+ abi: IntentGatewayV2_default.ABI,
17417
+ functionName: "params"
17418
+ });
17419
+ const protocolFeeBps = Array.isArray(gatewayParams) ? BigInt(gatewayParams[4]) : BigInt(gatewayParams.protocolFeeBps ?? 0);
17420
+ if (protocolFeeBps < 0n || protocolFeeBps >= BPS_DENOMINATOR) {
17421
+ throw new Error(`Invalid IntentGateway protocol fee: ${protocolFeeBps} bps`);
17422
+ }
17423
+ return protocolFeeBps;
17424
+ }
17425
+ function deductProtocolFee(amount, protocolFeeBps) {
17426
+ if (protocolFeeBps <= 0n) return amount;
17427
+ const fee = amount * protocolFeeBps / BPS_DENOMINATOR;
17428
+ return amount - fee;
17429
+ }
17430
+ function grossUpForProtocolFee(netAmount, protocolFeeBps) {
17431
+ if (protocolFeeBps <= 0n) return netAmount;
17432
+ if (protocolFeeBps >= BPS_DENOMINATOR) throw new Error("protocolFeeBps must be less than 10,000");
17433
+ return divCeil(netAmount * BPS_DENOMINATOR, BPS_DENOMINATOR - protocolFeeBps);
17434
+ }
17435
+ function divCeil(numerator, denominator) {
17436
+ if (denominator <= 0n) throw new Error("denominator must be greater than zero");
17437
+ return (numerator + denominator - 1n) / denominator;
17438
+ }
17318
17439
 
17319
17440
  // src/protocols/intents/quote/uniswapV4.ts
17320
17441
  var UNISWAP_INTENT_QUOTE_CHAIN = "EVM-8453" /* BASE_MAINNET */;
17321
- var BPS_DENOMINATOR = 10000n;
17322
17442
  var UniswapV4IntentQuoteStrategy = class {
17323
17443
  constructor(chainConfigService) {
17324
17444
  this.chainConfigService = chainConfigService;
@@ -17326,10 +17446,10 @@ var UniswapV4IntentQuoteStrategy = class {
17326
17446
  chainConfigService;
17327
17447
  baseQuoteClient;
17328
17448
  async quote(params, source, destination) {
17329
- this.validateQuoteParams(params);
17330
- const protocolFeeBps = await this.readProtocolFeeBps(source.client, source.stateMachineId);
17449
+ validateQuoteParams(params);
17450
+ const protocolFeeBps = await readProtocolFeeBps(this.chainConfigService, source);
17331
17451
  const quoteClient = this.resolveQuoteClient(source, destination);
17332
- const poolConfig = this.resolvePoolConfig(params, source.stateMachineId, UNISWAP_INTENT_QUOTE_CHAIN);
17452
+ const poolConfig = this.resolvePoolConfig(params, source.stateMachineId, destination.stateMachineId);
17333
17453
  return params.amountIn !== void 0 ? this.quoteExactInput({ params, client: quoteClient, protocolFeeBps, poolConfig }) : this.quoteExactOutput({ params, client: quoteClient, protocolFeeBps, poolConfig });
17334
17454
  }
17335
17455
  resolveQuoteClient(source, destination) {
@@ -17345,34 +17465,11 @@ var UniswapV4IntentQuoteStrategy = class {
17345
17465
  this.baseQuoteClient = baseQuoteClient;
17346
17466
  return baseQuoteClient;
17347
17467
  }
17348
- validateQuoteParams(params) {
17349
- const hasAmountIn = params.amountIn !== void 0;
17350
- const hasAmountOut = params.amountOut !== void 0;
17351
- if (hasAmountIn === hasAmountOut) throw new Error("Provide exactly one of amountIn or amountOut");
17352
- if (hasAmountIn && params.amountIn <= 0n) throw new Error("amountIn must be greater than zero");
17353
- if (hasAmountOut && params.amountOut <= 0n) throw new Error("amountOut must be greater than zero");
17354
- if (params.tokenIn.address.toLowerCase() === params.tokenOut.address.toLowerCase()) {
17355
- throw new Error("tokenIn and tokenOut cannot be the same");
17356
- }
17357
- }
17358
- async readProtocolFeeBps(client, chain) {
17359
- const gatewayAddress = this.chainConfigService.getIntentGatewayAddress(chain);
17360
- if (!gatewayAddress || gatewayAddress === "0x" || gatewayAddress === zeroAddress) {
17361
- throw new Error(`IntentGatewayV2 is not configured for chain ${chain}`);
17362
- }
17363
- const gatewayParams = await client.readContract({
17364
- address: gatewayAddress,
17365
- abi: IntentGatewayV2_default.ABI,
17366
- functionName: "params"
17367
- });
17368
- if (isGatewayParamsTuple(gatewayParams)) return BigInt(gatewayParams[4]);
17369
- return BigInt(gatewayParams.protocolFeeBps ?? 0);
17370
- }
17371
17468
  resolvePoolConfig(params, source, destination) {
17372
17469
  const override = params.uniswapV4?.poolKey;
17373
17470
  if (override) {
17374
17471
  const poolKey = normalizePoolKey(override);
17375
- const tokenInForQuote = getAddress(override.currencyIn ?? params.tokenIn.address);
17472
+ const tokenInForQuote = getAddress(override.currencyIn ?? params.tokenIn);
17376
17473
  if (tokenInForQuote !== poolKey.currency0 && tokenInForQuote !== poolKey.currency1) {
17377
17474
  throw new Error(
17378
17475
  `Input currency ${tokenInForQuote} is not part of the override pool (${poolKey.currency0}, ${poolKey.currency1}). For cross-chain quotes pass uniswapV4.poolKey.currencyIn with the Base-side input currency address.`
@@ -17380,11 +17477,11 @@ var UniswapV4IntentQuoteStrategy = class {
17380
17477
  }
17381
17478
  return {
17382
17479
  poolKey,
17383
- quoterAddress: this.resolveQuoterAddress(destination, override.quoterAddress),
17480
+ quoterAddress: this.resolveQuoterAddress(UNISWAP_INTENT_QUOTE_CHAIN, override.quoterAddress),
17384
17481
  tokenInForQuote
17385
17482
  };
17386
17483
  }
17387
- const poolConfig = this.resolveConfiguredPool(params, destination);
17484
+ const poolConfig = this.resolveConfiguredPool(params, source, destination, UNISWAP_INTENT_QUOTE_CHAIN);
17388
17485
  if (poolConfig) return poolConfig;
17389
17486
  throw new UnsupportedIntentQuotePairError({
17390
17487
  source,
@@ -17393,12 +17490,12 @@ var UniswapV4IntentQuoteStrategy = class {
17393
17490
  tokenOut: params.tokenOut
17394
17491
  });
17395
17492
  }
17396
- resolveConfiguredPool(params, chain) {
17397
- for (const pool of this.chainConfigService.getUniswapV4PoolConfigs(chain)) {
17398
- const resolvedPool = this.resolveConfiguredPoolTokens(chain, pool);
17493
+ resolveConfiguredPool(params, sourceChain, destinationChain, quoteChain) {
17494
+ for (const pool of this.chainConfigService.getUniswapV4PoolConfigs(quoteChain)) {
17495
+ const resolvedPool = this.resolveConfiguredPoolTokens(quoteChain, pool);
17399
17496
  if (!resolvedPool) continue;
17400
- const tokenInForQuote = matchPoolToken(params.tokenIn, resolvedPool);
17401
- const tokenOutForQuote = matchPoolToken(params.tokenOut, resolvedPool);
17497
+ const tokenInForQuote = this.matchPoolToken(params.tokenIn, sourceChain, resolvedPool);
17498
+ const tokenOutForQuote = this.matchPoolToken(params.tokenOut, destinationChain, resolvedPool);
17402
17499
  if (!tokenInForQuote || !tokenOutForQuote || tokenInForQuote.symbol === tokenOutForQuote.symbol) continue;
17403
17500
  const { currency0, currency1 } = sortCurrencies(resolvedPool[0].address, resolvedPool[1].address);
17404
17501
  return {
@@ -17409,7 +17506,7 @@ var UniswapV4IntentQuoteStrategy = class {
17409
17506
  tickSpacing: pool.tickSpacing,
17410
17507
  hooks: getAddress(pool.hooks ?? zeroAddress)
17411
17508
  },
17412
- quoterAddress: this.resolveQuoterAddress(chain),
17509
+ quoterAddress: this.resolveQuoterAddress(quoteChain),
17413
17510
  tokenInForQuote: tokenInForQuote.address
17414
17511
  };
17415
17512
  }
@@ -17432,8 +17529,18 @@ var UniswapV4IntentQuoteStrategy = class {
17432
17529
  if (!address || address === "0x") return null;
17433
17530
  return { symbol, address: getAddress(address) };
17434
17531
  }
17532
+ matchPoolToken(tokenAddress, orderChain, poolTokens) {
17533
+ const addressMatch = poolTokens.find(
17534
+ (poolToken) => poolToken.address.toLowerCase() === tokenAddress.toLowerCase()
17535
+ );
17536
+ if (addressMatch) return addressMatch;
17537
+ const metadata = this.chainConfigService.getAssetMetadataByAddress(orderChain, tokenAddress);
17538
+ if (!metadata) return null;
17539
+ return poolTokens.find((poolToken) => poolToken.symbol === metadata.symbol) ?? null;
17540
+ }
17435
17541
  async quoteExactInput(args) {
17436
17542
  const amountIn = args.params.amountIn;
17543
+ if (amountIn === void 0) throw new Error("amountIn is required for an exact-input quote");
17437
17544
  const swapAmountIn = deductProtocolFee(amountIn, args.protocolFeeBps);
17438
17545
  const amountOut = await this.readV4QuoteExactInput(args.client, args.poolConfig, swapAmountIn);
17439
17546
  return {
@@ -17451,6 +17558,7 @@ var UniswapV4IntentQuoteStrategy = class {
17451
17558
  }
17452
17559
  async quoteExactOutput(args) {
17453
17560
  const amountOut = args.params.amountOut;
17561
+ if (amountOut === void 0) throw new Error("amountOut is required for an exact-output quote");
17454
17562
  const swapAmountIn = await this.readV4QuoteExactOutput(args.client, args.poolConfig, amountOut);
17455
17563
  const amountIn = grossUpForProtocolFee(swapAmountIn, args.protocolFeeBps);
17456
17564
  return {
@@ -17529,34 +17637,125 @@ function sortCurrencies(tokenIn, tokenOut) {
17529
17637
  const output = getAddress(tokenOut);
17530
17638
  return BigInt(input) < BigInt(output) ? { currency0: input, currency1: output } : { currency0: output, currency1: input };
17531
17639
  }
17532
- function matchPoolToken(token, poolTokens) {
17533
- const tokenAddress = token.address.toLowerCase();
17534
- const addressMatch = poolTokens.find((poolToken) => poolToken.address.toLowerCase() === tokenAddress);
17535
- if (addressMatch) return addressMatch;
17536
- const tokenSymbol = token.symbol?.toUpperCase();
17537
- if (!tokenSymbol) return null;
17538
- return poolTokens.find((poolToken) => poolToken.symbol.toUpperCase() === tokenSymbol) ?? null;
17539
- }
17540
17640
  function getZeroForOne(tokenIn, poolKey) {
17541
17641
  return getAddress(tokenIn).toLowerCase() === getAddress(poolKey.currency0).toLowerCase();
17542
17642
  }
17543
- function isGatewayParamsTuple(value) {
17544
- return Array.isArray(value);
17545
- }
17546
- function deductProtocolFee(amount, protocolFeeBps) {
17547
- if (protocolFeeBps <= 0n) return amount;
17548
- const fee = amount * protocolFeeBps / BPS_DENOMINATOR;
17549
- return amount - fee;
17550
- }
17551
- function grossUpForProtocolFee(netAmount, protocolFeeBps) {
17552
- if (protocolFeeBps <= 0n) return netAmount;
17553
- return divCeil(netAmount * BPS_DENOMINATOR, BPS_DENOMINATOR - protocolFeeBps);
17643
+
17644
+ // src/protocols/intents/quote/phantomSnapshot.ts
17645
+ var PHANTOM_INTENT_QUOTE_CHAIN = "EVM-8453" /* BASE_MAINNET */;
17646
+ var BASE_SNAPSHOT_ASSET_BY_ORDER_ASSET = {
17647
+ USDC: "USDC",
17648
+ USDT: "USDC",
17649
+ cNGN: "cNGN"
17650
+ };
17651
+ var SUPPORTED_BASE_SNAPSHOT_PAIRS = /* @__PURE__ */ new Set(["USDC:cNGN", "cNGN:USDC"]);
17652
+ var PhantomSnapshotIntentQuoteStrategy = class {
17653
+ constructor(chainConfigService, getQueryClient) {
17654
+ this.chainConfigService = chainConfigService;
17655
+ this.getQueryClient = getQueryClient;
17656
+ }
17657
+ chainConfigService;
17658
+ getQueryClient;
17659
+ async quote(params, source, destination) {
17660
+ validateQuoteParams(params);
17661
+ const pair = this.resolveBaseSnapshotPair(params, source.stateMachineId, destination.stateMachineId);
17662
+ if (!pair) {
17663
+ throw new UnsupportedIntentQuotePairError({
17664
+ source: source.stateMachineId,
17665
+ destination: destination.stateMachineId,
17666
+ tokenIn: params.tokenIn,
17667
+ tokenOut: params.tokenOut,
17668
+ quoteSource: "Phantom snapshot pair"
17669
+ });
17670
+ }
17671
+ const queryClient = this.getQueryClient();
17672
+ const [protocolFeeBps, snapshot] = await Promise.all([
17673
+ readProtocolFeeBps(this.chainConfigService, source),
17674
+ _queryLatestPhantomOrderPriceSnapshot({
17675
+ tokenA: pair.tokenA,
17676
+ tokenB: pair.tokenB,
17677
+ queryClient
17678
+ })
17679
+ ]);
17680
+ if (!snapshot) throw new PhantomSnapshotUnavailableError(pair.tokenA, pair.tokenB);
17681
+ this.validateSnapshot(snapshot);
17682
+ return this.quoteSnapshot(params, protocolFeeBps, snapshot);
17683
+ }
17684
+ quoteSnapshot(params, protocolFeeBps, snapshot) {
17685
+ if (params.amountIn !== void 0) {
17686
+ const netAmountIn2 = deductProtocolFee(params.amountIn, protocolFeeBps);
17687
+ const amountOut = netAmountIn2 * snapshot.medianPrice / snapshot.standardAmount;
17688
+ if (amountOut <= 0n) {
17689
+ throw new InvalidPhantomSnapshotError(snapshot.commitment, "quote rounds down to zero output");
17690
+ }
17691
+ return this.buildResult("EXACT_INPUT", params.amountIn, amountOut, protocolFeeBps, snapshot);
17692
+ }
17693
+ if (params.amountOut === void 0) throw new Error("Quote amount is missing after validation");
17694
+ const netAmountIn = divCeil(params.amountOut * snapshot.standardAmount, snapshot.medianPrice);
17695
+ const amountIn = grossUpForProtocolFee(netAmountIn, protocolFeeBps);
17696
+ return this.buildResult("EXACT_OUTPUT", amountIn, params.amountOut, protocolFeeBps, snapshot);
17697
+ }
17698
+ buildResult(tradeType, amountIn, amountOut, protocolFeeBps, snapshot) {
17699
+ return {
17700
+ strategy: "phantom_snapshot",
17701
+ tradeType,
17702
+ amountIn,
17703
+ amountOut,
17704
+ quoteMetadata: {
17705
+ quoteChain: PHANTOM_INTENT_QUOTE_CHAIN,
17706
+ commitment: snapshot.commitment,
17707
+ tokenA: snapshot.tokenA,
17708
+ tokenB: snapshot.tokenB,
17709
+ standardAmount: snapshot.standardAmount,
17710
+ medianPrice: snapshot.medianPrice,
17711
+ lowestPrice: snapshot.lowestPrice,
17712
+ highestPrice: snapshot.highestPrice,
17713
+ blockNumber: snapshot.blockNumber,
17714
+ snapshotTime: snapshot.snapshotTime,
17715
+ bidCount: snapshot.bidCount,
17716
+ protocolFeeBps
17717
+ }
17718
+ };
17719
+ }
17720
+ validateSnapshot(snapshot) {
17721
+ if (snapshot.standardAmount <= 0n) {
17722
+ throw new InvalidPhantomSnapshotError(snapshot.commitment, "standardAmount must be greater than zero");
17723
+ }
17724
+ if (snapshot.medianPrice <= 0n) {
17725
+ throw new InvalidPhantomSnapshotError(snapshot.commitment, "medianPrice must be greater than zero");
17726
+ }
17727
+ if (snapshot.bidCount <= 0) {
17728
+ throw new InvalidPhantomSnapshotError(snapshot.commitment, "bidCount must be greater than zero");
17729
+ }
17730
+ if (Number.isNaN(snapshot.snapshotTime.getTime())) {
17731
+ throw new InvalidPhantomSnapshotError(snapshot.commitment, "snapshotTime is invalid");
17732
+ }
17733
+ }
17734
+ resolveBaseSnapshotPair(params, sourceStateMachineId, destinationStateMachineId) {
17735
+ const tokenIn = this.resolveBaseSnapshotToken(sourceStateMachineId, params.tokenIn);
17736
+ const tokenOut = this.resolveBaseSnapshotToken(destinationStateMachineId, params.tokenOut);
17737
+ if (!tokenIn || !tokenOut || !isSupportedSnapshotPair(tokenIn.symbol, tokenOut.symbol)) return;
17738
+ return { tokenA: tokenIn.address, tokenB: tokenOut.address };
17739
+ }
17740
+ resolveBaseSnapshotToken(chain, tokenAddress) {
17741
+ const orderAsset = this.chainConfigService.getAssetMetadataByAddress(chain, tokenAddress)?.symbol;
17742
+ if (!orderAsset) return;
17743
+ const snapshotAsset = BASE_SNAPSHOT_ASSET_BY_ORDER_ASSET[orderAsset];
17744
+ if (!snapshotAsset) return;
17745
+ const address = this.chainConfigService.getAssetAddress(PHANTOM_INTENT_QUOTE_CHAIN, snapshotAsset);
17746
+ if (!isConfiguredAddress(address)) return;
17747
+ return { symbol: snapshotAsset, address };
17748
+ }
17749
+ };
17750
+ function isSupportedSnapshotPair(tokenA, tokenB) {
17751
+ return SUPPORTED_BASE_SNAPSHOT_PAIRS.has(`${tokenA}:${tokenB}`);
17554
17752
  }
17555
- function divCeil(numerator, denominator) {
17556
- return (numerator + denominator - 1n) / denominator;
17753
+ function isConfiguredAddress(address) {
17754
+ return Boolean(address && address !== "0x" && !/^0x0{40}$/i.test(address));
17557
17755
  }
17558
17756
 
17559
17757
  // src/protocols/intents/IntentGateway.ts
17758
+ var CROSS_CHAIN_ORDER_FEE_GAS_BUMP = 600000n;
17560
17759
  var IntentGateway = class _IntentGateway {
17561
17760
  /** EVM chain on which orders are placed and escrowed. */
17562
17761
  source;
@@ -17628,6 +17827,10 @@ var IntentGateway = class _IntentGateway {
17628
17827
  this.gasEstimator = gasEstimator;
17629
17828
  this._crypto = crypto;
17630
17829
  this.quoteStrategies = {
17830
+ phantom_snapshot: new PhantomSnapshotIntentQuoteStrategy(
17831
+ dest.configService,
17832
+ () => this.requireIndexer().queryClient
17833
+ ),
17631
17834
  uniswap_v4: new UniswapV4IntentQuoteStrategy(dest.configService)
17632
17835
  };
17633
17836
  }
@@ -17677,37 +17880,39 @@ var IntentGateway = class _IntentGateway {
17677
17880
  /**
17678
17881
  * Quotes an intent between this gateway's source and destination chains.
17679
17882
  *
17680
- * `strategy` defaults to `uniswap_v4`, currently the only supported
17681
- * strategy. Provide exactly one of `amountIn` or `amountOut`.
17883
+ * Uses the latest directional Phantom order price snapshot from the attached
17884
+ * indexer by default. Pass `strategy: "uniswap_v4"` only when explicitly
17885
+ * requesting a Uniswap quote. Provide exactly one of `amountIn` or `amountOut`.
17682
17886
  *
17683
- * The Uniswap quote strategy always prices against the configured Base
17684
- * pool, regardless of this gateway's destination chain. Returned
17887
+ * Both built-in strategies resolve their canonical market on Base,
17888
+ * regardless of this gateway's destination chain. Returned
17685
17889
  * `amountIn`/`amountOut` already account for the gateway's protocol fee
17686
17890
  * (`quoteMetadata.protocolFeeBps`), which the gateway deducts from order
17687
- * inputs; apply only your own slippage tolerance before placing the order.
17891
+ * inputs; use the returned amounts directly when placing the order.
17688
17892
  *
17689
17893
  * @param params - Token pair, amount, and optional strategy/pool overrides.
17690
17894
  * @returns The quoted amounts plus strategy-specific metadata.
17691
17895
  * @throws {UnsupportedIntentQuoteStrategyError} For unknown strategies.
17692
- * @throws {UnsupportedIntentQuotePairError} When no pool is configured for the pair.
17896
+ * @throws {UnsupportedIntentQuotePairError} When the selected strategy does not support the pair.
17897
+ * @throws {PhantomSnapshotUnavailableError} When an eligible cNGN pair has no snapshot.
17693
17898
  */
17694
17899
  async quoteIntent(params) {
17695
- const strategy = params.strategy ?? "uniswap_v4";
17900
+ const source = { stateMachineId: this.source.config.stateMachineId, client: this.source.client };
17901
+ const destination = { stateMachineId: this.dest.config.stateMachineId, client: this.dest.client };
17902
+ const strategy = params.strategy ?? "phantom_snapshot";
17696
17903
  const handler = this.quoteStrategies[strategy];
17697
17904
  if (!handler) throw new UnsupportedIntentQuoteStrategyError(strategy);
17698
- return handler.quote(
17699
- { ...params, strategy },
17700
- { stateMachineId: this.source.config.stateMachineId, client: this.source.client },
17701
- { stateMachineId: this.dest.config.stateMachineId, client: this.dest.client }
17702
- );
17905
+ return handler.quote({ ...params, strategy }, source, destination);
17703
17906
  }
17704
17907
  /**
17705
17908
  * Bidirectional async generator that orchestrates the full order lifecycle:
17706
17909
  * placement, fee estimation, bid collection, and execution.
17707
17910
  *
17708
17911
  * **Yield/receive protocol:**
17709
- * 1. If `order.fees` is unset or zero, estimates gas and sets `order.fees`
17710
- * with a 1% buffer and the wei cost with a 2% buffer for the `value` field.
17912
+ * 1. If `order.fees` is unset or zero, estimates gas and sets same-chain
17913
+ * `order.fees` to twice the estimate. Cross-chain orders retain a 1% buffer
17914
+ * and include an additional 600k-gas fee uplift, while the wei cost used for
17915
+ * the `value` field receives a 2% buffer.
17711
17916
  * 2. Yields `AWAITING_PLACE_ORDER` with `{ to, data, value, sessionPrivateKey }`.
17712
17917
  * The caller must sign the transaction and pass it back via `gen.next(signedTx)`.
17713
17918
  * 3. Yields `ORDER_PLACED` with the finalised order and transaction hash once
@@ -17739,8 +17944,15 @@ var IntentGateway = class _IntentGateway {
17739
17944
  if (estimate.totalGasCostWei === 0n || estimate.totalGasInFeeToken === 0n) {
17740
17945
  throw new Error("Gas estimation failed");
17741
17946
  }
17947
+ const isSameChain = this.source.config.stateMachineId === this.dest.config.stateMachineId;
17742
17948
  value = estimate.totalGasCostWei + estimate.totalGasCostWei * 2n / 100n;
17743
- order.fees = estimate.totalGasInFeeToken + estimate.totalGasInFeeToken * 1n / 100n;
17949
+ const crossChainFeeBump = isSameChain ? 0n : await convertGasToFeeToken(
17950
+ this.ctx,
17951
+ CROSS_CHAIN_ORDER_FEE_GAS_BUMP,
17952
+ "source",
17953
+ this.source.config.stateMachineId
17954
+ );
17955
+ order.fees = isSameChain ? estimate.totalGasInFeeToken * 2n : estimate.totalGasInFeeToken + (crossChainFeeBump + estimate.totalGasInFeeToken * 1n / 100n);
17744
17956
  }
17745
17957
  const placeOrderGen = this.orderPlacer.placeOrder(order, graffiti);
17746
17958
  const placeOrderFirst = await placeOrderGen.next();
@@ -18121,7 +18333,9 @@ var IntentGateway = class _IntentGateway {
18121
18333
  }
18122
18334
  requireIndexer() {
18123
18335
  if (!this.indexer) {
18124
- throw new Error("IntentGateway: call withQueryClient(queryClient) before using indexer-backed methods");
18336
+ throw new Error(
18337
+ "IntentGateway: call withQueryClient(queryClient) before using indexer-backed methods or Phantom quotes"
18338
+ );
18125
18339
  }
18126
18340
  return this.indexer;
18127
18341
  }
@@ -22635,6 +22849,6 @@ async function teleportDot(param_) {
22635
22849
  return stream;
22636
22850
  }
22637
22851
 
22638
- 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, IsmpClient, MOCK_ADDRESS, ORDER_V2_PARAM_TYPE, OrderStatus, OrderStatusChecker, PACKED_USEROP_TYPEHASH, PLACE_ORDER_SELECTOR, 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, decodeERC7821ExecuteBatch, decodeUserOpScale, encodeERC7821ExecuteBatch, encodeISMPMessage, 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, normalizeEvmChainId, normalizeStateMachineId, orderCommitment, parseStateMachineId, pharosAtlantic, pharosMainnet, polkadotAssetHubPaseo, polkadotHubMainnet, postRequestCommitment, queryAssetTeleported, queryGetRequest, queryPostRequest, quoteUniswap, requestCommitmentKey, responseCommitmentKey, retryPromise, teleport, teleportDot, transformOrderForContract, tronChainIds, tronNile };
22852
+ 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, decodeERC7821ExecuteBatch, decodeUserOpScale, encodeERC7821ExecuteBatch, encodeISMPMessage, 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, normalizeEvmChainId, normalizeStateMachineId, orderCommitment, parseStateMachineId, pharosAtlantic, pharosMainnet, polkadotAssetHubPaseo, polkadotHubMainnet, postRequestCommitment, queryAssetTeleported, queryGetRequest, queryPostRequest, quoteUniswap, requestCommitmentKey, responseCommitmentKey, retryPromise, teleport, teleportDot, transformOrderForContract, tronChainIds, tronNile };
22639
22853
  //# sourceMappingURL=index.js.map
22640
22854
  //# sourceMappingURL=index.js.map