@hyperbridge/sdk 2.8.8 → 2.8.11

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.
@@ -6,6 +6,7 @@ import { PublicClient, TransactionReceipt, Hex, Log, ContractFunctionArgs, Chain
6
6
  import { Chain } from 'viem/chains';
7
7
  import { ApiPromise } from '@polkadot/api';
8
8
  import { KeyringPair } from '@polkadot/keyring/types';
9
+ import { RuntimeVersion } from '@polkadot/types/interfaces';
9
10
 
10
11
  declare const _default$1: {
11
12
  ABI: readonly [{
@@ -1027,50 +1028,50 @@ declare class ChainConfigService {
1027
1028
  constructor(env?: NodeJS.ProcessEnv);
1028
1029
  private getConfig;
1029
1030
  getChainConfig(chain: string): ChainConfig;
1030
- getIntentGatewayAddress(chain: string): HexString$1;
1031
- getTokenGatewayAddress(chain: string): HexString$1;
1032
- getHostAddress(chain: string): HexString$1;
1031
+ getIntentGatewayAddress(chain: string): HexString$2;
1032
+ getTokenGatewayAddress(chain: string): HexString$2;
1033
+ getHostAddress(chain: string): HexString$2;
1033
1034
  getWrappedNativeAssetWithDecimals(chain: string): {
1034
- asset: HexString$1;
1035
+ asset: HexString$2;
1035
1036
  decimals: number;
1036
1037
  };
1037
- getDaiAsset(chain: string): HexString$1;
1038
- getAssetAddress(chain: string, symbol: ConfiguredAssetSymbol): HexString$1 | undefined;
1038
+ getDaiAsset(chain: string): HexString$2;
1039
+ getAssetAddress(chain: string, symbol: ConfiguredAssetSymbol): HexString$2 | undefined;
1039
1040
  /**
1040
1041
  * Resolves configured token metadata from an address on a specific chain.
1041
1042
  * This is used by SDK helpers that accept token addresses rather than caller-
1042
1043
  * supplied symbols or decimals.
1043
1044
  */
1044
- getAssetMetadataByAddress(chain: string, address: HexString$1): {
1045
+ getAssetMetadataByAddress(chain: string, address: HexString$2): {
1045
1046
  symbol: ConfiguredAssetSymbol;
1046
- address: HexString$1;
1047
+ address: HexString$2;
1047
1048
  decimals?: number;
1048
1049
  } | undefined;
1049
- getUsdtAsset(chain: string): HexString$1;
1050
- getUsdcAsset(chain: string): HexString$1;
1050
+ getUsdtAsset(chain: string): HexString$2;
1051
+ getUsdcAsset(chain: string): HexString$2;
1051
1052
  getUsdcDecimals(chain: string): number;
1052
1053
  getUsdtDecimals(chain: string): number;
1053
- getCNgnAsset(chain: string): HexString$1 | undefined;
1054
+ getCNgnAsset(chain: string): HexString$2 | undefined;
1054
1055
  /**
1055
1056
  * Address of `symbol` on `chain` from the per-chain asset table, matched
1056
1057
  * case-insensitively ("cNGN" ≡ "CNGN"). This table is the single source of
1057
1058
  * truth for token addresses — the simplex asset registry resolves through
1058
1059
  * it, so a new asset is added once in `chain.ts` and nowhere else.
1059
1060
  */
1060
- getAssetBySymbol(chain: string, symbol: string): HexString$1 | undefined;
1061
+ getAssetBySymbol(chain: string, symbol: string): HexString$2 | undefined;
1061
1062
  /** Resolves a configured token symbol case-insensitively on a specific chain. */
1062
1063
  getAssetMetadataBySymbol(chain: string, symbol: string): {
1063
1064
  symbol: ConfiguredAssetSymbol;
1064
- address: HexString$1;
1065
+ address: HexString$2;
1065
1066
  decimals?: number;
1066
1067
  } | undefined;
1067
1068
  getCNgnDecimals(chain: string): number | undefined;
1068
- getExtAsset(chain: string): HexString$1 | undefined;
1069
+ getExtAsset(chain: string): HexString$2 | undefined;
1069
1070
  getExtDecimals(chain: string): number | undefined;
1070
1071
  /** Configured exotic (non-USD) tokens on a chain, for selection UIs. EXT is a test asset and is not offered. */
1071
1072
  getKnownExoticTokens(chain: string): Array<{
1072
1073
  symbol: string;
1073
- address: HexString$1;
1074
+ address: HexString$2;
1074
1075
  decimals?: number;
1075
1076
  }>;
1076
1077
  /** Known ERC-4626 treasury vaults on a chain, for selection UIs. */
@@ -1079,30 +1080,30 @@ declare class ChainConfigService {
1079
1080
  getConsensusStateId(chain: string): string;
1080
1081
  getHyperbridgeChainId(): number;
1081
1082
  getRpcUrl(chain: string): string;
1082
- getUniswapRouterV2Address(chain: string): HexString$1;
1083
- getAerodromeRouterAddress(chain: string): HexString$1;
1084
- getUniswapV2FactoryAddress(chain: string): HexString$1;
1085
- getUniswapV3FactoryAddress(chain: string): HexString$1;
1086
- getUniversalRouterAddress(chain: string): HexString$1;
1087
- getUniswapV3QuoterAddress(chain: string): HexString$1;
1088
- getUniswapV4QuoterAddress(chain: string): HexString$1;
1089
- getUniswapV4PositionManagerAddress(chain: string): HexString$1;
1090
- getUniswapV4PoolManagerAddress(chain: string): HexString$1;
1091
- getUniswapV4StateViewAddress(chain: string): HexString$1;
1083
+ getUniswapRouterV2Address(chain: string): HexString$2;
1084
+ getAerodromeRouterAddress(chain: string): HexString$2;
1085
+ getUniswapV2FactoryAddress(chain: string): HexString$2;
1086
+ getUniswapV3FactoryAddress(chain: string): HexString$2;
1087
+ getUniversalRouterAddress(chain: string): HexString$2;
1088
+ getUniswapV3QuoterAddress(chain: string): HexString$2;
1089
+ getUniswapV4QuoterAddress(chain: string): HexString$2;
1090
+ getUniswapV4PositionManagerAddress(chain: string): HexString$2;
1091
+ getUniswapV4PoolManagerAddress(chain: string): HexString$2;
1092
+ getUniswapV4StateViewAddress(chain: string): HexString$2;
1092
1093
  getUniswapV4PoolConfigs(chain: string): UniswapV4PoolConfigData[];
1093
- getPermit2Address(chain: string): HexString$1;
1094
- getSolverAccountAddress(chain: string): HexString$1 | undefined;
1094
+ getPermit2Address(chain: string): HexString$2;
1095
+ getSolverAccountAddress(chain: string): HexString$2 | undefined;
1095
1096
  getCoingeckoId(chain: string): string | undefined;
1096
1097
  getEtherscanApiKey(): string | undefined;
1097
- getCalldispatcherAddress(chain: string): HexString$1;
1098
+ getCalldispatcherAddress(chain: string): HexString$2;
1098
1099
  getTokenStorageSlots(chain: string, tokenAddress: string): {
1099
1100
  balanceSlot: number;
1100
1101
  allowanceSlot: number;
1101
1102
  } | undefined;
1102
1103
  getPopularTokens(chain: string): string[];
1103
- getEntryPointV08Address(chain: string): HexString$1;
1104
- getCirclePaymasterAddress(chain: string): HexString$1 | undefined;
1105
- getSimplexPaymasterAddress(chain: string): HexString$1 | undefined;
1104
+ getEntryPointV08Address(chain: string): HexString$2;
1105
+ getCirclePaymasterAddress(chain: string): HexString$2 | undefined;
1106
+ getSimplexPaymasterAddress(chain: string): HexString$2 | undefined;
1106
1107
  getHyperbridgeAddress(): string;
1107
1108
  /**
1108
1109
  * Get the LayerZero Endpoint ID for the chain
@@ -1114,7 +1115,7 @@ declare class ChainConfigService {
1114
1115
  * On Ethereum: OFT Adapter (locks/unlocks USDT)
1115
1116
  * On other chains: OFT contract (mints/burns USDT0)
1116
1117
  */
1117
- getUsdt0OftAddress(chain: string): HexString$1 | undefined;
1118
+ getUsdt0OftAddress(chain: string): HexString$2 | undefined;
1118
1119
  }
1119
1120
 
1120
1121
  type IStateMachine = {
@@ -1164,33 +1165,33 @@ declare class SubstrateChain implements IChain {
1164
1165
  * @param key - The H256 hash key (as a 0x-prefixed hex string)
1165
1166
  * @returns The storage key as a hex string
1166
1167
  */
1167
- requestReceiptKey(key: HexString$1): HexString$1;
1168
+ requestReceiptKey(key: HexString$2): HexString$2;
1168
1169
  /**
1169
1170
  * Returns the storage key for a request commitment in the child trie
1170
1171
  * The request commitment is the key
1171
1172
  * @param key - The H256 hash key (as a 0x-prefixed hex string)
1172
1173
  * @returns The storage key as a hex string
1173
1174
  */
1174
- requestCommitmentKey(key: HexString$1): HexString$1;
1175
+ requestCommitmentKey(key: HexString$2): HexString$2;
1175
1176
  /**
1176
1177
  * Queries a request commitment from the ISMP child trie storage.
1177
1178
  * @param {HexString} commitment - The commitment hash to look up.
1178
1179
  * @returns {Promise<HexString | undefined>} The commitment data if found, undefined otherwise.
1179
1180
  */
1180
- queryRequestCommitment(commitment: HexString$1): Promise<HexString$1 | undefined>;
1181
+ queryRequestCommitment(commitment: HexString$2): Promise<HexString$2 | undefined>;
1181
1182
  /**
1182
1183
  * Queries the request receipt.
1183
1184
  * @param {HexString} commitment - The commitment to query.
1184
1185
  * @returns {Promise<HexString | undefined>} The relayer address responsible for delivering the request.
1185
1186
  */
1186
- queryRequestReceipt(commitment: HexString$1): Promise<HexString$1 | undefined>;
1187
+ queryRequestReceipt(commitment: HexString$2): Promise<HexString$2 | undefined>;
1187
1188
  /**
1188
1189
  * Returns the storage key for a response receipt in the child trie.
1189
1190
  * A response receipt is keyed by the originating *request* commitment.
1190
1191
  * @param {HexString} key - The request commitment (0x-prefixed H256 hex string)
1191
1192
  * @returns {HexString} The storage key as a hex string
1192
1193
  */
1193
- responseReceiptKey(key: HexString$1): HexString$1;
1194
+ responseReceiptKey(key: HexString$2): HexString$2;
1194
1195
  /**
1195
1196
  * Queries the response receipt for a request commitment. For a GET, Hyperbridge
1196
1197
  * produces the response as it processes the request, so the presence of a response
@@ -1198,7 +1199,7 @@ declare class SubstrateChain implements IChain {
1198
1199
  * @param {HexString} commitment - The originating request commitment to query.
1199
1200
  * @returns {Promise<HexString | undefined>} The receipt data if present, otherwise undefined.
1200
1201
  */
1201
- queryResponseReceipt(commitment: HexString$1): Promise<HexString$1 | undefined>;
1202
+ queryResponseReceipt(commitment: HexString$2): Promise<HexString$2 | undefined>;
1202
1203
  /**
1203
1204
  * Queries the state-machine commitment Hyperbridge holds for a counterparty chain at an
1204
1205
  * exact height — the `BoundedStateCommitments` map that `state_machine_commitment` (and thus
@@ -1207,7 +1208,7 @@ declare class SubstrateChain implements IChain {
1207
1208
  * @param {StateMachineHeight} height - The counterparty state machine id + height.
1208
1209
  * @returns {Promise<HexString | undefined>} The committed state root, or undefined if absent.
1209
1210
  */
1210
- queryStateMachineCommitment(height: StateMachineHeight): Promise<HexString$1 | undefined>;
1211
+ queryStateMachineCommitment(height: StateMachineHeight): Promise<HexString$2 | undefined>;
1211
1212
  /**
1212
1213
  * Returns the current timestamp of the chain.
1213
1214
  * @returns {Promise<bigint>} The current timestamp.
@@ -1220,7 +1221,7 @@ declare class SubstrateChain implements IChain {
1220
1221
  * @param {bigint} [at] - The block number to query at.
1221
1222
  * @returns {Promise<HexString>} The proof.
1222
1223
  */
1223
- queryProof(message: IMessage, counterparty: string, at?: bigint): Promise<HexString$1>;
1224
+ queryProof(message: IMessage, counterparty: string, at?: bigint): Promise<HexString$2>;
1224
1225
  /**
1225
1226
  * Submit an unsigned ISMP transaction to the chain. Resolves when the transaction is finalized.
1226
1227
  * @param message - The message to be submitted.
@@ -1239,7 +1240,7 @@ declare class SubstrateChain implements IChain {
1239
1240
  * @param _address - Optional address (ignored for Substrate; present for IChain compatibility).
1240
1241
  * @returns The state proof as a hexadecimal string.
1241
1242
  */
1242
- queryStateProof(at: bigint, keys: HexString$1[], _address?: HexString$1): Promise<HexString$1>;
1243
+ queryStateProof(at: bigint, keys: HexString$2[], _address?: HexString$2): Promise<HexString$2>;
1243
1244
  /**
1244
1245
  * Get the latest state machine height for a given state machine ID.
1245
1246
  * @param {StateMachineIdParams} stateMachineId - The state machine ID.
@@ -1266,7 +1267,7 @@ declare class SubstrateChain implements IChain {
1266
1267
  * @param message The ISMP message to encode.
1267
1268
  * @returns The encoded message as a hexadecimal string.
1268
1269
  */
1269
- encode(message: IIsmpMessage): HexString$1;
1270
+ encode(message: IIsmpMessage): HexString$2;
1270
1271
  /**
1271
1272
  * Queries the latest proven height for this chain from pallet-ismp.
1272
1273
  */
@@ -1280,7 +1281,7 @@ declare class SubstrateChain implements IChain {
1280
1281
  * @param currentEpoch - The current authority set id on the destination EVM chain
1281
1282
  */
1282
1283
  queryConsensusProofs(neededHeight: bigint, currentEpoch: bigint): Promise<{
1283
- proofs: HexString$1[];
1284
+ proofs: HexString$2[];
1284
1285
  provenHeight: bigint;
1285
1286
  } | undefined>;
1286
1287
  private getPalletIndex;
@@ -1307,7 +1308,7 @@ declare function convertStateMachineEnumToString(stateMachine: {
1307
1308
  */
1308
1309
  declare function convertStateIdToStateMachineId(stateId: {
1309
1310
  Evm?: number;
1310
- Substrate?: HexString$1;
1311
+ Substrate?: HexString$2;
1311
1312
  Polkadot?: number;
1312
1313
  Kusama?: number;
1313
1314
  }): string;
@@ -1406,22 +1407,22 @@ declare function deriveHttpUrl(wsUrl: string): string;
1406
1407
  * @param userOp - The PackedUserOperation to encode
1407
1408
  * @returns Hex-encoded SCALE bytes
1408
1409
  */
1409
- declare function encodeUserOpScale(userOp: PackedUserOperation): HexString$1;
1410
+ declare function encodeUserOpScale(userOp: PackedUserOperation): HexString$2;
1410
1411
  /**
1411
1412
  * Decodes a SCALE-encoded PackedUserOperation.
1412
1413
  *
1413
1414
  * @param hex - The hex-encoded SCALE bytes
1414
1415
  * @returns The decoded PackedUserOperation
1415
1416
  */
1416
- declare function decodeUserOpScale(hex: HexString$1): PackedUserOperation;
1417
+ declare function decodeUserOpScale(hex: HexString$2): PackedUserOperation;
1417
1418
  /** One directed leg of a phantom order: `standardAmount` of `tokenA` quoted in `tokenB`. */
1418
1419
  interface PhantomOrderLeg {
1419
- tokenA: HexString$1;
1420
- tokenB: HexString$1;
1420
+ tokenA: HexString$2;
1421
+ tokenB: HexString$2;
1421
1422
  standardAmount: bigint;
1422
1423
  }
1423
1424
  interface PhantomOrderEvent {
1424
- commitment: HexString$1;
1425
+ commitment: HexString$2;
1425
1426
  chain: string;
1426
1427
  createdAt: number;
1427
1428
  /**
@@ -1430,21 +1431,35 @@ interface PhantomOrderEvent {
1430
1431
  */
1431
1432
  legs: PhantomOrderLeg[];
1432
1433
  }
1434
+ /** The pallet's phantom order timings, as the chain currently has them. */
1435
+ interface PhantomTimings {
1436
+ /**
1437
+ * Blocks after registration during which the pallet accepts a bid: the `PhantomBidWindow`
1438
+ * storage value, or the `PhantomOrderBidWindowBlocks` runtime constant when that value is zero,
1439
+ * which is the same fallback the pallet's own `phantom_bid_window()` applies.
1440
+ */
1441
+ bidWindowBlocks: number;
1442
+ /**
1443
+ * Blocks between generations (`PhantomOrderInterval`). Zero is meaningful rather than unset —
1444
+ * the pallet generates once and never regenerates — so there is no constant to fall back to.
1445
+ */
1446
+ intervalBlocks: number;
1447
+ }
1433
1448
  /** One phantom bid to place, and the bid it replaces on the same chain. */
1434
1449
  interface PhantomBid {
1435
1450
  /** The phantom order commitment being bid on. */
1436
- commitment: HexString$1;
1451
+ commitment: HexString$2;
1437
1452
  /** The SCALE-encoded PackedUserOperation backing the quote. */
1438
- userOp: HexString$1;
1453
+ userOp: HexString$2;
1439
1454
  /**
1440
1455
  * A live bid from a previous interval on the same chain, retracted alongside this one to
1441
1456
  * reclaim its deposit. Best-effort: a retraction that fails never affects the bid.
1442
1457
  */
1443
- retractCommitment?: HexString$1;
1458
+ retractCommitment?: HexString$2;
1444
1459
  }
1445
1460
  /** What became of one bid in a batch. */
1446
1461
  interface PhantomBidOutcome {
1447
- commitment: HexString$1;
1462
+ commitment: HexString$2;
1448
1463
  success: boolean;
1449
1464
  /** The dispatch error that rejected this bid, when it failed. */
1450
1465
  error?: string;
@@ -1453,8 +1468,8 @@ interface PhantomBidBatchResult {
1453
1468
  /** One entry per submitted bid, in the order they were given. */
1454
1469
  bids: PhantomBidOutcome[];
1455
1470
  /** The block and extrinsic the bids landed in. */
1456
- blockHash?: HexString$1;
1457
- extrinsicHash?: HexString$1;
1471
+ blockHash?: HexString$2;
1472
+ extrinsicHash?: HexString$2;
1458
1473
  /**
1459
1474
  * The batch reached the pool but its inclusion was not observed, so no per-bid outcome is
1460
1475
  * known. Same contract as {@link BidSubmissionResult.pending}: in flight, do not re-sign.
@@ -1468,17 +1483,22 @@ interface PollPhantomOrdersOptions {
1468
1483
  intervalMs?: number;
1469
1484
  /**
1470
1485
  * Most blocks scanned in a single poll, so a long outage catches up over several ticks instead of
1471
- * one unbounded scan. Defaults to 500.
1486
+ * one burst. Defaults to 10 — several times the rate the chain produces blocks, so recovery is
1487
+ * still quick, but small enough to bound both the work one `state_queryStorage` call asks of the
1488
+ * node and the requests the per-block fallback queues ahead of a bid submission.
1472
1489
  */
1473
1490
  maxBlocksPerPoll?: number;
1474
- /**
1475
- * How many blocks before the current head to start from on the first poll. Defaults to 0 (start
1476
- * at the head). Set this to the runtime's bid window to have a restarting process pick up orders
1477
- * whose window is still open.
1478
- */
1479
- lookbackBlocks?: number;
1480
1491
  /** Notified when a poll fails; polling continues regardless. */
1481
1492
  onError?: (err: unknown) => void;
1493
+ /**
1494
+ * Notified when the cursor was forced forward past a backlog too old to bid on, with the range
1495
+ * that was never scanned. Nothing else reports it, and skipping blocks is worth a line in the log.
1496
+ */
1497
+ onSkip?: (skipped: {
1498
+ from: number;
1499
+ to: number;
1500
+ head: number;
1501
+ }) => void;
1482
1502
  }
1483
1503
  /**
1484
1504
  * Service for interacting with Hyperbridge's pallet-intents coprocessor.
@@ -1492,8 +1512,14 @@ declare class IntentsCoprocessor {
1492
1512
  private ownsConnection;
1493
1513
  /** Cached result of whether the node exposes intents_* RPC methods */
1494
1514
  private hasIntentsRpc;
1515
+ /** The pallet's phantom timings, read once. Cleared on failure so the read retries. */
1516
+ private phantomTimingsRead;
1495
1517
  /** The HTTP-backed api, connected on first use. Cleared after a failed attempt so it retries. */
1496
1518
  private httpApi;
1519
+ /** Last runtime version read from the node, for {@link confirmedRuntimeVersion} to compare against. */
1520
+ private lastRuntimeVersion;
1521
+ /** Set once the node refuses `state_queryStorage`, so the poll stops asking for it. */
1522
+ private rangeQueryUnavailable;
1497
1523
  private submissionQueue;
1498
1524
  /**
1499
1525
  * Creates and connects an IntentsCoprocessor to a Hyperbridge node.
@@ -1651,7 +1677,7 @@ declare class IntentsCoprocessor {
1651
1677
  * @param userOp - The encoded PackedUserOperation as hex string
1652
1678
  * @returns BidSubmissionResult with success status and block/extrinsic hash
1653
1679
  */
1654
- submitBid(commitment: HexString$1, userOp: HexString$1): Promise<BidSubmissionResult>;
1680
+ submitBid(commitment: HexString$2, userOp: HexString$2): Promise<BidSubmissionResult>;
1655
1681
  /**
1656
1682
  * Retracts a bid from Hyperbridge and reclaims the deposit
1657
1683
  *
@@ -1660,7 +1686,7 @@ declare class IntentsCoprocessor {
1660
1686
  * @param commitment - The order commitment hash (bytes32)
1661
1687
  * @returns BidSubmissionResult with success status and block/extrinsic hash
1662
1688
  */
1663
- retractBid(commitment: HexString$1): Promise<BidSubmissionResult>;
1689
+ retractBid(commitment: HexString$2): Promise<BidSubmissionResult>;
1664
1690
  /**
1665
1691
  * Places a new bid and retracts a previous one in a single transaction via utility.batch.
1666
1692
  *
@@ -1681,7 +1707,7 @@ declare class IntentsCoprocessor {
1681
1707
  * @param userOp - The encoded PackedUserOperation as hex string
1682
1708
  * @returns BidSubmissionResult with success status and block/extrinsic hash
1683
1709
  */
1684
- submitBidWithRetraction(retractCommitment: HexString$1, bidCommitment: HexString$1, userOp: HexString$1): Promise<BidSubmissionResult>;
1710
+ submitBidWithRetraction(retractCommitment: HexString$2, bidCommitment: HexString$2, userOp: HexString$2): Promise<BidSubmissionResult>;
1685
1711
  /**
1686
1712
  * Places every phantom bid of one interval in a single extrinsic, retracting each chain's
1687
1713
  * previous bid alongside it.
@@ -1723,7 +1749,7 @@ declare class IntentsCoprocessor {
1723
1749
  * @param commitment - The order commitment hash (bytes32)
1724
1750
  * @returns Array of BidStorageEntry objects
1725
1751
  */
1726
- getBidStorageEntries(commitment: HexString$1): Promise<BidStorageEntry[]>;
1752
+ getBidStorageEntries(commitment: HexString$2): Promise<BidStorageEntry[]>;
1727
1753
  /**
1728
1754
  * Fetches all bids for a given order commitment from Hyperbridge.
1729
1755
  *
@@ -1734,7 +1760,7 @@ declare class IntentsCoprocessor {
1734
1760
  * @param commitment - The order commitment hash (bytes32)
1735
1761
  * @returns Array of FillerBid objects containing filler address, userOp, and deposit
1736
1762
  */
1737
- getBidsForOrder(commitment: HexString$1): Promise<FillerBid[]>;
1763
+ getBidsForOrder(commitment: HexString$2): Promise<FillerBid[]>;
1738
1764
  /**
1739
1765
  * Fetches bids using the custom intents_getBidsForOrder RPC.
1740
1766
  * Single round-trip but does not include deposit amounts.
@@ -1757,11 +1783,61 @@ declare class IntentsCoprocessor {
1757
1783
  * Returns `null` if the key is absent (e.g. the node is not an offchain worker
1758
1784
  * or the commitment has expired and been cleared).
1759
1785
  */
1760
- fetchPhantomOrder(commitment: HexString$1): Promise<Order | null>;
1786
+ fetchPhantomOrder(commitment: HexString$2): Promise<Order | null>;
1761
1787
  /**
1762
1788
  * Reads the PhantomOrderRegistered events emitted in a single block.
1789
+ *
1790
+ * Costs two RPCs per block when `knownVersion` is supplied and four without it, which is why the
1791
+ * poll goes to the trouble of establishing one. `api.at(hash)` has to work out which metadata to
1792
+ * decode the block against, and with nothing to go on it fetches the header and then the runtime
1793
+ * version at its parent — every block, forever. Its cheaper paths are a registry already pinned
1794
+ * to this exact hash (only ever the previous block's) or one matching a version the caller
1795
+ * names, so naming the version is the only way out. See `getBlockRegistry` in
1796
+ * `@polkadot/api/base/Init`; the `getUpgradeVersion` shortcut that would otherwise skip the
1797
+ * lookup only covers chains hardcoded in `@polkadot/types-known`, which Hyperbridge is not.
1798
+ *
1799
+ * @param knownVersion - the runtime version this block is known to run, if the caller has
1800
+ * established one. Passing a version the block does not actually run decodes it against the
1801
+ * wrong metadata, so this is for callers that have checked, not a place to pass a guess.
1802
+ */
1803
+ getPhantomOrdersInBlock(blockNumber: number, knownVersion?: RuntimeVersion): Promise<PhantomOrderEvent[]>;
1804
+ /**
1805
+ * The same read, for a caller that already holds the block's hash.
1806
+ *
1807
+ * Split out so the poll can fetch a whole range's hashes in one concurrent wave — which the
1808
+ * provider coalesces into a single batched request — and then read each block's events knowing
1809
+ * its hash. `chain_getBlockHash` is the half of the pair that parallelises safely: it takes no
1810
+ * historic block hash, so it never triggers polkadot-js's per-hash registry resolution, and
1811
+ * concurrent calls cannot race each other's registry state.
1812
+ */
1813
+ getPhantomOrdersAtHash(blockHash: HexString$2, knownVersion?: RuntimeVersion): Promise<PhantomOrderEvent[]>;
1814
+ /**
1815
+ * Every block's phantom orders across a whole range, in one `state_queryStorage` call.
1816
+ *
1817
+ * This is the cheap path: the request cost of a scan stops depending on how many blocks it
1818
+ * covers. The events key is the only key queried, and both bounds are block hashes the caller
1819
+ * already holds.
1820
+ *
1821
+ * Two properties of the RPC shape the result.
1822
+ *
1823
+ * It returns *diffs*: `query_storage_unfiltered` in `sc-rpc` pushes a change set for a block only
1824
+ * when the value differs from the previous block in the range (`has_changed`, and the set is
1825
+ * dropped when empty), so a block whose events encode byte-for-byte identically to its
1826
+ * predecessor's is simply absent. That happens on a quiet chain, where consecutive blocks carry
1827
+ * nothing but the timestamp inherent's `ExtrinsicSuccess`. It is safe here because an absent
1828
+ * block provably carries no phantom orders: a `PhantomOrderRegistered` commitment is derived from
1829
+ * the block number (`phantom_order_commitment`), so a block that registered orders can never
1830
+ * encode identically to any other block. Absent therefore means "same as the previous block",
1831
+ * and the previous block having orders would contradict that.
1832
+ *
1833
+ * And it is gated by `--rpc-methods` (`check_if_safe` in `sc-rpc`), which answers a denied call
1834
+ * with `Method not found`. The node this reads from must already run unsafe RPC to serve
1835
+ * `offchain_localStorageGet` for the orders themselves, so this is normally available; the poll
1836
+ * falls back to reading block by block when it is not.
1837
+ *
1838
+ * @returns one entry per block the node reported a change for, in ascending block order.
1763
1839
  */
1764
- getPhantomOrdersInBlock(blockNumber: number): Promise<PhantomOrderEvent[]>;
1840
+ getPhantomOrdersInRange(fromBlockHash: HexString$2, toBlockHash: HexString$2): Promise<PhantomOrderEvent[][]>;
1765
1841
  /**
1766
1842
  * Polls for newly registered phantom orders, invoking the callback once per block that carries
1767
1843
  * any, with all of that block's orders.
@@ -1788,9 +1864,87 @@ declare class IntentsCoprocessor {
1788
1864
  * socket that looks alive while delivering nothing. It also means a websocket outage does not
1789
1865
  * pause phantom bidding at all — the two transports fail independently.
1790
1866
  *
1867
+ * What the cadence does *not* describe is the request rate, which is what rate limiters police.
1868
+ * A tick costs four requests whatever the range covers — the head, the runtime version, the two
1869
+ * bounding block hashes as one batched request, and one `state_queryStorage` for every block's
1870
+ * events — and they go out back-to-back, so an interval well under any per-second limit could
1871
+ * still arrive as a burst over it. Three things keep that in bounds: the provider coalesces
1872
+ * concurrent calls into one request and paces requests through the endpoint's token bucket (see
1873
+ * `http`), and `maxBlocksPerPoll` bounds the range. A 429 that gets through anyway backs the
1874
+ * poll off for a doubling number of ticks, so a limiter that is already shedding load is not
1875
+ * handed the next window's budget in rejections too.
1876
+ *
1877
+ * Where the node will not serve `state_queryStorage` the poll reads block by block instead, at
1878
+ * three requests plus one per block; see {@link scanRangeAtOnce}.
1879
+ *
1791
1880
  * Returns a function that stops polling.
1792
1881
  */
1793
1882
  pollPhantomOrders(callback: (events: PhantomOrderEvent[]) => void, options?: PollPhantomOrdersOptions): () => void;
1883
+ /**
1884
+ * The Hyperbridge head, over HTTP like every other read here.
1885
+ *
1886
+ * Exposed for callers that have to know how old something is: a phantom order carries the block
1887
+ * it was registered at, and only against the head does that become "still biddable" or "long
1888
+ * expired".
1889
+ */
1890
+ latestBlockNumber(): Promise<number>;
1891
+ /**
1892
+ * The pallet's phantom timings, read from chain state.
1893
+ *
1894
+ * Both are governance-settable and neither is derivable: on Nexus today the window is 15 while
1895
+ * the runtime constant behind it is 25, so anything hard-coded is wrong in one direction or the
1896
+ * other — too tight and live orders are dropped, too loose and bids are sent into a closed
1897
+ * window for the pallet to reject.
1898
+ *
1899
+ * Read once per instance and cached, because a governance change to either is rare and a read
1900
+ * per poll tick would be a request per tick forever. The cost is that a change is picked up on
1901
+ * the next restart rather than immediately. A failed read is not cached, so it retries.
1902
+ */
1903
+ phantomTimings(): Promise<PhantomTimings>;
1904
+ private readPhantomTimings;
1905
+ /**
1906
+ * A whole range of blocks in one `state_queryStorage` call, or `null` when that is not available
1907
+ * and the caller should read block by block.
1908
+ *
1909
+ * Two conditions have to hold, and both are about decoding rather than the range itself.
1910
+ *
1911
+ * The version must be confirmed for this tick — an upgrade inside the range means blocks decode
1912
+ * against different metadata, and one call cannot do that.
1913
+ *
1914
+ * And that confirmed version must still be the one the api's own registry was built for.
1915
+ * `state_queryStorage` declares no historic block hash, so rpc-core skips its registry swap and
1916
+ * decodes the reply against the default registry — fixed at connect, with no
1917
+ * `subscribeRuntimeVersion` on an HTTP api to refresh it. After an upgrade the two diverge, and
1918
+ * the per-block path takes over for good: `api.at(hash, version)` resolves, and builds, the right
1919
+ * registry. That costs a restart to get the cheap path back, which is the correct direction to
1920
+ * fail in.
1921
+ */
1922
+ private scanRangeAtOnce;
1923
+ /**
1924
+ * The runtime version this tick's blocks may be decoded against, or `undefined` when that cannot
1925
+ * be established and each block must resolve its own.
1926
+ *
1927
+ * Naming a version to `api.at` is what removes two of the four RPCs a block scan costs, and it
1928
+ * is only sound while the version is actually the block's. Getting that wrong is not a loud
1929
+ * failure: events decoded against the wrong metadata come back as a shape the scan does not
1930
+ * recognise, so the block reads as carrying no phantom orders and the cursor advances past it —
1931
+ * exactly the silent miss the block cursor exists to rule out.
1932
+ *
1933
+ * So the version is read fresh each tick and only used when it matches the previous reading.
1934
+ * `specVersion` only ever increases, and this read happens *after* the head read, so two equal
1935
+ * readings mean no upgrade landed anywhere in between — and therefore none in the range about to
1936
+ * be scanned. A reading that differs means an upgrade landed inside the range: that tick falls
1937
+ * back to per-block resolution, which is exact, and the version is used from the next tick on
1938
+ * once it has been seen twice.
1939
+ *
1940
+ * The gap this leaves is a backlog reaching back past an upgrade, whose oldest blocks predate
1941
+ * even the previous reading. Recovering from an outage that long means those bid windows closed
1942
+ * many upgrades ago, so nothing is lost that was still winnable.
1943
+ *
1944
+ * A version that cannot be read at all yields `undefined` rather than an error: the scan is
1945
+ * about to make the same request against the same endpoint and is the better place to report it.
1946
+ */
1947
+ private confirmedRuntimeVersion;
1794
1948
  /**
1795
1949
  * The poll cadence for the runtime this instance is connected to: Gargantua polls every block,
1796
1950
  * everything else every 15s. Falls back to the slower cadence if the runtime cannot be read,
@@ -1805,7 +1959,7 @@ declare class IntentsCoprocessor {
1805
1959
  type IIsmpMessage = IRequestMessage | ITimeoutPostRequestMessage | IGetResponseMessage | IGetRequestMessage | IConsensusMessage | IBatchConsensusAndPostRequestMessage | IBatchConsensusAndGetResponseMessage;
1806
1960
  interface IConsensusMessage {
1807
1961
  kind: "Consensus";
1808
- consensusProof: HexString$1;
1962
+ consensusProof: HexString$2;
1809
1963
  }
1810
1964
  interface IRequestMessage {
1811
1965
  /**
@@ -1823,7 +1977,7 @@ interface IRequestMessage {
1823
1977
  /**
1824
1978
  * The signer of the message.
1825
1979
  */
1826
- signer: HexString$1;
1980
+ signer: HexString$2;
1827
1981
  }
1828
1982
  interface IGetRequestMessage {
1829
1983
  /**
@@ -1845,7 +1999,7 @@ interface IGetRequestMessage {
1845
1999
  /**
1846
2000
  * The signer of the message.
1847
2001
  */
1848
- signer: HexString$1;
2002
+ signer: HexString$2;
1849
2003
  }
1850
2004
  interface IGetResponse {
1851
2005
  /**
@@ -1873,7 +2027,7 @@ interface IGetResponseMessage {
1873
2027
  /**
1874
2028
  * The signer of the message.
1875
2029
  */
1876
- signer: HexString$1;
2030
+ signer: HexString$2;
1877
2031
  }
1878
2032
  interface ITimeoutPostRequestMessage {
1879
2033
  /**
@@ -1891,17 +2045,17 @@ interface ITimeoutPostRequestMessage {
1891
2045
  }
1892
2046
  interface IBatchConsensusAndPostRequestMessage {
1893
2047
  kind: "BatchConsensusAndPostRequest";
1894
- consensusProofs: HexString$1[];
2048
+ consensusProofs: HexString$2[];
1895
2049
  requests: IPostRequest[];
1896
2050
  proof: IProof;
1897
- signer: HexString$1;
2051
+ signer: HexString$2;
1898
2052
  }
1899
2053
  interface IBatchConsensusAndGetResponseMessage {
1900
2054
  kind: "BatchConsensusAndGetResponse";
1901
- consensusProofs: HexString$1[];
2055
+ consensusProofs: HexString$2[];
1902
2056
  responses: IGetResponse[];
1903
2057
  proof: IProof;
1904
- signer: HexString$1;
2058
+ signer: HexString$2;
1905
2059
  }
1906
2060
  interface IProof {
1907
2061
  /**
@@ -1919,7 +2073,7 @@ interface IProof {
1919
2073
  /**
1920
2074
  * The encoded storage proof
1921
2075
  */
1922
- proof: HexString$1;
2076
+ proof: HexString$2;
1923
2077
  }
1924
2078
  /**
1925
2079
  * Interface representing a chain.
@@ -1933,18 +2087,18 @@ interface IChain {
1933
2087
  /**
1934
2088
  * Returns the state trie key for the request-receipt storage item for the given request commitment.
1935
2089
  */
1936
- requestReceiptKey(commitment: HexString$1): HexString$1;
2090
+ requestReceiptKey(commitment: HexString$2): HexString$2;
1937
2091
  /**
1938
2092
  * Query and return the request-receipt for the given request commitment.
1939
2093
  */
1940
- queryRequestReceipt(commitment: HexString$1): Promise<HexString$1 | undefined>;
2094
+ queryRequestReceipt(commitment: HexString$2): Promise<HexString$2 | undefined>;
1941
2095
  /**
1942
2096
  * Query and return the encoded storage proof for the provided keys at the given height.
1943
2097
  * @param address - Optional contract address for EVM chains; defaults to host contract when omitted.
1944
2098
  */
1945
- queryStateProof(at: bigint, keys: HexString$1[], address?: HexString$1): Promise<HexString$1>;
1946
- queryProof(message: IMessage, counterparty: string, at?: bigint): Promise<HexString$1>;
1947
- encode(message: IIsmpMessage): HexString$1;
2099
+ queryStateProof(at: bigint, keys: HexString$2[], address?: HexString$2): Promise<HexString$2>;
2100
+ queryProof(message: IMessage, counterparty: string, at?: bigint): Promise<HexString$2>;
2101
+ encode(message: IIsmpMessage): HexString$2;
1948
2102
  /**
1949
2103
  * Get the latest state machine height for a given state machine ID.
1950
2104
  */
@@ -1969,18 +2123,18 @@ interface IEvmChain extends IChain {
1969
2123
  getHostNonce(): Promise<bigint>;
1970
2124
  quoteNative(request: IPostRequest | IGetRequest, fee: bigint): Promise<bigint>;
1971
2125
  getFeeTokenWithDecimals(): Promise<{
1972
- address: HexString$1;
2126
+ address: HexString$2;
1973
2127
  decimals: number;
1974
2128
  }>;
1975
- getPlaceOrderCalldata(txHash: string, intentGatewayAddress: string, occurrenceIndex?: number): Promise<HexString$1>;
1976
- broadcastTransaction(signedTransaction: HexString$1): Promise<TransactionReceipt>;
1977
- getTransactionReceipt(hash: HexString$1): Promise<TransactionReceipt>;
2129
+ getPlaceOrderCalldata(txHash: string, intentGatewayAddress: string, occurrenceIndex?: number): Promise<HexString$2>;
2130
+ broadcastTransaction(signedTransaction: HexString$2): Promise<TransactionReceipt>;
2131
+ getTransactionReceipt(hash: HexString$2): Promise<TransactionReceipt>;
1978
2132
  }
1979
2133
 
1980
2134
  type EstimateGasCallData = ContractFunctionArgs<typeof _default$1.ABI, "nonpayable" | "payable", "handlePostRequests">;
1981
- type HexString$1 = `0x${string}`;
2135
+ type HexString$2 = `0x${string}`;
1982
2136
  type StateMachineId = string;
1983
- type BytesLikeHex = HexString$1;
2137
+ type BytesLikeHex = HexString$2;
1984
2138
  interface IConfig {
1985
2139
  source: IEvmConfig | ISubstrateConfig | IPolkadotHubConfig | IPharosConfig;
1986
2140
  dest: IEvmConfig | ISubstrateConfig | IPolkadotHubConfig | IPharosConfig;
@@ -1990,7 +2144,7 @@ interface IConfig {
1990
2144
  interface IEvmConfig {
1991
2145
  rpcUrl: string;
1992
2146
  stateMachineId: string;
1993
- host: HexString$1;
2147
+ host: HexString$2;
1994
2148
  consensusStateId: string;
1995
2149
  }
1996
2150
  /**
@@ -2022,25 +2176,25 @@ interface IHyperbridgeConfig {
2022
2176
  interface IPostRequest {
2023
2177
  source: string;
2024
2178
  dest: string;
2025
- from: HexString$1;
2026
- to: HexString$1;
2179
+ from: HexString$2;
2180
+ to: HexString$2;
2027
2181
  nonce: bigint;
2028
- body: HexString$1;
2182
+ body: HexString$2;
2029
2183
  timeoutTimestamp: bigint;
2030
2184
  }
2031
2185
  interface IGetRequest {
2032
2186
  source: string;
2033
2187
  dest: string;
2034
- from: HexString$1;
2188
+ from: HexString$2;
2035
2189
  nonce: bigint;
2036
2190
  height: bigint;
2037
- keys: HexString$1[];
2191
+ keys: HexString$2[];
2038
2192
  timeoutTimestamp: bigint;
2039
- context: HexString$1;
2193
+ context: HexString$2;
2040
2194
  }
2041
2195
  interface GetResponseStorageValues {
2042
- key: HexString$1;
2043
- value: HexString$1;
2196
+ key: HexString$2;
2197
+ value: HexString$2;
2044
2198
  }
2045
2199
  interface IPostResponse {
2046
2200
  post: IPostRequest;
@@ -2048,9 +2202,9 @@ interface IPostResponse {
2048
2202
  timeoutTimestamp: bigint;
2049
2203
  }
2050
2204
  type IMessage = {
2051
- Requests: HexString$1[];
2205
+ Requests: HexString$2[];
2052
2206
  } | {
2053
- Responses: HexString$1[];
2207
+ Responses: HexString$2[];
2054
2208
  };
2055
2209
  type IndexerQueryClient = GraphQLClient;
2056
2210
  interface ClientConfig {
@@ -2215,10 +2369,10 @@ interface RequestResponse {
2215
2369
  nodes: Array<{
2216
2370
  source: string;
2217
2371
  dest: string;
2218
- to: HexString$1;
2219
- from: HexString$1;
2372
+ to: HexString$2;
2373
+ from: HexString$2;
2220
2374
  nonce: bigint;
2221
- body: HexString$1;
2375
+ body: HexString$2;
2222
2376
  timeoutTimestamp: bigint;
2223
2377
  statusMetadata: {
2224
2378
  nodes: Array<{
@@ -2238,12 +2392,12 @@ interface GetRequestResponse {
2238
2392
  nodes: Array<{
2239
2393
  source: string;
2240
2394
  dest: string;
2241
- to: HexString$1;
2242
- from: HexString$1;
2395
+ to: HexString$2;
2396
+ from: HexString$2;
2243
2397
  nonce: bigint;
2244
2398
  height: bigint;
2245
- keys: HexString$1[];
2246
- context: HexString$1;
2399
+ keys: HexString$2[];
2400
+ context: HexString$2;
2247
2401
  timeoutTimestamp: bigint;
2248
2402
  statusMetadata: {
2249
2403
  nodes: Array<{
@@ -2343,20 +2497,20 @@ type RequestStatusWithMetadata = {
2343
2497
  interface GenericRequestWithStatuses {
2344
2498
  source: string;
2345
2499
  dest: string;
2346
- from: HexString$1;
2500
+ from: HexString$2;
2347
2501
  nonce: bigint;
2348
2502
  timeoutTimestamp: bigint;
2349
2503
  statuses: Array<RequestStatusWithMetadata>;
2350
2504
  }
2351
2505
  interface PostRequestWithStatus extends GenericRequestWithStatuses {
2352
- to: HexString$1;
2353
- body: HexString$1;
2506
+ to: HexString$2;
2507
+ body: HexString$2;
2354
2508
  }
2355
2509
  interface GetRequestWithStatus extends GenericRequestWithStatuses {
2356
2510
  height: bigint;
2357
- keys: HexString$1[];
2358
- context: HexString$1;
2359
- commitment: HexString$1;
2511
+ keys: HexString$2[];
2512
+ context: HexString$2;
2513
+ commitment: HexString$2;
2360
2514
  }
2361
2515
  interface GetResponseByRequestIdResponse {
2362
2516
  getResponses: {
@@ -2399,7 +2553,7 @@ interface AssetTeleported {
2399
2553
  to: string;
2400
2554
  amount: bigint;
2401
2555
  dest: string;
2402
- commitment: HexString$1;
2556
+ commitment: HexString$2;
2403
2557
  createdAt: Date;
2404
2558
  blockNumber: number;
2405
2559
  }
@@ -2409,7 +2563,7 @@ interface AssetTeleportedResponse {
2409
2563
  interface StateMachineIdParams {
2410
2564
  stateId: {
2411
2565
  Evm?: number;
2412
- Substrate?: HexString$1;
2566
+ Substrate?: HexString$2;
2413
2567
  Polkadot?: number;
2414
2568
  Kusama?: number;
2415
2569
  };
@@ -2452,73 +2606,73 @@ interface TokenInfo {
2452
2606
  interface DecodedOrderPlacedLog extends Log {
2453
2607
  eventName: string;
2454
2608
  args: {
2455
- user: HexString$1;
2609
+ user: HexString$2;
2456
2610
  source: string;
2457
2611
  destination: string;
2458
2612
  deadline: bigint;
2459
2613
  nonce: bigint;
2460
2614
  fees: bigint;
2461
- session: HexString$1;
2462
- beneficiary: HexString$1;
2615
+ session: HexString$2;
2616
+ beneficiary: HexString$2;
2463
2617
  predispatch: Array<{
2464
- token: HexString$1;
2618
+ token: HexString$2;
2465
2619
  amount: bigint;
2466
2620
  }>;
2467
2621
  inputs: Array<{
2468
- token: HexString$1;
2622
+ token: HexString$2;
2469
2623
  amount: bigint;
2470
2624
  }>;
2471
2625
  outputs: Array<{
2472
- token: HexString$1;
2626
+ token: HexString$2;
2473
2627
  amount: bigint;
2474
2628
  }>;
2475
2629
  /**
2476
2630
  * Calldata executed via the CallDispatcher before escrow.
2477
2631
  * Absent on logs emitted under the pre-#1092 event schema.
2478
2632
  */
2479
- predispatchCall?: HexString$1;
2633
+ predispatchCall?: HexString$2;
2480
2634
  /**
2481
2635
  * Calldata executed on the destination chain during the fill.
2482
2636
  * Absent on logs emitted under the pre-#1092 event schema.
2483
2637
  */
2484
- outputCall?: HexString$1;
2638
+ outputCall?: HexString$2;
2485
2639
  /**
2486
2640
  * Attribution tag supplied by the order placer.
2487
2641
  * Absent on logs emitted under the pre-#1092 event schema.
2488
2642
  */
2489
- graffiti?: HexString$1;
2643
+ graffiti?: HexString$2;
2490
2644
  };
2491
- transactionHash: HexString$1;
2645
+ transactionHash: HexString$2;
2492
2646
  }
2493
2647
  interface DecodedPostRequestEvent extends Log {
2494
2648
  eventName: string;
2495
2649
  args: {
2496
2650
  source: string;
2497
2651
  dest: string;
2498
- from: HexString$1;
2499
- to: HexString$1;
2652
+ from: HexString$2;
2653
+ to: HexString$2;
2500
2654
  nonce: bigint;
2501
2655
  timeoutTimestamp: bigint;
2502
- body: HexString$1;
2656
+ body: HexString$2;
2503
2657
  fee: bigint;
2504
2658
  };
2505
- transactionHash: HexString$1;
2659
+ transactionHash: HexString$2;
2506
2660
  }
2507
2661
  interface DecodedPostResponseEvent extends Log {
2508
2662
  eventName: string;
2509
2663
  args: {
2510
2664
  source: string;
2511
2665
  dest: string;
2512
- from: HexString$1;
2513
- to: HexString$1;
2666
+ from: HexString$2;
2667
+ to: HexString$2;
2514
2668
  nonce: bigint;
2515
2669
  timeoutTimestamp: bigint;
2516
- body: HexString$1;
2517
- response: HexString$1;
2670
+ body: HexString$2;
2671
+ response: HexString$2;
2518
2672
  responseTimeoutTimestamp: bigint;
2519
2673
  fee: bigint;
2520
2674
  };
2521
- transactionHash: HexString$1;
2675
+ transactionHash: HexString$2;
2522
2676
  }
2523
2677
  /**
2524
2678
  * Options for canceling an order
@@ -2540,11 +2694,11 @@ interface Deployment {
2540
2694
  /**
2541
2695
  * The raw state machine ID bytes for the deployment chain (hashed on-chain)
2542
2696
  */
2543
- chain: HexString$1;
2697
+ chain: HexString$2;
2544
2698
  /**
2545
2699
  * The gateway identifier
2546
2700
  */
2547
- gateway: HexString$1;
2701
+ gateway: HexString$2;
2548
2702
  }
2549
2703
  /**
2550
2704
  * Represents the body of a request
@@ -2553,11 +2707,11 @@ interface RequestBody {
2553
2707
  /**
2554
2708
  * Represents the commitment of an order
2555
2709
  */
2556
- commitment: HexString$1;
2710
+ commitment: HexString$2;
2557
2711
  /**
2558
2712
  * Stores the identifier for the beneficiary
2559
2713
  */
2560
- beneficiary: HexString$1;
2714
+ beneficiary: HexString$2;
2561
2715
  /**
2562
2716
  * An array of token identifiers
2563
2717
  */
@@ -2725,8 +2879,8 @@ interface ExecutionResult {
2725
2879
  * Any tokens exchanged during the fill process
2726
2880
  */
2727
2881
  exchanges?: Array<{
2728
- fromToken: HexString$1;
2729
- toToken: HexString$1;
2882
+ fromToken: HexString$2;
2883
+ toToken: HexString$2;
2730
2884
  fromAmount: string;
2731
2885
  toAmount: string;
2732
2886
  exchangeRate: string;
@@ -2748,15 +2902,15 @@ interface DispatchPost {
2748
2902
  /**
2749
2903
  * Bytes representation of the destination state machine
2750
2904
  */
2751
- dest: HexString$1;
2905
+ dest: HexString$2;
2752
2906
  /**
2753
2907
  * The destination module
2754
2908
  */
2755
- to: HexString$1;
2909
+ to: HexString$2;
2756
2910
  /**
2757
2911
  * The request body
2758
2912
  */
2759
- body: HexString$1;
2913
+ body: HexString$2;
2760
2914
  /**
2761
2915
  * Timeout for this request in seconds
2762
2916
  */
@@ -2769,13 +2923,13 @@ interface DispatchPost {
2769
2923
  /**
2770
2924
  * Who pays for this request?
2771
2925
  */
2772
- payer: HexString$1;
2926
+ payer: HexString$2;
2773
2927
  }
2774
2928
  interface DispatchGet {
2775
2929
  /**
2776
2930
  * Bytes representation of the destination state machine
2777
2931
  */
2778
- dest: HexString$1;
2932
+ dest: HexString$2;
2779
2933
  /**
2780
2934
  * Height at which to read the state machine
2781
2935
  */
@@ -2783,7 +2937,7 @@ interface DispatchGet {
2783
2937
  /**
2784
2938
  * Raw storage keys to fetch values from the counterparty
2785
2939
  */
2786
- keys: HexString$1[];
2940
+ keys: HexString$2[];
2787
2941
  /**
2788
2942
  * Timeout for this request in seconds
2789
2943
  */
@@ -2795,17 +2949,17 @@ interface DispatchGet {
2795
2949
  /**
2796
2950
  * Context for the request
2797
2951
  */
2798
- context: HexString$1;
2952
+ context: HexString$2;
2799
2953
  /**
2800
2954
  * Who pays for this request?
2801
2955
  */
2802
- payer: HexString$1;
2956
+ payer: HexString$2;
2803
2957
  }
2804
2958
  interface StateMachineHeight {
2805
2959
  id: {
2806
2960
  stateId: {
2807
2961
  Evm?: number;
2808
- Substrate?: HexString$1;
2962
+ Substrate?: HexString$2;
2809
2963
  Polkadot?: number;
2810
2964
  Kusama?: number;
2811
2965
  };
@@ -2821,26 +2975,26 @@ interface HostParams {
2821
2975
  * The fee token contract address. This will typically be DAI.
2822
2976
  * but we allow it to be configurable to prevent future regrets.
2823
2977
  */
2824
- feeToken: HexString$1;
2978
+ feeToken: HexString$2;
2825
2979
  /**
2826
2980
  * The admin account, this only has the rights to freeze, or unfreeze the bridge
2827
2981
  */
2828
- admin: HexString$1;
2982
+ admin: HexString$2;
2829
2983
  /**
2830
2984
  * Ismp message handler contract. This performs all verification logic
2831
2985
  * needed to validate cross-chain messages before they are dispatched to local modules
2832
2986
  */
2833
- handler: HexString$1;
2987
+ handler: HexString$2;
2834
2988
  /**
2835
2989
  * The authorized host manager contract, is itself an `IIsmpModule`
2836
2990
  * which receives governance requests from the Hyperbridge chain to either
2837
2991
  * withdraw revenue from the host or update its protocol parameters
2838
2992
  */
2839
- hostManager: HexString$1;
2993
+ hostManager: HexString$2;
2840
2994
  /**
2841
2995
  * The local UniswapV2Router02 contract, used for swapping the native token to the feeToken.
2842
2996
  */
2843
- uniswapV2: HexString$1;
2997
+ uniswapV2: HexString$2;
2844
2998
  /**
2845
2999
  * The unstaking period of Polkadot's validators. In order to prevent long-range attacks
2846
3000
  */
@@ -2852,7 +3006,7 @@ interface HostParams {
2852
3006
  /**
2853
3007
  * The consensus client contract which handles consensus proof verification
2854
3008
  */
2855
- consensusClient: HexString$1;
3009
+ consensusClient: HexString$2;
2856
3010
  /**
2857
3011
  * State machines whose state commitments are accepted
2858
3012
  */
@@ -2860,7 +3014,7 @@ interface HostParams {
2860
3014
  /**
2861
3015
  * The state machine identifier for hyperbridge
2862
3016
  */
2863
- hyperbridge: HexString$1;
3017
+ hyperbridge: HexString$2;
2864
3018
  }
2865
3019
  interface OrderStatusMetadata {
2866
3020
  status: OrderStatus;
@@ -2942,9 +3096,9 @@ interface OrderResponse {
2942
3096
  };
2943
3097
  }
2944
3098
  interface PhantomOrderPriceSnapshot {
2945
- commitment: HexString$1;
2946
- tokenA: HexString$1;
2947
- tokenB: HexString$1;
3099
+ commitment: HexString$2;
3100
+ tokenA: HexString$2;
3101
+ tokenB: HexString$2;
2948
3102
  standardAmount: bigint;
2949
3103
  blockNumber: bigint;
2950
3104
  medianPrice: bigint;
@@ -2983,7 +3137,7 @@ interface LiquiditySlice {
2983
3137
  interface AvailableLiquidity {
2984
3138
  sourceChain: Chains;
2985
3139
  destinationChain: Chains;
2986
- tokenAddress: HexString$1;
3140
+ tokenAddress: HexString$2;
2987
3141
  updatedAt: Date;
2988
3142
  destination: LiquiditySlice;
2989
3143
  unrestricted: LiquiditySlice;
@@ -3041,7 +3195,7 @@ interface Transaction {
3041
3195
  /**
3042
3196
  * The address to send the transaction to (typically the Universal Router address)
3043
3197
  */
3044
- to: HexString$1;
3198
+ to: HexString$2;
3045
3199
  /**
3046
3200
  * The value to send with the transaction (in wei)
3047
3201
  */
@@ -3049,7 +3203,7 @@ interface Transaction {
3049
3203
  /**
3050
3204
  * The calldata for the transaction
3051
3205
  */
3052
- data: HexString$1;
3206
+ data: HexString$2;
3053
3207
  }
3054
3208
  interface StorageFacade {
3055
3209
  get<T>(key: string): Promise<T | undefined>;
@@ -3060,15 +3214,15 @@ interface PaymentInfo {
3060
3214
  /** Accepts a standard 20-byte address; the SDK pads to bytes32 internally when needed. */
3061
3215
  beneficiary: BytesLikeHex;
3062
3216
  assets: TokenInfo[];
3063
- call: HexString$1;
3217
+ call: HexString$2;
3064
3218
  }
3065
3219
  interface DispatchInfo {
3066
3220
  assets: TokenInfo[];
3067
- call: HexString$1;
3221
+ call: HexString$2;
3068
3222
  }
3069
3223
  interface Order {
3070
3224
  id?: string;
3071
- user: HexString$1;
3225
+ user: HexString$2;
3072
3226
  /** Accepts either `"EVM-1"` style IDs or their hex-encoded form. */
3073
3227
  source: StateMachineId;
3074
3228
  /** Accepts either `"EVM-42161"` style IDs or their hex-encoded form. */
@@ -3076,7 +3230,7 @@ interface Order {
3076
3230
  deadline: bigint;
3077
3231
  nonce: bigint;
3078
3232
  fees: bigint;
3079
- session: HexString$1;
3233
+ session: HexString$2;
3080
3234
  predispatch: DispatchInfo;
3081
3235
  inputs: TokenInfo[];
3082
3236
  output: PaymentInfo;
@@ -3088,18 +3242,30 @@ interface CancelOrderOptions {
3088
3242
  interface FillOptions {
3089
3243
  relayerFee: bigint;
3090
3244
  nativeDispatchFee: bigint;
3245
+ /**
3246
+ * Last block number at which this fill may execute. `0n` means no bound.
3247
+ *
3248
+ * A solver bidding through the coprocessor signs this calldata and then has no further
3249
+ * say in when it is used: the order's `deadline` is placer-chosen with no ceiling, and
3250
+ * retracting the bid on Hyperbridge does not reach the destination chain. Without a bound
3251
+ * the placer can sit on a signed bid and execute it once the price has moved their way.
3252
+ *
3253
+ * In blocks, matching `order.deadline`, so both read against the same clock. Dropped when
3254
+ * encoding against a gateway whose implementation predates the field.
3255
+ */
3256
+ validUntil: bigint;
3091
3257
  outputs: TokenInfo[];
3092
3258
  }
3093
3259
  interface PackedUserOperation {
3094
- sender: HexString$1;
3260
+ sender: HexString$2;
3095
3261
  nonce: bigint;
3096
- initCode: HexString$1;
3097
- callData: HexString$1;
3098
- accountGasLimits: HexString$1;
3262
+ initCode: HexString$2;
3263
+ callData: HexString$2;
3264
+ accountGasLimits: HexString$2;
3099
3265
  preVerificationGas: bigint;
3100
- gasFees: HexString$1;
3101
- paymasterAndData: HexString$1;
3102
- signature: HexString$1;
3266
+ gasFees: HexString$2;
3267
+ paymasterAndData: HexString$2;
3268
+ signature: HexString$2;
3103
3269
  }
3104
3270
  interface SigningAccount {
3105
3271
  /**
@@ -3112,29 +3278,29 @@ interface SigningAccount {
3112
3278
  * Returns the 65-byte `r ‖ s ‖ v` signature as 0x-hex, `v` 27 or 28 — the
3113
3279
  * `eth_signTypedData_v4` form. Bid validation recovers against exactly this.
3114
3280
  */
3115
- signTypedData: (typedData: unknown) => Promise<HexString$1>;
3281
+ signTypedData: (typedData: unknown) => Promise<HexString$2>;
3116
3282
  }
3117
3283
  interface SubmitBidOptions {
3118
3284
  order: Order;
3119
3285
  fillOptions: FillOptions;
3120
- solverAccount: HexString$1;
3286
+ solverAccount: HexString$2;
3121
3287
  /** Canonical signer used for bid message signing and raw-hash operations. */
3122
3288
  solverSigner: SigningAccount;
3123
3289
  nonce: bigint;
3124
- entryPointAddress: HexString$1;
3290
+ entryPointAddress: HexString$2;
3125
3291
  callGasLimit: bigint;
3126
3292
  verificationGasLimit: bigint;
3127
3293
  preVerificationGas: bigint;
3128
3294
  maxFeePerGas: bigint;
3129
3295
  maxPriorityFeePerGas: bigint;
3130
3296
  /** Pre-built ERC-7821 calldata encoding the UserOp execution (approvals + fillOrder). */
3131
- callData: HexString$1;
3297
+ callData: HexString$2;
3132
3298
  /**
3133
3299
  * Optional packed paymasterAndData for EntryPoint v0.8.
3134
3300
  * Must be built BEFORE calling prepareSubmitBid so the hash covers paymaster bytes.
3135
3301
  * Defaults to "0x" (EntryPoint deposit pays gas).
3136
3302
  */
3137
- paymasterAndData?: HexString$1;
3303
+ paymasterAndData?: HexString$2;
3138
3304
  }
3139
3305
  interface EstimateFillOrderParams {
3140
3306
  order: Order;
@@ -3186,8 +3352,9 @@ interface OrderFeesQuote {
3186
3352
  /**
3187
3353
  * The amount to set as `Order.fees`, denominated in the source-chain fee
3188
3354
  * token. Same-chain fills carry a 2x margin over the estimated fill gas without
3189
- * a gas-price bump. Cross-chain gas is priced with 10% SDK-only headroom before
3190
- * adding the settlement relayer fee and a further 5% buffer over the whole sum.
3355
+ * a gas-price bump. Cross-chain orders originating on Ethereum mainnet use 50%
3356
+ * SDK-only gas-price headroom; other source chains use 10%. The settlement
3357
+ * relayer fee is then added with a further 5% buffer over the whole sum.
3191
3358
  */
3192
3359
  fees: bigint;
3193
3360
  /**
@@ -3201,7 +3368,7 @@ interface OrderFeesQuote {
3201
3368
  * The source-chain fee token `fees` is denominated in — check the user's
3202
3369
  * balance and allowance against this address when paying the fee directly.
3203
3370
  */
3204
- feeToken: HexString$1;
3371
+ feeToken: HexString$2;
3205
3372
  /** The underlying gas estimate the quote was derived from. */
3206
3373
  estimate: FillOrderEstimate;
3207
3374
  }
@@ -3216,11 +3383,11 @@ interface BidSubmissionResult {
3216
3383
  /**
3217
3384
  * Block hash where the bid was included
3218
3385
  */
3219
- blockHash?: HexString$1;
3386
+ blockHash?: HexString$2;
3220
3387
  /**
3221
3388
  * Extrinsic hash of the bid transaction
3222
3389
  */
3223
- extrinsicHash?: HexString$1;
3390
+ extrinsicHash?: HexString$2;
3224
3391
  /**
3225
3392
  * Error message if submission failed
3226
3393
  */
@@ -3241,7 +3408,7 @@ interface BidSubmissionResult {
3241
3408
  */
3242
3409
  interface BidStorageEntry {
3243
3410
  /** The order commitment hash (H256) */
3244
- commitment: HexString$1;
3411
+ commitment: HexString$2;
3245
3412
  /** The filler's Substrate account ID (SS58 encoded) */
3246
3413
  filler: string;
3247
3414
  /** The deposit amount stored on-chain (BalanceOf<T> = u128) */
@@ -3264,11 +3431,11 @@ interface FillerBid {
3264
3431
  */
3265
3432
  interface SelectOptions {
3266
3433
  /** The order commitment hash (bytes32) */
3267
- commitment: HexString$1;
3434
+ commitment: HexString$2;
3268
3435
  /** The solver address to select */
3269
- solver: HexString$1;
3436
+ solver: HexString$2;
3270
3437
  /** The EIP-712 signature from the session key */
3271
- signature: HexString$1;
3438
+ signature: HexString$2;
3272
3439
  }
3273
3440
  /**
3274
3441
  * A first-class, executable solver bid surfaced to consumers of the intents SDK.
@@ -3286,7 +3453,7 @@ interface SelectOptions {
3286
3453
  */
3287
3454
  interface Bid {
3288
3455
  /** The solver account that submitted this bid (`userOp.sender`). */
3289
- readonly solverAddress: HexString$1;
3456
+ readonly solverAddress: HexString$2;
3290
3457
  /** Decoded `FillOptions.outputs` — the tokens and amounts the solver offers. */
3291
3458
  readonly outputs: TokenInfo[];
3292
3459
  /** Relayer fee from the decoded fill options. */
@@ -3335,8 +3502,8 @@ type IntentOrderStatusKey = keyof typeof IntentOrderStatus;
3335
3502
  /** Tagged union of all possible status updates yielded by the intent order execution stream */
3336
3503
  type IntentOrderStatusUpdate = {
3337
3504
  status: "AWAITING_PLACE_ORDER";
3338
- to: HexString$1;
3339
- data: HexString$1;
3505
+ to: HexString$2;
3506
+ data: HexString$2;
3340
3507
  /**
3341
3508
  * The order's native-token input amounts. Native inputs cannot be
3342
3509
  * pulled via allowance, so this must be part of the placement
@@ -3350,62 +3517,62 @@ type IntentOrderStatusUpdate = {
3350
3517
  * (fee-token rail).
3351
3518
  */
3352
3519
  nativeFee: bigint;
3353
- sessionPrivateKey: HexString$1;
3520
+ sessionPrivateKey: HexString$2;
3354
3521
  /** Exact source-chain fee-token amount encoded in `data`. */
3355
3522
  feeTokenAmount: bigint;
3356
3523
  /** Source-chain ERC-20 token charged for `feeTokenAmount`. */
3357
- feeTokenAddress: HexString$1;
3524
+ feeTokenAddress: HexString$2;
3358
3525
  } | {
3359
3526
  status: "ORDER_PLACED";
3360
3527
  order: Order;
3361
3528
  receipt: TransactionReceipt;
3362
3529
  } | {
3363
3530
  status: "AWAITING_BIDS";
3364
- commitment: HexString$1;
3531
+ commitment: HexString$2;
3365
3532
  totalFilledAssets: TokenInfo[];
3366
3533
  remainingAssets: TokenInfo[];
3367
3534
  } | {
3368
3535
  status: "NEW_BID";
3369
- commitment: HexString$1;
3536
+ commitment: HexString$2;
3370
3537
  bid: Bid;
3371
3538
  } | {
3372
3539
  status: "BIDS_RECEIVED";
3373
- commitment: HexString$1;
3540
+ commitment: HexString$2;
3374
3541
  bidCount: number;
3375
3542
  bids: Bid[];
3376
3543
  } | {
3377
3544
  status: "BID_SELECTED";
3378
- commitment: HexString$1;
3379
- selectedSolver: HexString$1;
3380
- userOpHash: HexString$1;
3545
+ commitment: HexString$2;
3546
+ selectedSolver: HexString$2;
3547
+ userOpHash: HexString$2;
3381
3548
  userOp: PackedUserOperation;
3382
- transactionHash?: HexString$1;
3549
+ transactionHash?: HexString$2;
3383
3550
  } | {
3384
3551
  status: "FILLED";
3385
- commitment: HexString$1;
3386
- userOpHash: HexString$1;
3387
- selectedSolver: HexString$1;
3388
- transactionHash?: HexString$1;
3552
+ commitment: HexString$2;
3553
+ userOpHash: HexString$2;
3554
+ selectedSolver: HexString$2;
3555
+ transactionHash?: HexString$2;
3389
3556
  totalFilledAssets: TokenInfo[];
3390
3557
  remainingAssets: TokenInfo[];
3391
3558
  } | {
3392
3559
  status: "PARTIAL_FILL";
3393
- commitment: HexString$1;
3394
- userOpHash: HexString$1;
3395
- selectedSolver: HexString$1;
3396
- transactionHash?: HexString$1;
3560
+ commitment: HexString$2;
3561
+ userOpHash: HexString$2;
3562
+ selectedSolver: HexString$2;
3563
+ transactionHash?: HexString$2;
3397
3564
  filledAssets: TokenInfo[];
3398
3565
  totalFilledAssets: TokenInfo[];
3399
3566
  remainingAssets: TokenInfo[];
3400
3567
  } | {
3401
3568
  status: "EXPIRED";
3402
- commitment: HexString$1;
3569
+ commitment: HexString$2;
3403
3570
  totalFilledAssets?: TokenInfo[];
3404
3571
  remainingAssets?: TokenInfo[];
3405
3572
  error: string;
3406
3573
  } | {
3407
3574
  status: "FAILED";
3408
- commitment?: HexString$1;
3575
+ commitment?: HexString$2;
3409
3576
  totalFilledAssets?: TokenInfo[];
3410
3577
  remainingAssets?: TokenInfo[];
3411
3578
  error: string;
@@ -3413,10 +3580,10 @@ type IntentOrderStatusUpdate = {
3413
3580
  /** Result of selecting a bid and submitting to the bundler */
3414
3581
  interface SelectBidResult {
3415
3582
  userOp: PackedUserOperation;
3416
- userOpHash: HexString$1;
3417
- solverAddress: HexString$1;
3418
- commitment: HexString$1;
3419
- txnHash?: HexString$1;
3583
+ userOpHash: HexString$2;
3584
+ solverAddress: HexString$2;
3585
+ commitment: HexString$2;
3586
+ txnHash?: HexString$2;
3420
3587
  fillStatus?: "full" | "partial";
3421
3588
  /** Assets filled in this user operation (best-effort, based on on-chain PartialFill logs) */
3422
3589
  filledAssets?: TokenInfo[];
@@ -3424,7 +3591,7 @@ interface SelectBidResult {
3424
3591
  /** Options for executing an intent order */
3425
3592
  interface ExecuteIntentOrderOptions {
3426
3593
  order: Order;
3427
- sessionPrivateKey?: HexString$1;
3594
+ sessionPrivateKey?: HexString$2;
3428
3595
  /** Duration in ms to collect bids before selecting the best one. */
3429
3596
  auctionTimeMs: number;
3430
3597
  pollIntervalMs?: number;
@@ -3434,19 +3601,19 @@ interface ExecuteIntentOrderOptions {
3434
3601
  */
3435
3602
  solver?: {
3436
3603
  /** Only bids from this address (matched against userOp.sender) will be considered */
3437
- address: HexString$1;
3604
+ address: HexString$2;
3438
3605
  /** After this many ms without a matching bid, execution falls back to any solver */
3439
3606
  timeoutMs: number;
3440
3607
  };
3441
3608
  }
3442
3609
  /** Options for resuming execution of a previously placed intent order */
3443
3610
  interface ResumeIntentOrderOptions {
3444
- sessionPrivateKey?: HexString$1;
3611
+ sessionPrivateKey?: HexString$2;
3445
3612
  /** Duration in ms to collect bids before selecting the best one. */
3446
3613
  auctionTimeMs: number;
3447
3614
  pollIntervalMs?: number;
3448
3615
  solver?: {
3449
- address: HexString$1;
3616
+ address: HexString$2;
3450
3617
  timeoutMs: number;
3451
3618
  };
3452
3619
  }
@@ -3467,8 +3634,238 @@ declare function sortPoolSymbols<Symbol extends string>(symbolA: Symbol, symbolB
3467
3634
  /** Canonical indexer pool ID for a pair of canonical token symbols. */
3468
3635
  declare function poolSlug(symbolA: string, symbolB: string): string;
3469
3636
 
3470
- declare function encodeERC7821ExecuteBatch(calls: ERC7821Call[]): HexString$1;
3471
- declare function decodeERC7821ExecuteBatch(callData: HexString$1): ERC7821Call[] | null;
3637
+ declare function encodeERC7821ExecuteBatch(calls: ERC7821Call[]): HexString$2;
3638
+ declare function decodeERC7821ExecuteBatch(callData: HexString$2): ERC7821Call[] | null;
3639
+
3640
+ /**
3641
+ * `FillOptions` gained a `validUntil` field. Adding a field to a struct changes the
3642
+ * enclosing function's selector, so `fillOrder` has two incompatible shapes in the wild:
3643
+ *
3644
+ * v1 fillOrder(Order, (uint256 relayerFee, uint256 nativeDispatchFee, TokenInfo[] outputs))
3645
+ * v2 fillOrder(Order, (uint256 relayerFee, uint256 nativeDispatchFee, uint256 validUntil, TokenInfo[] outputs))
3646
+ *
3647
+ * The selectors differ (`0x5cfb1ea5` vs `0xa5470064`), so a v2 payload sent to a v1
3648
+ * deployment finds no matching function and reverts rather than mis-decoding — which is the
3649
+ * safe failure, but it does mean callers have to know which shape a gateway speaks.
3650
+ */
3651
+ type FillOptionsVersion = 1 | 2;
3652
+ /**
3653
+ * The v1 `fillOrder`, kept only so we can still talk to deployments that predate `validUntil`.
3654
+ *
3655
+ * Exported because consumers that cannot use {@link decodeFillOrder} still have to accept both
3656
+ * shapes. The indexer decodes bid calldata with ethers rather than viem (viem's byte handling
3657
+ * throws inside SubQuery's VM2 sandbox), so it rebuilds this decode itself and needs the same
3658
+ * definition rather than a second copy that can drift out of step with this one.
3659
+ */
3660
+ declare const FILL_ORDER_V1_ABI: readonly [{
3661
+ readonly type: "function";
3662
+ readonly name: "fillOrder";
3663
+ readonly stateMutability: "payable";
3664
+ readonly outputs: readonly [];
3665
+ readonly inputs: readonly [{
3666
+ readonly name: "order";
3667
+ readonly type: "tuple";
3668
+ readonly internalType: "struct Order";
3669
+ readonly components: readonly [{
3670
+ readonly name: "user";
3671
+ readonly type: "bytes32";
3672
+ readonly internalType: "bytes32";
3673
+ }, {
3674
+ readonly name: "source";
3675
+ readonly type: "bytes";
3676
+ readonly internalType: "bytes";
3677
+ }, {
3678
+ readonly name: "destination";
3679
+ readonly type: "bytes";
3680
+ readonly internalType: "bytes";
3681
+ }, {
3682
+ readonly name: "deadline";
3683
+ readonly type: "uint256";
3684
+ readonly internalType: "uint256";
3685
+ }, {
3686
+ readonly name: "nonce";
3687
+ readonly type: "uint256";
3688
+ readonly internalType: "uint256";
3689
+ }, {
3690
+ readonly name: "fees";
3691
+ readonly type: "uint256";
3692
+ readonly internalType: "uint256";
3693
+ }, {
3694
+ readonly name: "session";
3695
+ readonly type: "address";
3696
+ readonly internalType: "address";
3697
+ }, {
3698
+ readonly name: "predispatch";
3699
+ readonly type: "tuple";
3700
+ readonly internalType: "struct DispatchInfo";
3701
+ readonly components: readonly [{
3702
+ readonly name: "assets";
3703
+ readonly type: "tuple[]";
3704
+ readonly internalType: "struct TokenInfo[]";
3705
+ readonly components: readonly [{
3706
+ readonly name: "token";
3707
+ readonly type: "bytes32";
3708
+ readonly internalType: "bytes32";
3709
+ }, {
3710
+ readonly name: "amount";
3711
+ readonly type: "uint256";
3712
+ readonly internalType: "uint256";
3713
+ }];
3714
+ }, {
3715
+ readonly name: "call";
3716
+ readonly type: "bytes";
3717
+ readonly internalType: "bytes";
3718
+ }];
3719
+ }, {
3720
+ readonly name: "inputs";
3721
+ readonly type: "tuple[]";
3722
+ readonly internalType: "struct TokenInfo[]";
3723
+ readonly components: readonly [{
3724
+ readonly name: "token";
3725
+ readonly type: "bytes32";
3726
+ readonly internalType: "bytes32";
3727
+ }, {
3728
+ readonly name: "amount";
3729
+ readonly type: "uint256";
3730
+ readonly internalType: "uint256";
3731
+ }];
3732
+ }, {
3733
+ readonly name: "output";
3734
+ readonly type: "tuple";
3735
+ readonly internalType: "struct PaymentInfo";
3736
+ readonly components: readonly [{
3737
+ readonly name: "beneficiary";
3738
+ readonly type: "bytes32";
3739
+ readonly internalType: "bytes32";
3740
+ }, {
3741
+ readonly name: "assets";
3742
+ readonly type: "tuple[]";
3743
+ readonly internalType: "struct TokenInfo[]";
3744
+ readonly components: readonly [{
3745
+ readonly name: "token";
3746
+ readonly type: "bytes32";
3747
+ readonly internalType: "bytes32";
3748
+ }, {
3749
+ readonly name: "amount";
3750
+ readonly type: "uint256";
3751
+ readonly internalType: "uint256";
3752
+ }];
3753
+ }, {
3754
+ readonly name: "call";
3755
+ readonly type: "bytes";
3756
+ readonly internalType: "bytes";
3757
+ }];
3758
+ }];
3759
+ }, {
3760
+ readonly name: "options";
3761
+ readonly type: "tuple";
3762
+ readonly internalType: "struct FillOptions";
3763
+ readonly components: readonly [{
3764
+ readonly name: "relayerFee";
3765
+ readonly type: "uint256";
3766
+ readonly internalType: "uint256";
3767
+ }, {
3768
+ readonly name: "nativeDispatchFee";
3769
+ readonly type: "uint256";
3770
+ readonly internalType: "uint256";
3771
+ }, {
3772
+ readonly name: "outputs";
3773
+ readonly type: "tuple[]";
3774
+ readonly internalType: "struct TokenInfo[]";
3775
+ readonly components: readonly [{
3776
+ readonly name: "token";
3777
+ readonly type: "bytes32";
3778
+ readonly internalType: "bytes32";
3779
+ }, {
3780
+ readonly name: "amount";
3781
+ readonly type: "uint256";
3782
+ readonly internalType: "uint256";
3783
+ }];
3784
+ }];
3785
+ }];
3786
+ }];
3787
+ /**
3788
+ * IntentGateway implementations deployed before `FillOptions.validUntil` existed.
3789
+ *
3790
+ * The list is of *legacy* implementations rather than current ones, so the default is v2 and
3791
+ * nothing has to be added here when a new implementation ships — only when an old one is
3792
+ * discovered. Once every deployment is upgraded this set is vestigial and still correct.
3793
+ *
3794
+ * The alternative, listing known-good implementations, would be the version constant this
3795
+ * replaced wearing a different hat: a value someone must remember to update on every upgrade,
3796
+ * where forgetting breaks every fill on the chain.
3797
+ */
3798
+ declare const LEGACY_FILL_OPTIONS_IMPLEMENTATIONS: Set<string>;
3799
+ /**
3800
+ * Chains whose IntentGateway has not been redeployed with `FillOptions.validUntil` yet.
3801
+ *
3802
+ * A blunter instrument than {@link LEGACY_FILL_OPTIONS_IMPLEMENTATIONS} and used for the same
3803
+ * reason: those chains run a pre-`validUntil` implementation whose address is not tracked here,
3804
+ * so the address check would wrongly read them as current and every fill would revert on a
3805
+ * selector that does not exist.
3806
+ *
3807
+ * Delete a chain from this set when its gateway is redeployed. Once the set is empty the
3808
+ * implementation-address check covers everything on its own.
3809
+ */
3810
+ declare const CHAINS_WITHOUT_VALID_UNTIL: Set<number>;
3811
+ /** Test seam: drop memoised detection results. */
3812
+ declare function resetFillOptionsVersionCache(): void;
3813
+ /**
3814
+ * Works out which `FillOptions` shape a gateway accepts from the implementation it delegates to.
3815
+ *
3816
+ * EIP-1967 standardises three slots, all holding addresses — there is no version field to read,
3817
+ * and the contract deliberately does not carry one either: a hand-maintained version constant is
3818
+ * a second source of truth that has to be bumped on the right upgrade. The implementation address
3819
+ * is the value the proxy already updates, so it is what identifies the deployed code.
3820
+ */
3821
+ declare function getFillOptionsVersion(client: PublicClient, gateway: HexString$2): Promise<FillOptionsVersion>;
3822
+ /**
3823
+ * ABI-encodes a `fillOrder` call in the shape the target gateway understands.
3824
+ *
3825
+ * On a v1 gateway `validUntil` is dropped — there is nowhere to put it and no check on the
3826
+ * other side. That is a real loss of protection, so callers that rely on the bound should
3827
+ * surface it rather than assume it took effect.
3828
+ */
3829
+ declare function encodeFillOrder(order: Order, options: FillOptions, version: FillOptionsVersion): HexString$2;
3830
+ /**
3831
+ * Decodes a `fillOrder` call of either shape.
3832
+ *
3833
+ * v2 is tried first and v1 is the fallback; the selectors differ, so there is no shape a
3834
+ * decode could silently get wrong. `validUntil` reads as `0n` for a v1 payload, which is the
3835
+ * same value that means "no bound" in v2 — accurate, since a v1 fill genuinely has none.
3836
+ *
3837
+ * @returns The decoded order and options, or `null` if the calldata is not a `fillOrder`.
3838
+ */
3839
+ declare function decodeFillOrder(data: HexString$2): {
3840
+ order: Order;
3841
+ options: FillOptions;
3842
+ } | null;
3843
+
3844
+ type HexString$1 = `0x${string}`;
3845
+ /** A decoded `getPoolAndPositionInfo` return: the pool's key words plus the packed position info. */
3846
+ interface PoolAndPositionInfo {
3847
+ currency0: HexString$1;
3848
+ currency1: HexString$1;
3849
+ /**
3850
+ * The ABI-encoded PoolKey exactly as returned, i.e. the first five words. A static struct's
3851
+ * abi.encode IS its concatenated words, so `keccak256` of this slice is the pool id — no
3852
+ * re-encoding, and no chance of the re-encoding disagreeing with what the chain hashed.
3853
+ */
3854
+ poolKeyEncoded: HexString$1;
3855
+ tickLower: number;
3856
+ tickUpper: number;
3857
+ }
3858
+ /**
3859
+ * How much of `outputToken` a position is currently worth. Zero when the token is not one of the
3860
+ * pool's currencies, or when the price has moved the position entirely onto the other side — both
3861
+ * ordinary outcomes, not errors.
3862
+ */
3863
+ declare function positionAmountOfToken(params: {
3864
+ info: PoolAndPositionInfo;
3865
+ liquidity: bigint;
3866
+ sqrtPriceX96: bigint;
3867
+ outputToken: string;
3868
+ }): bigint;
3472
3869
 
3473
3870
  type HexString = `0x${string}`;
3474
3871
  /**
@@ -3485,7 +3882,7 @@ declare function setAggregationFetch(fetchImpl: FetchLike): void;
3485
3882
  declare const FILL_ORDER_ABI: readonly [{
3486
3883
  readonly type: "constructor";
3487
3884
  readonly inputs: readonly [{
3488
- readonly name: "admin";
3885
+ readonly name: "owner";
3489
3886
  readonly type: "address";
3490
3887
  readonly internalType: "address";
3491
3888
  }];
@@ -3541,20 +3938,6 @@ declare const FILL_ORDER_ABI: readonly [{
3541
3938
  readonly internalType: "address";
3542
3939
  }];
3543
3940
  readonly stateMutability: "view";
3544
- }, {
3545
- readonly type: "function";
3546
- readonly name: "_instances";
3547
- readonly inputs: readonly [{
3548
- readonly name: "";
3549
- readonly type: "bytes32";
3550
- readonly internalType: "bytes32";
3551
- }];
3552
- readonly outputs: readonly [{
3553
- readonly name: "";
3554
- readonly type: "address";
3555
- readonly internalType: "address";
3556
- }];
3557
- readonly stateMutability: "view";
3558
3941
  }, {
3559
3942
  readonly type: "function";
3560
3943
  readonly name: "_nonce";
@@ -3583,6 +3966,16 @@ declare const FILL_ORDER_ABI: readonly [{
3583
3966
  readonly internalType: "uint256";
3584
3967
  }];
3585
3968
  readonly stateMutability: "view";
3969
+ }, {
3970
+ readonly type: "function";
3971
+ readonly name: "_owner";
3972
+ readonly inputs: readonly [];
3973
+ readonly outputs: readonly [{
3974
+ readonly name: "";
3975
+ readonly type: "address";
3976
+ readonly internalType: "address";
3977
+ }];
3978
+ readonly stateMutability: "view";
3586
3979
  }, {
3587
3980
  readonly type: "function";
3588
3981
  readonly name: "_partialFills";
@@ -3871,6 +4264,10 @@ declare const FILL_ORDER_ABI: readonly [{
3871
4264
  readonly name: "nativeDispatchFee";
3872
4265
  readonly type: "uint256";
3873
4266
  readonly internalType: "uint256";
4267
+ }, {
4268
+ readonly name: "validUntil";
4269
+ readonly type: "uint256";
4270
+ readonly internalType: "uint256";
3874
4271
  }, {
3875
4272
  readonly name: "outputs";
3876
4273
  readonly type: "tuple[]";
@@ -3900,36 +4297,89 @@ declare const FILL_ORDER_ABI: readonly [{
3900
4297
  readonly stateMutability: "view";
3901
4298
  }, {
3902
4299
  readonly type: "function";
3903
- readonly name: "instance";
3904
- readonly inputs: readonly [{
3905
- readonly name: "stateMachineId";
3906
- readonly type: "bytes";
3907
- readonly internalType: "bytes";
3908
- }];
3909
- readonly outputs: readonly [{
3910
- readonly name: "";
3911
- readonly type: "address";
3912
- readonly internalType: "address";
3913
- }];
3914
- readonly stateMutability: "view";
3915
- }, {
3916
- readonly type: "function";
3917
- readonly name: "onAccept";
4300
+ readonly name: "initialize";
3918
4301
  readonly inputs: readonly [{
3919
- readonly name: "incoming";
4302
+ readonly name: "p";
3920
4303
  readonly type: "tuple";
3921
- readonly internalType: "struct IncomingPostRequest";
4304
+ readonly internalType: "struct Params";
3922
4305
  readonly components: readonly [{
3923
- readonly name: "request";
3924
- readonly type: "tuple";
3925
- readonly internalType: "struct PostRequest";
3926
- readonly components: readonly [{
3927
- readonly name: "source";
3928
- readonly type: "bytes";
3929
- readonly internalType: "bytes";
3930
- }, {
3931
- readonly name: "dest";
3932
- readonly type: "bytes";
4306
+ readonly name: "host";
4307
+ readonly type: "address";
4308
+ readonly internalType: "address";
4309
+ }, {
4310
+ readonly name: "dispatcher";
4311
+ readonly type: "address";
4312
+ readonly internalType: "address";
4313
+ }, {
4314
+ readonly name: "solverSelection";
4315
+ readonly type: "bool";
4316
+ readonly internalType: "bool";
4317
+ }, {
4318
+ readonly name: "surplusShareBps";
4319
+ readonly type: "uint256";
4320
+ readonly internalType: "uint256";
4321
+ }, {
4322
+ readonly name: "protocolFeeBps";
4323
+ readonly type: "uint256";
4324
+ readonly internalType: "uint256";
4325
+ }, {
4326
+ readonly name: "priceOracle";
4327
+ readonly type: "address";
4328
+ readonly internalType: "address";
4329
+ }];
4330
+ }, {
4331
+ readonly name: "peerChains";
4332
+ readonly type: "bytes[]";
4333
+ readonly internalType: "bytes[]";
4334
+ }, {
4335
+ readonly name: "relayer";
4336
+ readonly type: "address";
4337
+ readonly internalType: "address";
4338
+ }];
4339
+ readonly outputs: readonly [];
4340
+ readonly stateMutability: "nonpayable";
4341
+ }, {
4342
+ readonly type: "function";
4343
+ readonly name: "instance";
4344
+ readonly inputs: readonly [{
4345
+ readonly name: "stateMachineId";
4346
+ readonly type: "bytes";
4347
+ readonly internalType: "bytes";
4348
+ }];
4349
+ readonly outputs: readonly [{
4350
+ readonly name: "";
4351
+ readonly type: "address";
4352
+ readonly internalType: "address";
4353
+ }];
4354
+ readonly stateMutability: "view";
4355
+ }, {
4356
+ readonly type: "function";
4357
+ readonly name: "migrate";
4358
+ readonly inputs: readonly [{
4359
+ readonly name: "relayer";
4360
+ readonly type: "address";
4361
+ readonly internalType: "address";
4362
+ }];
4363
+ readonly outputs: readonly [];
4364
+ readonly stateMutability: "nonpayable";
4365
+ }, {
4366
+ readonly type: "function";
4367
+ readonly name: "onAccept";
4368
+ readonly inputs: readonly [{
4369
+ readonly name: "incoming";
4370
+ readonly type: "tuple";
4371
+ readonly internalType: "struct IncomingPostRequest";
4372
+ readonly components: readonly [{
4373
+ readonly name: "request";
4374
+ readonly type: "tuple";
4375
+ readonly internalType: "struct PostRequest";
4376
+ readonly components: readonly [{
4377
+ readonly name: "source";
4378
+ readonly type: "bytes";
4379
+ readonly internalType: "bytes";
4380
+ }, {
4381
+ readonly name: "dest";
4382
+ readonly type: "bytes";
3933
4383
  readonly internalType: "bytes";
3934
4384
  }, {
3935
4385
  readonly name: "nonce";
@@ -4307,7 +4757,7 @@ declare const FILL_ORDER_ABI: readonly [{
4307
4757
  readonly type: "uint256";
4308
4758
  readonly internalType: "uint256";
4309
4759
  }];
4310
- readonly stateMutability: "view";
4760
+ readonly stateMutability: "nonpayable";
4311
4761
  }, {
4312
4762
  readonly type: "function";
4313
4763
  readonly name: "quote";
@@ -4350,6 +4800,16 @@ declare const FILL_ORDER_ABI: readonly [{
4350
4800
  readonly type: "uint256";
4351
4801
  readonly internalType: "uint256";
4352
4802
  }];
4803
+ readonly stateMutability: "nonpayable";
4804
+ }, {
4805
+ readonly type: "function";
4806
+ readonly name: "relayer";
4807
+ readonly inputs: readonly [];
4808
+ readonly outputs: readonly [{
4809
+ readonly name: "";
4810
+ readonly type: "address";
4811
+ readonly internalType: "address";
4812
+ }];
4353
4813
  readonly stateMutability: "view";
4354
4814
  }, {
4355
4815
  readonly type: "function";
@@ -4380,52 +4840,53 @@ declare const FILL_ORDER_ABI: readonly [{
4380
4840
  readonly stateMutability: "nonpayable";
4381
4841
  }, {
4382
4842
  readonly type: "function";
4383
- readonly name: "init";
4843
+ readonly name: "setRelayer";
4384
4844
  readonly inputs: readonly [{
4385
- readonly name: "p";
4386
- readonly type: "tuple";
4387
- readonly internalType: "struct Params";
4388
- readonly components: readonly [{
4389
- readonly name: "host";
4390
- readonly type: "address";
4391
- readonly internalType: "address";
4392
- }, {
4393
- readonly name: "dispatcher";
4394
- readonly type: "address";
4395
- readonly internalType: "address";
4396
- }, {
4397
- readonly name: "solverSelection";
4398
- readonly type: "bool";
4399
- readonly internalType: "bool";
4400
- }, {
4401
- readonly name: "surplusShareBps";
4402
- readonly type: "uint256";
4403
- readonly internalType: "uint256";
4404
- }, {
4405
- readonly name: "protocolFeeBps";
4406
- readonly type: "uint256";
4407
- readonly internalType: "uint256";
4408
- }, {
4409
- readonly name: "priceOracle";
4410
- readonly type: "address";
4411
- readonly internalType: "address";
4412
- }];
4845
+ readonly name: "relayer";
4846
+ readonly type: "address";
4847
+ readonly internalType: "address";
4848
+ }];
4849
+ readonly outputs: readonly [];
4850
+ readonly stateMutability: "nonpayable";
4851
+ }, {
4852
+ readonly type: "function";
4853
+ readonly name: "upgradeToAndCall";
4854
+ readonly inputs: readonly [{
4855
+ readonly name: "newImplementation";
4856
+ readonly type: "address";
4857
+ readonly internalType: "address";
4413
4858
  }, {
4414
- readonly name: "deployments";
4415
- readonly type: "tuple[]";
4416
- readonly internalType: "struct Deployment[]";
4417
- readonly components: readonly [{
4418
- readonly name: "chain";
4419
- readonly type: "bytes";
4420
- readonly internalType: "bytes";
4421
- }, {
4422
- readonly name: "gateway";
4423
- readonly type: "address";
4424
- readonly internalType: "address";
4425
- }];
4859
+ readonly name: "data";
4860
+ readonly type: "bytes";
4861
+ readonly internalType: "bytes";
4426
4862
  }];
4427
4863
  readonly outputs: readonly [];
4428
4864
  readonly stateMutability: "nonpayable";
4865
+ }, {
4866
+ readonly type: "function";
4867
+ readonly name: "version";
4868
+ readonly inputs: readonly [];
4869
+ readonly outputs: readonly [{
4870
+ readonly name: "";
4871
+ readonly type: "uint64";
4872
+ readonly internalType: "uint64";
4873
+ }];
4874
+ readonly stateMutability: "view";
4875
+ }, {
4876
+ readonly type: "event";
4877
+ readonly name: "DeploymentAdded";
4878
+ readonly inputs: readonly [{
4879
+ readonly name: "chain";
4880
+ readonly type: "string";
4881
+ readonly indexed: false;
4882
+ readonly internalType: "string";
4883
+ }, {
4884
+ readonly name: "gateway";
4885
+ readonly type: "address";
4886
+ readonly indexed: false;
4887
+ readonly internalType: "address";
4888
+ }];
4889
+ readonly anonymous: false;
4429
4890
  }, {
4430
4891
  readonly type: "event";
4431
4892
  readonly name: "DestinationProtocolFeeUpdated";
@@ -4531,14 +4992,24 @@ declare const FILL_ORDER_ABI: readonly [{
4531
4992
  readonly anonymous: false;
4532
4993
  }, {
4533
4994
  readonly type: "event";
4534
- readonly name: "DeploymentAdded";
4995
+ readonly name: "Initialized";
4535
4996
  readonly inputs: readonly [{
4536
- readonly name: "chain";
4537
- readonly type: "string";
4997
+ readonly name: "version";
4998
+ readonly type: "uint64";
4538
4999
  readonly indexed: false;
4539
- readonly internalType: "string";
5000
+ readonly internalType: "uint64";
5001
+ }];
5002
+ readonly anonymous: false;
5003
+ }, {
5004
+ readonly type: "event";
5005
+ readonly name: "OrderCancelled";
5006
+ readonly inputs: readonly [{
5007
+ readonly name: "commitment";
5008
+ readonly type: "bytes32";
5009
+ readonly indexed: true;
5010
+ readonly internalType: "bytes32";
4540
5011
  }, {
4541
- readonly name: "gateway";
5012
+ readonly name: "canceller";
4542
5013
  readonly type: "address";
4543
5014
  readonly indexed: false;
4544
5015
  readonly internalType: "address";
@@ -4797,13 +5268,42 @@ declare const FILL_ORDER_ABI: readonly [{
4797
5268
  }];
4798
5269
  }];
4799
5270
  readonly anonymous: false;
5271
+ }, {
5272
+ readonly type: "event";
5273
+ readonly name: "RelayerUpdated";
5274
+ readonly inputs: readonly [{
5275
+ readonly name: "previous";
5276
+ readonly type: "address";
5277
+ readonly indexed: false;
5278
+ readonly internalType: "address";
5279
+ }, {
5280
+ readonly name: "current";
5281
+ readonly type: "address";
5282
+ readonly indexed: false;
5283
+ readonly internalType: "address";
5284
+ }];
5285
+ readonly anonymous: false;
5286
+ }, {
5287
+ readonly type: "event";
5288
+ readonly name: "Upgraded";
5289
+ readonly inputs: readonly [{
5290
+ readonly name: "implementation";
5291
+ readonly type: "address";
5292
+ readonly indexed: true;
5293
+ readonly internalType: "address";
5294
+ }];
5295
+ readonly anonymous: false;
4800
5296
  }, {
4801
5297
  readonly type: "error";
4802
- readonly name: "Cancelled";
4803
- readonly inputs: readonly [];
5298
+ readonly name: "AddressEmptyCode";
5299
+ readonly inputs: readonly [{
5300
+ readonly name: "target";
5301
+ readonly type: "address";
5302
+ readonly internalType: "address";
5303
+ }];
4804
5304
  }, {
4805
5305
  readonly type: "error";
4806
- readonly name: "UnknownInstance";
5306
+ readonly name: "Cancelled";
4807
5307
  readonly inputs: readonly [];
4808
5308
  }, {
4809
5309
  readonly type: "error";
@@ -4825,10 +5325,30 @@ declare const FILL_ORDER_ABI: readonly [{
4825
5325
  readonly type: "bytes32";
4826
5326
  readonly internalType: "bytes32";
4827
5327
  }];
5328
+ }, {
5329
+ readonly type: "error";
5330
+ readonly name: "ERC1967InvalidImplementation";
5331
+ readonly inputs: readonly [{
5332
+ readonly name: "implementation";
5333
+ readonly type: "address";
5334
+ readonly internalType: "address";
5335
+ }];
5336
+ }, {
5337
+ readonly type: "error";
5338
+ readonly name: "ERC1967NonPayable";
5339
+ readonly inputs: readonly [];
4828
5340
  }, {
4829
5341
  readonly type: "error";
4830
5342
  readonly name: "Expired";
4831
5343
  readonly inputs: readonly [];
5344
+ }, {
5345
+ readonly type: "error";
5346
+ readonly name: "FailedCall";
5347
+ readonly inputs: readonly [];
5348
+ }, {
5349
+ readonly type: "error";
5350
+ readonly name: "FillExpired";
5351
+ readonly inputs: readonly [];
4832
5352
  }, {
4833
5353
  readonly type: "error";
4834
5354
  readonly name: "Filled";
@@ -4837,6 +5357,10 @@ declare const FILL_ORDER_ABI: readonly [{
4837
5357
  readonly type: "error";
4838
5358
  readonly name: "InsufficientNativeToken";
4839
5359
  readonly inputs: readonly [];
5360
+ }, {
5361
+ readonly type: "error";
5362
+ readonly name: "InvalidInitialization";
5363
+ readonly inputs: readonly [];
4840
5364
  }, {
4841
5365
  readonly type: "error";
4842
5366
  readonly name: "InvalidInput";
@@ -4849,6 +5373,18 @@ declare const FILL_ORDER_ABI: readonly [{
4849
5373
  readonly type: "error";
4850
5374
  readonly name: "NotExpired";
4851
5375
  readonly inputs: readonly [];
5376
+ }, {
5377
+ readonly type: "error";
5378
+ readonly name: "NotInitializing";
5379
+ readonly inputs: readonly [];
5380
+ }, {
5381
+ readonly type: "error";
5382
+ readonly name: "PartialFillNotAllowed";
5383
+ readonly inputs: readonly [];
5384
+ }, {
5385
+ readonly type: "error";
5386
+ readonly name: "ReentrancyGuardReentrantCall";
5387
+ readonly inputs: readonly [];
4852
5388
  }, {
4853
5389
  readonly type: "error";
4854
5390
  readonly name: "SafeERC20FailedOperation";
@@ -4877,6 +5413,10 @@ declare const FILL_ORDER_ABI: readonly [{
4877
5413
  readonly type: "error";
4878
5414
  readonly name: "UnexpectedCall";
4879
5415
  readonly inputs: readonly [];
5416
+ }, {
5417
+ readonly type: "error";
5418
+ readonly name: "UnknownInstance";
5419
+ readonly inputs: readonly [];
4880
5420
  }, {
4881
5421
  readonly type: "error";
4882
5422
  readonly name: "UnknownOrder";
@@ -4994,6 +5534,20 @@ interface PhantomLegAggregation {
4994
5534
  /** The verified, inventory-backed solvers quoting this leg; bidCount === bidders.length. */
4995
5535
  bidders: PhantomLegBidder[];
4996
5536
  }
5537
+ /**
5538
+ * A Uniswap V4 position a bid declared, after the on-chain ownership check — i.e. one this solver
5539
+ * really holds and can fund a fill from.
5540
+ *
5541
+ * A bid is the only place a position is ever named, so a consumer that wants to value these between
5542
+ * bid windows (an order fill drains a position inside the fill transaction, while wallet and vault
5543
+ * balances barely move) has to take them from here.
5544
+ */
5545
+ interface SolverV4Position {
5546
+ solver: HexString;
5547
+ /** The chain the bid was for. A bid is per chain, so no other chain's reads can see it. */
5548
+ chain: string;
5549
+ tokenId: bigint;
5550
+ }
4997
5551
  /** The aggregated result for a single phantom order's bid window. */
4998
5552
  interface PhantomAggregation {
4999
5553
  /**
@@ -5003,6 +5557,21 @@ interface PhantomAggregation {
5003
5557
  */
5004
5558
  legs: PhantomLegAggregation[];
5005
5559
  lpBalances: LpBalance[];
5560
+ /**
5561
+ * Every declared position that passed the ownership check, across all bids in this window.
5562
+ * Empty when the chain has no configured V4 deployment, since nothing is read there.
5563
+ */
5564
+ positions: SolverV4Position[];
5565
+ /**
5566
+ * Every solver whose bid passed verification in this window, whether or not it ended up backing
5567
+ * a leg, holding any inventory, or declaring anything.
5568
+ *
5569
+ * The other three fields are all filtered — `legs` drops unbacked quotes, `lpBalances` skips
5570
+ * tokens a solver does not hold, and `positions` only lists what was declared — so a solver that
5571
+ * bid while holding nothing anywhere appears in none of them. This is the only complete answer
5572
+ * to "who bid this window", which is what a consumer reconciling per-solver state needs.
5573
+ */
5574
+ solvers: HexString[];
5006
5575
  }
5007
5576
  interface AggregationLogger {
5008
5577
  warn: (payload: unknown, message: string) => void;
@@ -5012,13 +5581,24 @@ interface AggregationLogger {
5012
5581
  *
5013
5582
  * A bid that declares V4 positions is quoting off those pools, and a pool price is what a trade
5014
5583
  * gets BEFORE the pool takes its fee — so the amount such a bid names is more than the solver
5015
- * would actually be left holding once the swap that sources it clears. 30bps is the fee tier the
5016
- * pools these positions sit in charge, so netting it out here is what makes a pool-priced quote
5017
- * comparable to a wallet-funded one, whose inventory has already paid its cost of goods.
5584
+ * would actually be left holding once the swap that sources it clears. Netting that cost out here
5585
+ * is what makes a pool-priced quote comparable to a wallet-funded one, whose inventory has already
5586
+ * paid its cost of goods.
5587
+ */
5588
+ declare const UNISWAP_QUOTE_HAIRCUT_BPS = 10n;
5589
+ /**
5590
+ * Haircut applied to every phantom quote that is NOT priced off a Uniswap V4 pool, in basis points.
5591
+ *
5592
+ * A wallet-funded quote is still the best case the solver sees at bid time; the published rate is
5593
+ * what the protocol tells takers they can trade against, so it is shaded by this margin rather
5594
+ * than being the most optimistic number any bidder named. Pool-priced quotes pay
5595
+ * {@link UNISWAP_QUOTE_HAIRCUT_BPS} instead of this — not on top of it.
5018
5596
  */
5019
- declare const UNISWAP_QUOTE_HAIRCUT_BPS = 30n;
5597
+ declare const PHANTOM_QUOTE_HAIRCUT_BPS = 5n;
5020
5598
  /** Applies {@link UNISWAP_QUOTE_HAIRCUT_BPS} to a quoted output amount, rounding down. */
5021
5599
  declare function applyUniswapQuoteHaircut(amount: bigint): bigint;
5600
+ /** Applies {@link PHANTOM_QUOTE_HAIRCUT_BPS} to a quoted output amount, rounding down. */
5601
+ declare function applyPhantomQuoteHaircut(amount: bigint): bigint;
5022
5602
  declare function weightedMedian(entries: {
5023
5603
  price: bigint;
5024
5604
  weight: bigint;
@@ -5052,16 +5632,63 @@ type RecoverBidSigner = (userOp: PackedUserOperation, entryPoint: HexString, cha
5052
5632
  */
5053
5633
  declare const recoverBidSignerViem: RecoverBidSigner;
5054
5634
  /** Promise-caching delegation reader produced by {@link memoizedDelegationCheck}. */
5055
- type DelegationReader = (evmRpcUrl: string, account: string, solverAccount: string) => Promise<boolean>;
5635
+ type DelegationReader = (evmRpcUrl: string, account: string, solverAccounts: readonly string[]) => Promise<boolean>;
5056
5636
  declare function fetchBidsForOrder(nodeUrl: string, commitment: string): Promise<RpcBidInfo[]>;
5637
+ /**
5638
+ * Sums the solver's redeemable balance of a single token on one chain: the raw ERC-20 balance plus
5639
+ * any ERC-4626 vault positions wrapping it.
5640
+ *
5641
+ * This is THE definition of "a solver's balance" — the periodic sweep and any per-event re-read
5642
+ * must use it rather than a bare `balanceOf`, because simplex funds fills straight out of a vault
5643
+ * inside the fill transaction: the wallet ends the block roughly where it started while
5644
+ * `maxWithdraw` is what actually moved, so a wallet-only read misses such a fill entirely.
5645
+ *
5646
+ * `blockTag` reads the balance as of a specific block ("0x..." or a tag), so a caller replaying an
5647
+ * event records the balance as of that event rather than stamping today's balance onto a
5648
+ * historical row. It defaults to the chain head, which is what a periodic sweep wants.
5649
+ */
5650
+ declare function getTotalSolverBalance(evmRpcUrl: string, chain: string, token: string, solver: string, yieldVaults: YieldVaultMap, blockTag?: string): Promise<bigint>;
5057
5651
  /** PositionManager + StateView addresses for a chain's Uniswap V4 deployment. */
5058
5652
  interface UniswapV4Contracts {
5059
5653
  positionManager: string;
5060
5654
  stateView: string;
5061
5655
  }
5656
+ /** Everything a declared position's contribution depends on, read once and reused across legs. */
5657
+ interface V4PositionState {
5658
+ /** Current on-chain owner. Compared against the bid's signer, never trusted from the bid. */
5659
+ owner: string;
5660
+ info: PoolAndPositionInfo;
5661
+ liquidity: bigint;
5662
+ sqrtPriceX96: bigint;
5663
+ }
5664
+ /**
5665
+ * Reads a declared position: who owns it, how much liquidity it holds, and the price its pool is
5666
+ * currently at. Null when the position does not exist — a solver may name a burned tokenId, which
5667
+ * is not an RPC failure and must not sink the run.
5668
+ *
5669
+ * Exported because a bid is the only place a position is ever named: a consumer that persists the
5670
+ * tokenIds this run verified can re-value them later (at `blockTag`) with exactly these reads, and
5671
+ * `owner` is what tells it a position has since been transferred away.
5672
+ */
5673
+ declare function readV4Position(params: {
5674
+ evmRpcUrl: string;
5675
+ contracts: UniswapV4Contracts;
5676
+ tokenId: bigint;
5677
+ keccak: (hex: HexString) => HexString;
5678
+ /** Block to read at; defaults to the chain head. */
5679
+ blockTag?: string;
5680
+ logger?: AggregationLogger;
5681
+ }): Promise<V4PositionState | null>;
5062
5682
  /** Promise-caching balance reader produced by [`memoizedSolverBalance`]. */
5063
5683
  type SolverBalanceReader = (evmRpcUrl: string, chain: string, token: string, solver: string) => Promise<bigint>;
5064
- declare function memoizedSolverBalance(yieldVaults: YieldVaultMap): SolverBalanceReader;
5684
+ declare function memoizedSolverBalance(yieldVaults: YieldVaultMap,
5685
+ /**
5686
+ * Block to read each chain at, keyed by state machine id; anything absent reads the head. Block
5687
+ * numbers are per chain, so a caller handling an event on one chain can pin that chain to the
5688
+ * event's block while the rest of its sweep stays at the head, where the numbers would mean
5689
+ * nothing.
5690
+ */
5691
+ blockTags?: Record<string, string>): SolverBalanceReader;
5065
5692
  /**
5066
5693
  * Aggregates every bid for a phantom order into a single price/liquidity snapshot.
5067
5694
  *
@@ -5094,8 +5721,12 @@ declare function runAggregation(params: {
5094
5721
  gatewayAddress: string;
5095
5722
  commitment: string;
5096
5723
  yieldVaults: YieldVaultMap;
5097
- /** SolverAccount on `chain` that our solvers delegate to; bids from anyone else are dropped. */
5098
- solverAccount: string;
5724
+ /**
5725
+ * SolverAccount on `chain` that our solvers delegate to; bids from anyone else are dropped.
5726
+ * Several may be given, e.g. the current deployment and the one it replaced, and a bid is
5727
+ * counted when its sender delegates to any of them.
5728
+ */
5729
+ solverAccount: string | readonly string[];
5099
5730
  extractFill?: (callData: HexString, gatewayAddress: string) => FillData | null;
5100
5731
  recoverSigner?: RecoverBidSigner;
5101
5732
  bidNonceKey?: BidNonceKeyFn;
@@ -5120,7 +5751,7 @@ declare function runAggregation(params: {
5120
5751
  declare const ABI: readonly [{
5121
5752
  readonly type: "constructor";
5122
5753
  readonly inputs: readonly [{
5123
- readonly name: "admin";
5754
+ readonly name: "owner";
5124
5755
  readonly type: "address";
5125
5756
  readonly internalType: "address";
5126
5757
  }];
@@ -5176,20 +5807,6 @@ declare const ABI: readonly [{
5176
5807
  readonly internalType: "address";
5177
5808
  }];
5178
5809
  readonly stateMutability: "view";
5179
- }, {
5180
- readonly type: "function";
5181
- readonly name: "_instances";
5182
- readonly inputs: readonly [{
5183
- readonly name: "";
5184
- readonly type: "bytes32";
5185
- readonly internalType: "bytes32";
5186
- }];
5187
- readonly outputs: readonly [{
5188
- readonly name: "";
5189
- readonly type: "address";
5190
- readonly internalType: "address";
5191
- }];
5192
- readonly stateMutability: "view";
5193
5810
  }, {
5194
5811
  readonly type: "function";
5195
5812
  readonly name: "_nonce";
@@ -5218,6 +5835,16 @@ declare const ABI: readonly [{
5218
5835
  readonly internalType: "uint256";
5219
5836
  }];
5220
5837
  readonly stateMutability: "view";
5838
+ }, {
5839
+ readonly type: "function";
5840
+ readonly name: "_owner";
5841
+ readonly inputs: readonly [];
5842
+ readonly outputs: readonly [{
5843
+ readonly name: "";
5844
+ readonly type: "address";
5845
+ readonly internalType: "address";
5846
+ }];
5847
+ readonly stateMutability: "view";
5221
5848
  }, {
5222
5849
  readonly type: "function";
5223
5850
  readonly name: "_partialFills";
@@ -5506,6 +6133,10 @@ declare const ABI: readonly [{
5506
6133
  readonly name: "nativeDispatchFee";
5507
6134
  readonly type: "uint256";
5508
6135
  readonly internalType: "uint256";
6136
+ }, {
6137
+ readonly name: "validUntil";
6138
+ readonly type: "uint256";
6139
+ readonly internalType: "uint256";
5509
6140
  }, {
5510
6141
  readonly name: "outputs";
5511
6142
  readonly type: "tuple[]";
@@ -5533,6 +6164,49 @@ declare const ABI: readonly [{
5533
6164
  readonly internalType: "address";
5534
6165
  }];
5535
6166
  readonly stateMutability: "view";
6167
+ }, {
6168
+ readonly type: "function";
6169
+ readonly name: "initialize";
6170
+ readonly inputs: readonly [{
6171
+ readonly name: "p";
6172
+ readonly type: "tuple";
6173
+ readonly internalType: "struct Params";
6174
+ readonly components: readonly [{
6175
+ readonly name: "host";
6176
+ readonly type: "address";
6177
+ readonly internalType: "address";
6178
+ }, {
6179
+ readonly name: "dispatcher";
6180
+ readonly type: "address";
6181
+ readonly internalType: "address";
6182
+ }, {
6183
+ readonly name: "solverSelection";
6184
+ readonly type: "bool";
6185
+ readonly internalType: "bool";
6186
+ }, {
6187
+ readonly name: "surplusShareBps";
6188
+ readonly type: "uint256";
6189
+ readonly internalType: "uint256";
6190
+ }, {
6191
+ readonly name: "protocolFeeBps";
6192
+ readonly type: "uint256";
6193
+ readonly internalType: "uint256";
6194
+ }, {
6195
+ readonly name: "priceOracle";
6196
+ readonly type: "address";
6197
+ readonly internalType: "address";
6198
+ }];
6199
+ }, {
6200
+ readonly name: "peerChains";
6201
+ readonly type: "bytes[]";
6202
+ readonly internalType: "bytes[]";
6203
+ }, {
6204
+ readonly name: "relayer";
6205
+ readonly type: "address";
6206
+ readonly internalType: "address";
6207
+ }];
6208
+ readonly outputs: readonly [];
6209
+ readonly stateMutability: "nonpayable";
5536
6210
  }, {
5537
6211
  readonly type: "function";
5538
6212
  readonly name: "instance";
@@ -5547,6 +6221,16 @@ declare const ABI: readonly [{
5547
6221
  readonly internalType: "address";
5548
6222
  }];
5549
6223
  readonly stateMutability: "view";
6224
+ }, {
6225
+ readonly type: "function";
6226
+ readonly name: "migrate";
6227
+ readonly inputs: readonly [{
6228
+ readonly name: "relayer";
6229
+ readonly type: "address";
6230
+ readonly internalType: "address";
6231
+ }];
6232
+ readonly outputs: readonly [];
6233
+ readonly stateMutability: "nonpayable";
5550
6234
  }, {
5551
6235
  readonly type: "function";
5552
6236
  readonly name: "onAccept";
@@ -5942,7 +6626,7 @@ declare const ABI: readonly [{
5942
6626
  readonly type: "uint256";
5943
6627
  readonly internalType: "uint256";
5944
6628
  }];
5945
- readonly stateMutability: "view";
6629
+ readonly stateMutability: "nonpayable";
5946
6630
  }, {
5947
6631
  readonly type: "function";
5948
6632
  readonly name: "quote";
@@ -5985,6 +6669,16 @@ declare const ABI: readonly [{
5985
6669
  readonly type: "uint256";
5986
6670
  readonly internalType: "uint256";
5987
6671
  }];
6672
+ readonly stateMutability: "nonpayable";
6673
+ }, {
6674
+ readonly type: "function";
6675
+ readonly name: "relayer";
6676
+ readonly inputs: readonly [];
6677
+ readonly outputs: readonly [{
6678
+ readonly name: "";
6679
+ readonly type: "address";
6680
+ readonly internalType: "address";
6681
+ }];
5988
6682
  readonly stateMutability: "view";
5989
6683
  }, {
5990
6684
  readonly type: "function";
@@ -6015,52 +6709,53 @@ declare const ABI: readonly [{
6015
6709
  readonly stateMutability: "nonpayable";
6016
6710
  }, {
6017
6711
  readonly type: "function";
6018
- readonly name: "init";
6712
+ readonly name: "setRelayer";
6019
6713
  readonly inputs: readonly [{
6020
- readonly name: "p";
6021
- readonly type: "tuple";
6022
- readonly internalType: "struct Params";
6023
- readonly components: readonly [{
6024
- readonly name: "host";
6025
- readonly type: "address";
6026
- readonly internalType: "address";
6027
- }, {
6028
- readonly name: "dispatcher";
6029
- readonly type: "address";
6030
- readonly internalType: "address";
6031
- }, {
6032
- readonly name: "solverSelection";
6033
- readonly type: "bool";
6034
- readonly internalType: "bool";
6035
- }, {
6036
- readonly name: "surplusShareBps";
6037
- readonly type: "uint256";
6038
- readonly internalType: "uint256";
6039
- }, {
6040
- readonly name: "protocolFeeBps";
6041
- readonly type: "uint256";
6042
- readonly internalType: "uint256";
6043
- }, {
6044
- readonly name: "priceOracle";
6045
- readonly type: "address";
6046
- readonly internalType: "address";
6047
- }];
6714
+ readonly name: "relayer";
6715
+ readonly type: "address";
6716
+ readonly internalType: "address";
6717
+ }];
6718
+ readonly outputs: readonly [];
6719
+ readonly stateMutability: "nonpayable";
6720
+ }, {
6721
+ readonly type: "function";
6722
+ readonly name: "upgradeToAndCall";
6723
+ readonly inputs: readonly [{
6724
+ readonly name: "newImplementation";
6725
+ readonly type: "address";
6726
+ readonly internalType: "address";
6048
6727
  }, {
6049
- readonly name: "deployments";
6050
- readonly type: "tuple[]";
6051
- readonly internalType: "struct Deployment[]";
6052
- readonly components: readonly [{
6053
- readonly name: "chain";
6054
- readonly type: "bytes";
6055
- readonly internalType: "bytes";
6056
- }, {
6057
- readonly name: "gateway";
6058
- readonly type: "address";
6059
- readonly internalType: "address";
6060
- }];
6728
+ readonly name: "data";
6729
+ readonly type: "bytes";
6730
+ readonly internalType: "bytes";
6061
6731
  }];
6062
6732
  readonly outputs: readonly [];
6063
6733
  readonly stateMutability: "nonpayable";
6734
+ }, {
6735
+ readonly type: "function";
6736
+ readonly name: "version";
6737
+ readonly inputs: readonly [];
6738
+ readonly outputs: readonly [{
6739
+ readonly name: "";
6740
+ readonly type: "uint64";
6741
+ readonly internalType: "uint64";
6742
+ }];
6743
+ readonly stateMutability: "view";
6744
+ }, {
6745
+ readonly type: "event";
6746
+ readonly name: "DeploymentAdded";
6747
+ readonly inputs: readonly [{
6748
+ readonly name: "chain";
6749
+ readonly type: "string";
6750
+ readonly indexed: false;
6751
+ readonly internalType: "string";
6752
+ }, {
6753
+ readonly name: "gateway";
6754
+ readonly type: "address";
6755
+ readonly indexed: false;
6756
+ readonly internalType: "address";
6757
+ }];
6758
+ readonly anonymous: false;
6064
6759
  }, {
6065
6760
  readonly type: "event";
6066
6761
  readonly name: "DestinationProtocolFeeUpdated";
@@ -6166,14 +6861,24 @@ declare const ABI: readonly [{
6166
6861
  readonly anonymous: false;
6167
6862
  }, {
6168
6863
  readonly type: "event";
6169
- readonly name: "DeploymentAdded";
6864
+ readonly name: "Initialized";
6170
6865
  readonly inputs: readonly [{
6171
- readonly name: "chain";
6172
- readonly type: "string";
6866
+ readonly name: "version";
6867
+ readonly type: "uint64";
6173
6868
  readonly indexed: false;
6174
- readonly internalType: "string";
6869
+ readonly internalType: "uint64";
6870
+ }];
6871
+ readonly anonymous: false;
6872
+ }, {
6873
+ readonly type: "event";
6874
+ readonly name: "OrderCancelled";
6875
+ readonly inputs: readonly [{
6876
+ readonly name: "commitment";
6877
+ readonly type: "bytes32";
6878
+ readonly indexed: true;
6879
+ readonly internalType: "bytes32";
6175
6880
  }, {
6176
- readonly name: "gateway";
6881
+ readonly name: "canceller";
6177
6882
  readonly type: "address";
6178
6883
  readonly indexed: false;
6179
6884
  readonly internalType: "address";
@@ -6432,13 +7137,42 @@ declare const ABI: readonly [{
6432
7137
  }];
6433
7138
  }];
6434
7139
  readonly anonymous: false;
7140
+ }, {
7141
+ readonly type: "event";
7142
+ readonly name: "RelayerUpdated";
7143
+ readonly inputs: readonly [{
7144
+ readonly name: "previous";
7145
+ readonly type: "address";
7146
+ readonly indexed: false;
7147
+ readonly internalType: "address";
7148
+ }, {
7149
+ readonly name: "current";
7150
+ readonly type: "address";
7151
+ readonly indexed: false;
7152
+ readonly internalType: "address";
7153
+ }];
7154
+ readonly anonymous: false;
7155
+ }, {
7156
+ readonly type: "event";
7157
+ readonly name: "Upgraded";
7158
+ readonly inputs: readonly [{
7159
+ readonly name: "implementation";
7160
+ readonly type: "address";
7161
+ readonly indexed: true;
7162
+ readonly internalType: "address";
7163
+ }];
7164
+ readonly anonymous: false;
6435
7165
  }, {
6436
7166
  readonly type: "error";
6437
- readonly name: "Cancelled";
6438
- readonly inputs: readonly [];
7167
+ readonly name: "AddressEmptyCode";
7168
+ readonly inputs: readonly [{
7169
+ readonly name: "target";
7170
+ readonly type: "address";
7171
+ readonly internalType: "address";
7172
+ }];
6439
7173
  }, {
6440
7174
  readonly type: "error";
6441
- readonly name: "UnknownInstance";
7175
+ readonly name: "Cancelled";
6442
7176
  readonly inputs: readonly [];
6443
7177
  }, {
6444
7178
  readonly type: "error";
@@ -6462,7 +7196,27 @@ declare const ABI: readonly [{
6462
7196
  }];
6463
7197
  }, {
6464
7198
  readonly type: "error";
6465
- readonly name: "Expired";
7199
+ readonly name: "ERC1967InvalidImplementation";
7200
+ readonly inputs: readonly [{
7201
+ readonly name: "implementation";
7202
+ readonly type: "address";
7203
+ readonly internalType: "address";
7204
+ }];
7205
+ }, {
7206
+ readonly type: "error";
7207
+ readonly name: "ERC1967NonPayable";
7208
+ readonly inputs: readonly [];
7209
+ }, {
7210
+ readonly type: "error";
7211
+ readonly name: "Expired";
7212
+ readonly inputs: readonly [];
7213
+ }, {
7214
+ readonly type: "error";
7215
+ readonly name: "FailedCall";
7216
+ readonly inputs: readonly [];
7217
+ }, {
7218
+ readonly type: "error";
7219
+ readonly name: "FillExpired";
6466
7220
  readonly inputs: readonly [];
6467
7221
  }, {
6468
7222
  readonly type: "error";
@@ -6472,6 +7226,10 @@ declare const ABI: readonly [{
6472
7226
  readonly type: "error";
6473
7227
  readonly name: "InsufficientNativeToken";
6474
7228
  readonly inputs: readonly [];
7229
+ }, {
7230
+ readonly type: "error";
7231
+ readonly name: "InvalidInitialization";
7232
+ readonly inputs: readonly [];
6475
7233
  }, {
6476
7234
  readonly type: "error";
6477
7235
  readonly name: "InvalidInput";
@@ -6484,6 +7242,18 @@ declare const ABI: readonly [{
6484
7242
  readonly type: "error";
6485
7243
  readonly name: "NotExpired";
6486
7244
  readonly inputs: readonly [];
7245
+ }, {
7246
+ readonly type: "error";
7247
+ readonly name: "NotInitializing";
7248
+ readonly inputs: readonly [];
7249
+ }, {
7250
+ readonly type: "error";
7251
+ readonly name: "PartialFillNotAllowed";
7252
+ readonly inputs: readonly [];
7253
+ }, {
7254
+ readonly type: "error";
7255
+ readonly name: "ReentrancyGuardReentrantCall";
7256
+ readonly inputs: readonly [];
6487
7257
  }, {
6488
7258
  readonly type: "error";
6489
7259
  readonly name: "SafeERC20FailedOperation";
@@ -6512,6 +7282,10 @@ declare const ABI: readonly [{
6512
7282
  readonly type: "error";
6513
7283
  readonly name: "UnexpectedCall";
6514
7284
  readonly inputs: readonly [];
7285
+ }, {
7286
+ readonly type: "error";
7287
+ readonly name: "UnknownInstance";
7288
+ readonly inputs: readonly [];
6515
7289
  }, {
6516
7290
  readonly type: "error";
6517
7291
  readonly name: "UnknownOrder";
@@ -6525,7 +7299,7 @@ declare const _default: {
6525
7299
  ABI: readonly [{
6526
7300
  readonly type: "constructor";
6527
7301
  readonly inputs: readonly [{
6528
- readonly name: "admin";
7302
+ readonly name: "owner";
6529
7303
  readonly type: "address";
6530
7304
  readonly internalType: "address";
6531
7305
  }];
@@ -6581,20 +7355,6 @@ declare const _default: {
6581
7355
  readonly internalType: "address";
6582
7356
  }];
6583
7357
  readonly stateMutability: "view";
6584
- }, {
6585
- readonly type: "function";
6586
- readonly name: "_instances";
6587
- readonly inputs: readonly [{
6588
- readonly name: "";
6589
- readonly type: "bytes32";
6590
- readonly internalType: "bytes32";
6591
- }];
6592
- readonly outputs: readonly [{
6593
- readonly name: "";
6594
- readonly type: "address";
6595
- readonly internalType: "address";
6596
- }];
6597
- readonly stateMutability: "view";
6598
7358
  }, {
6599
7359
  readonly type: "function";
6600
7360
  readonly name: "_nonce";
@@ -6623,6 +7383,16 @@ declare const _default: {
6623
7383
  readonly internalType: "uint256";
6624
7384
  }];
6625
7385
  readonly stateMutability: "view";
7386
+ }, {
7387
+ readonly type: "function";
7388
+ readonly name: "_owner";
7389
+ readonly inputs: readonly [];
7390
+ readonly outputs: readonly [{
7391
+ readonly name: "";
7392
+ readonly type: "address";
7393
+ readonly internalType: "address";
7394
+ }];
7395
+ readonly stateMutability: "view";
6626
7396
  }, {
6627
7397
  readonly type: "function";
6628
7398
  readonly name: "_partialFills";
@@ -6911,6 +7681,10 @@ declare const _default: {
6911
7681
  readonly name: "nativeDispatchFee";
6912
7682
  readonly type: "uint256";
6913
7683
  readonly internalType: "uint256";
7684
+ }, {
7685
+ readonly name: "validUntil";
7686
+ readonly type: "uint256";
7687
+ readonly internalType: "uint256";
6914
7688
  }, {
6915
7689
  readonly name: "outputs";
6916
7690
  readonly type: "tuple[]";
@@ -6938,6 +7712,49 @@ declare const _default: {
6938
7712
  readonly internalType: "address";
6939
7713
  }];
6940
7714
  readonly stateMutability: "view";
7715
+ }, {
7716
+ readonly type: "function";
7717
+ readonly name: "initialize";
7718
+ readonly inputs: readonly [{
7719
+ readonly name: "p";
7720
+ readonly type: "tuple";
7721
+ readonly internalType: "struct Params";
7722
+ readonly components: readonly [{
7723
+ readonly name: "host";
7724
+ readonly type: "address";
7725
+ readonly internalType: "address";
7726
+ }, {
7727
+ readonly name: "dispatcher";
7728
+ readonly type: "address";
7729
+ readonly internalType: "address";
7730
+ }, {
7731
+ readonly name: "solverSelection";
7732
+ readonly type: "bool";
7733
+ readonly internalType: "bool";
7734
+ }, {
7735
+ readonly name: "surplusShareBps";
7736
+ readonly type: "uint256";
7737
+ readonly internalType: "uint256";
7738
+ }, {
7739
+ readonly name: "protocolFeeBps";
7740
+ readonly type: "uint256";
7741
+ readonly internalType: "uint256";
7742
+ }, {
7743
+ readonly name: "priceOracle";
7744
+ readonly type: "address";
7745
+ readonly internalType: "address";
7746
+ }];
7747
+ }, {
7748
+ readonly name: "peerChains";
7749
+ readonly type: "bytes[]";
7750
+ readonly internalType: "bytes[]";
7751
+ }, {
7752
+ readonly name: "relayer";
7753
+ readonly type: "address";
7754
+ readonly internalType: "address";
7755
+ }];
7756
+ readonly outputs: readonly [];
7757
+ readonly stateMutability: "nonpayable";
6941
7758
  }, {
6942
7759
  readonly type: "function";
6943
7760
  readonly name: "instance";
@@ -6952,6 +7769,16 @@ declare const _default: {
6952
7769
  readonly internalType: "address";
6953
7770
  }];
6954
7771
  readonly stateMutability: "view";
7772
+ }, {
7773
+ readonly type: "function";
7774
+ readonly name: "migrate";
7775
+ readonly inputs: readonly [{
7776
+ readonly name: "relayer";
7777
+ readonly type: "address";
7778
+ readonly internalType: "address";
7779
+ }];
7780
+ readonly outputs: readonly [];
7781
+ readonly stateMutability: "nonpayable";
6955
7782
  }, {
6956
7783
  readonly type: "function";
6957
7784
  readonly name: "onAccept";
@@ -7347,7 +8174,7 @@ declare const _default: {
7347
8174
  readonly type: "uint256";
7348
8175
  readonly internalType: "uint256";
7349
8176
  }];
7350
- readonly stateMutability: "view";
8177
+ readonly stateMutability: "nonpayable";
7351
8178
  }, {
7352
8179
  readonly type: "function";
7353
8180
  readonly name: "quote";
@@ -7390,6 +8217,16 @@ declare const _default: {
7390
8217
  readonly type: "uint256";
7391
8218
  readonly internalType: "uint256";
7392
8219
  }];
8220
+ readonly stateMutability: "nonpayable";
8221
+ }, {
8222
+ readonly type: "function";
8223
+ readonly name: "relayer";
8224
+ readonly inputs: readonly [];
8225
+ readonly outputs: readonly [{
8226
+ readonly name: "";
8227
+ readonly type: "address";
8228
+ readonly internalType: "address";
8229
+ }];
7393
8230
  readonly stateMutability: "view";
7394
8231
  }, {
7395
8232
  readonly type: "function";
@@ -7420,52 +8257,53 @@ declare const _default: {
7420
8257
  readonly stateMutability: "nonpayable";
7421
8258
  }, {
7422
8259
  readonly type: "function";
7423
- readonly name: "init";
8260
+ readonly name: "setRelayer";
7424
8261
  readonly inputs: readonly [{
7425
- readonly name: "p";
7426
- readonly type: "tuple";
7427
- readonly internalType: "struct Params";
7428
- readonly components: readonly [{
7429
- readonly name: "host";
7430
- readonly type: "address";
7431
- readonly internalType: "address";
7432
- }, {
7433
- readonly name: "dispatcher";
7434
- readonly type: "address";
7435
- readonly internalType: "address";
7436
- }, {
7437
- readonly name: "solverSelection";
7438
- readonly type: "bool";
7439
- readonly internalType: "bool";
7440
- }, {
7441
- readonly name: "surplusShareBps";
7442
- readonly type: "uint256";
7443
- readonly internalType: "uint256";
7444
- }, {
7445
- readonly name: "protocolFeeBps";
7446
- readonly type: "uint256";
7447
- readonly internalType: "uint256";
7448
- }, {
7449
- readonly name: "priceOracle";
7450
- readonly type: "address";
7451
- readonly internalType: "address";
7452
- }];
8262
+ readonly name: "relayer";
8263
+ readonly type: "address";
8264
+ readonly internalType: "address";
8265
+ }];
8266
+ readonly outputs: readonly [];
8267
+ readonly stateMutability: "nonpayable";
8268
+ }, {
8269
+ readonly type: "function";
8270
+ readonly name: "upgradeToAndCall";
8271
+ readonly inputs: readonly [{
8272
+ readonly name: "newImplementation";
8273
+ readonly type: "address";
8274
+ readonly internalType: "address";
7453
8275
  }, {
7454
- readonly name: "deployments";
7455
- readonly type: "tuple[]";
7456
- readonly internalType: "struct Deployment[]";
7457
- readonly components: readonly [{
7458
- readonly name: "chain";
7459
- readonly type: "bytes";
7460
- readonly internalType: "bytes";
7461
- }, {
7462
- readonly name: "gateway";
7463
- readonly type: "address";
7464
- readonly internalType: "address";
7465
- }];
8276
+ readonly name: "data";
8277
+ readonly type: "bytes";
8278
+ readonly internalType: "bytes";
7466
8279
  }];
7467
8280
  readonly outputs: readonly [];
7468
8281
  readonly stateMutability: "nonpayable";
8282
+ }, {
8283
+ readonly type: "function";
8284
+ readonly name: "version";
8285
+ readonly inputs: readonly [];
8286
+ readonly outputs: readonly [{
8287
+ readonly name: "";
8288
+ readonly type: "uint64";
8289
+ readonly internalType: "uint64";
8290
+ }];
8291
+ readonly stateMutability: "view";
8292
+ }, {
8293
+ readonly type: "event";
8294
+ readonly name: "DeploymentAdded";
8295
+ readonly inputs: readonly [{
8296
+ readonly name: "chain";
8297
+ readonly type: "string";
8298
+ readonly indexed: false;
8299
+ readonly internalType: "string";
8300
+ }, {
8301
+ readonly name: "gateway";
8302
+ readonly type: "address";
8303
+ readonly indexed: false;
8304
+ readonly internalType: "address";
8305
+ }];
8306
+ readonly anonymous: false;
7469
8307
  }, {
7470
8308
  readonly type: "event";
7471
8309
  readonly name: "DestinationProtocolFeeUpdated";
@@ -7571,14 +8409,24 @@ declare const _default: {
7571
8409
  readonly anonymous: false;
7572
8410
  }, {
7573
8411
  readonly type: "event";
7574
- readonly name: "DeploymentAdded";
8412
+ readonly name: "Initialized";
7575
8413
  readonly inputs: readonly [{
7576
- readonly name: "chain";
7577
- readonly type: "string";
8414
+ readonly name: "version";
8415
+ readonly type: "uint64";
7578
8416
  readonly indexed: false;
7579
- readonly internalType: "string";
8417
+ readonly internalType: "uint64";
8418
+ }];
8419
+ readonly anonymous: false;
8420
+ }, {
8421
+ readonly type: "event";
8422
+ readonly name: "OrderCancelled";
8423
+ readonly inputs: readonly [{
8424
+ readonly name: "commitment";
8425
+ readonly type: "bytes32";
8426
+ readonly indexed: true;
8427
+ readonly internalType: "bytes32";
7580
8428
  }, {
7581
- readonly name: "gateway";
8429
+ readonly name: "canceller";
7582
8430
  readonly type: "address";
7583
8431
  readonly indexed: false;
7584
8432
  readonly internalType: "address";
@@ -7837,13 +8685,42 @@ declare const _default: {
7837
8685
  }];
7838
8686
  }];
7839
8687
  readonly anonymous: false;
8688
+ }, {
8689
+ readonly type: "event";
8690
+ readonly name: "RelayerUpdated";
8691
+ readonly inputs: readonly [{
8692
+ readonly name: "previous";
8693
+ readonly type: "address";
8694
+ readonly indexed: false;
8695
+ readonly internalType: "address";
8696
+ }, {
8697
+ readonly name: "current";
8698
+ readonly type: "address";
8699
+ readonly indexed: false;
8700
+ readonly internalType: "address";
8701
+ }];
8702
+ readonly anonymous: false;
8703
+ }, {
8704
+ readonly type: "event";
8705
+ readonly name: "Upgraded";
8706
+ readonly inputs: readonly [{
8707
+ readonly name: "implementation";
8708
+ readonly type: "address";
8709
+ readonly indexed: true;
8710
+ readonly internalType: "address";
8711
+ }];
8712
+ readonly anonymous: false;
7840
8713
  }, {
7841
8714
  readonly type: "error";
7842
- readonly name: "Cancelled";
7843
- readonly inputs: readonly [];
8715
+ readonly name: "AddressEmptyCode";
8716
+ readonly inputs: readonly [{
8717
+ readonly name: "target";
8718
+ readonly type: "address";
8719
+ readonly internalType: "address";
8720
+ }];
7844
8721
  }, {
7845
8722
  readonly type: "error";
7846
- readonly name: "UnknownInstance";
8723
+ readonly name: "Cancelled";
7847
8724
  readonly inputs: readonly [];
7848
8725
  }, {
7849
8726
  readonly type: "error";
@@ -7865,10 +8742,30 @@ declare const _default: {
7865
8742
  readonly type: "bytes32";
7866
8743
  readonly internalType: "bytes32";
7867
8744
  }];
8745
+ }, {
8746
+ readonly type: "error";
8747
+ readonly name: "ERC1967InvalidImplementation";
8748
+ readonly inputs: readonly [{
8749
+ readonly name: "implementation";
8750
+ readonly type: "address";
8751
+ readonly internalType: "address";
8752
+ }];
8753
+ }, {
8754
+ readonly type: "error";
8755
+ readonly name: "ERC1967NonPayable";
8756
+ readonly inputs: readonly [];
7868
8757
  }, {
7869
8758
  readonly type: "error";
7870
8759
  readonly name: "Expired";
7871
8760
  readonly inputs: readonly [];
8761
+ }, {
8762
+ readonly type: "error";
8763
+ readonly name: "FailedCall";
8764
+ readonly inputs: readonly [];
8765
+ }, {
8766
+ readonly type: "error";
8767
+ readonly name: "FillExpired";
8768
+ readonly inputs: readonly [];
7872
8769
  }, {
7873
8770
  readonly type: "error";
7874
8771
  readonly name: "Filled";
@@ -7877,6 +8774,10 @@ declare const _default: {
7877
8774
  readonly type: "error";
7878
8775
  readonly name: "InsufficientNativeToken";
7879
8776
  readonly inputs: readonly [];
8777
+ }, {
8778
+ readonly type: "error";
8779
+ readonly name: "InvalidInitialization";
8780
+ readonly inputs: readonly [];
7880
8781
  }, {
7881
8782
  readonly type: "error";
7882
8783
  readonly name: "InvalidInput";
@@ -7889,6 +8790,18 @@ declare const _default: {
7889
8790
  readonly type: "error";
7890
8791
  readonly name: "NotExpired";
7891
8792
  readonly inputs: readonly [];
8793
+ }, {
8794
+ readonly type: "error";
8795
+ readonly name: "NotInitializing";
8796
+ readonly inputs: readonly [];
8797
+ }, {
8798
+ readonly type: "error";
8799
+ readonly name: "PartialFillNotAllowed";
8800
+ readonly inputs: readonly [];
8801
+ }, {
8802
+ readonly type: "error";
8803
+ readonly name: "ReentrancyGuardReentrantCall";
8804
+ readonly inputs: readonly [];
7892
8805
  }, {
7893
8806
  readonly type: "error";
7894
8807
  readonly name: "SafeERC20FailedOperation";
@@ -7917,6 +8830,10 @@ declare const _default: {
7917
8830
  readonly type: "error";
7918
8831
  readonly name: "UnexpectedCall";
7919
8832
  readonly inputs: readonly [];
8833
+ }, {
8834
+ readonly type: "error";
8835
+ readonly name: "UnknownInstance";
8836
+ readonly inputs: readonly [];
7920
8837
  }, {
7921
8838
  readonly type: "error";
7922
8839
  readonly name: "UnknownOrder";
@@ -7928,4 +8845,4 @@ declare const _default: {
7928
8845
  }];
7929
8846
  };
7930
8847
 
7931
- export { type DecodedPostResponseEvent as $, type AssetTeleported as A, type BuyAndSellRates as B, ChainConfigService as C, type SubmitBidOptions as D, type EstimateGasCallData as E, type PackedUserOperation as F, type GetRequestWithStatus as G, type HexString$1 as H, type IChain as I, type FillerBid as J, type Bid as K, type EstimateFillOrderParams as L, type FillOrderEstimate as M, type OrderFeesQuote 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, type ERC7821Call as U, type OrderWithStatus as V, OrderStatus as W, type TokenGatewayAssetTeleportedWithStatus as X, TeleportStatus as Y, type DecodedOrderPlacedLog as Z, type DecodedPostRequestEvent as _, type IEvmConfig as a, type SigningAccount as a$, type AllStatusKey as a0, type AssetTeleportedResponse as a1, type BidStorageEntry as a2, type BidSubmissionResult as a3, type BlockMetadata as a4, type BytesLikeHex as a5, type CancelOptions as a6, type ChainConfig as a7, type ChainConfigData 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, memoizedSolverBalance 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, UNISWAP_QUOTE_HAIRCUT_BPS as b9, polkadotAssetHubPaseo as bA, polkadotHubMainnet as bB, poolSlug as bC, sortPoolSymbols as bD, tronChainIds as bE, tronNile as bF, type AggregationLogger as bG, type BidNonceKeyFn as bH, type BidSignature as bI, ENTRY_POINT_V08_ADDRESS as bJ, FILL_ORDER_ABI as bK, type FetchLike as bL, type FillData as bM, type HexString as bN, _default as bO, type LpBalance as bP, type OrderCommitmentFn as bQ, type PhantomAggregation as bR, type PhantomLegAggregation as bS, type PhantomLegBidder as bT, type RecoverBidSigner as bU, type RpcBidInfo as bV, type SolverBalanceReader as bW, type YieldVaultMap as bX, aggregatePhantomBids as bY, extractFillData as bZ, fetchBidsForOrder as b_, type UniswapV4PoolConfigData as ba, applyUniswapQuoteHaircut as bb, chainConfigs as bc, convertCodecToIGetRequest as bd, convertCodecToIProof as be, convertIGetRequestToCodec as bf, convertIProofToCodec as bg, convertStateIdToStateMachineId as bh, convertStateMachineEnumToString as bi, convertStateMachineIdToEnum as bj, decodeAcceptedSourceChains as bk, decodeERC7821ExecuteBatch as bl, decodePhantomBidDeclaration as bm, decodeUserOpScale as bn, deriveHttpUrl as bo, encodeAcceptedSourceChains as bp, encodeERC7821ExecuteBatch as bq, encodeISMPMessage as br, encodePhantomBidDeclaration as bs, encodeUserOpScale as bt, getChainId as bu, getConfigByStateMachineId as bv, getViemChain as bw, hyperbridgeAddress as bx, pharosAtlantic as by, pharosMainnet as bz, type StateMachineHeight as c, orderCommitmentFromDecoded as c0, recoverBidSignerViem as c1, setAggregationFetch as c2, splitBidSignature as c3, weightedMedian as c4, zipFillLegs as c5, 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, Chains as s, type ConfiguredAssetSymbol as t, type AvailableLiquidity as u, type IntentOrderStatusUpdate as v, type SelectBidResult as w, type ResumeIntentOrderOptions as x, type CancelOrderOptions as y, type CancelQuote as z };
8848
+ export { type DecodedPostResponseEvent as $, type AssetTeleported as A, type BuyAndSellRates as B, ChainConfigService as C, type SubmitBidOptions as D, type EstimateGasCallData as E, type PackedUserOperation as F, type GetRequestWithStatus as G, type HexString$2 as H, type IChain as I, type FillerBid as J, type Bid as K, type EstimateFillOrderParams as L, type FillOrderEstimate as M, type OrderFeesQuote 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, type ERC7821Call as U, type OrderWithStatus as V, OrderStatus as W, type TokenGatewayAssetTeleportedWithStatus as X, TeleportStatus as Y, type DecodedOrderPlacedLog as Z, type DecodedPostRequestEvent as _, type IEvmConfig as a, type RequestCommitment as a$, type AllStatusKey as a0, type AssetTeleportedResponse as a1, type BidStorageEntry as a2, type BidSubmissionResult as a3, type BlockMetadata as a4, type BytesLikeHex as a5, CHAINS_WITHOUT_VALID_UNTIL as a6, type CancelOptions as a7, type ChainConfig as a8, type ChainConfigData as a9, type IPostResponse as aA, type IRequestMessage as aB, type ISubstrateConfig as aC, type ITimeoutPostRequestMessage as aD, ABI as aE, type IntentGatewayParams as aF, IntentOrderStatus as aG, type IntentOrderStatusKey as aH, type IsmpRequest as aI, LEGACY_FILL_OPTIONS_IMPLEMENTATIONS as aJ, type LiquiditySlice as aK, type OrderResponse as aL, type OrderStatusMetadata as aM, PHANTOM_QUOTE_HAIRCUT_BPS as aN, type PaymentInfo as aO, type PhantomBid as aP, type PhantomBidBatchResult as aQ, type PhantomBidDeclaration as aR, type PhantomBidOutcome as aS, type PhantomOrderEvent as aT, type PhantomOrderLeg as aU, type PhantomOrderPriceSnapshot as aV, type PhantomOrderPriceSnapshotsResponse as aW, type PhantomTimings as aX, type PollPhantomOrdersOptions as aY, type PostRequestStatus as aZ, type RequestBody as a_, type ConfiguredAssetSymbolInput as aa, type Deployment as ab, type DispatchGet as ac, type DispatchInfo as ad, type DispatchPost as ae, type Erc4626VaultConfigData as af, type ExecuteIntentOrderOptions as ag, type ExecutionResult as ah, FILL_ORDER_V1_ABI as ai, type FillOptions as aj, type FillOptionsVersion as ak, type FillerConfig as al, type GetRequestResponse as am, type GetResponseByRequestIdResponse as an, type GetResponseStorageValues as ao, type HostParams as ap, HyperClientStatus as aq, type IBatchConsensusAndGetResponseMessage as ar, type IBatchConsensusAndPostRequestMessage as as, type IConfig as at, type IConsensusMessage as au, type IGetRequestMessage as av, type IGetResponse as aw, type IGetResponseMessage as ax, type IHyperbridgeConfig as ay, INCLUSION_TIMEOUT_MS as az, type IMessage as b, type OrderCommitmentFn as b$, RequestKind as b0, type RequestResponse as b1, RequestStatus as b2, type RequestStatusKey as b3, type SelectOptions as b4, type SigningAccount as b5, type StateMachineId as b6, type StateMachineResponse as b7, type StorageFacade as b8, TimeoutStatus as b9, encodeISMPMessage as bA, encodePhantomBidDeclaration as bB, encodeUserOpScale as bC, getChainId as bD, getConfigByStateMachineId as bE, getFillOptionsVersion as bF, getViemChain as bG, hyperbridgeAddress as bH, pharosAtlantic as bI, pharosMainnet as bJ, polkadotAssetHubPaseo as bK, polkadotHubMainnet as bL, poolSlug as bM, resetFillOptionsVersionCache as bN, sortPoolSymbols as bO, tronChainIds as bP, tronNile as bQ, type AggregationLogger as bR, type BidNonceKeyFn as bS, type BidSignature as bT, ENTRY_POINT_V08_ADDRESS as bU, FILL_ORDER_ABI as bV, type FetchLike as bW, type FillData as bX, type HexString as bY, _default as bZ, type LpBalance as b_, type TimeoutStatusKey as ba, type TokenGatewayAssetTeleportedResponse as bb, type TokenInfo as bc, type TokenPrice as bd, type TokenPricesResponse as be, UNISWAP_QUOTE_HAIRCUT_BPS as bf, type UniswapV4PoolConfigData as bg, applyPhantomQuoteHaircut as bh, applyUniswapQuoteHaircut as bi, chainConfigs as bj, convertCodecToIGetRequest as bk, convertCodecToIProof as bl, convertIGetRequestToCodec as bm, convertIProofToCodec as bn, convertStateIdToStateMachineId as bo, convertStateMachineEnumToString as bp, convertStateMachineIdToEnum as bq, decodeAcceptedSourceChains as br, decodeERC7821ExecuteBatch as bs, decodeFillOrder as bt, decodePhantomBidDeclaration as bu, decodeUserOpScale as bv, deriveHttpUrl as bw, encodeAcceptedSourceChains as bx, encodeERC7821ExecuteBatch as by, encodeFillOrder as bz, type StateMachineHeight as c, type PhantomAggregation as c0, type PhantomLegAggregation as c1, type PhantomLegBidder as c2, type PoolAndPositionInfo as c3, type RecoverBidSigner as c4, type RpcBidInfo as c5, type SolverBalanceReader as c6, type SolverV4Position as c7, type UniswapV4Contracts as c8, type V4PositionState as c9, type YieldVaultMap as ca, aggregatePhantomBids as cb, extractFillData as cc, fetchBidsForOrder as cd, getTotalSolverBalance as ce, memoizedSolverBalance as cf, orderCommitmentFromDecoded as cg, positionAmountOfToken as ch, readV4Position as ci, recoverBidSignerViem as cj, setAggregationFetch as ck, splitBidSignature as cl, weightedMedian as cm, zipFillLegs as cn, 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, Chains as s, type ConfiguredAssetSymbol as t, type AvailableLiquidity as u, type IntentOrderStatusUpdate as v, type SelectBidResult as w, type ResumeIntentOrderOptions as x, type CancelOrderOptions as y, type CancelQuote as z };