@hyperbridge/sdk 2.8.3 → 2.8.4

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.
@@ -2,7 +2,7 @@ import { ConsolaInstance } from 'consola';
2
2
  import Decimal from 'decimal.js';
3
3
  import { GraphQLClient } from 'graphql-request';
4
4
  import * as viem from 'viem';
5
- import { PublicClient, TransactionReceipt, Hex, Log, ContractFunctionArgs } from 'viem';
5
+ import { PublicClient, TransactionReceipt, Hex, Log, ContractFunctionArgs, Chain as Chain$1 } from 'viem';
6
6
  import { Chain } from 'viem/chains';
7
7
  import { ApiPromise } from '@polkadot/api';
8
8
  import { KeyringPair } from '@polkadot/keyring/types';
@@ -886,7 +886,9 @@ declare const tronNile: {
886
886
  verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
887
887
  };
888
888
  declare const tronChainIds: Set<number>;
889
- type ConfiguredAssetSymbol = "WETH" | "DAI" | "USDC" | "USDT" | "cNGN" | "EXT";
889
+ type ConfiguredAssetSymbol = "WETH" | "DAI" | "USDC" | "USDT" | "cNGN" | "EXT" | "ZARP" | "EURC" | "XSGD" | "TRYB" | "USDR";
890
+ /** A configured asset symbol in its canonical, lowercase, or uppercase form. */
891
+ type ConfiguredAssetSymbolInput = ConfiguredAssetSymbol | Lowercase<ConfiguredAssetSymbol> | Uppercase<ConfiguredAssetSymbol>;
890
892
  interface UniswapV4PoolConfigData {
891
893
  tokens: readonly [ConfiguredAssetSymbol, ConfiguredAssetSymbol];
892
894
  fee: number;
@@ -1015,7 +1017,7 @@ interface ChainConfigData {
1015
1017
  layerZeroEid?: number;
1016
1018
  }
1017
1019
  declare const chainConfigs: Record<number, ChainConfigData>;
1018
- declare const getConfigByStateMachineId: (id: Chains) => ChainConfigData | undefined;
1020
+ declare const getConfigByStateMachineId: (id: string) => ChainConfigData | undefined;
1019
1021
  declare const getChainId: (stateMachineId: string) => number | undefined;
1020
1022
  declare const getViemChain: (chainId: number) => Chain | undefined;
1021
1023
  declare const hyperbridgeAddress = "";
@@ -1056,6 +1058,12 @@ declare class ChainConfigService {
1056
1058
  * it, so a new asset is added once in `chain.ts` and nowhere else.
1057
1059
  */
1058
1060
  getAssetBySymbol(chain: string, symbol: string): HexString$1 | undefined;
1061
+ /** Resolves a configured token symbol case-insensitively on a specific chain. */
1062
+ getAssetMetadataBySymbol(chain: string, symbol: string): {
1063
+ symbol: ConfiguredAssetSymbol;
1064
+ address: HexString$1;
1065
+ decimals?: number;
1066
+ } | undefined;
1059
1067
  getCNgnDecimals(chain: string): number | undefined;
1060
1068
  getExtAsset(chain: string): HexString$1 | undefined;
1061
1069
  getExtDecimals(chain: string): number | undefined;
@@ -1372,6 +1380,14 @@ declare function convertCodecToIProof(codec: {
1372
1380
  }): IProof;
1373
1381
  declare function encodeISMPMessage(message: IIsmpMessage): Uint8Array;
1374
1382
 
1383
+ /**
1384
+ * How long a submitted extrinsic has to reach a block before the attempt is treated as stalled.
1385
+ *
1386
+ * Sized against the bid window, not against how long inclusion can conceivably take: a bid is worth
1387
+ * nothing once its window closes, so an extrinsic still sitting in the pool after a few blocks is
1388
+ * better replaced by a higher-tipped copy than waited on.
1389
+ */
1390
+ declare const INCLUSION_TIMEOUT_MS = 20000;
1375
1391
  /**
1376
1392
  * Maps a websocket endpoint onto the HTTP endpoint of the same node — substrate serves both on the
1377
1393
  * same host and port, so the scheme is the only difference. Throws for anything that is not a
@@ -1550,8 +1566,10 @@ declare class IntentsCoprocessor {
1550
1566
  /**
1551
1567
  * Signs and sends an extrinsic. Submissions are serialised through {@link submissionQueue} so
1552
1568
  * concurrent calls never collide on the substrate account nonce — each extrinsic reaches a block
1553
- * (or is confirmed still pooled and returned as `pending`) before the next is signed; auto-nonce
1554
- * via `system.accountNextIndex` counts pooled extrinsics, so a pending one is never re-used.
1569
+ * (or is confirmed still pooled and returned as `pending`) before the next is signed. The
1570
+ * auto-nonce is the account's on-chain nonce, so a still-pooled extrinsic does not advance it: a
1571
+ * submission signed behind a pending one bounces off it (1013/1014) and is reported as pending
1572
+ * too, rather than landing as a second copy.
1555
1573
  *
1556
1574
  * The extrinsic is built rather than passed in because the api it is built on decides where it
1557
1575
  * is signed and sent: a websocket that is down when the queue reaches this submission diverts it
@@ -1576,14 +1594,34 @@ declare class IntentsCoprocessor {
1576
1594
  * Signs and sends an extrinsic, handling status updates and errors.
1577
1595
  * Implements retry logic with progressive tip increases for stuck transactions.
1578
1596
  *
1579
- * A retry only happens when the previous attempt verifiably went nowhere. Once an attempt's
1580
- * extrinsic is known to be pooled (`pending`), re-signing the same call would race our own
1581
- * submission: the copy either bounces off the pool (1014, same nonce below the replacement
1582
- * priority bump) or if the original lands first, freeing the nonce — executes as a duplicate
1583
- * and fails on-chain (e.g. `BidNotFound` for a retraction). Neither can succeed, so the pending
1584
- * result is returned for the caller to confirm later.
1597
+ * Two kinds of failure are retried, and the difference is the nonce.
1598
+ *
1599
+ * An attempt that verifiably went nowhere (rejected before the pool, dropped, invalid) leaves
1600
+ * the account nonce free, so the next attempt simply re-signs with the auto-nonce.
1601
+ *
1602
+ * An attempt that reached the pool and was still there when the watch timed out (`stalled`) is
1603
+ * retried as a *replacement*: the same nonce it was signed with, and double the tip. Substrate's
1604
+ * pool evicts a pooled extrinsic in favour of a higher-priority one at the same (account, nonce),
1605
+ * so exactly one of the two can ever execute. This matters for a bid, which is worth nothing once
1606
+ * its window closes — waiting out a stalled extrinsic usually means not bidding at all.
1607
+ *
1608
+ * Re-signing without pinning the nonce is what must never happen here. The auto-nonce is read
1609
+ * from on-chain state, so it is only the stalled extrinsic's nonce for as long as that extrinsic
1610
+ * stays out of a block — and a stall is precisely the case where it may land at any moment. Once
1611
+ * it does, an unpinned retry takes the *next* nonce and both execute: a duplicate `placeBid` that
1612
+ * fails on-chain, and a second `retractBid` that pulls the bid just placed. When the signed nonce
1613
+ * cannot be read, the stalled result is returned rather than guessed at.
1614
+ *
1615
+ * A rejection that bounced off a copy already pooled (1013/1014) is likewise left alone: that
1616
+ * copy is in flight and its outcome is unknown here, so the `pending` result goes back to the
1617
+ * caller to confirm later.
1585
1618
  */
1586
1619
  private sendExtrinsicWithRetries;
1620
+ /**
1621
+ * The nonce an extrinsic was signed with, or undefined if it carries no readable one — which is
1622
+ * the case before it has ever been signed, and for a stub api in tests.
1623
+ */
1624
+ private signedNonce;
1587
1625
  /**
1588
1626
  * Classifies a submission rejection. Codes 1013 ("already imported") and 1014 ("priority is
1589
1627
  * too low") both mean a copy of this account+nonce is already in the pool — almost always our
@@ -1597,8 +1635,13 @@ declare class IntentsCoprocessor {
1597
1635
  *
1598
1636
  * A timeout is only a failure when the extrinsic never made it into the transaction pool.
1599
1637
  * Once a pool-entry status (Future/Ready/Broadcast/Retracted) has been seen, the extrinsic is
1600
- * in flight and may well execute after the watch is abandoned — the result is then `pending`,
1601
- * telling the caller to confirm the outcome later instead of re-signing the same call.
1638
+ * in flight and may well execute after the watch is abandoned — the result is then `pending`
1639
+ * and `stalled`, telling the caller to replace it under the same nonce or confirm it later,
1640
+ * never to re-sign the same call under a fresh one.
1641
+ *
1642
+ * `nonce` pins the submission to a specific account nonce, which is what makes a retry a pool
1643
+ * replacement rather than a second extrinsic queued behind the first. Left undefined on the
1644
+ * first attempt, where the api's auto-nonce is correct.
1602
1645
  */
1603
1646
  private sendWithTimeout;
1604
1647
  /**
@@ -2926,25 +2969,51 @@ interface PhantomOrderPriceSnapshotsResponse {
2926
2969
  }>;
2927
2970
  };
2928
2971
  }
2972
+ /** One independently reported slice of indexed liquidity. */
2973
+ interface LiquiditySlice {
2974
+ totalLiquidity: string;
2975
+ providerCount: number;
2976
+ }
2929
2977
  /**
2930
- * Total solver liquidity measured at one immutable Phantom price snapshot.
2978
+ * Indexed destination capacity and its source-routing slices.
2931
2979
  *
2932
- * Liquidity amounts are decimal strings formatted with the configured decimals
2933
- * for their respective `tokenAddress` and chain.
2980
+ * The SDK reports the indexer's facts separately and does not decide whether a
2981
+ * source chain is covered by the legacy unrestricted-bidder policy.
2934
2982
  */
2935
- interface AvailableLiquiditySnapshot {
2936
- totalLiquidity: string;
2937
- providerCount: number;
2983
+ interface AvailableLiquidity {
2984
+ sourceChain: Chains;
2985
+ destinationChain: Chains;
2938
2986
  tokenAddress: HexString$1;
2939
- snapshotTime: Date;
2940
- liquidityByChain: AvailableLiquidityByChain[];
2987
+ updatedAt: Date;
2988
+ destination: LiquiditySlice;
2989
+ unrestricted: LiquiditySlice;
2990
+ explicitRoute: (LiquiditySlice & {
2991
+ updatedAt: Date;
2992
+ }) | null;
2941
2993
  }
2942
- /** Liquidity for one chain/token balance group in an availability snapshot. */
2943
- interface AvailableLiquidityByChain {
2944
- chain: string;
2945
- tokenAddress: HexString$1;
2946
- totalLiquidity: string;
2947
- providerCount: number;
2994
+ /**
2995
+ * Chain-specific buy and sell rates expressed as quote-token units per one
2996
+ * base token. The quote token is the less valuable currency when the indexed
2997
+ * rates establish an ordering (for example, cNGN in a USDC/cNGN pair).
2998
+ */
2999
+ interface BuyAndSellRates {
3000
+ baseTokenSymbol: ConfiguredAssetSymbol;
3001
+ quoteTokenSymbol: ConfiguredAssetSymbol;
3002
+ sourceChain: Chains;
3003
+ destinationChain: Chains;
3004
+ /** Quote-token units received when buying the quote token with one base token. */
3005
+ buyRate: string | null;
3006
+ /** Quote-token units sold to receive one base token. */
3007
+ sellRate: string | null;
3008
+ buyRateUpdatedAt: Date | null;
3009
+ sellRateUpdatedAt: Date | null;
3010
+ }
3011
+ /** Symbol-only input for querying an indexed pool's rates. */
3012
+ interface QueryBuyAndSellRatesParams {
3013
+ tokenInSymbol: ConfiguredAssetSymbolInput;
3014
+ tokenOutSymbol: ConfiguredAssetSymbolInput;
3015
+ sourceChainId: Chain$1["id"];
3016
+ destinationChainId: Chain$1["id"];
2948
3017
  }
2949
3018
  interface TokenPrice {
2950
3019
  symbol: string;
@@ -3390,6 +3459,16 @@ type ERC7821Call = {
3390
3459
  data: `0x${string}`;
3391
3460
  };
3392
3461
 
3462
+ /**
3463
+ * Canonical symbol order used by the SDK and indexer pool IDs.
3464
+ *
3465
+ * Plain code-unit comparison, never locale-sensitive collation — the result is
3466
+ * a persisted primary key and must sort identically everywhere.
3467
+ */
3468
+ declare function sortPoolSymbols<Symbol extends string>(symbolA: Symbol, symbolB: Symbol): [Symbol, Symbol];
3469
+ /** Canonical indexer pool ID for a pair of canonical token symbols. */
3470
+ declare function poolSlug(symbolA: string, symbolB: string): string;
3471
+
3393
3472
  declare function encodeERC7821ExecuteBatch(calls: ERC7821Call[]): HexString$1;
3394
3473
  declare function decodeERC7821ExecuteBatch(callData: HexString$1): ERC7821Call[] | null;
3395
3474
 
@@ -7839,4 +7918,4 @@ declare const _default: {
7839
7918
  }];
7840
7919
  };
7841
7920
 
7842
- export { type BidStorageEntry as $, type AssetTeleported as A, type Bid as B, ChainConfigService as C, type EstimateFillOrderParams as D, type EstimateGasCallData as E, type FillerBid as F, type GetRequestWithStatus as G, type HexString$1 as H, type IChain as I, type FillOrderEstimate as J, type OrderFeesQuote as K, type ERC7821Call as L, type OrderWithStatus as M, OrderStatus as N, type Order as O, type PostRequestWithStatus as P, type TokenGatewayAssetTeleportedWithStatus as Q, type RetryConfig as R, type StateMachineIdParams as S, type Transaction as T, TeleportStatus as U, type DecodedOrderPlacedLog as V, type DecodedPostRequestEvent as W, type DecodedPostResponseEvent as X, type AllStatusKey as Y, type AssetTeleportedResponse as Z, type AvailableLiquidityByChain as _, type IEvmConfig as a, TimeoutStatus as a$, type BidSubmissionResult as a0, type BlockMetadata as a1, type BytesLikeHex as a2, type CancelOptions as a3, type ChainConfig as a4, type ChainConfigData as a5, Chains as a6, type ConfiguredAssetSymbol as a7, type Deployment as a8, type DispatchGet as a9, IntentOrderStatus as aA, type IntentOrderStatusKey as aB, type IsmpRequest as aC, type OrderResponse as aD, type OrderStatusMetadata as aE, type PaymentInfo as aF, type PhantomBid as aG, type PhantomBidBatchResult as aH, type PhantomBidDeclaration as aI, type PhantomBidOutcome as aJ, type PhantomOrderEvent as aK, type PhantomOrderLeg as aL, type PhantomOrderPriceSnapshot as aM, type PhantomOrderPriceSnapshotsResponse as aN, type PollPhantomOrdersOptions as aO, type PostRequestStatus as aP, type RequestBody as aQ, type RequestCommitment as aR, RequestKind as aS, type RequestResponse as aT, RequestStatus as aU, type RequestStatusKey as aV, type SelectOptions as aW, type SigningAccount as aX, type StateMachineId as aY, type StateMachineResponse as aZ, type StorageFacade as a_, type DispatchInfo as aa, type DispatchPost as ab, type Erc4626VaultConfigData as ac, type ExecuteIntentOrderOptions as ad, type ExecutionResult as ae, type FillOptions as af, type FillerConfig as ag, type GetRequestResponse as ah, type GetResponseByRequestIdResponse as ai, type GetResponseStorageValues as aj, type HostParams as ak, HyperClientStatus as al, type IBatchConsensusAndGetResponseMessage as am, type IBatchConsensusAndPostRequestMessage as an, type IConfig as ao, type IConsensusMessage as ap, type IGetRequestMessage as aq, type IGetResponse as ar, type IGetResponseMessage as as, type IHyperbridgeConfig as at, type IPostResponse as au, type IRequestMessage as av, type ISubstrateConfig as aw, type ITimeoutPostRequestMessage as ax, ABI as ay, type IntentGatewayParams as az, type IMessage as b, type TimeoutStatusKey as b0, type TokenGatewayAssetTeleportedResponse as b1, type TokenInfo as b2, type TokenPrice as b3, type TokenPricesResponse as b4, type UniswapV4PoolConfigData as b5, chainConfigs as b6, convertCodecToIGetRequest as b7, convertCodecToIProof as b8, convertIGetRequestToCodec as b9, type BidSignature as bA, ENTRY_POINT_V08_ADDRESS as bB, FILL_ORDER_ABI as bC, type FetchLike as bD, type FillData as bE, type HexString as bF, _default as bG, type LpBalance as bH, type OrderCommitmentFn as bI, type PhantomAggregation as bJ, type PhantomLegAggregation as bK, type PhantomLegBidder as bL, type RecoverBidSigner as bM, type RpcBidInfo as bN, type SolverBalanceReader as bO, type YieldVaultMap as bP, aggregatePhantomBids as bQ, extractFillData as bR, fetchBidsForOrder as bS, memoizedSolverBalance as bT, orderCommitmentFromDecoded as bU, recoverBidSignerViem as bV, setAggregationFetch as bW, splitBidSignature as bX, weightedMedian as bY, zipFillLegs as bZ, convertIProofToCodec as ba, convertStateIdToStateMachineId as bb, convertStateMachineEnumToString as bc, convertStateMachineIdToEnum as bd, decodeAcceptedSourceChains as be, decodeERC7821ExecuteBatch as bf, decodePhantomBidDeclaration as bg, decodeUserOpScale as bh, deriveHttpUrl as bi, encodeAcceptedSourceChains as bj, encodeERC7821ExecuteBatch as bk, encodeISMPMessage as bl, encodePhantomBidDeclaration as bm, encodeUserOpScale as bn, getChainId as bo, getConfigByStateMachineId as bp, getViemChain as bq, hyperbridgeAddress as br, pharosAtlantic as bs, pharosMainnet as bt, polkadotAssetHubPaseo as bu, polkadotHubMainnet as bv, tronChainIds as bw, tronNile as bx, type AggregationLogger as by, type BidNonceKeyFn as bz, type StateMachineHeight as c, type IIsmpMessage as d, type IPostRequest as e, type IGetRequest as f, type IPolkadotHubConfig as g, type IPharosConfig as h, type StateMachineUpdate as i, type ResponseCommitmentWithValues as j, type RequestStatusWithMetadata as k, type PostRequestTimeoutStatus as l, SubstrateChain as m, type ClientConfig as n, type IndexerQueryClient as o, type IProof as p, type IEvmChain as q, IntentsCoprocessor as r, type AvailableLiquiditySnapshot as s, type IntentOrderStatusUpdate as t, type SelectBidResult as u, type ResumeIntentOrderOptions as v, type CancelOrderOptions as w, type CancelQuote as x, type SubmitBidOptions as y, type PackedUserOperation as z };
7921
+ export { type AssetTeleportedResponse as $, type AssetTeleported as A, type BuyAndSellRates as B, ChainConfigService as C, type Bid as D, type EstimateGasCallData as E, type FillerBid as F, type GetRequestWithStatus as G, type HexString$1 as H, type IChain as I, type EstimateFillOrderParams as J, type FillOrderEstimate as K, type OrderFeesQuote as L, type ERC7821Call as M, type OrderWithStatus as N, type Order as O, type PostRequestWithStatus as P, type QueryBuyAndSellRatesParams as Q, type RetryConfig as R, type StateMachineIdParams as S, type Transaction as T, OrderStatus as U, type TokenGatewayAssetTeleportedWithStatus as V, TeleportStatus as W, type DecodedOrderPlacedLog as X, type DecodedPostRequestEvent as Y, type DecodedPostResponseEvent as Z, type AllStatusKey as _, type IEvmConfig as a, type SigningAccount as a$, type BidStorageEntry as a0, type BidSubmissionResult as a1, type BlockMetadata as a2, type BytesLikeHex as a3, type CancelOptions as a4, type ChainConfig as a5, type ChainConfigData as a6, Chains as a7, type ConfiguredAssetSymbol as a8, type ConfiguredAssetSymbolInput as a9, type ITimeoutPostRequestMessage as aA, ABI as aB, type IntentGatewayParams as aC, IntentOrderStatus as aD, type IntentOrderStatusKey as aE, type IsmpRequest as aF, type LiquiditySlice as aG, type OrderResponse as aH, type OrderStatusMetadata as aI, type PaymentInfo as aJ, type PhantomBid as aK, type PhantomBidBatchResult as aL, type PhantomBidDeclaration as aM, type PhantomBidOutcome as aN, type PhantomOrderEvent as aO, type PhantomOrderLeg as aP, type PhantomOrderPriceSnapshot as aQ, type PhantomOrderPriceSnapshotsResponse as aR, type PollPhantomOrdersOptions as aS, type PostRequestStatus as aT, type RequestBody as aU, type RequestCommitment as aV, RequestKind as aW, type RequestResponse as aX, RequestStatus as aY, type RequestStatusKey as aZ, type SelectOptions as a_, type Deployment as aa, type DispatchGet as ab, type DispatchInfo as ac, type DispatchPost as ad, type Erc4626VaultConfigData as ae, type ExecuteIntentOrderOptions as af, type ExecutionResult as ag, type FillOptions as ah, type FillerConfig as ai, type GetRequestResponse as aj, type GetResponseByRequestIdResponse as ak, type GetResponseStorageValues as al, type HostParams as am, HyperClientStatus as an, type IBatchConsensusAndGetResponseMessage as ao, type IBatchConsensusAndPostRequestMessage as ap, type IConfig as aq, type IConsensusMessage as ar, type IGetRequestMessage as as, type IGetResponse as at, type IGetResponseMessage as au, type IHyperbridgeConfig as av, INCLUSION_TIMEOUT_MS as aw, type IPostResponse as ax, type IRequestMessage as ay, type ISubstrateConfig as az, type IMessage as b, recoverBidSignerViem as b$, type StateMachineId as b0, type StateMachineResponse as b1, type StorageFacade as b2, TimeoutStatus as b3, type TimeoutStatusKey as b4, type TokenGatewayAssetTeleportedResponse as b5, type TokenInfo as b6, type TokenPrice as b7, type TokenPricesResponse as b8, type UniswapV4PoolConfigData as b9, poolSlug as bA, sortPoolSymbols as bB, tronChainIds as bC, tronNile as bD, type AggregationLogger as bE, type BidNonceKeyFn as bF, type BidSignature as bG, ENTRY_POINT_V08_ADDRESS as bH, FILL_ORDER_ABI as bI, type FetchLike as bJ, type FillData as bK, type HexString as bL, _default as bM, type LpBalance as bN, type OrderCommitmentFn as bO, type PhantomAggregation as bP, type PhantomLegAggregation as bQ, type PhantomLegBidder as bR, type RecoverBidSigner as bS, type RpcBidInfo as bT, type SolverBalanceReader as bU, type YieldVaultMap as bV, aggregatePhantomBids as bW, extractFillData as bX, fetchBidsForOrder as bY, memoizedSolverBalance as bZ, orderCommitmentFromDecoded as b_, chainConfigs as ba, convertCodecToIGetRequest as bb, convertCodecToIProof as bc, convertIGetRequestToCodec as bd, convertIProofToCodec as be, convertStateIdToStateMachineId as bf, convertStateMachineEnumToString as bg, convertStateMachineIdToEnum as bh, decodeAcceptedSourceChains as bi, decodeERC7821ExecuteBatch as bj, decodePhantomBidDeclaration as bk, decodeUserOpScale as bl, deriveHttpUrl as bm, encodeAcceptedSourceChains as bn, encodeERC7821ExecuteBatch as bo, encodeISMPMessage as bp, encodePhantomBidDeclaration as bq, encodeUserOpScale as br, getChainId as bs, getConfigByStateMachineId as bt, getViemChain as bu, hyperbridgeAddress as bv, pharosAtlantic as bw, pharosMainnet as bx, polkadotAssetHubPaseo as by, polkadotHubMainnet as bz, type StateMachineHeight as c, setAggregationFetch as c0, splitBidSignature as c1, weightedMedian as c2, zipFillLegs as c3, type IIsmpMessage as d, type IPostRequest as e, type IGetRequest as f, type IPolkadotHubConfig as g, type IPharosConfig as h, type StateMachineUpdate as i, type ResponseCommitmentWithValues as j, type RequestStatusWithMetadata as k, type PostRequestTimeoutStatus as l, SubstrateChain as m, type ClientConfig as n, type IndexerQueryClient as o, type IProof as p, type IEvmChain as q, IntentsCoprocessor as r, type AvailableLiquidity as s, type IntentOrderStatusUpdate as t, type SelectBidResult as u, type ResumeIntentOrderOptions as v, type CancelOrderOptions as w, type CancelQuote as x, type SubmitBidOptions as y, type PackedUserOperation as z };
@@ -2,7 +2,7 @@ import { ConsolaInstance } from 'consola';
2
2
  import Decimal from 'decimal.js';
3
3
  import { GraphQLClient } from 'graphql-request';
4
4
  import * as viem from 'viem';
5
- import { PublicClient, TransactionReceipt, Hex, Log, ContractFunctionArgs } from 'viem';
5
+ import { PublicClient, TransactionReceipt, Hex, Log, ContractFunctionArgs, Chain as Chain$1 } from 'viem';
6
6
  import { Chain } from 'viem/chains';
7
7
  import { ApiPromise } from '@polkadot/api';
8
8
  import { KeyringPair } from '@polkadot/keyring/types';
@@ -886,7 +886,9 @@ declare const tronNile: {
886
886
  verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
887
887
  };
888
888
  declare const tronChainIds: Set<number>;
889
- type ConfiguredAssetSymbol = "WETH" | "DAI" | "USDC" | "USDT" | "cNGN" | "EXT";
889
+ type ConfiguredAssetSymbol = "WETH" | "DAI" | "USDC" | "USDT" | "cNGN" | "EXT" | "ZARP" | "EURC" | "XSGD" | "TRYB" | "USDR";
890
+ /** A configured asset symbol in its canonical, lowercase, or uppercase form. */
891
+ type ConfiguredAssetSymbolInput = ConfiguredAssetSymbol | Lowercase<ConfiguredAssetSymbol> | Uppercase<ConfiguredAssetSymbol>;
890
892
  interface UniswapV4PoolConfigData {
891
893
  tokens: readonly [ConfiguredAssetSymbol, ConfiguredAssetSymbol];
892
894
  fee: number;
@@ -1015,7 +1017,7 @@ interface ChainConfigData {
1015
1017
  layerZeroEid?: number;
1016
1018
  }
1017
1019
  declare const chainConfigs: Record<number, ChainConfigData>;
1018
- declare const getConfigByStateMachineId: (id: Chains) => ChainConfigData | undefined;
1020
+ declare const getConfigByStateMachineId: (id: string) => ChainConfigData | undefined;
1019
1021
  declare const getChainId: (stateMachineId: string) => number | undefined;
1020
1022
  declare const getViemChain: (chainId: number) => Chain | undefined;
1021
1023
  declare const hyperbridgeAddress = "";
@@ -1056,6 +1058,12 @@ declare class ChainConfigService {
1056
1058
  * it, so a new asset is added once in `chain.ts` and nowhere else.
1057
1059
  */
1058
1060
  getAssetBySymbol(chain: string, symbol: string): HexString$1 | undefined;
1061
+ /** Resolves a configured token symbol case-insensitively on a specific chain. */
1062
+ getAssetMetadataBySymbol(chain: string, symbol: string): {
1063
+ symbol: ConfiguredAssetSymbol;
1064
+ address: HexString$1;
1065
+ decimals?: number;
1066
+ } | undefined;
1059
1067
  getCNgnDecimals(chain: string): number | undefined;
1060
1068
  getExtAsset(chain: string): HexString$1 | undefined;
1061
1069
  getExtDecimals(chain: string): number | undefined;
@@ -1372,6 +1380,14 @@ declare function convertCodecToIProof(codec: {
1372
1380
  }): IProof;
1373
1381
  declare function encodeISMPMessage(message: IIsmpMessage): Uint8Array;
1374
1382
 
1383
+ /**
1384
+ * How long a submitted extrinsic has to reach a block before the attempt is treated as stalled.
1385
+ *
1386
+ * Sized against the bid window, not against how long inclusion can conceivably take: a bid is worth
1387
+ * nothing once its window closes, so an extrinsic still sitting in the pool after a few blocks is
1388
+ * better replaced by a higher-tipped copy than waited on.
1389
+ */
1390
+ declare const INCLUSION_TIMEOUT_MS = 20000;
1375
1391
  /**
1376
1392
  * Maps a websocket endpoint onto the HTTP endpoint of the same node — substrate serves both on the
1377
1393
  * same host and port, so the scheme is the only difference. Throws for anything that is not a
@@ -1550,8 +1566,10 @@ declare class IntentsCoprocessor {
1550
1566
  /**
1551
1567
  * Signs and sends an extrinsic. Submissions are serialised through {@link submissionQueue} so
1552
1568
  * concurrent calls never collide on the substrate account nonce — each extrinsic reaches a block
1553
- * (or is confirmed still pooled and returned as `pending`) before the next is signed; auto-nonce
1554
- * via `system.accountNextIndex` counts pooled extrinsics, so a pending one is never re-used.
1569
+ * (or is confirmed still pooled and returned as `pending`) before the next is signed. The
1570
+ * auto-nonce is the account's on-chain nonce, so a still-pooled extrinsic does not advance it: a
1571
+ * submission signed behind a pending one bounces off it (1013/1014) and is reported as pending
1572
+ * too, rather than landing as a second copy.
1555
1573
  *
1556
1574
  * The extrinsic is built rather than passed in because the api it is built on decides where it
1557
1575
  * is signed and sent: a websocket that is down when the queue reaches this submission diverts it
@@ -1576,14 +1594,34 @@ declare class IntentsCoprocessor {
1576
1594
  * Signs and sends an extrinsic, handling status updates and errors.
1577
1595
  * Implements retry logic with progressive tip increases for stuck transactions.
1578
1596
  *
1579
- * A retry only happens when the previous attempt verifiably went nowhere. Once an attempt's
1580
- * extrinsic is known to be pooled (`pending`), re-signing the same call would race our own
1581
- * submission: the copy either bounces off the pool (1014, same nonce below the replacement
1582
- * priority bump) or if the original lands first, freeing the nonce — executes as a duplicate
1583
- * and fails on-chain (e.g. `BidNotFound` for a retraction). Neither can succeed, so the pending
1584
- * result is returned for the caller to confirm later.
1597
+ * Two kinds of failure are retried, and the difference is the nonce.
1598
+ *
1599
+ * An attempt that verifiably went nowhere (rejected before the pool, dropped, invalid) leaves
1600
+ * the account nonce free, so the next attempt simply re-signs with the auto-nonce.
1601
+ *
1602
+ * An attempt that reached the pool and was still there when the watch timed out (`stalled`) is
1603
+ * retried as a *replacement*: the same nonce it was signed with, and double the tip. Substrate's
1604
+ * pool evicts a pooled extrinsic in favour of a higher-priority one at the same (account, nonce),
1605
+ * so exactly one of the two can ever execute. This matters for a bid, which is worth nothing once
1606
+ * its window closes — waiting out a stalled extrinsic usually means not bidding at all.
1607
+ *
1608
+ * Re-signing without pinning the nonce is what must never happen here. The auto-nonce is read
1609
+ * from on-chain state, so it is only the stalled extrinsic's nonce for as long as that extrinsic
1610
+ * stays out of a block — and a stall is precisely the case where it may land at any moment. Once
1611
+ * it does, an unpinned retry takes the *next* nonce and both execute: a duplicate `placeBid` that
1612
+ * fails on-chain, and a second `retractBid` that pulls the bid just placed. When the signed nonce
1613
+ * cannot be read, the stalled result is returned rather than guessed at.
1614
+ *
1615
+ * A rejection that bounced off a copy already pooled (1013/1014) is likewise left alone: that
1616
+ * copy is in flight and its outcome is unknown here, so the `pending` result goes back to the
1617
+ * caller to confirm later.
1585
1618
  */
1586
1619
  private sendExtrinsicWithRetries;
1620
+ /**
1621
+ * The nonce an extrinsic was signed with, or undefined if it carries no readable one — which is
1622
+ * the case before it has ever been signed, and for a stub api in tests.
1623
+ */
1624
+ private signedNonce;
1587
1625
  /**
1588
1626
  * Classifies a submission rejection. Codes 1013 ("already imported") and 1014 ("priority is
1589
1627
  * too low") both mean a copy of this account+nonce is already in the pool — almost always our
@@ -1597,8 +1635,13 @@ declare class IntentsCoprocessor {
1597
1635
  *
1598
1636
  * A timeout is only a failure when the extrinsic never made it into the transaction pool.
1599
1637
  * Once a pool-entry status (Future/Ready/Broadcast/Retracted) has been seen, the extrinsic is
1600
- * in flight and may well execute after the watch is abandoned — the result is then `pending`,
1601
- * telling the caller to confirm the outcome later instead of re-signing the same call.
1638
+ * in flight and may well execute after the watch is abandoned — the result is then `pending`
1639
+ * and `stalled`, telling the caller to replace it under the same nonce or confirm it later,
1640
+ * never to re-sign the same call under a fresh one.
1641
+ *
1642
+ * `nonce` pins the submission to a specific account nonce, which is what makes a retry a pool
1643
+ * replacement rather than a second extrinsic queued behind the first. Left undefined on the
1644
+ * first attempt, where the api's auto-nonce is correct.
1602
1645
  */
1603
1646
  private sendWithTimeout;
1604
1647
  /**
@@ -2926,25 +2969,51 @@ interface PhantomOrderPriceSnapshotsResponse {
2926
2969
  }>;
2927
2970
  };
2928
2971
  }
2972
+ /** One independently reported slice of indexed liquidity. */
2973
+ interface LiquiditySlice {
2974
+ totalLiquidity: string;
2975
+ providerCount: number;
2976
+ }
2929
2977
  /**
2930
- * Total solver liquidity measured at one immutable Phantom price snapshot.
2978
+ * Indexed destination capacity and its source-routing slices.
2931
2979
  *
2932
- * Liquidity amounts are decimal strings formatted with the configured decimals
2933
- * for their respective `tokenAddress` and chain.
2980
+ * The SDK reports the indexer's facts separately and does not decide whether a
2981
+ * source chain is covered by the legacy unrestricted-bidder policy.
2934
2982
  */
2935
- interface AvailableLiquiditySnapshot {
2936
- totalLiquidity: string;
2937
- providerCount: number;
2983
+ interface AvailableLiquidity {
2984
+ sourceChain: Chains;
2985
+ destinationChain: Chains;
2938
2986
  tokenAddress: HexString$1;
2939
- snapshotTime: Date;
2940
- liquidityByChain: AvailableLiquidityByChain[];
2987
+ updatedAt: Date;
2988
+ destination: LiquiditySlice;
2989
+ unrestricted: LiquiditySlice;
2990
+ explicitRoute: (LiquiditySlice & {
2991
+ updatedAt: Date;
2992
+ }) | null;
2941
2993
  }
2942
- /** Liquidity for one chain/token balance group in an availability snapshot. */
2943
- interface AvailableLiquidityByChain {
2944
- chain: string;
2945
- tokenAddress: HexString$1;
2946
- totalLiquidity: string;
2947
- providerCount: number;
2994
+ /**
2995
+ * Chain-specific buy and sell rates expressed as quote-token units per one
2996
+ * base token. The quote token is the less valuable currency when the indexed
2997
+ * rates establish an ordering (for example, cNGN in a USDC/cNGN pair).
2998
+ */
2999
+ interface BuyAndSellRates {
3000
+ baseTokenSymbol: ConfiguredAssetSymbol;
3001
+ quoteTokenSymbol: ConfiguredAssetSymbol;
3002
+ sourceChain: Chains;
3003
+ destinationChain: Chains;
3004
+ /** Quote-token units received when buying the quote token with one base token. */
3005
+ buyRate: string | null;
3006
+ /** Quote-token units sold to receive one base token. */
3007
+ sellRate: string | null;
3008
+ buyRateUpdatedAt: Date | null;
3009
+ sellRateUpdatedAt: Date | null;
3010
+ }
3011
+ /** Symbol-only input for querying an indexed pool's rates. */
3012
+ interface QueryBuyAndSellRatesParams {
3013
+ tokenInSymbol: ConfiguredAssetSymbolInput;
3014
+ tokenOutSymbol: ConfiguredAssetSymbolInput;
3015
+ sourceChainId: Chain$1["id"];
3016
+ destinationChainId: Chain$1["id"];
2948
3017
  }
2949
3018
  interface TokenPrice {
2950
3019
  symbol: string;
@@ -3390,6 +3459,16 @@ type ERC7821Call = {
3390
3459
  data: `0x${string}`;
3391
3460
  };
3392
3461
 
3462
+ /**
3463
+ * Canonical symbol order used by the SDK and indexer pool IDs.
3464
+ *
3465
+ * Plain code-unit comparison, never locale-sensitive collation — the result is
3466
+ * a persisted primary key and must sort identically everywhere.
3467
+ */
3468
+ declare function sortPoolSymbols<Symbol extends string>(symbolA: Symbol, symbolB: Symbol): [Symbol, Symbol];
3469
+ /** Canonical indexer pool ID for a pair of canonical token symbols. */
3470
+ declare function poolSlug(symbolA: string, symbolB: string): string;
3471
+
3393
3472
  declare function encodeERC7821ExecuteBatch(calls: ERC7821Call[]): HexString$1;
3394
3473
  declare function decodeERC7821ExecuteBatch(callData: HexString$1): ERC7821Call[] | null;
3395
3474
 
@@ -7839,4 +7918,4 @@ declare const _default: {
7839
7918
  }];
7840
7919
  };
7841
7920
 
7842
- export { type BidStorageEntry as $, type AssetTeleported as A, type Bid as B, ChainConfigService as C, type EstimateFillOrderParams as D, type EstimateGasCallData as E, type FillerBid as F, type GetRequestWithStatus as G, type HexString$1 as H, type IChain as I, type FillOrderEstimate as J, type OrderFeesQuote as K, type ERC7821Call as L, type OrderWithStatus as M, OrderStatus as N, type Order as O, type PostRequestWithStatus as P, type TokenGatewayAssetTeleportedWithStatus as Q, type RetryConfig as R, type StateMachineIdParams as S, type Transaction as T, TeleportStatus as U, type DecodedOrderPlacedLog as V, type DecodedPostRequestEvent as W, type DecodedPostResponseEvent as X, type AllStatusKey as Y, type AssetTeleportedResponse as Z, type AvailableLiquidityByChain as _, type IEvmConfig as a, TimeoutStatus as a$, type BidSubmissionResult as a0, type BlockMetadata as a1, type BytesLikeHex as a2, type CancelOptions as a3, type ChainConfig as a4, type ChainConfigData as a5, Chains as a6, type ConfiguredAssetSymbol as a7, type Deployment as a8, type DispatchGet as a9, IntentOrderStatus as aA, type IntentOrderStatusKey as aB, type IsmpRequest as aC, type OrderResponse as aD, type OrderStatusMetadata as aE, type PaymentInfo as aF, type PhantomBid as aG, type PhantomBidBatchResult as aH, type PhantomBidDeclaration as aI, type PhantomBidOutcome as aJ, type PhantomOrderEvent as aK, type PhantomOrderLeg as aL, type PhantomOrderPriceSnapshot as aM, type PhantomOrderPriceSnapshotsResponse as aN, type PollPhantomOrdersOptions as aO, type PostRequestStatus as aP, type RequestBody as aQ, type RequestCommitment as aR, RequestKind as aS, type RequestResponse as aT, RequestStatus as aU, type RequestStatusKey as aV, type SelectOptions as aW, type SigningAccount as aX, type StateMachineId as aY, type StateMachineResponse as aZ, type StorageFacade as a_, type DispatchInfo as aa, type DispatchPost as ab, type Erc4626VaultConfigData as ac, type ExecuteIntentOrderOptions as ad, type ExecutionResult as ae, type FillOptions as af, type FillerConfig as ag, type GetRequestResponse as ah, type GetResponseByRequestIdResponse as ai, type GetResponseStorageValues as aj, type HostParams as ak, HyperClientStatus as al, type IBatchConsensusAndGetResponseMessage as am, type IBatchConsensusAndPostRequestMessage as an, type IConfig as ao, type IConsensusMessage as ap, type IGetRequestMessage as aq, type IGetResponse as ar, type IGetResponseMessage as as, type IHyperbridgeConfig as at, type IPostResponse as au, type IRequestMessage as av, type ISubstrateConfig as aw, type ITimeoutPostRequestMessage as ax, ABI as ay, type IntentGatewayParams as az, type IMessage as b, type TimeoutStatusKey as b0, type TokenGatewayAssetTeleportedResponse as b1, type TokenInfo as b2, type TokenPrice as b3, type TokenPricesResponse as b4, type UniswapV4PoolConfigData as b5, chainConfigs as b6, convertCodecToIGetRequest as b7, convertCodecToIProof as b8, convertIGetRequestToCodec as b9, type BidSignature as bA, ENTRY_POINT_V08_ADDRESS as bB, FILL_ORDER_ABI as bC, type FetchLike as bD, type FillData as bE, type HexString as bF, _default as bG, type LpBalance as bH, type OrderCommitmentFn as bI, type PhantomAggregation as bJ, type PhantomLegAggregation as bK, type PhantomLegBidder as bL, type RecoverBidSigner as bM, type RpcBidInfo as bN, type SolverBalanceReader as bO, type YieldVaultMap as bP, aggregatePhantomBids as bQ, extractFillData as bR, fetchBidsForOrder as bS, memoizedSolverBalance as bT, orderCommitmentFromDecoded as bU, recoverBidSignerViem as bV, setAggregationFetch as bW, splitBidSignature as bX, weightedMedian as bY, zipFillLegs as bZ, convertIProofToCodec as ba, convertStateIdToStateMachineId as bb, convertStateMachineEnumToString as bc, convertStateMachineIdToEnum as bd, decodeAcceptedSourceChains as be, decodeERC7821ExecuteBatch as bf, decodePhantomBidDeclaration as bg, decodeUserOpScale as bh, deriveHttpUrl as bi, encodeAcceptedSourceChains as bj, encodeERC7821ExecuteBatch as bk, encodeISMPMessage as bl, encodePhantomBidDeclaration as bm, encodeUserOpScale as bn, getChainId as bo, getConfigByStateMachineId as bp, getViemChain as bq, hyperbridgeAddress as br, pharosAtlantic as bs, pharosMainnet as bt, polkadotAssetHubPaseo as bu, polkadotHubMainnet as bv, tronChainIds as bw, tronNile as bx, type AggregationLogger as by, type BidNonceKeyFn as bz, type StateMachineHeight as c, type IIsmpMessage as d, type IPostRequest as e, type IGetRequest as f, type IPolkadotHubConfig as g, type IPharosConfig as h, type StateMachineUpdate as i, type ResponseCommitmentWithValues as j, type RequestStatusWithMetadata as k, type PostRequestTimeoutStatus as l, SubstrateChain as m, type ClientConfig as n, type IndexerQueryClient as o, type IProof as p, type IEvmChain as q, IntentsCoprocessor as r, type AvailableLiquiditySnapshot as s, type IntentOrderStatusUpdate as t, type SelectBidResult as u, type ResumeIntentOrderOptions as v, type CancelOrderOptions as w, type CancelQuote as x, type SubmitBidOptions as y, type PackedUserOperation as z };
7921
+ export { type AssetTeleportedResponse as $, type AssetTeleported as A, type BuyAndSellRates as B, ChainConfigService as C, type Bid as D, type EstimateGasCallData as E, type FillerBid as F, type GetRequestWithStatus as G, type HexString$1 as H, type IChain as I, type EstimateFillOrderParams as J, type FillOrderEstimate as K, type OrderFeesQuote as L, type ERC7821Call as M, type OrderWithStatus as N, type Order as O, type PostRequestWithStatus as P, type QueryBuyAndSellRatesParams as Q, type RetryConfig as R, type StateMachineIdParams as S, type Transaction as T, OrderStatus as U, type TokenGatewayAssetTeleportedWithStatus as V, TeleportStatus as W, type DecodedOrderPlacedLog as X, type DecodedPostRequestEvent as Y, type DecodedPostResponseEvent as Z, type AllStatusKey as _, type IEvmConfig as a, type SigningAccount as a$, type BidStorageEntry as a0, type BidSubmissionResult as a1, type BlockMetadata as a2, type BytesLikeHex as a3, type CancelOptions as a4, type ChainConfig as a5, type ChainConfigData as a6, Chains as a7, type ConfiguredAssetSymbol as a8, type ConfiguredAssetSymbolInput as a9, type ITimeoutPostRequestMessage as aA, ABI as aB, type IntentGatewayParams as aC, IntentOrderStatus as aD, type IntentOrderStatusKey as aE, type IsmpRequest as aF, type LiquiditySlice as aG, type OrderResponse as aH, type OrderStatusMetadata as aI, type PaymentInfo as aJ, type PhantomBid as aK, type PhantomBidBatchResult as aL, type PhantomBidDeclaration as aM, type PhantomBidOutcome as aN, type PhantomOrderEvent as aO, type PhantomOrderLeg as aP, type PhantomOrderPriceSnapshot as aQ, type PhantomOrderPriceSnapshotsResponse as aR, type PollPhantomOrdersOptions as aS, type PostRequestStatus as aT, type RequestBody as aU, type RequestCommitment as aV, RequestKind as aW, type RequestResponse as aX, RequestStatus as aY, type RequestStatusKey as aZ, type SelectOptions as a_, type Deployment as aa, type DispatchGet as ab, type DispatchInfo as ac, type DispatchPost as ad, type Erc4626VaultConfigData as ae, type ExecuteIntentOrderOptions as af, type ExecutionResult as ag, type FillOptions as ah, type FillerConfig as ai, type GetRequestResponse as aj, type GetResponseByRequestIdResponse as ak, type GetResponseStorageValues as al, type HostParams as am, HyperClientStatus as an, type IBatchConsensusAndGetResponseMessage as ao, type IBatchConsensusAndPostRequestMessage as ap, type IConfig as aq, type IConsensusMessage as ar, type IGetRequestMessage as as, type IGetResponse as at, type IGetResponseMessage as au, type IHyperbridgeConfig as av, INCLUSION_TIMEOUT_MS as aw, type IPostResponse as ax, type IRequestMessage as ay, type ISubstrateConfig as az, type IMessage as b, recoverBidSignerViem as b$, type StateMachineId as b0, type StateMachineResponse as b1, type StorageFacade as b2, TimeoutStatus as b3, type TimeoutStatusKey as b4, type TokenGatewayAssetTeleportedResponse as b5, type TokenInfo as b6, type TokenPrice as b7, type TokenPricesResponse as b8, type UniswapV4PoolConfigData as b9, poolSlug as bA, sortPoolSymbols as bB, tronChainIds as bC, tronNile as bD, type AggregationLogger as bE, type BidNonceKeyFn as bF, type BidSignature as bG, ENTRY_POINT_V08_ADDRESS as bH, FILL_ORDER_ABI as bI, type FetchLike as bJ, type FillData as bK, type HexString as bL, _default as bM, type LpBalance as bN, type OrderCommitmentFn as bO, type PhantomAggregation as bP, type PhantomLegAggregation as bQ, type PhantomLegBidder as bR, type RecoverBidSigner as bS, type RpcBidInfo as bT, type SolverBalanceReader as bU, type YieldVaultMap as bV, aggregatePhantomBids as bW, extractFillData as bX, fetchBidsForOrder as bY, memoizedSolverBalance as bZ, orderCommitmentFromDecoded as b_, chainConfigs as ba, convertCodecToIGetRequest as bb, convertCodecToIProof as bc, convertIGetRequestToCodec as bd, convertIProofToCodec as be, convertStateIdToStateMachineId as bf, convertStateMachineEnumToString as bg, convertStateMachineIdToEnum as bh, decodeAcceptedSourceChains as bi, decodeERC7821ExecuteBatch as bj, decodePhantomBidDeclaration as bk, decodeUserOpScale as bl, deriveHttpUrl as bm, encodeAcceptedSourceChains as bn, encodeERC7821ExecuteBatch as bo, encodeISMPMessage as bp, encodePhantomBidDeclaration as bq, encodeUserOpScale as br, getChainId as bs, getConfigByStateMachineId as bt, getViemChain as bu, hyperbridgeAddress as bv, pharosAtlantic as bw, pharosMainnet as bx, polkadotAssetHubPaseo as by, polkadotHubMainnet as bz, type StateMachineHeight as c, setAggregationFetch as c0, splitBidSignature as c1, weightedMedian as c2, zipFillLegs as c3, type IIsmpMessage as d, type IPostRequest as e, type IGetRequest as f, type IPolkadotHubConfig as g, type IPharosConfig as h, type StateMachineUpdate as i, type ResponseCommitmentWithValues as j, type RequestStatusWithMetadata as k, type PostRequestTimeoutStatus as l, SubstrateChain as m, type ClientConfig as n, type IndexerQueryClient as o, type IProof as p, type IEvmChain as q, IntentsCoprocessor as r, type AvailableLiquidity as s, type IntentOrderStatusUpdate as t, type SelectBidResult as u, type ResumeIntentOrderOptions as v, type CancelOrderOptions as w, type CancelQuote as x, type SubmitBidOptions as y, type PackedUserOperation as z };
@@ -1939,6 +1939,14 @@ function decodeUserOpScale(hex) {
1939
1939
  signature: util.u8aToHex(new Uint8Array(decoded.signature))
1940
1940
  };
1941
1941
  }
1942
+
1943
+ // src/protocols/intents/liquidity-pool.ts
1944
+ function sortPoolSymbols(symbolA, symbolB) {
1945
+ return symbolA.toLowerCase() <= symbolB.toLowerCase() ? [symbolA, symbolB] : [symbolB, symbolA];
1946
+ }
1947
+ function poolSlug(symbolA, symbolB) {
1948
+ return sortPoolSymbols(symbolA, symbolB).join("-");
1949
+ }
1942
1950
  var SELECT_SOLVER_TYPEHASH = viem.keccak256(viem.toHex("SelectSolver(bytes32 commitment,address solver)"));
1943
1951
  var PACKED_USEROP_TYPEHASH = viem.keccak256(
1944
1952
  viem.toHex(
@@ -3036,8 +3044,10 @@ exports.extractFillData = extractFillData;
3036
3044
  exports.fetchBidsForOrder = fetchBidsForOrder;
3037
3045
  exports.memoizedSolverBalance = memoizedSolverBalance;
3038
3046
  exports.orderCommitmentFromDecoded = orderCommitmentFromDecoded;
3047
+ exports.poolSlug = poolSlug;
3039
3048
  exports.recoverBidSignerViem = recoverBidSignerViem;
3040
3049
  exports.setAggregationFetch = setAggregationFetch;
3050
+ exports.sortPoolSymbols = sortPoolSymbols;
3041
3051
  exports.splitBidSignature = splitBidSignature;
3042
3052
  exports.weightedMedian = weightedMedian;
3043
3053
  exports.zipFillLegs = zipFillLegs;