@hyperbridge/sdk 2.6.1 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/index.d.ts +563 -411
- package/dist/browser/index.js +260 -60
- package/dist/browser/index.js.map +1 -1
- package/dist/node/index.cjs +260 -58
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.cts +44 -12
- package/dist/node/index.d.ts +44 -12
- package/dist/node/index.js +260 -60
- package/dist/node/index.js.map +1 -1
- package/dist/node/{IntentGatewayV2-BJUF1dsr.d.cts → intents-helpers-gyGREuyu.d.cts} +1943 -248
- package/dist/node/{IntentGatewayV2-BJUF1dsr.d.ts → intents-helpers-gyGREuyu.d.ts} +1943 -248
- package/dist/node/intents-helpers.cjs +113 -19
- package/dist/node/intents-helpers.cjs.map +1 -1
- package/dist/node/intents-helpers.d.cts +3 -1506
- package/dist/node/intents-helpers.d.ts +3 -1506
- package/dist/node/intents-helpers.js +111 -21
- package/dist/node/intents-helpers.js.map +1 -1
- package/package.json +1 -1
package/dist/browser/index.d.ts
CHANGED
|
@@ -898,6 +898,14 @@ interface UniswapV4PoolConfigData {
|
|
|
898
898
|
tickSpacing: number;
|
|
899
899
|
hooks?: `0x${string}`;
|
|
900
900
|
}
|
|
901
|
+
/** A known ERC-4626 vault fillers can use as a stablecoin treasury. */
|
|
902
|
+
interface Erc4626VaultConfigData {
|
|
903
|
+
/** Display label, e.g. "Aave stataUSDC" */
|
|
904
|
+
label: string;
|
|
905
|
+
address: `0x${string}`;
|
|
906
|
+
/** Underlying asset symbol; the on-chain vault resolves the address. */
|
|
907
|
+
asset: ConfiguredAssetSymbol;
|
|
908
|
+
}
|
|
901
909
|
interface ChainConfigData {
|
|
902
910
|
chainId: number;
|
|
903
911
|
stateMachineId: Chains;
|
|
@@ -914,6 +922,7 @@ interface ChainConfigData {
|
|
|
914
922
|
EURC?: string;
|
|
915
923
|
XSGD?: string;
|
|
916
924
|
TRYB?: string;
|
|
925
|
+
USDR?: string;
|
|
917
926
|
};
|
|
918
927
|
tokenDecimals?: {
|
|
919
928
|
USDC: number;
|
|
@@ -976,6 +985,8 @@ interface ChainConfigData {
|
|
|
976
985
|
coingeckoId: string;
|
|
977
986
|
popularTokens?: string[];
|
|
978
987
|
uniswapV4Pools?: UniswapV4PoolConfigData[];
|
|
988
|
+
/** Known ERC-4626 treasury vaults on this chain */
|
|
989
|
+
erc4626Vaults?: Erc4626VaultConfigData[];
|
|
979
990
|
/** LayerZero Endpoint ID for cross-chain messaging */
|
|
980
991
|
layerZeroEid?: number;
|
|
981
992
|
}
|
|
@@ -990,68 +1001,76 @@ declare class ChainConfigService {
|
|
|
990
1001
|
constructor(env?: NodeJS.ProcessEnv);
|
|
991
1002
|
private getConfig;
|
|
992
1003
|
getChainConfig(chain: string): ChainConfig;
|
|
993
|
-
getIntentGatewayAddress(chain: string): HexString;
|
|
994
|
-
getTokenGatewayAddress(chain: string): HexString;
|
|
995
|
-
getHostAddress(chain: string): HexString;
|
|
1004
|
+
getIntentGatewayAddress(chain: string): HexString$1;
|
|
1005
|
+
getTokenGatewayAddress(chain: string): HexString$1;
|
|
1006
|
+
getHostAddress(chain: string): HexString$1;
|
|
996
1007
|
getWrappedNativeAssetWithDecimals(chain: string): {
|
|
997
|
-
asset: HexString;
|
|
1008
|
+
asset: HexString$1;
|
|
998
1009
|
decimals: number;
|
|
999
1010
|
};
|
|
1000
|
-
getDaiAsset(chain: string): HexString;
|
|
1001
|
-
getAssetAddress(chain: string, symbol: ConfiguredAssetSymbol): HexString | undefined;
|
|
1011
|
+
getDaiAsset(chain: string): HexString$1;
|
|
1012
|
+
getAssetAddress(chain: string, symbol: ConfiguredAssetSymbol): HexString$1 | undefined;
|
|
1002
1013
|
/**
|
|
1003
1014
|
* Resolves configured token metadata from an address on a specific chain.
|
|
1004
1015
|
* This is used by SDK helpers that accept token addresses rather than caller-
|
|
1005
1016
|
* supplied symbols or decimals.
|
|
1006
1017
|
*/
|
|
1007
|
-
getAssetMetadataByAddress(chain: string, address: HexString): {
|
|
1018
|
+
getAssetMetadataByAddress(chain: string, address: HexString$1): {
|
|
1008
1019
|
symbol: ConfiguredAssetSymbol;
|
|
1009
|
-
address: HexString;
|
|
1020
|
+
address: HexString$1;
|
|
1010
1021
|
decimals?: number;
|
|
1011
1022
|
} | undefined;
|
|
1012
|
-
getUsdtAsset(chain: string): HexString;
|
|
1013
|
-
getUsdcAsset(chain: string): HexString;
|
|
1023
|
+
getUsdtAsset(chain: string): HexString$1;
|
|
1024
|
+
getUsdcAsset(chain: string): HexString$1;
|
|
1014
1025
|
getUsdcDecimals(chain: string): number;
|
|
1015
1026
|
getUsdtDecimals(chain: string): number;
|
|
1016
|
-
getCNgnAsset(chain: string): HexString | undefined;
|
|
1027
|
+
getCNgnAsset(chain: string): HexString$1 | undefined;
|
|
1017
1028
|
/**
|
|
1018
1029
|
* Address of `symbol` on `chain` from the per-chain asset table, matched
|
|
1019
1030
|
* case-insensitively ("cNGN" ≡ "CNGN"). This table is the single source of
|
|
1020
1031
|
* truth for token addresses — the simplex asset registry resolves through
|
|
1021
1032
|
* it, so a new asset is added once in `chain.ts` and nowhere else.
|
|
1022
1033
|
*/
|
|
1023
|
-
getAssetBySymbol(chain: string, symbol: string): HexString | undefined;
|
|
1034
|
+
getAssetBySymbol(chain: string, symbol: string): HexString$1 | undefined;
|
|
1024
1035
|
getCNgnDecimals(chain: string): number | undefined;
|
|
1025
|
-
getExtAsset(chain: string): HexString | undefined;
|
|
1036
|
+
getExtAsset(chain: string): HexString$1 | undefined;
|
|
1026
1037
|
getExtDecimals(chain: string): number | undefined;
|
|
1038
|
+
/** Configured exotic (non-USD) tokens on a chain, for selection UIs. EXT is a test asset and is not offered. */
|
|
1039
|
+
getKnownExoticTokens(chain: string): Array<{
|
|
1040
|
+
symbol: string;
|
|
1041
|
+
address: HexString$1;
|
|
1042
|
+
decimals?: number;
|
|
1043
|
+
}>;
|
|
1044
|
+
/** Known ERC-4626 treasury vaults on a chain, for selection UIs. */
|
|
1045
|
+
getKnownVaults(chain: string): Erc4626VaultConfigData[];
|
|
1027
1046
|
getChainId(chain: string): number;
|
|
1028
1047
|
getConsensusStateId(chain: string): string;
|
|
1029
1048
|
getHyperbridgeChainId(): number;
|
|
1030
1049
|
getRpcUrl(chain: string): string;
|
|
1031
|
-
getUniswapRouterV2Address(chain: string): HexString;
|
|
1032
|
-
getAerodromeRouterAddress(chain: string): HexString;
|
|
1033
|
-
getUniswapV2FactoryAddress(chain: string): HexString;
|
|
1034
|
-
getUniswapV3FactoryAddress(chain: string): HexString;
|
|
1035
|
-
getUniversalRouterAddress(chain: string): HexString;
|
|
1036
|
-
getUniswapV3QuoterAddress(chain: string): HexString;
|
|
1037
|
-
getUniswapV4QuoterAddress(chain: string): HexString;
|
|
1038
|
-
getUniswapV4PositionManagerAddress(chain: string): HexString;
|
|
1039
|
-
getUniswapV4PoolManagerAddress(chain: string): HexString;
|
|
1040
|
-
getUniswapV4StateViewAddress(chain: string): HexString;
|
|
1050
|
+
getUniswapRouterV2Address(chain: string): HexString$1;
|
|
1051
|
+
getAerodromeRouterAddress(chain: string): HexString$1;
|
|
1052
|
+
getUniswapV2FactoryAddress(chain: string): HexString$1;
|
|
1053
|
+
getUniswapV3FactoryAddress(chain: string): HexString$1;
|
|
1054
|
+
getUniversalRouterAddress(chain: string): HexString$1;
|
|
1055
|
+
getUniswapV3QuoterAddress(chain: string): HexString$1;
|
|
1056
|
+
getUniswapV4QuoterAddress(chain: string): HexString$1;
|
|
1057
|
+
getUniswapV4PositionManagerAddress(chain: string): HexString$1;
|
|
1058
|
+
getUniswapV4PoolManagerAddress(chain: string): HexString$1;
|
|
1059
|
+
getUniswapV4StateViewAddress(chain: string): HexString$1;
|
|
1041
1060
|
getUniswapV4PoolConfigs(chain: string): UniswapV4PoolConfigData[];
|
|
1042
|
-
getPermit2Address(chain: string): HexString;
|
|
1043
|
-
getSolverAccountAddress(chain: string): HexString | undefined;
|
|
1061
|
+
getPermit2Address(chain: string): HexString$1;
|
|
1062
|
+
getSolverAccountAddress(chain: string): HexString$1 | undefined;
|
|
1044
1063
|
getCoingeckoId(chain: string): string | undefined;
|
|
1045
1064
|
getEtherscanApiKey(): string | undefined;
|
|
1046
|
-
getCalldispatcherAddress(chain: string): HexString;
|
|
1065
|
+
getCalldispatcherAddress(chain: string): HexString$1;
|
|
1047
1066
|
getTokenStorageSlots(chain: string, tokenAddress: string): {
|
|
1048
1067
|
balanceSlot: number;
|
|
1049
1068
|
allowanceSlot: number;
|
|
1050
1069
|
} | undefined;
|
|
1051
1070
|
getPopularTokens(chain: string): string[];
|
|
1052
|
-
getEntryPointV08Address(chain: string): HexString;
|
|
1053
|
-
getCirclePaymasterAddress(chain: string): HexString | undefined;
|
|
1054
|
-
getSimplexPaymasterAddress(chain: string): HexString | undefined;
|
|
1071
|
+
getEntryPointV08Address(chain: string): HexString$1;
|
|
1072
|
+
getCirclePaymasterAddress(chain: string): HexString$1 | undefined;
|
|
1073
|
+
getSimplexPaymasterAddress(chain: string): HexString$1 | undefined;
|
|
1055
1074
|
getHyperbridgeAddress(): string;
|
|
1056
1075
|
/**
|
|
1057
1076
|
* Get the LayerZero Endpoint ID for the chain
|
|
@@ -1063,7 +1082,7 @@ declare class ChainConfigService {
|
|
|
1063
1082
|
* On Ethereum: OFT Adapter (locks/unlocks USDT)
|
|
1064
1083
|
* On other chains: OFT contract (mints/burns USDT0)
|
|
1065
1084
|
*/
|
|
1066
|
-
getUsdt0OftAddress(chain: string): HexString | undefined;
|
|
1085
|
+
getUsdt0OftAddress(chain: string): HexString$1 | undefined;
|
|
1067
1086
|
}
|
|
1068
1087
|
|
|
1069
1088
|
/**
|
|
@@ -1089,7 +1108,7 @@ interface EvmChainParams {
|
|
|
1089
1108
|
/**
|
|
1090
1109
|
* The host address of the EVM chain (IsmpHost contract address)
|
|
1091
1110
|
*/
|
|
1092
|
-
host: HexString;
|
|
1111
|
+
host: HexString$1;
|
|
1093
1112
|
/**
|
|
1094
1113
|
* Consensus state identifier of this chain on hyperbridge
|
|
1095
1114
|
*/
|
|
@@ -1136,7 +1155,7 @@ declare class EvmChain implements IChain {
|
|
|
1136
1155
|
*/
|
|
1137
1156
|
static create(rpcUrl: string, bundlerUrl?: string): Promise<EvmChain>;
|
|
1138
1157
|
get client(): PublicClient;
|
|
1139
|
-
get host(): HexString;
|
|
1158
|
+
get host(): HexString$1;
|
|
1140
1159
|
get bundlerUrl(): string | undefined;
|
|
1141
1160
|
get config(): IEvmConfig;
|
|
1142
1161
|
get configService(): ChainConfigService;
|
|
@@ -1149,13 +1168,13 @@ declare class EvmChain implements IChain {
|
|
|
1149
1168
|
* @param {HexString} commitment - The commitment to derive the key from.
|
|
1150
1169
|
* @returns {HexString} The derived key.
|
|
1151
1170
|
*/
|
|
1152
|
-
requestReceiptKey(commitment: HexString): HexString;
|
|
1171
|
+
requestReceiptKey(commitment: HexString$1): HexString$1;
|
|
1153
1172
|
/**
|
|
1154
1173
|
* Queries the request receipt.
|
|
1155
1174
|
* @param {HexString} commitment - The commitment to query.
|
|
1156
1175
|
* @returns {Promise<HexString | undefined>} The relayer address responsible for delivering the request.
|
|
1157
1176
|
*/
|
|
1158
|
-
queryRequestReceipt(commitment: HexString): Promise<HexString | undefined>;
|
|
1177
|
+
queryRequestReceipt(commitment: HexString$1): Promise<HexString$1 | undefined>;
|
|
1159
1178
|
/**
|
|
1160
1179
|
* Queries the proof of the commitments.
|
|
1161
1180
|
* @param {IMessage} message - The message to query.
|
|
@@ -1163,7 +1182,7 @@ declare class EvmChain implements IChain {
|
|
|
1163
1182
|
* @param {bigint} [at] - The block number to query at.
|
|
1164
1183
|
* @returns {Promise<HexString>} The proof.
|
|
1165
1184
|
*/
|
|
1166
|
-
queryProof(message: IMessage, counterparty: string, at?: bigint): Promise<HexString>;
|
|
1185
|
+
queryProof(message: IMessage, counterparty: string, at?: bigint): Promise<HexString$1>;
|
|
1167
1186
|
/**
|
|
1168
1187
|
* Query and return the encoded storage proof for the provided keys at the given height.
|
|
1169
1188
|
*
|
|
@@ -1178,7 +1197,7 @@ declare class EvmChain implements IChain {
|
|
|
1178
1197
|
* of this contract. Omit to let 52-byte keys carry their own contract address.
|
|
1179
1198
|
* @returns {Promise<HexString>} The encoded storage proof.
|
|
1180
1199
|
*/
|
|
1181
|
-
queryStateProof(at: bigint, keys: HexString[], address?: HexString): Promise<HexString>;
|
|
1200
|
+
queryStateProof(at: bigint, keys: HexString$1[], address?: HexString$1): Promise<HexString$1>;
|
|
1182
1201
|
/**
|
|
1183
1202
|
* Returns the current timestamp of the chain.
|
|
1184
1203
|
* @returns {Promise<bigint>} The current timestamp.
|
|
@@ -1203,7 +1222,7 @@ declare class EvmChain implements IChain {
|
|
|
1203
1222
|
* When the transaction contains multiple placeOrder calls, `occurrenceIndex`
|
|
1204
1223
|
* selects which call's calldata to return (0-indexed in execution order).
|
|
1205
1224
|
*/
|
|
1206
|
-
getPlaceOrderCalldata(txHash: string, intentGatewayAddress: string, occurrenceIndex?: number): Promise<HexString>;
|
|
1225
|
+
getPlaceOrderCalldata(txHash: string, intentGatewayAddress: string, occurrenceIndex?: number): Promise<HexString$1>;
|
|
1207
1226
|
/**
|
|
1208
1227
|
* Get the challenge period for a given state machine id.
|
|
1209
1228
|
* @param {StateMachineIdParams} stateMachineId - The state machine ID.
|
|
@@ -1215,7 +1234,7 @@ declare class EvmChain implements IChain {
|
|
|
1215
1234
|
* @param {IIsmpMessage} message The ISMP message to encode.
|
|
1216
1235
|
* @returns {HexString} The encoded calldata.
|
|
1217
1236
|
*/
|
|
1218
|
-
encode(message: IIsmpMessage): HexString;
|
|
1237
|
+
encode(message: IIsmpMessage): HexString$1;
|
|
1219
1238
|
/**
|
|
1220
1239
|
* Returns the protocol fee charged by the host on dispatch.
|
|
1221
1240
|
*
|
|
@@ -1230,12 +1249,12 @@ declare class EvmChain implements IChain {
|
|
|
1230
1249
|
* Given a desired output amount of a token, returns how much native is needed as input.
|
|
1231
1250
|
* Uses the chain's Uniswap V2 router (or `router` when provided): WETH → tokenOut path.
|
|
1232
1251
|
*/
|
|
1233
|
-
getAmountsIn(amountOut: bigint, tokenOutForQuote: HexString, chain?: string, router?: HexString): Promise<bigint>;
|
|
1252
|
+
getAmountsIn(amountOut: bigint, tokenOutForQuote: HexString$1, chain?: string, router?: HexString$1): Promise<bigint>;
|
|
1234
1253
|
/**
|
|
1235
1254
|
* Given an input amount of native token, returns how much of the output token you get.
|
|
1236
1255
|
* Uses the chain's Uniswap V2 router: WETH → tokenOut path.
|
|
1237
1256
|
*/
|
|
1238
|
-
getAmountsOut(amountIn: bigint, tokenOutForQuote: HexString, chain?: string): Promise<bigint>;
|
|
1257
|
+
getAmountsOut(amountIn: bigint, tokenOutForQuote: HexString$1, chain?: string): Promise<bigint>;
|
|
1239
1258
|
/**
|
|
1240
1259
|
* Estimates the gas required for a post request execution on this chain.
|
|
1241
1260
|
* This function generates mock proofs for the post request, creates a state override
|
|
@@ -1248,7 +1267,7 @@ declare class EvmChain implements IChain {
|
|
|
1248
1267
|
*/
|
|
1249
1268
|
estimateGas(request: IPostRequest): Promise<{
|
|
1250
1269
|
gas: bigint;
|
|
1251
|
-
postRequestCalldata: HexString;
|
|
1270
|
+
postRequestCalldata: HexString$1;
|
|
1252
1271
|
}>;
|
|
1253
1272
|
/**
|
|
1254
1273
|
* Gets the fee token address and decimals for the chain.
|
|
@@ -1257,7 +1276,7 @@ declare class EvmChain implements IChain {
|
|
|
1257
1276
|
* @returns The fee token address and decimals
|
|
1258
1277
|
*/
|
|
1259
1278
|
getFeeTokenWithDecimals(): Promise<{
|
|
1260
|
-
address: HexString;
|
|
1279
|
+
address: HexString$1;
|
|
1261
1280
|
decimals: number;
|
|
1262
1281
|
}>;
|
|
1263
1282
|
/**
|
|
@@ -1267,8 +1286,8 @@ declare class EvmChain implements IChain {
|
|
|
1267
1286
|
* @returns The nonce of the host
|
|
1268
1287
|
*/
|
|
1269
1288
|
getHostNonce(): Promise<bigint>;
|
|
1270
|
-
broadcastTransaction(signedTransaction: HexString): Promise<TransactionReceipt>;
|
|
1271
|
-
getTransactionReceipt(hash: HexString): Promise<TransactionReceipt>;
|
|
1289
|
+
broadcastTransaction(signedTransaction: HexString$1): Promise<TransactionReceipt>;
|
|
1290
|
+
getTransactionReceipt(hash: HexString$1): Promise<TransactionReceipt>;
|
|
1272
1291
|
}
|
|
1273
1292
|
/**
|
|
1274
1293
|
* Factory function for creating EVM chain instances with common defaults
|
|
@@ -1292,7 +1311,7 @@ declare class EvmChain implements IChain {
|
|
|
1292
1311
|
* })
|
|
1293
1312
|
* ```
|
|
1294
1313
|
*/
|
|
1295
|
-
declare function createEvmChain(chainId: number, host: HexString, options: {
|
|
1314
|
+
declare function createEvmChain(chainId: number, host: HexString$1, options: {
|
|
1296
1315
|
rpcUrl: string;
|
|
1297
1316
|
consensusStateId?: string;
|
|
1298
1317
|
}): EvmChain;
|
|
@@ -1335,8 +1354,8 @@ declare function responseCommitmentKey(key: Hex): Hex;
|
|
|
1335
1354
|
* @param field - The field index in the struct (0 for timestamp, 1 for overlayRoot, 2 for stateRoot)
|
|
1336
1355
|
* @returns The storage slot for the specific field
|
|
1337
1356
|
*/
|
|
1338
|
-
declare function getStateCommitmentFieldSlot(stateMachineId: bigint, height: bigint, field: 0 | 1 | 2): HexString;
|
|
1339
|
-
declare function getStateCommitmentSlot(stateMachineId: bigint, height: bigint): HexString;
|
|
1357
|
+
declare function getStateCommitmentFieldSlot(stateMachineId: bigint, height: bigint, field: 0 | 1 | 2): HexString$1;
|
|
1358
|
+
declare function getStateCommitmentSlot(stateMachineId: bigint, height: bigint): HexString$1;
|
|
1340
1359
|
|
|
1341
1360
|
/**
|
|
1342
1361
|
* Generates a Merkle Mountain Range (MMR) root hash and proof for a post request.
|
|
@@ -1356,8 +1375,8 @@ declare function getStateCommitmentSlot(stateMachineId: bigint, height: bigint):
|
|
|
1356
1375
|
* - mmrSize: The size of the MMR in nodes
|
|
1357
1376
|
*/
|
|
1358
1377
|
declare function generateRootWithProof(postRequest: IPostRequest, treeSize: bigint): Promise<{
|
|
1359
|
-
root: HexString;
|
|
1360
|
-
proof: HexString[];
|
|
1378
|
+
root: HexString$1;
|
|
1379
|
+
proof: HexString$1[];
|
|
1361
1380
|
index: bigint;
|
|
1362
1381
|
treeSize: bigint;
|
|
1363
1382
|
mmrSize: bigint;
|
|
@@ -1381,10 +1400,10 @@ type IStateMachine = {
|
|
|
1381
1400
|
value: number[];
|
|
1382
1401
|
};
|
|
1383
1402
|
|
|
1384
|
-
declare const ADDRESS_ZERO: HexString;
|
|
1385
|
-
declare const MOCK_ADDRESS: HexString;
|
|
1386
|
-
declare const DUMMY_PRIVATE_KEY: HexString;
|
|
1387
|
-
declare const DEFAULT_GRAFFITI: HexString;
|
|
1403
|
+
declare const ADDRESS_ZERO: HexString$1;
|
|
1404
|
+
declare const MOCK_ADDRESS: HexString$1;
|
|
1405
|
+
declare const DUMMY_PRIVATE_KEY: HexString$1;
|
|
1406
|
+
declare const DEFAULT_GRAFFITI: HexString$1;
|
|
1388
1407
|
/**
|
|
1389
1408
|
* Returns the maximum of two bigint values
|
|
1390
1409
|
* @param a - First bigint value
|
|
@@ -1406,7 +1425,7 @@ declare function maxBigInt(a: bigint, b: bigint): bigint;
|
|
|
1406
1425
|
declare function parseStateMachineId(stateMachineId: string): {
|
|
1407
1426
|
stateId: {
|
|
1408
1427
|
Evm?: number;
|
|
1409
|
-
Substrate?: HexString;
|
|
1428
|
+
Substrate?: HexString$1;
|
|
1410
1429
|
Polkadot?: number;
|
|
1411
1430
|
Kusama?: number;
|
|
1412
1431
|
};
|
|
@@ -1417,28 +1436,28 @@ declare function parseStateMachineId(stateMachineId: string): {
|
|
|
1417
1436
|
* @returns The commitment hash and the encode packed data.
|
|
1418
1437
|
*/
|
|
1419
1438
|
declare function postRequestCommitment(post: IPostRequest): {
|
|
1420
|
-
commitment: HexString;
|
|
1421
|
-
encodePacked: HexString;
|
|
1439
|
+
commitment: HexString$1;
|
|
1440
|
+
encodePacked: HexString$1;
|
|
1422
1441
|
};
|
|
1423
1442
|
/**
|
|
1424
1443
|
* Converts a bytes32 token address to bytes20 format
|
|
1425
1444
|
* This removes the extra padded zeros from the address
|
|
1426
1445
|
*/
|
|
1427
|
-
declare function bytes32ToBytes20(bytes32Address: string): HexString;
|
|
1428
|
-
declare function bytes20ToBytes32(bytes20Address: string): HexString;
|
|
1446
|
+
declare function bytes32ToBytes20(bytes32Address: string): HexString$1;
|
|
1447
|
+
declare function bytes20ToBytes32(bytes20Address: string): HexString$1;
|
|
1429
1448
|
declare function hexToString(hex: string): string;
|
|
1430
1449
|
declare function normalizeStateMachineId(stateMachineId: string): string;
|
|
1431
1450
|
declare function normalizeEvmChainId(chainId: number | string): {
|
|
1432
1451
|
chainId: number;
|
|
1433
1452
|
stateMachineId: string;
|
|
1434
1453
|
};
|
|
1435
|
-
declare function encodeStateMachineId(stateMachineId: string): HexString;
|
|
1436
|
-
declare function normalizeAddressForEvmBytes32(address: string): HexString;
|
|
1454
|
+
declare function encodeStateMachineId(stateMachineId: string): HexString$1;
|
|
1455
|
+
declare function normalizeAddressForEvmBytes32(address: string): HexString$1;
|
|
1437
1456
|
/**
|
|
1438
1457
|
* Validates an EVM address and returns its canonical lowercase representation.
|
|
1439
1458
|
*/
|
|
1440
|
-
declare function normalizeEvmAddress(address: string, field?: string): HexString;
|
|
1441
|
-
declare function normalizeAddressForStateMachine(address: string, stateMachineId: string): HexString;
|
|
1459
|
+
declare function normalizeEvmAddress(address: string, field?: string): HexString$1;
|
|
1460
|
+
declare function normalizeAddressForStateMachine(address: string, stateMachineId: string): HexString$1;
|
|
1442
1461
|
/**
|
|
1443
1462
|
* Retries a promise-returning operation with exponential backoff.
|
|
1444
1463
|
* This function will attempt to execute the operation up to maxRetries times,
|
|
@@ -1454,7 +1473,7 @@ declare function retryPromise<T>(operation: () => Promise<T>, retryConfig: Retry
|
|
|
1454
1473
|
* @param get The get request to calculate the commitment hash for.
|
|
1455
1474
|
* @returns The commitment hash.
|
|
1456
1475
|
*/
|
|
1457
|
-
declare function getRequestCommitment(get: IGetRequest): HexString;
|
|
1476
|
+
declare function getRequestCommitment(get: IGetRequest): HexString$1;
|
|
1458
1477
|
/**
|
|
1459
1478
|
* Estimates the gas required for a post request transaction on the source chain.
|
|
1460
1479
|
* This function constructs a post request, generates mock proofs, and estimates
|
|
@@ -1464,7 +1483,7 @@ declare function estimateGasForPost(params: {
|
|
|
1464
1483
|
postRequest: IPostRequest;
|
|
1465
1484
|
sourceClient: PublicClient;
|
|
1466
1485
|
hostLatestStateMachineHeight: bigint;
|
|
1467
|
-
hostAddress: HexString;
|
|
1486
|
+
hostAddress: HexString$1;
|
|
1468
1487
|
}): Promise<{
|
|
1469
1488
|
gas_fee: bigint;
|
|
1470
1489
|
call_data: EstimateGasCallData;
|
|
@@ -1474,18 +1493,18 @@ declare function estimateGasForPost(params: {
|
|
|
1474
1493
|
* Used as the GET-request context for cancel-from-source, and as the inner
|
|
1475
1494
|
* payload (after the RequestKind prefix) for POST-based escrow operations.
|
|
1476
1495
|
*/
|
|
1477
|
-
declare function encodeWithdrawalRequest(order: Order | Order, beneficiary: HexString): HexString;
|
|
1496
|
+
declare function encodeWithdrawalRequest(order: Order | Order, beneficiary: HexString$1): HexString$1;
|
|
1478
1497
|
/**
|
|
1479
1498
|
* Constructs the request body for a redeem escrow operation.
|
|
1480
1499
|
* This function encodes the order commitment, beneficiary address, and token inputs
|
|
1481
1500
|
* to match the format expected by the IntentGateway contract.
|
|
1482
1501
|
*/
|
|
1483
|
-
declare function constructRedeemEscrowRequestBody(order: Order | Order, beneficiary: HexString): HexString;
|
|
1502
|
+
declare function constructRedeemEscrowRequestBody(order: Order | Order, beneficiary: HexString$1): HexString$1;
|
|
1484
1503
|
/**
|
|
1485
1504
|
* Constructs the request body for a refund escrow operation (cancel from destination).
|
|
1486
1505
|
* Uses RequestKind.RefundEscrow to match the IntentGatewayV2 contract's _cancelFromDest.
|
|
1487
1506
|
*/
|
|
1488
|
-
declare function constructRefundEscrowRequestBody(order: Order | Order, beneficiary: HexString): HexString;
|
|
1507
|
+
declare function constructRefundEscrowRequestBody(order: Order | Order, beneficiary: HexString$1): HexString$1;
|
|
1489
1508
|
declare function fetchPrice(identifier: string | undefined, chainId?: number, apiKey?: string): Promise<number>;
|
|
1490
1509
|
/**
|
|
1491
1510
|
* Fetches the current network gas price from an Etherscan-family explorer API.
|
|
@@ -1542,7 +1561,7 @@ declare enum EvmLanguage {
|
|
|
1542
1561
|
* )
|
|
1543
1562
|
* ```
|
|
1544
1563
|
*/
|
|
1545
|
-
declare function getStorageSlot(client: PublicClient, contractAddress: HexString, data: HexString): Promise<string>;
|
|
1564
|
+
declare function getStorageSlot(client: PublicClient, contractAddress: HexString$1, data: HexString$1): Promise<string>;
|
|
1546
1565
|
/**
|
|
1547
1566
|
* Returns the storage slot for an ERC20 `balanceOf` or `allowance` call,
|
|
1548
1567
|
* first checking the recorded slot cache and falling back to an RPC trace
|
|
@@ -1554,7 +1573,7 @@ declare function getStorageSlot(client: PublicClient, contractAddress: HexString
|
|
|
1554
1573
|
* @param data - The ABI-encoded call data (method selector + padded args)
|
|
1555
1574
|
* @returns The storage slot as a hex string, or undefined if not found
|
|
1556
1575
|
*/
|
|
1557
|
-
declare function getOrFetchStorageSlot(client: PublicClient, chain: string, contractAddress: HexString, data: HexString): Promise<HexString | undefined>;
|
|
1576
|
+
declare function getOrFetchStorageSlot(client: PublicClient, chain: string, contractAddress: HexString$1, data: HexString$1): Promise<HexString$1 | undefined>;
|
|
1558
1577
|
/**
|
|
1559
1578
|
* Adjusts fee amounts between different decimal precisions.
|
|
1560
1579
|
* Handles scaling up or down based on the decimal difference.
|
|
@@ -1588,7 +1607,7 @@ declare const TESTNET_CHAINS: Set<string>;
|
|
|
1588
1607
|
* @returns An ordered list of calldata hex strings (empty if the target is not called)
|
|
1589
1608
|
* @throws Error if the RPC call fails or returns an unexpected response
|
|
1590
1609
|
*/
|
|
1591
|
-
declare function getContractCallInputs(client: PublicClient, txHash: HexString, targetContractAddress: string): Promise<HexString[]>;
|
|
1610
|
+
declare function getContractCallInputs(client: PublicClient, txHash: HexString$1, targetContractAddress: string): Promise<HexString$1[]>;
|
|
1592
1611
|
/**
|
|
1593
1612
|
* Retrieves the calldata used to call a target contract within a transaction.
|
|
1594
1613
|
* Returns the first call by execution order; callers handling multiple logs
|
|
@@ -1600,7 +1619,7 @@ declare function getContractCallInputs(client: PublicClient, txHash: HexString,
|
|
|
1600
1619
|
* @returns The input (calldata) as a hex string, or null if the target is not found in the trace
|
|
1601
1620
|
* @throws Error if the RPC call fails or returns an unexpected response
|
|
1602
1621
|
*/
|
|
1603
|
-
declare function getContractCallInput(client: PublicClient, txHash: HexString, targetContractAddress: string): Promise<HexString | null>;
|
|
1622
|
+
declare function getContractCallInput(client: PublicClient, txHash: HexString$1, targetContractAddress: string): Promise<HexString$1 | null>;
|
|
1604
1623
|
/**
|
|
1605
1624
|
* Calculates the balance mapping location for a given slot and holder address.
|
|
1606
1625
|
* This function handles the different encoding formats used by Solidity and Vyper.
|
|
@@ -1610,7 +1629,7 @@ declare function getContractCallInput(client: PublicClient, txHash: HexString, t
|
|
|
1610
1629
|
* @param language - The language of the contract.
|
|
1611
1630
|
* @returns The balance mapping location as a HexString.
|
|
1612
1631
|
*/
|
|
1613
|
-
declare function calculateBalanceMappingLocation(slot: bigint, holder: string, language: EvmLanguage): HexString;
|
|
1632
|
+
declare function calculateBalanceMappingLocation(slot: bigint, holder: string, language: EvmLanguage): HexString$1;
|
|
1614
1633
|
/**
|
|
1615
1634
|
* Calculates the allowance mapping location for a given slot, owner, and spender.
|
|
1616
1635
|
* ERC20 allowance is a nested mapping: mapping(address owner => mapping(address spender => uint256))
|
|
@@ -1621,7 +1640,7 @@ declare function calculateBalanceMappingLocation(slot: bigint, holder: string, l
|
|
|
1621
1640
|
* @param language - The language of the contract (Solidity or Vyper)
|
|
1622
1641
|
* @returns The allowance mapping location as a HexString
|
|
1623
1642
|
*/
|
|
1624
|
-
declare function calculateAllowanceMappingLocation(slot: bigint, owner: string, spender: string, language: EvmLanguage): HexString;
|
|
1643
|
+
declare function calculateAllowanceMappingLocation(slot: bigint, owner: string, spender: string, language: EvmLanguage): HexString$1;
|
|
1625
1644
|
|
|
1626
1645
|
declare class SubstrateChain implements IChain {
|
|
1627
1646
|
private readonly params;
|
|
@@ -1653,33 +1672,33 @@ declare class SubstrateChain implements IChain {
|
|
|
1653
1672
|
* @param key - The H256 hash key (as a 0x-prefixed hex string)
|
|
1654
1673
|
* @returns The storage key as a hex string
|
|
1655
1674
|
*/
|
|
1656
|
-
requestReceiptKey(key: HexString): HexString;
|
|
1675
|
+
requestReceiptKey(key: HexString$1): HexString$1;
|
|
1657
1676
|
/**
|
|
1658
1677
|
* Returns the storage key for a request commitment in the child trie
|
|
1659
1678
|
* The request commitment is the key
|
|
1660
1679
|
* @param key - The H256 hash key (as a 0x-prefixed hex string)
|
|
1661
1680
|
* @returns The storage key as a hex string
|
|
1662
1681
|
*/
|
|
1663
|
-
requestCommitmentKey(key: HexString): HexString;
|
|
1682
|
+
requestCommitmentKey(key: HexString$1): HexString$1;
|
|
1664
1683
|
/**
|
|
1665
1684
|
* Queries a request commitment from the ISMP child trie storage.
|
|
1666
1685
|
* @param {HexString} commitment - The commitment hash to look up.
|
|
1667
1686
|
* @returns {Promise<HexString | undefined>} The commitment data if found, undefined otherwise.
|
|
1668
1687
|
*/
|
|
1669
|
-
queryRequestCommitment(commitment: HexString): Promise<HexString | undefined>;
|
|
1688
|
+
queryRequestCommitment(commitment: HexString$1): Promise<HexString$1 | undefined>;
|
|
1670
1689
|
/**
|
|
1671
1690
|
* Queries the request receipt.
|
|
1672
1691
|
* @param {HexString} commitment - The commitment to query.
|
|
1673
1692
|
* @returns {Promise<HexString | undefined>} The relayer address responsible for delivering the request.
|
|
1674
1693
|
*/
|
|
1675
|
-
queryRequestReceipt(commitment: HexString): Promise<HexString | undefined>;
|
|
1694
|
+
queryRequestReceipt(commitment: HexString$1): Promise<HexString$1 | undefined>;
|
|
1676
1695
|
/**
|
|
1677
1696
|
* Returns the storage key for a response receipt in the child trie.
|
|
1678
1697
|
* A response receipt is keyed by the originating *request* commitment.
|
|
1679
1698
|
* @param {HexString} key - The request commitment (0x-prefixed H256 hex string)
|
|
1680
1699
|
* @returns {HexString} The storage key as a hex string
|
|
1681
1700
|
*/
|
|
1682
|
-
responseReceiptKey(key: HexString): HexString;
|
|
1701
|
+
responseReceiptKey(key: HexString$1): HexString$1;
|
|
1683
1702
|
/**
|
|
1684
1703
|
* Queries the response receipt for a request commitment. For a GET, Hyperbridge
|
|
1685
1704
|
* produces the response as it processes the request, so the presence of a response
|
|
@@ -1687,7 +1706,7 @@ declare class SubstrateChain implements IChain {
|
|
|
1687
1706
|
* @param {HexString} commitment - The originating request commitment to query.
|
|
1688
1707
|
* @returns {Promise<HexString | undefined>} The receipt data if present, otherwise undefined.
|
|
1689
1708
|
*/
|
|
1690
|
-
queryResponseReceipt(commitment: HexString): Promise<HexString | undefined>;
|
|
1709
|
+
queryResponseReceipt(commitment: HexString$1): Promise<HexString$1 | undefined>;
|
|
1691
1710
|
/**
|
|
1692
1711
|
* Queries the state-machine commitment Hyperbridge holds for a counterparty chain at an
|
|
1693
1712
|
* exact height — the `BoundedStateCommitments` map that `state_machine_commitment` (and thus
|
|
@@ -1696,7 +1715,7 @@ declare class SubstrateChain implements IChain {
|
|
|
1696
1715
|
* @param {StateMachineHeight} height - The counterparty state machine id + height.
|
|
1697
1716
|
* @returns {Promise<HexString | undefined>} The committed state root, or undefined if absent.
|
|
1698
1717
|
*/
|
|
1699
|
-
queryStateMachineCommitment(height: StateMachineHeight): Promise<HexString | undefined>;
|
|
1718
|
+
queryStateMachineCommitment(height: StateMachineHeight): Promise<HexString$1 | undefined>;
|
|
1700
1719
|
/**
|
|
1701
1720
|
* Returns the current timestamp of the chain.
|
|
1702
1721
|
* @returns {Promise<bigint>} The current timestamp.
|
|
@@ -1709,7 +1728,7 @@ declare class SubstrateChain implements IChain {
|
|
|
1709
1728
|
* @param {bigint} [at] - The block number to query at.
|
|
1710
1729
|
* @returns {Promise<HexString>} The proof.
|
|
1711
1730
|
*/
|
|
1712
|
-
queryProof(message: IMessage, counterparty: string, at?: bigint): Promise<HexString>;
|
|
1731
|
+
queryProof(message: IMessage, counterparty: string, at?: bigint): Promise<HexString$1>;
|
|
1713
1732
|
/**
|
|
1714
1733
|
* Submit an unsigned ISMP transaction to the chain. Resolves when the transaction is finalized.
|
|
1715
1734
|
* @param message - The message to be submitted.
|
|
@@ -1728,7 +1747,7 @@ declare class SubstrateChain implements IChain {
|
|
|
1728
1747
|
* @param _address - Optional address (ignored for Substrate; present for IChain compatibility).
|
|
1729
1748
|
* @returns The state proof as a hexadecimal string.
|
|
1730
1749
|
*/
|
|
1731
|
-
queryStateProof(at: bigint, keys: HexString[], _address?: HexString): Promise<HexString>;
|
|
1750
|
+
queryStateProof(at: bigint, keys: HexString$1[], _address?: HexString$1): Promise<HexString$1>;
|
|
1732
1751
|
/**
|
|
1733
1752
|
* Get the latest state machine height for a given state machine ID.
|
|
1734
1753
|
* @param {StateMachineIdParams} stateMachineId - The state machine ID.
|
|
@@ -1755,7 +1774,7 @@ declare class SubstrateChain implements IChain {
|
|
|
1755
1774
|
* @param message The ISMP message to encode.
|
|
1756
1775
|
* @returns The encoded message as a hexadecimal string.
|
|
1757
1776
|
*/
|
|
1758
|
-
encode(message: IIsmpMessage): HexString;
|
|
1777
|
+
encode(message: IIsmpMessage): HexString$1;
|
|
1759
1778
|
/**
|
|
1760
1779
|
* Queries the latest proven height for this chain from pallet-ismp.
|
|
1761
1780
|
*/
|
|
@@ -1769,7 +1788,7 @@ declare class SubstrateChain implements IChain {
|
|
|
1769
1788
|
* @param currentEpoch - The current authority set id on the destination EVM chain
|
|
1770
1789
|
*/
|
|
1771
1790
|
queryConsensusProofs(neededHeight: bigint, currentEpoch: bigint): Promise<{
|
|
1772
|
-
proofs: HexString[];
|
|
1791
|
+
proofs: HexString$1[];
|
|
1773
1792
|
provenHeight: bigint;
|
|
1774
1793
|
} | undefined>;
|
|
1775
1794
|
private getPalletIndex;
|
|
@@ -1796,7 +1815,7 @@ declare function convertStateMachineEnumToString(stateMachine: {
|
|
|
1796
1815
|
*/
|
|
1797
1816
|
declare function convertStateIdToStateMachineId(stateId: {
|
|
1798
1817
|
Evm?: number;
|
|
1799
|
-
Substrate?: HexString;
|
|
1818
|
+
Substrate?: HexString$1;
|
|
1800
1819
|
Polkadot?: number;
|
|
1801
1820
|
Kusama?: number;
|
|
1802
1821
|
}): string;
|
|
@@ -1876,21 +1895,29 @@ declare function encodeISMPMessage(message: IIsmpMessage): Uint8Array;
|
|
|
1876
1895
|
* @param userOp - The PackedUserOperation to encode
|
|
1877
1896
|
* @returns Hex-encoded SCALE bytes
|
|
1878
1897
|
*/
|
|
1879
|
-
declare function encodeUserOpScale(userOp: PackedUserOperation): HexString;
|
|
1898
|
+
declare function encodeUserOpScale(userOp: PackedUserOperation): HexString$1;
|
|
1880
1899
|
/**
|
|
1881
1900
|
* Decodes a SCALE-encoded PackedUserOperation.
|
|
1882
1901
|
*
|
|
1883
1902
|
* @param hex - The hex-encoded SCALE bytes
|
|
1884
1903
|
* @returns The decoded PackedUserOperation
|
|
1885
1904
|
*/
|
|
1886
|
-
declare function decodeUserOpScale(hex: HexString): PackedUserOperation;
|
|
1905
|
+
declare function decodeUserOpScale(hex: HexString$1): PackedUserOperation;
|
|
1906
|
+
/** One directed leg of a phantom order: `standardAmount` of `tokenA` quoted in `tokenB`. */
|
|
1907
|
+
interface PhantomOrderLeg {
|
|
1908
|
+
tokenA: HexString$1;
|
|
1909
|
+
tokenB: HexString$1;
|
|
1910
|
+
standardAmount: bigint;
|
|
1911
|
+
}
|
|
1887
1912
|
interface PhantomOrderEvent {
|
|
1888
|
-
commitment: HexString;
|
|
1913
|
+
commitment: HexString$1;
|
|
1889
1914
|
chain: string;
|
|
1890
1915
|
createdAt: number;
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1916
|
+
/**
|
|
1917
|
+
* Every configured pair expands into its configured direction plus the reverse. Listed in
|
|
1918
|
+
* the same order as the order's asset lists, so index `i` here is the order's leg `i`.
|
|
1919
|
+
*/
|
|
1920
|
+
legs: PhantomOrderLeg[];
|
|
1894
1921
|
}
|
|
1895
1922
|
interface PollPhantomOrdersOptions {
|
|
1896
1923
|
/** How often to check for a new head. Defaults to 6s, roughly one block. */
|
|
@@ -1979,7 +2006,7 @@ declare class IntentsCoprocessor {
|
|
|
1979
2006
|
* @param userOp - The encoded PackedUserOperation as hex string
|
|
1980
2007
|
* @returns BidSubmissionResult with success status and block/extrinsic hash
|
|
1981
2008
|
*/
|
|
1982
|
-
submitBid(commitment: HexString, userOp: HexString): Promise<BidSubmissionResult>;
|
|
2009
|
+
submitBid(commitment: HexString$1, userOp: HexString$1): Promise<BidSubmissionResult>;
|
|
1983
2010
|
/**
|
|
1984
2011
|
* Retracts a bid from Hyperbridge and reclaims the deposit
|
|
1985
2012
|
*
|
|
@@ -1988,7 +2015,7 @@ declare class IntentsCoprocessor {
|
|
|
1988
2015
|
* @param commitment - The order commitment hash (bytes32)
|
|
1989
2016
|
* @returns BidSubmissionResult with success status and block/extrinsic hash
|
|
1990
2017
|
*/
|
|
1991
|
-
retractBid(commitment: HexString): Promise<BidSubmissionResult>;
|
|
2018
|
+
retractBid(commitment: HexString$1): Promise<BidSubmissionResult>;
|
|
1992
2019
|
/**
|
|
1993
2020
|
* Places a new bid and retracts a previous one in a single transaction via utility.batch.
|
|
1994
2021
|
*
|
|
@@ -2009,7 +2036,7 @@ declare class IntentsCoprocessor {
|
|
|
2009
2036
|
* @param userOp - The encoded PackedUserOperation as hex string
|
|
2010
2037
|
* @returns BidSubmissionResult with success status and block/extrinsic hash
|
|
2011
2038
|
*/
|
|
2012
|
-
submitBidWithRetraction(retractCommitment: HexString, bidCommitment: HexString, userOp: HexString): Promise<BidSubmissionResult>;
|
|
2039
|
+
submitBidWithRetraction(retractCommitment: HexString$1, bidCommitment: HexString$1, userOp: HexString$1): Promise<BidSubmissionResult>;
|
|
2013
2040
|
/**
|
|
2014
2041
|
* Fetches all bid storage entries for a given order commitment.
|
|
2015
2042
|
* Returns the on-chain data only (filler addresses and deposits).
|
|
@@ -2017,7 +2044,7 @@ declare class IntentsCoprocessor {
|
|
|
2017
2044
|
* @param commitment - The order commitment hash (bytes32)
|
|
2018
2045
|
* @returns Array of BidStorageEntry objects
|
|
2019
2046
|
*/
|
|
2020
|
-
getBidStorageEntries(commitment: HexString): Promise<BidStorageEntry[]>;
|
|
2047
|
+
getBidStorageEntries(commitment: HexString$1): Promise<BidStorageEntry[]>;
|
|
2021
2048
|
/**
|
|
2022
2049
|
* Fetches all bids for a given order commitment from Hyperbridge.
|
|
2023
2050
|
*
|
|
@@ -2028,7 +2055,7 @@ declare class IntentsCoprocessor {
|
|
|
2028
2055
|
* @param commitment - The order commitment hash (bytes32)
|
|
2029
2056
|
* @returns Array of FillerBid objects containing filler address, userOp, and deposit
|
|
2030
2057
|
*/
|
|
2031
|
-
getBidsForOrder(commitment: HexString): Promise<FillerBid[]>;
|
|
2058
|
+
getBidsForOrder(commitment: HexString$1): Promise<FillerBid[]>;
|
|
2032
2059
|
/**
|
|
2033
2060
|
* Fetches bids using the custom intents_getBidsForOrder RPC.
|
|
2034
2061
|
* Single round-trip but does not include deposit amounts.
|
|
@@ -2051,7 +2078,7 @@ declare class IntentsCoprocessor {
|
|
|
2051
2078
|
* Returns `null` if the key is absent (e.g. the node is not an offchain worker
|
|
2052
2079
|
* or the commitment has expired and been cleared).
|
|
2053
2080
|
*/
|
|
2054
|
-
fetchPhantomOrder(commitment: HexString): Promise<Order | null>;
|
|
2081
|
+
fetchPhantomOrder(commitment: HexString$1): Promise<Order | null>;
|
|
2055
2082
|
/**
|
|
2056
2083
|
* Reads the PhantomOrderRegistered events emitted in a single block.
|
|
2057
2084
|
*/
|
|
@@ -2097,7 +2124,7 @@ declare class TronChain implements IChain {
|
|
|
2097
2124
|
/** Underlying viem public client (delegated from the internal EvmChain) */
|
|
2098
2125
|
get client(): PublicClient;
|
|
2099
2126
|
/** Host contract address for this chain (delegated from the internal EvmChain) */
|
|
2100
|
-
get host(): HexString;
|
|
2127
|
+
get host(): HexString$1;
|
|
2101
2128
|
/** Chain configuration (delegated from the internal EvmChain) */
|
|
2102
2129
|
get config(): IEvmConfig;
|
|
2103
2130
|
/** Chain configuration service (delegated from the internal EvmChain) */
|
|
@@ -2105,11 +2132,11 @@ declare class TronChain implements IChain {
|
|
|
2105
2132
|
/** TronWeb instance for this Tron chain (constructed from rpcUrl) */
|
|
2106
2133
|
get tronWeb(): InstanceType<typeof TronWeb>;
|
|
2107
2134
|
timestamp(): Promise<bigint>;
|
|
2108
|
-
requestReceiptKey(commitment: HexString): HexString;
|
|
2109
|
-
queryRequestReceipt(commitment: HexString): Promise<HexString | undefined>;
|
|
2110
|
-
queryStateProof(at: bigint, keys: HexString[], address?: HexString): Promise<HexString>;
|
|
2111
|
-
queryProof(message: IMessage, counterparty: string, at?: bigint): Promise<HexString>;
|
|
2112
|
-
encode(message: IIsmpMessage): HexString;
|
|
2135
|
+
requestReceiptKey(commitment: HexString$1): HexString$1;
|
|
2136
|
+
queryRequestReceipt(commitment: HexString$1): Promise<HexString$1 | undefined>;
|
|
2137
|
+
queryStateProof(at: bigint, keys: HexString$1[], address?: HexString$1): Promise<HexString$1>;
|
|
2138
|
+
queryProof(message: IMessage, counterparty: string, at?: bigint): Promise<HexString$1>;
|
|
2139
|
+
encode(message: IIsmpMessage): HexString$1;
|
|
2113
2140
|
latestStateMachineHeight(stateMachineId: StateMachineIdParams): Promise<bigint>;
|
|
2114
2141
|
challengePeriod(stateMachineId: StateMachineIdParams): Promise<bigint>;
|
|
2115
2142
|
stateMachineUpdateTime(stateMachineHeight: StateMachineHeight): Promise<bigint>;
|
|
@@ -2118,7 +2145,7 @@ declare class TronChain implements IChain {
|
|
|
2118
2145
|
* Only works for direct calls to IntentGateway (not nested/multicall).
|
|
2119
2146
|
* Tron does not support debug_traceTransaction.
|
|
2120
2147
|
*/
|
|
2121
|
-
getPlaceOrderCalldata(txHash: string, _intentGatewayAddress: string, _occurrenceIndex?: number): Promise<HexString>;
|
|
2148
|
+
getPlaceOrderCalldata(txHash: string, _intentGatewayAddress: string, _occurrenceIndex?: number): Promise<HexString$1>;
|
|
2122
2149
|
/**
|
|
2123
2150
|
* Broadcasts a signed Tron transaction and waits for confirmation,
|
|
2124
2151
|
* returning a 0x-prefixed transaction hash compatible with viem.
|
|
@@ -2126,10 +2153,10 @@ declare class TronChain implements IChain {
|
|
|
2126
2153
|
* This mirrors the behavior used in IntentGatewayV2 for Tron chains.
|
|
2127
2154
|
*/
|
|
2128
2155
|
broadcastTransaction(signedTransaction: any): Promise<TransactionReceipt>;
|
|
2129
|
-
getTransactionReceipt(hash: HexString): Promise<TransactionReceipt>;
|
|
2156
|
+
getTransactionReceipt(hash: HexString$1): Promise<TransactionReceipt>;
|
|
2130
2157
|
/** Gets the fee token address and decimals for the chain. */
|
|
2131
2158
|
getFeeTokenWithDecimals(): Promise<{
|
|
2132
|
-
address: HexString;
|
|
2159
|
+
address: HexString$1;
|
|
2133
2160
|
decimals: number;
|
|
2134
2161
|
}>;
|
|
2135
2162
|
/** Gets the nonce of the host contract on this chain. */
|
|
@@ -2139,7 +2166,7 @@ declare class TronChain implements IChain {
|
|
|
2139
2166
|
/** Estimates gas for executing a post request on this chain. */
|
|
2140
2167
|
estimateGas(request: IPostRequest): Promise<{
|
|
2141
2168
|
gas: bigint;
|
|
2142
|
-
postRequestCalldata: HexString;
|
|
2169
|
+
postRequestCalldata: HexString$1;
|
|
2143
2170
|
}>;
|
|
2144
2171
|
}
|
|
2145
2172
|
|
|
@@ -2170,34 +2197,34 @@ declare class PolkadotHubChain implements IChain {
|
|
|
2170
2197
|
static create(evmRpcUrl: string, substrateRpcUrl: string, bundlerUrl?: string): Promise<PolkadotHubChain>;
|
|
2171
2198
|
private constructor();
|
|
2172
2199
|
get client(): PublicClient;
|
|
2173
|
-
get host(): HexString;
|
|
2200
|
+
get host(): HexString$1;
|
|
2174
2201
|
get bundlerUrl(): string | undefined;
|
|
2175
2202
|
get configService(): ChainConfigService;
|
|
2176
2203
|
get config(): IPolkadotHubConfig;
|
|
2177
2204
|
private hostAddress20;
|
|
2178
2205
|
private fetchCombinedProof;
|
|
2179
2206
|
timestamp(): Promise<bigint>;
|
|
2180
|
-
requestReceiptKey(commitment: HexString): HexString;
|
|
2181
|
-
queryRequestReceipt(commitment: HexString): Promise<HexString | undefined>;
|
|
2182
|
-
queryProof(message: IMessage, _counterparty: string, at?: bigint): Promise<HexString>;
|
|
2183
|
-
queryStateProof(at: bigint, keys: HexString[], _address?: HexString): Promise<HexString>;
|
|
2184
|
-
encode(message: IIsmpMessage): HexString;
|
|
2207
|
+
requestReceiptKey(commitment: HexString$1): HexString$1;
|
|
2208
|
+
queryRequestReceipt(commitment: HexString$1): Promise<HexString$1 | undefined>;
|
|
2209
|
+
queryProof(message: IMessage, _counterparty: string, at?: bigint): Promise<HexString$1>;
|
|
2210
|
+
queryStateProof(at: bigint, keys: HexString$1[], _address?: HexString$1): Promise<HexString$1>;
|
|
2211
|
+
encode(message: IIsmpMessage): HexString$1;
|
|
2185
2212
|
latestStateMachineHeight(stateMachineId: StateMachineIdParams): Promise<bigint>;
|
|
2186
2213
|
challengePeriod(stateMachineId: StateMachineIdParams): Promise<bigint>;
|
|
2187
2214
|
stateMachineUpdateTime(stateMachineHeight: StateMachineHeight): Promise<bigint>;
|
|
2188
2215
|
getHostNonce(): Promise<bigint>;
|
|
2189
2216
|
quoteNative(request: IPostRequest | IGetRequest, fee: bigint): Promise<bigint>;
|
|
2190
2217
|
getFeeTokenWithDecimals(): Promise<{
|
|
2191
|
-
address: HexString;
|
|
2218
|
+
address: HexString$1;
|
|
2192
2219
|
decimals: number;
|
|
2193
2220
|
}>;
|
|
2194
|
-
getPlaceOrderCalldata(txHash: string, intentGatewayAddress: string, occurrenceIndex?: number): Promise<HexString>;
|
|
2221
|
+
getPlaceOrderCalldata(txHash: string, intentGatewayAddress: string, occurrenceIndex?: number): Promise<HexString$1>;
|
|
2195
2222
|
estimateGas(request: IPostRequest): Promise<{
|
|
2196
2223
|
gas: bigint;
|
|
2197
|
-
postRequestCalldata: HexString;
|
|
2224
|
+
postRequestCalldata: HexString$1;
|
|
2198
2225
|
}>;
|
|
2199
|
-
broadcastTransaction(signedTransaction: HexString): Promise<TransactionReceipt>;
|
|
2200
|
-
getTransactionReceipt(hash: HexString): Promise<TransactionReceipt>;
|
|
2226
|
+
broadcastTransaction(signedTransaction: HexString$1): Promise<TransactionReceipt>;
|
|
2227
|
+
getTransactionReceipt(hash: HexString$1): Promise<TransactionReceipt>;
|
|
2201
2228
|
}
|
|
2202
2229
|
|
|
2203
2230
|
/**
|
|
@@ -2229,7 +2256,7 @@ declare class PharosChain implements IChain {
|
|
|
2229
2256
|
static create(rpcUrl: string, bundlerUrl?: string): Promise<PharosChain>;
|
|
2230
2257
|
private constructor();
|
|
2231
2258
|
get client(): PublicClient;
|
|
2232
|
-
get host(): HexString;
|
|
2259
|
+
get host(): HexString$1;
|
|
2233
2260
|
get bundlerUrl(): string | undefined;
|
|
2234
2261
|
get configService(): ChainConfigService;
|
|
2235
2262
|
get config(): IPharosConfig;
|
|
@@ -2246,8 +2273,8 @@ declare class PharosChain implements IChain {
|
|
|
2246
2273
|
*/
|
|
2247
2274
|
private fetchAccountProofInto;
|
|
2248
2275
|
timestamp(): Promise<bigint>;
|
|
2249
|
-
requestReceiptKey(commitment: HexString): HexString;
|
|
2250
|
-
queryRequestReceipt(commitment: HexString): Promise<HexString | undefined>;
|
|
2276
|
+
requestReceiptKey(commitment: HexString$1): HexString$1;
|
|
2277
|
+
queryRequestReceipt(commitment: HexString$1): Promise<HexString$1 | undefined>;
|
|
2251
2278
|
/**
|
|
2252
2279
|
* Query a Pharos state proof for the request/response commitments in `message`.
|
|
2253
2280
|
*
|
|
@@ -2256,7 +2283,7 @@ declare class PharosChain implements IChain {
|
|
|
2256
2283
|
* {@link requestCommitmentKey} / {@link responseCommitmentKey}) and request it
|
|
2257
2284
|
* from the ISMP host via `eth_getProof`.
|
|
2258
2285
|
*/
|
|
2259
|
-
queryProof(message: IMessage, _counterparty: string, at?: bigint): Promise<HexString>;
|
|
2286
|
+
queryProof(message: IMessage, _counterparty: string, at?: bigint): Promise<HexString$1>;
|
|
2260
2287
|
/**
|
|
2261
2288
|
* Query a Pharos state proof for arbitrary keys.
|
|
2262
2289
|
*
|
|
@@ -2268,24 +2295,24 @@ declare class PharosChain implements IChain {
|
|
|
2268
2295
|
* If `address` is provided, all keys are treated as 32-byte slots under that
|
|
2269
2296
|
* contract (matching the `EvmChain.queryStateProof` contract-override shape).
|
|
2270
2297
|
*/
|
|
2271
|
-
queryStateProof(at: bigint, keys: HexString[], address?: HexString): Promise<HexString>;
|
|
2272
|
-
encode(message: IIsmpMessage): HexString;
|
|
2298
|
+
queryStateProof(at: bigint, keys: HexString$1[], address?: HexString$1): Promise<HexString$1>;
|
|
2299
|
+
encode(message: IIsmpMessage): HexString$1;
|
|
2273
2300
|
latestStateMachineHeight(stateMachineId: StateMachineIdParams): Promise<bigint>;
|
|
2274
2301
|
challengePeriod(stateMachineId: StateMachineIdParams): Promise<bigint>;
|
|
2275
2302
|
stateMachineUpdateTime(stateMachineHeight: StateMachineHeight): Promise<bigint>;
|
|
2276
2303
|
getHostNonce(): Promise<bigint>;
|
|
2277
2304
|
quoteNative(request: IPostRequest | IGetRequest, fee: bigint): Promise<bigint>;
|
|
2278
2305
|
getFeeTokenWithDecimals(): Promise<{
|
|
2279
|
-
address: HexString;
|
|
2306
|
+
address: HexString$1;
|
|
2280
2307
|
decimals: number;
|
|
2281
2308
|
}>;
|
|
2282
|
-
getPlaceOrderCalldata(txHash: string, intentGatewayAddress: string, occurrenceIndex?: number): Promise<HexString>;
|
|
2309
|
+
getPlaceOrderCalldata(txHash: string, intentGatewayAddress: string, occurrenceIndex?: number): Promise<HexString$1>;
|
|
2283
2310
|
estimateGas(request: IPostRequest): Promise<{
|
|
2284
2311
|
gas: bigint;
|
|
2285
|
-
postRequestCalldata: HexString;
|
|
2312
|
+
postRequestCalldata: HexString$1;
|
|
2286
2313
|
}>;
|
|
2287
|
-
broadcastTransaction(signedTransaction: HexString): Promise<TransactionReceipt>;
|
|
2288
|
-
getTransactionReceipt(hash: HexString): Promise<TransactionReceipt>;
|
|
2314
|
+
broadcastTransaction(signedTransaction: HexString$1): Promise<TransactionReceipt>;
|
|
2315
|
+
getTransactionReceipt(hash: HexString$1): Promise<TransactionReceipt>;
|
|
2289
2316
|
}
|
|
2290
2317
|
|
|
2291
2318
|
/**
|
|
@@ -2294,7 +2321,7 @@ declare class PharosChain implements IChain {
|
|
|
2294
2321
|
type IIsmpMessage = IRequestMessage | ITimeoutPostRequestMessage | IGetResponseMessage | IGetRequestMessage | IConsensusMessage | IBatchConsensusAndPostRequestMessage | IBatchConsensusAndGetResponseMessage;
|
|
2295
2322
|
interface IConsensusMessage {
|
|
2296
2323
|
kind: "Consensus";
|
|
2297
|
-
consensusProof: HexString;
|
|
2324
|
+
consensusProof: HexString$1;
|
|
2298
2325
|
}
|
|
2299
2326
|
interface IRequestMessage {
|
|
2300
2327
|
/**
|
|
@@ -2312,7 +2339,7 @@ interface IRequestMessage {
|
|
|
2312
2339
|
/**
|
|
2313
2340
|
* The signer of the message.
|
|
2314
2341
|
*/
|
|
2315
|
-
signer: HexString;
|
|
2342
|
+
signer: HexString$1;
|
|
2316
2343
|
}
|
|
2317
2344
|
interface IGetRequestMessage {
|
|
2318
2345
|
/**
|
|
@@ -2334,7 +2361,7 @@ interface IGetRequestMessage {
|
|
|
2334
2361
|
/**
|
|
2335
2362
|
* The signer of the message.
|
|
2336
2363
|
*/
|
|
2337
|
-
signer: HexString;
|
|
2364
|
+
signer: HexString$1;
|
|
2338
2365
|
}
|
|
2339
2366
|
interface IGetResponse {
|
|
2340
2367
|
/**
|
|
@@ -2362,7 +2389,7 @@ interface IGetResponseMessage {
|
|
|
2362
2389
|
/**
|
|
2363
2390
|
* The signer of the message.
|
|
2364
2391
|
*/
|
|
2365
|
-
signer: HexString;
|
|
2392
|
+
signer: HexString$1;
|
|
2366
2393
|
}
|
|
2367
2394
|
interface ITimeoutPostRequestMessage {
|
|
2368
2395
|
/**
|
|
@@ -2380,17 +2407,17 @@ interface ITimeoutPostRequestMessage {
|
|
|
2380
2407
|
}
|
|
2381
2408
|
interface IBatchConsensusAndPostRequestMessage {
|
|
2382
2409
|
kind: "BatchConsensusAndPostRequest";
|
|
2383
|
-
consensusProofs: HexString[];
|
|
2410
|
+
consensusProofs: HexString$1[];
|
|
2384
2411
|
requests: IPostRequest[];
|
|
2385
2412
|
proof: IProof;
|
|
2386
|
-
signer: HexString;
|
|
2413
|
+
signer: HexString$1;
|
|
2387
2414
|
}
|
|
2388
2415
|
interface IBatchConsensusAndGetResponseMessage {
|
|
2389
2416
|
kind: "BatchConsensusAndGetResponse";
|
|
2390
|
-
consensusProofs: HexString[];
|
|
2417
|
+
consensusProofs: HexString$1[];
|
|
2391
2418
|
responses: IGetResponse[];
|
|
2392
2419
|
proof: IProof;
|
|
2393
|
-
signer: HexString;
|
|
2420
|
+
signer: HexString$1;
|
|
2394
2421
|
}
|
|
2395
2422
|
interface IProof {
|
|
2396
2423
|
/**
|
|
@@ -2408,7 +2435,7 @@ interface IProof {
|
|
|
2408
2435
|
/**
|
|
2409
2436
|
* The encoded storage proof
|
|
2410
2437
|
*/
|
|
2411
|
-
proof: HexString;
|
|
2438
|
+
proof: HexString$1;
|
|
2412
2439
|
}
|
|
2413
2440
|
/**
|
|
2414
2441
|
* Interface representing a chain.
|
|
@@ -2422,18 +2449,18 @@ interface IChain {
|
|
|
2422
2449
|
/**
|
|
2423
2450
|
* Returns the state trie key for the request-receipt storage item for the given request commitment.
|
|
2424
2451
|
*/
|
|
2425
|
-
requestReceiptKey(commitment: HexString): HexString;
|
|
2452
|
+
requestReceiptKey(commitment: HexString$1): HexString$1;
|
|
2426
2453
|
/**
|
|
2427
2454
|
* Query and return the request-receipt for the given request commitment.
|
|
2428
2455
|
*/
|
|
2429
|
-
queryRequestReceipt(commitment: HexString): Promise<HexString | undefined>;
|
|
2456
|
+
queryRequestReceipt(commitment: HexString$1): Promise<HexString$1 | undefined>;
|
|
2430
2457
|
/**
|
|
2431
2458
|
* Query and return the encoded storage proof for the provided keys at the given height.
|
|
2432
2459
|
* @param address - Optional contract address for EVM chains; defaults to host contract when omitted.
|
|
2433
2460
|
*/
|
|
2434
|
-
queryStateProof(at: bigint, keys: HexString[], address?: HexString): Promise<HexString>;
|
|
2435
|
-
queryProof(message: IMessage, counterparty: string, at?: bigint): Promise<HexString>;
|
|
2436
|
-
encode(message: IIsmpMessage): HexString;
|
|
2461
|
+
queryStateProof(at: bigint, keys: HexString$1[], address?: HexString$1): Promise<HexString$1>;
|
|
2462
|
+
queryProof(message: IMessage, counterparty: string, at?: bigint): Promise<HexString$1>;
|
|
2463
|
+
encode(message: IIsmpMessage): HexString$1;
|
|
2437
2464
|
/**
|
|
2438
2465
|
* Get the latest state machine height for a given state machine ID.
|
|
2439
2466
|
*/
|
|
@@ -2458,18 +2485,18 @@ interface IEvmChain extends IChain {
|
|
|
2458
2485
|
getHostNonce(): Promise<bigint>;
|
|
2459
2486
|
quoteNative(request: IPostRequest | IGetRequest, fee: bigint): Promise<bigint>;
|
|
2460
2487
|
getFeeTokenWithDecimals(): Promise<{
|
|
2461
|
-
address: HexString;
|
|
2488
|
+
address: HexString$1;
|
|
2462
2489
|
decimals: number;
|
|
2463
2490
|
}>;
|
|
2464
|
-
getPlaceOrderCalldata(txHash: string, intentGatewayAddress: string, occurrenceIndex?: number): Promise<HexString>;
|
|
2465
|
-
broadcastTransaction(signedTransaction: HexString): Promise<TransactionReceipt>;
|
|
2466
|
-
getTransactionReceipt(hash: HexString): Promise<TransactionReceipt>;
|
|
2491
|
+
getPlaceOrderCalldata(txHash: string, intentGatewayAddress: string, occurrenceIndex?: number): Promise<HexString$1>;
|
|
2492
|
+
broadcastTransaction(signedTransaction: HexString$1): Promise<TransactionReceipt>;
|
|
2493
|
+
getTransactionReceipt(hash: HexString$1): Promise<TransactionReceipt>;
|
|
2467
2494
|
}
|
|
2468
2495
|
|
|
2469
2496
|
type EstimateGasCallData = ContractFunctionArgs<typeof _default.ABI, "nonpayable" | "payable", "handlePostRequests">;
|
|
2470
|
-
type HexString = `0x${string}`;
|
|
2497
|
+
type HexString$1 = `0x${string}`;
|
|
2471
2498
|
type StateMachineId = string;
|
|
2472
|
-
type BytesLikeHex = HexString;
|
|
2499
|
+
type BytesLikeHex = HexString$1;
|
|
2473
2500
|
interface IConfig {
|
|
2474
2501
|
source: IEvmConfig | ISubstrateConfig | IPolkadotHubConfig | IPharosConfig;
|
|
2475
2502
|
dest: IEvmConfig | ISubstrateConfig | IPolkadotHubConfig | IPharosConfig;
|
|
@@ -2479,7 +2506,7 @@ interface IConfig {
|
|
|
2479
2506
|
interface IEvmConfig {
|
|
2480
2507
|
rpcUrl: string;
|
|
2481
2508
|
stateMachineId: string;
|
|
2482
|
-
host: HexString;
|
|
2509
|
+
host: HexString$1;
|
|
2483
2510
|
consensusStateId: string;
|
|
2484
2511
|
}
|
|
2485
2512
|
/**
|
|
@@ -2511,25 +2538,25 @@ interface IHyperbridgeConfig {
|
|
|
2511
2538
|
interface IPostRequest {
|
|
2512
2539
|
source: string;
|
|
2513
2540
|
dest: string;
|
|
2514
|
-
from: HexString;
|
|
2515
|
-
to: HexString;
|
|
2541
|
+
from: HexString$1;
|
|
2542
|
+
to: HexString$1;
|
|
2516
2543
|
nonce: bigint;
|
|
2517
|
-
body: HexString;
|
|
2544
|
+
body: HexString$1;
|
|
2518
2545
|
timeoutTimestamp: bigint;
|
|
2519
2546
|
}
|
|
2520
2547
|
interface IGetRequest {
|
|
2521
2548
|
source: string;
|
|
2522
2549
|
dest: string;
|
|
2523
|
-
from: HexString;
|
|
2550
|
+
from: HexString$1;
|
|
2524
2551
|
nonce: bigint;
|
|
2525
2552
|
height: bigint;
|
|
2526
|
-
keys: HexString[];
|
|
2553
|
+
keys: HexString$1[];
|
|
2527
2554
|
timeoutTimestamp: bigint;
|
|
2528
|
-
context: HexString;
|
|
2555
|
+
context: HexString$1;
|
|
2529
2556
|
}
|
|
2530
2557
|
interface GetResponseStorageValues {
|
|
2531
|
-
key: HexString;
|
|
2532
|
-
value: HexString;
|
|
2558
|
+
key: HexString$1;
|
|
2559
|
+
value: HexString$1;
|
|
2533
2560
|
}
|
|
2534
2561
|
interface IPostResponse {
|
|
2535
2562
|
post: IPostRequest;
|
|
@@ -2537,9 +2564,9 @@ interface IPostResponse {
|
|
|
2537
2564
|
timeoutTimestamp: bigint;
|
|
2538
2565
|
}
|
|
2539
2566
|
type IMessage = {
|
|
2540
|
-
Requests: HexString[];
|
|
2567
|
+
Requests: HexString$1[];
|
|
2541
2568
|
} | {
|
|
2542
|
-
Responses: HexString[];
|
|
2569
|
+
Responses: HexString$1[];
|
|
2543
2570
|
};
|
|
2544
2571
|
type IndexerQueryClient = GraphQLClient;
|
|
2545
2572
|
interface ClientConfig {
|
|
@@ -2704,10 +2731,10 @@ interface RequestResponse {
|
|
|
2704
2731
|
nodes: Array<{
|
|
2705
2732
|
source: string;
|
|
2706
2733
|
dest: string;
|
|
2707
|
-
to: HexString;
|
|
2708
|
-
from: HexString;
|
|
2734
|
+
to: HexString$1;
|
|
2735
|
+
from: HexString$1;
|
|
2709
2736
|
nonce: bigint;
|
|
2710
|
-
body: HexString;
|
|
2737
|
+
body: HexString$1;
|
|
2711
2738
|
timeoutTimestamp: bigint;
|
|
2712
2739
|
statusMetadata: {
|
|
2713
2740
|
nodes: Array<{
|
|
@@ -2727,12 +2754,12 @@ interface GetRequestResponse {
|
|
|
2727
2754
|
nodes: Array<{
|
|
2728
2755
|
source: string;
|
|
2729
2756
|
dest: string;
|
|
2730
|
-
to: HexString;
|
|
2731
|
-
from: HexString;
|
|
2757
|
+
to: HexString$1;
|
|
2758
|
+
from: HexString$1;
|
|
2732
2759
|
nonce: bigint;
|
|
2733
2760
|
height: bigint;
|
|
2734
|
-
keys: HexString[];
|
|
2735
|
-
context: HexString;
|
|
2761
|
+
keys: HexString$1[];
|
|
2762
|
+
context: HexString$1;
|
|
2736
2763
|
timeoutTimestamp: bigint;
|
|
2737
2764
|
statusMetadata: {
|
|
2738
2765
|
nodes: Array<{
|
|
@@ -2832,20 +2859,20 @@ type RequestStatusWithMetadata = {
|
|
|
2832
2859
|
interface GenericRequestWithStatuses {
|
|
2833
2860
|
source: string;
|
|
2834
2861
|
dest: string;
|
|
2835
|
-
from: HexString;
|
|
2862
|
+
from: HexString$1;
|
|
2836
2863
|
nonce: bigint;
|
|
2837
2864
|
timeoutTimestamp: bigint;
|
|
2838
2865
|
statuses: Array<RequestStatusWithMetadata>;
|
|
2839
2866
|
}
|
|
2840
2867
|
interface PostRequestWithStatus extends GenericRequestWithStatuses {
|
|
2841
|
-
to: HexString;
|
|
2842
|
-
body: HexString;
|
|
2868
|
+
to: HexString$1;
|
|
2869
|
+
body: HexString$1;
|
|
2843
2870
|
}
|
|
2844
2871
|
interface GetRequestWithStatus extends GenericRequestWithStatuses {
|
|
2845
2872
|
height: bigint;
|
|
2846
|
-
keys: HexString[];
|
|
2847
|
-
context: HexString;
|
|
2848
|
-
commitment: HexString;
|
|
2873
|
+
keys: HexString$1[];
|
|
2874
|
+
context: HexString$1;
|
|
2875
|
+
commitment: HexString$1;
|
|
2849
2876
|
}
|
|
2850
2877
|
interface GetResponseByRequestIdResponse {
|
|
2851
2878
|
getResponses: {
|
|
@@ -2888,7 +2915,7 @@ interface AssetTeleported {
|
|
|
2888
2915
|
to: string;
|
|
2889
2916
|
amount: bigint;
|
|
2890
2917
|
dest: string;
|
|
2891
|
-
commitment: HexString;
|
|
2918
|
+
commitment: HexString$1;
|
|
2892
2919
|
createdAt: Date;
|
|
2893
2920
|
blockNumber: number;
|
|
2894
2921
|
}
|
|
@@ -2898,7 +2925,7 @@ interface AssetTeleportedResponse {
|
|
|
2898
2925
|
interface StateMachineIdParams {
|
|
2899
2926
|
stateId: {
|
|
2900
2927
|
Evm?: number;
|
|
2901
|
-
Substrate?: HexString;
|
|
2928
|
+
Substrate?: HexString$1;
|
|
2902
2929
|
Polkadot?: number;
|
|
2903
2930
|
Kusama?: number;
|
|
2904
2931
|
};
|
|
@@ -2941,58 +2968,73 @@ interface TokenInfo {
|
|
|
2941
2968
|
interface DecodedOrderPlacedLog extends Log {
|
|
2942
2969
|
eventName: string;
|
|
2943
2970
|
args: {
|
|
2944
|
-
user: HexString;
|
|
2971
|
+
user: HexString$1;
|
|
2945
2972
|
source: string;
|
|
2946
2973
|
destination: string;
|
|
2947
2974
|
deadline: bigint;
|
|
2948
2975
|
nonce: bigint;
|
|
2949
2976
|
fees: bigint;
|
|
2950
|
-
session: HexString;
|
|
2951
|
-
beneficiary: HexString;
|
|
2977
|
+
session: HexString$1;
|
|
2978
|
+
beneficiary: HexString$1;
|
|
2952
2979
|
predispatch: Array<{
|
|
2953
|
-
token: HexString;
|
|
2980
|
+
token: HexString$1;
|
|
2954
2981
|
amount: bigint;
|
|
2955
2982
|
}>;
|
|
2956
2983
|
inputs: Array<{
|
|
2957
|
-
token: HexString;
|
|
2984
|
+
token: HexString$1;
|
|
2958
2985
|
amount: bigint;
|
|
2959
2986
|
}>;
|
|
2960
2987
|
outputs: Array<{
|
|
2961
|
-
token: HexString;
|
|
2988
|
+
token: HexString$1;
|
|
2962
2989
|
amount: bigint;
|
|
2963
2990
|
}>;
|
|
2991
|
+
/**
|
|
2992
|
+
* Calldata executed via the CallDispatcher before escrow.
|
|
2993
|
+
* Absent on logs emitted under the pre-#1092 event schema.
|
|
2994
|
+
*/
|
|
2995
|
+
predispatchCall?: HexString$1;
|
|
2996
|
+
/**
|
|
2997
|
+
* Calldata executed on the destination chain during the fill.
|
|
2998
|
+
* Absent on logs emitted under the pre-#1092 event schema.
|
|
2999
|
+
*/
|
|
3000
|
+
outputCall?: HexString$1;
|
|
3001
|
+
/**
|
|
3002
|
+
* Attribution tag supplied by the order placer.
|
|
3003
|
+
* Absent on logs emitted under the pre-#1092 event schema.
|
|
3004
|
+
*/
|
|
3005
|
+
graffiti?: HexString$1;
|
|
2964
3006
|
};
|
|
2965
|
-
transactionHash: HexString;
|
|
3007
|
+
transactionHash: HexString$1;
|
|
2966
3008
|
}
|
|
2967
3009
|
interface DecodedPostRequestEvent extends Log {
|
|
2968
3010
|
eventName: string;
|
|
2969
3011
|
args: {
|
|
2970
3012
|
source: string;
|
|
2971
3013
|
dest: string;
|
|
2972
|
-
from: HexString;
|
|
2973
|
-
to: HexString;
|
|
3014
|
+
from: HexString$1;
|
|
3015
|
+
to: HexString$1;
|
|
2974
3016
|
nonce: bigint;
|
|
2975
3017
|
timeoutTimestamp: bigint;
|
|
2976
|
-
body: HexString;
|
|
3018
|
+
body: HexString$1;
|
|
2977
3019
|
fee: bigint;
|
|
2978
3020
|
};
|
|
2979
|
-
transactionHash: HexString;
|
|
3021
|
+
transactionHash: HexString$1;
|
|
2980
3022
|
}
|
|
2981
3023
|
interface DecodedPostResponseEvent extends Log {
|
|
2982
3024
|
eventName: string;
|
|
2983
3025
|
args: {
|
|
2984
3026
|
source: string;
|
|
2985
3027
|
dest: string;
|
|
2986
|
-
from: HexString;
|
|
2987
|
-
to: HexString;
|
|
3028
|
+
from: HexString$1;
|
|
3029
|
+
to: HexString$1;
|
|
2988
3030
|
nonce: bigint;
|
|
2989
3031
|
timeoutTimestamp: bigint;
|
|
2990
|
-
body: HexString;
|
|
2991
|
-
response: HexString;
|
|
3032
|
+
body: HexString$1;
|
|
3033
|
+
response: HexString$1;
|
|
2992
3034
|
responseTimeoutTimestamp: bigint;
|
|
2993
3035
|
fee: bigint;
|
|
2994
3036
|
};
|
|
2995
|
-
transactionHash: HexString;
|
|
3037
|
+
transactionHash: HexString$1;
|
|
2996
3038
|
}
|
|
2997
3039
|
/**
|
|
2998
3040
|
* Options for canceling an order
|
|
@@ -3014,11 +3056,11 @@ interface Deployment {
|
|
|
3014
3056
|
/**
|
|
3015
3057
|
* The raw state machine ID bytes for the deployment chain (hashed on-chain)
|
|
3016
3058
|
*/
|
|
3017
|
-
chain: HexString;
|
|
3059
|
+
chain: HexString$1;
|
|
3018
3060
|
/**
|
|
3019
3061
|
* The gateway identifier
|
|
3020
3062
|
*/
|
|
3021
|
-
gateway: HexString;
|
|
3063
|
+
gateway: HexString$1;
|
|
3022
3064
|
}
|
|
3023
3065
|
/**
|
|
3024
3066
|
* Represents the body of a request
|
|
@@ -3027,11 +3069,11 @@ interface RequestBody {
|
|
|
3027
3069
|
/**
|
|
3028
3070
|
* Represents the commitment of an order
|
|
3029
3071
|
*/
|
|
3030
|
-
commitment: HexString;
|
|
3072
|
+
commitment: HexString$1;
|
|
3031
3073
|
/**
|
|
3032
3074
|
* Stores the identifier for the beneficiary
|
|
3033
3075
|
*/
|
|
3034
|
-
beneficiary: HexString;
|
|
3076
|
+
beneficiary: HexString$1;
|
|
3035
3077
|
/**
|
|
3036
3078
|
* An array of token identifiers
|
|
3037
3079
|
*/
|
|
@@ -3132,6 +3174,13 @@ interface FillerConfig {
|
|
|
3132
3174
|
* Example: { 1: true, 56: false } - watch-only on Ethereum, normal execution on BSC
|
|
3133
3175
|
*/
|
|
3134
3176
|
watchOnly?: Record<number, boolean>;
|
|
3177
|
+
/**
|
|
3178
|
+
* Source chains (state machine ids, e.g. "EVM-8453") this filler accepts payment from when
|
|
3179
|
+
* filling cross-chain orders, declared inside its phantom bids' paymasterAndData. Omit to
|
|
3180
|
+
* declare nothing, which downstream consumers read as "accepts all CCTP/USDT0-covered
|
|
3181
|
+
* chains"; an empty array declares that no source chain is accepted.
|
|
3182
|
+
*/
|
|
3183
|
+
acceptedSourceChains?: string[];
|
|
3135
3184
|
}
|
|
3136
3185
|
/**
|
|
3137
3186
|
* Result of an order execution attempt
|
|
@@ -3181,8 +3230,8 @@ interface ExecutionResult {
|
|
|
3181
3230
|
* Any tokens exchanged during the fill process
|
|
3182
3231
|
*/
|
|
3183
3232
|
exchanges?: Array<{
|
|
3184
|
-
fromToken: HexString;
|
|
3185
|
-
toToken: HexString;
|
|
3233
|
+
fromToken: HexString$1;
|
|
3234
|
+
toToken: HexString$1;
|
|
3186
3235
|
fromAmount: string;
|
|
3187
3236
|
toAmount: string;
|
|
3188
3237
|
exchangeRate: string;
|
|
@@ -3204,15 +3253,15 @@ interface DispatchPost {
|
|
|
3204
3253
|
/**
|
|
3205
3254
|
* Bytes representation of the destination state machine
|
|
3206
3255
|
*/
|
|
3207
|
-
dest: HexString;
|
|
3256
|
+
dest: HexString$1;
|
|
3208
3257
|
/**
|
|
3209
3258
|
* The destination module
|
|
3210
3259
|
*/
|
|
3211
|
-
to: HexString;
|
|
3260
|
+
to: HexString$1;
|
|
3212
3261
|
/**
|
|
3213
3262
|
* The request body
|
|
3214
3263
|
*/
|
|
3215
|
-
body: HexString;
|
|
3264
|
+
body: HexString$1;
|
|
3216
3265
|
/**
|
|
3217
3266
|
* Timeout for this request in seconds
|
|
3218
3267
|
*/
|
|
@@ -3225,13 +3274,13 @@ interface DispatchPost {
|
|
|
3225
3274
|
/**
|
|
3226
3275
|
* Who pays for this request?
|
|
3227
3276
|
*/
|
|
3228
|
-
payer: HexString;
|
|
3277
|
+
payer: HexString$1;
|
|
3229
3278
|
}
|
|
3230
3279
|
interface DispatchGet {
|
|
3231
3280
|
/**
|
|
3232
3281
|
* Bytes representation of the destination state machine
|
|
3233
3282
|
*/
|
|
3234
|
-
dest: HexString;
|
|
3283
|
+
dest: HexString$1;
|
|
3235
3284
|
/**
|
|
3236
3285
|
* Height at which to read the state machine
|
|
3237
3286
|
*/
|
|
@@ -3239,7 +3288,7 @@ interface DispatchGet {
|
|
|
3239
3288
|
/**
|
|
3240
3289
|
* Raw storage keys to fetch values from the counterparty
|
|
3241
3290
|
*/
|
|
3242
|
-
keys: HexString[];
|
|
3291
|
+
keys: HexString$1[];
|
|
3243
3292
|
/**
|
|
3244
3293
|
* Timeout for this request in seconds
|
|
3245
3294
|
*/
|
|
@@ -3251,17 +3300,17 @@ interface DispatchGet {
|
|
|
3251
3300
|
/**
|
|
3252
3301
|
* Context for the request
|
|
3253
3302
|
*/
|
|
3254
|
-
context: HexString;
|
|
3303
|
+
context: HexString$1;
|
|
3255
3304
|
/**
|
|
3256
3305
|
* Who pays for this request?
|
|
3257
3306
|
*/
|
|
3258
|
-
payer: HexString;
|
|
3307
|
+
payer: HexString$1;
|
|
3259
3308
|
}
|
|
3260
3309
|
interface StateMachineHeight {
|
|
3261
3310
|
id: {
|
|
3262
3311
|
stateId: {
|
|
3263
3312
|
Evm?: number;
|
|
3264
|
-
Substrate?: HexString;
|
|
3313
|
+
Substrate?: HexString$1;
|
|
3265
3314
|
Polkadot?: number;
|
|
3266
3315
|
Kusama?: number;
|
|
3267
3316
|
};
|
|
@@ -3277,26 +3326,26 @@ interface HostParams {
|
|
|
3277
3326
|
* The fee token contract address. This will typically be DAI.
|
|
3278
3327
|
* but we allow it to be configurable to prevent future regrets.
|
|
3279
3328
|
*/
|
|
3280
|
-
feeToken: HexString;
|
|
3329
|
+
feeToken: HexString$1;
|
|
3281
3330
|
/**
|
|
3282
3331
|
* The admin account, this only has the rights to freeze, or unfreeze the bridge
|
|
3283
3332
|
*/
|
|
3284
|
-
admin: HexString;
|
|
3333
|
+
admin: HexString$1;
|
|
3285
3334
|
/**
|
|
3286
3335
|
* Ismp message handler contract. This performs all verification logic
|
|
3287
3336
|
* needed to validate cross-chain messages before they are dispatched to local modules
|
|
3288
3337
|
*/
|
|
3289
|
-
handler: HexString;
|
|
3338
|
+
handler: HexString$1;
|
|
3290
3339
|
/**
|
|
3291
3340
|
* The authorized host manager contract, is itself an `IIsmpModule`
|
|
3292
3341
|
* which receives governance requests from the Hyperbridge chain to either
|
|
3293
3342
|
* withdraw revenue from the host or update its protocol parameters
|
|
3294
3343
|
*/
|
|
3295
|
-
hostManager: HexString;
|
|
3344
|
+
hostManager: HexString$1;
|
|
3296
3345
|
/**
|
|
3297
3346
|
* The local UniswapV2Router02 contract, used for swapping the native token to the feeToken.
|
|
3298
3347
|
*/
|
|
3299
|
-
uniswapV2: HexString;
|
|
3348
|
+
uniswapV2: HexString$1;
|
|
3300
3349
|
/**
|
|
3301
3350
|
* The unstaking period of Polkadot's validators. In order to prevent long-range attacks
|
|
3302
3351
|
*/
|
|
@@ -3308,7 +3357,7 @@ interface HostParams {
|
|
|
3308
3357
|
/**
|
|
3309
3358
|
* The consensus client contract which handles consensus proof verification
|
|
3310
3359
|
*/
|
|
3311
|
-
consensusClient: HexString;
|
|
3360
|
+
consensusClient: HexString$1;
|
|
3312
3361
|
/**
|
|
3313
3362
|
* State machines whose state commitments are accepted
|
|
3314
3363
|
*/
|
|
@@ -3316,7 +3365,7 @@ interface HostParams {
|
|
|
3316
3365
|
/**
|
|
3317
3366
|
* The state machine identifier for hyperbridge
|
|
3318
3367
|
*/
|
|
3319
|
-
hyperbridge: HexString;
|
|
3368
|
+
hyperbridge: HexString$1;
|
|
3320
3369
|
}
|
|
3321
3370
|
interface OrderStatusMetadata {
|
|
3322
3371
|
status: OrderStatus;
|
|
@@ -3398,9 +3447,9 @@ interface OrderResponse {
|
|
|
3398
3447
|
};
|
|
3399
3448
|
}
|
|
3400
3449
|
interface PhantomOrderPriceSnapshot {
|
|
3401
|
-
commitment: HexString;
|
|
3402
|
-
tokenA: HexString;
|
|
3403
|
-
tokenB: HexString;
|
|
3450
|
+
commitment: HexString$1;
|
|
3451
|
+
tokenA: HexString$1;
|
|
3452
|
+
tokenB: HexString$1;
|
|
3404
3453
|
standardAmount: bigint;
|
|
3405
3454
|
blockNumber: bigint;
|
|
3406
3455
|
medianPrice: bigint;
|
|
@@ -3434,14 +3483,14 @@ interface PhantomOrderPriceSnapshotsResponse {
|
|
|
3434
3483
|
interface AvailableLiquiditySnapshot {
|
|
3435
3484
|
totalLiquidity: string;
|
|
3436
3485
|
providerCount: number;
|
|
3437
|
-
tokenAddress: HexString;
|
|
3486
|
+
tokenAddress: HexString$1;
|
|
3438
3487
|
snapshotTime: Date;
|
|
3439
3488
|
liquidityByChain: AvailableLiquidityByChain[];
|
|
3440
3489
|
}
|
|
3441
3490
|
/** Liquidity for one chain/token balance group in an availability snapshot. */
|
|
3442
3491
|
interface AvailableLiquidityByChain {
|
|
3443
3492
|
chain: string;
|
|
3444
|
-
tokenAddress: HexString;
|
|
3493
|
+
tokenAddress: HexString$1;
|
|
3445
3494
|
totalLiquidity: string;
|
|
3446
3495
|
providerCount: number;
|
|
3447
3496
|
}
|
|
@@ -3471,7 +3520,7 @@ interface Transaction {
|
|
|
3471
3520
|
/**
|
|
3472
3521
|
* The address to send the transaction to (typically the Universal Router address)
|
|
3473
3522
|
*/
|
|
3474
|
-
to: HexString;
|
|
3523
|
+
to: HexString$1;
|
|
3475
3524
|
/**
|
|
3476
3525
|
* The value to send with the transaction (in wei)
|
|
3477
3526
|
*/
|
|
@@ -3479,7 +3528,7 @@ interface Transaction {
|
|
|
3479
3528
|
/**
|
|
3480
3529
|
* The calldata for the transaction
|
|
3481
3530
|
*/
|
|
3482
|
-
data: HexString;
|
|
3531
|
+
data: HexString$1;
|
|
3483
3532
|
}
|
|
3484
3533
|
interface StorageFacade {
|
|
3485
3534
|
get<T>(key: string): Promise<T | undefined>;
|
|
@@ -3490,15 +3539,15 @@ interface PaymentInfo {
|
|
|
3490
3539
|
/** Accepts a standard 20-byte address; the SDK pads to bytes32 internally when needed. */
|
|
3491
3540
|
beneficiary: BytesLikeHex;
|
|
3492
3541
|
assets: TokenInfo[];
|
|
3493
|
-
call: HexString;
|
|
3542
|
+
call: HexString$1;
|
|
3494
3543
|
}
|
|
3495
3544
|
interface DispatchInfo {
|
|
3496
3545
|
assets: TokenInfo[];
|
|
3497
|
-
call: HexString;
|
|
3546
|
+
call: HexString$1;
|
|
3498
3547
|
}
|
|
3499
3548
|
interface Order {
|
|
3500
3549
|
id?: string;
|
|
3501
|
-
user: HexString;
|
|
3550
|
+
user: HexString$1;
|
|
3502
3551
|
/** Accepts either `"EVM-1"` style IDs or their hex-encoded form. */
|
|
3503
3552
|
source: StateMachineId;
|
|
3504
3553
|
/** Accepts either `"EVM-42161"` style IDs or their hex-encoded form. */
|
|
@@ -3506,7 +3555,7 @@ interface Order {
|
|
|
3506
3555
|
deadline: bigint;
|
|
3507
3556
|
nonce: bigint;
|
|
3508
3557
|
fees: bigint;
|
|
3509
|
-
session: HexString;
|
|
3558
|
+
session: HexString$1;
|
|
3510
3559
|
predispatch: DispatchInfo;
|
|
3511
3560
|
inputs: TokenInfo[];
|
|
3512
3561
|
output: PaymentInfo;
|
|
@@ -3521,52 +3570,52 @@ interface FillOptions {
|
|
|
3521
3570
|
outputs: TokenInfo[];
|
|
3522
3571
|
}
|
|
3523
3572
|
interface PackedUserOperation {
|
|
3524
|
-
sender: HexString;
|
|
3573
|
+
sender: HexString$1;
|
|
3525
3574
|
nonce: bigint;
|
|
3526
|
-
initCode: HexString;
|
|
3527
|
-
callData: HexString;
|
|
3528
|
-
accountGasLimits: HexString;
|
|
3575
|
+
initCode: HexString$1;
|
|
3576
|
+
callData: HexString$1;
|
|
3577
|
+
accountGasLimits: HexString$1;
|
|
3529
3578
|
preVerificationGas: bigint;
|
|
3530
|
-
gasFees: HexString;
|
|
3531
|
-
paymasterAndData: HexString;
|
|
3532
|
-
signature: HexString;
|
|
3579
|
+
gasFees: HexString$1;
|
|
3580
|
+
paymasterAndData: HexString$1;
|
|
3581
|
+
signature: HexString$1;
|
|
3533
3582
|
}
|
|
3534
3583
|
interface SigningAccount {
|
|
3535
3584
|
/** Signs a bid message hash for a given chain. Returns a 65-byte ECDSA signature. */
|
|
3536
|
-
signMessage: (messageHash: HexString, chainId: number) => Promise<HexString>;
|
|
3585
|
+
signMessage: (messageHash: HexString$1, chainId: number) => Promise<HexString$1>;
|
|
3537
3586
|
/** Signs a raw 32-byte hash, returning split signature components for EIP-7702 etc. */
|
|
3538
|
-
signRawHash: (hash: HexString) => Promise<{
|
|
3539
|
-
r: HexString;
|
|
3540
|
-
s: HexString;
|
|
3587
|
+
signRawHash: (hash: HexString$1) => Promise<{
|
|
3588
|
+
r: HexString$1;
|
|
3589
|
+
s: HexString$1;
|
|
3541
3590
|
yParity: number;
|
|
3542
3591
|
}>;
|
|
3543
3592
|
/**
|
|
3544
3593
|
* Signs an EIP-712 typed-data payload (e.g. an EIP-2612 USDC permit for the Circle Paymaster).
|
|
3545
3594
|
* The shape of `typedData` matches viem's `TypedDataDefinition` (domain + types + message).
|
|
3546
3595
|
*/
|
|
3547
|
-
signTypedData: (typedData: unknown, chainId?: number) => Promise<HexString>;
|
|
3596
|
+
signTypedData: (typedData: unknown, chainId?: number) => Promise<HexString$1>;
|
|
3548
3597
|
}
|
|
3549
3598
|
interface SubmitBidOptions {
|
|
3550
3599
|
order: Order;
|
|
3551
3600
|
fillOptions: FillOptions;
|
|
3552
|
-
solverAccount: HexString;
|
|
3601
|
+
solverAccount: HexString$1;
|
|
3553
3602
|
/** Canonical signer used for bid message signing and raw-hash operations. */
|
|
3554
3603
|
solverSigner: SigningAccount;
|
|
3555
3604
|
nonce: bigint;
|
|
3556
|
-
entryPointAddress: HexString;
|
|
3605
|
+
entryPointAddress: HexString$1;
|
|
3557
3606
|
callGasLimit: bigint;
|
|
3558
3607
|
verificationGasLimit: bigint;
|
|
3559
3608
|
preVerificationGas: bigint;
|
|
3560
3609
|
maxFeePerGas: bigint;
|
|
3561
3610
|
maxPriorityFeePerGas: bigint;
|
|
3562
3611
|
/** Pre-built ERC-7821 calldata encoding the UserOp execution (approvals + fillOrder). */
|
|
3563
|
-
callData: HexString;
|
|
3612
|
+
callData: HexString$1;
|
|
3564
3613
|
/**
|
|
3565
3614
|
* Optional packed paymasterAndData for EntryPoint v0.8.
|
|
3566
3615
|
* Must be built BEFORE calling prepareSubmitBid so the hash covers paymaster bytes.
|
|
3567
3616
|
* Defaults to "0x" (EntryPoint deposit pays gas).
|
|
3568
3617
|
*/
|
|
3569
|
-
paymasterAndData?: HexString;
|
|
3618
|
+
paymasterAndData?: HexString$1;
|
|
3570
3619
|
}
|
|
3571
3620
|
interface EstimateFillOrderParams {
|
|
3572
3621
|
order: Order;
|
|
@@ -3610,6 +3659,33 @@ interface FillOrderEstimate {
|
|
|
3610
3659
|
*/
|
|
3611
3660
|
relayerFeeInSourceFeeToken: bigint;
|
|
3612
3661
|
}
|
|
3662
|
+
/**
|
|
3663
|
+
* Solver-fee quote for an order, priced with the same policy `execute()` /
|
|
3664
|
+
* `executeBest()` apply when `order.fees` is `0n`.
|
|
3665
|
+
*/
|
|
3666
|
+
interface OrderFeesQuote {
|
|
3667
|
+
/**
|
|
3668
|
+
* The amount to set as `Order.fees`, denominated in the source-chain fee
|
|
3669
|
+
* token. Same-chain fills carry a 2x margin over the estimated fill gas without
|
|
3670
|
+
* a gas-price bump. Cross-chain gas is priced with 10% SDK-only headroom before
|
|
3671
|
+
* adding the settlement relayer fee and a further 5% buffer over the whole sum.
|
|
3672
|
+
*/
|
|
3673
|
+
fees: bigint;
|
|
3674
|
+
/**
|
|
3675
|
+
* The native value attached to the placement transaction when the fee is
|
|
3676
|
+
* paid in the native token: the estimated fill gas cost in source-chain
|
|
3677
|
+
* wei plus a 2% buffer. The gateway swaps it for the fee token and refunds
|
|
3678
|
+
* any unused amount.
|
|
3679
|
+
*/
|
|
3680
|
+
nativeValue: bigint;
|
|
3681
|
+
/**
|
|
3682
|
+
* The source-chain fee token `fees` is denominated in — check the user's
|
|
3683
|
+
* balance and allowance against this address when paying the fee directly.
|
|
3684
|
+
*/
|
|
3685
|
+
feeToken: HexString$1;
|
|
3686
|
+
/** The underlying gas estimate the quote was derived from. */
|
|
3687
|
+
estimate: FillOrderEstimate;
|
|
3688
|
+
}
|
|
3613
3689
|
/**
|
|
3614
3690
|
* Result of submitting a bid to Hyperbridge
|
|
3615
3691
|
*/
|
|
@@ -3621,11 +3697,11 @@ interface BidSubmissionResult {
|
|
|
3621
3697
|
/**
|
|
3622
3698
|
* Block hash where the bid was included
|
|
3623
3699
|
*/
|
|
3624
|
-
blockHash?: HexString;
|
|
3700
|
+
blockHash?: HexString$1;
|
|
3625
3701
|
/**
|
|
3626
3702
|
* Extrinsic hash of the bid transaction
|
|
3627
3703
|
*/
|
|
3628
|
-
extrinsicHash?: HexString;
|
|
3704
|
+
extrinsicHash?: HexString$1;
|
|
3629
3705
|
/**
|
|
3630
3706
|
* Error message if submission failed
|
|
3631
3707
|
*/
|
|
@@ -3637,7 +3713,7 @@ interface BidSubmissionResult {
|
|
|
3637
3713
|
*/
|
|
3638
3714
|
interface BidStorageEntry {
|
|
3639
3715
|
/** The order commitment hash (H256) */
|
|
3640
|
-
commitment: HexString;
|
|
3716
|
+
commitment: HexString$1;
|
|
3641
3717
|
/** The filler's Substrate account ID (SS58 encoded) */
|
|
3642
3718
|
filler: string;
|
|
3643
3719
|
/** The deposit amount stored on-chain (BalanceOf<T> = u128) */
|
|
@@ -3660,11 +3736,11 @@ interface FillerBid {
|
|
|
3660
3736
|
*/
|
|
3661
3737
|
interface SelectOptions {
|
|
3662
3738
|
/** The order commitment hash (bytes32) */
|
|
3663
|
-
commitment: HexString;
|
|
3739
|
+
commitment: HexString$1;
|
|
3664
3740
|
/** The solver address to select */
|
|
3665
|
-
solver: HexString;
|
|
3741
|
+
solver: HexString$1;
|
|
3666
3742
|
/** The EIP-712 signature from the session key */
|
|
3667
|
-
signature: HexString;
|
|
3743
|
+
signature: HexString$1;
|
|
3668
3744
|
}
|
|
3669
3745
|
/**
|
|
3670
3746
|
* A first-class, executable solver bid surfaced to consumers of the intents SDK.
|
|
@@ -3682,7 +3758,7 @@ interface SelectOptions {
|
|
|
3682
3758
|
*/
|
|
3683
3759
|
interface Bid {
|
|
3684
3760
|
/** The solver account that submitted this bid (`userOp.sender`). */
|
|
3685
|
-
readonly solverAddress: HexString;
|
|
3761
|
+
readonly solverAddress: HexString$1;
|
|
3686
3762
|
/** Decoded `FillOptions.outputs` — the tokens and amounts the solver offers. */
|
|
3687
3763
|
readonly outputs: TokenInfo[];
|
|
3688
3764
|
/** Relayer fee from the decoded fill options. */
|
|
@@ -3731,61 +3807,77 @@ type IntentOrderStatusKey = keyof typeof IntentOrderStatus;
|
|
|
3731
3807
|
/** Tagged union of all possible status updates yielded by the intent order execution stream */
|
|
3732
3808
|
type IntentOrderStatusUpdate = {
|
|
3733
3809
|
status: "AWAITING_PLACE_ORDER";
|
|
3734
|
-
to: HexString;
|
|
3735
|
-
data: HexString;
|
|
3736
|
-
|
|
3737
|
-
|
|
3810
|
+
to: HexString$1;
|
|
3811
|
+
data: HexString$1;
|
|
3812
|
+
/**
|
|
3813
|
+
* The order's native-token input amounts. Native inputs cannot be
|
|
3814
|
+
* pulled via allowance, so this must be part of the placement
|
|
3815
|
+
* transaction's `msg.value`. Does not include the solver fee.
|
|
3816
|
+
*/
|
|
3817
|
+
value: bigint;
|
|
3818
|
+
/**
|
|
3819
|
+
* The native amount that funds `order.fees`: what the gateway swaps
|
|
3820
|
+
* into the fee token at placement. Add it to `value` when paying the
|
|
3821
|
+
* fee in native token. `0n` when `order.fees` was set by the caller
|
|
3822
|
+
* (fee-token rail).
|
|
3823
|
+
*/
|
|
3824
|
+
nativeFee: bigint;
|
|
3825
|
+
sessionPrivateKey: HexString$1;
|
|
3826
|
+
/** Exact source-chain fee-token amount encoded in `data`. */
|
|
3827
|
+
feeTokenAmount: bigint;
|
|
3828
|
+
/** Source-chain ERC-20 token charged for `feeTokenAmount`. */
|
|
3829
|
+
feeTokenAddress: HexString$1;
|
|
3738
3830
|
} | {
|
|
3739
3831
|
status: "ORDER_PLACED";
|
|
3740
3832
|
order: Order;
|
|
3741
3833
|
receipt: TransactionReceipt;
|
|
3742
3834
|
} | {
|
|
3743
3835
|
status: "AWAITING_BIDS";
|
|
3744
|
-
commitment: HexString;
|
|
3836
|
+
commitment: HexString$1;
|
|
3745
3837
|
totalFilledAssets: TokenInfo[];
|
|
3746
3838
|
remainingAssets: TokenInfo[];
|
|
3747
3839
|
} | {
|
|
3748
3840
|
status: "NEW_BID";
|
|
3749
|
-
commitment: HexString;
|
|
3841
|
+
commitment: HexString$1;
|
|
3750
3842
|
bid: Bid;
|
|
3751
3843
|
} | {
|
|
3752
3844
|
status: "BIDS_RECEIVED";
|
|
3753
|
-
commitment: HexString;
|
|
3845
|
+
commitment: HexString$1;
|
|
3754
3846
|
bidCount: number;
|
|
3755
3847
|
bids: Bid[];
|
|
3756
3848
|
} | {
|
|
3757
3849
|
status: "BID_SELECTED";
|
|
3758
|
-
commitment: HexString;
|
|
3759
|
-
selectedSolver: HexString;
|
|
3760
|
-
userOpHash: HexString;
|
|
3850
|
+
commitment: HexString$1;
|
|
3851
|
+
selectedSolver: HexString$1;
|
|
3852
|
+
userOpHash: HexString$1;
|
|
3761
3853
|
userOp: PackedUserOperation;
|
|
3762
|
-
transactionHash?: HexString;
|
|
3854
|
+
transactionHash?: HexString$1;
|
|
3763
3855
|
} | {
|
|
3764
3856
|
status: "FILLED";
|
|
3765
|
-
commitment: HexString;
|
|
3766
|
-
userOpHash: HexString;
|
|
3767
|
-
selectedSolver: HexString;
|
|
3768
|
-
transactionHash?: HexString;
|
|
3857
|
+
commitment: HexString$1;
|
|
3858
|
+
userOpHash: HexString$1;
|
|
3859
|
+
selectedSolver: HexString$1;
|
|
3860
|
+
transactionHash?: HexString$1;
|
|
3769
3861
|
totalFilledAssets: TokenInfo[];
|
|
3770
3862
|
remainingAssets: TokenInfo[];
|
|
3771
3863
|
} | {
|
|
3772
3864
|
status: "PARTIAL_FILL";
|
|
3773
|
-
commitment: HexString;
|
|
3774
|
-
userOpHash: HexString;
|
|
3775
|
-
selectedSolver: HexString;
|
|
3776
|
-
transactionHash?: HexString;
|
|
3865
|
+
commitment: HexString$1;
|
|
3866
|
+
userOpHash: HexString$1;
|
|
3867
|
+
selectedSolver: HexString$1;
|
|
3868
|
+
transactionHash?: HexString$1;
|
|
3777
3869
|
filledAssets: TokenInfo[];
|
|
3778
3870
|
totalFilledAssets: TokenInfo[];
|
|
3779
3871
|
remainingAssets: TokenInfo[];
|
|
3780
3872
|
} | {
|
|
3781
3873
|
status: "EXPIRED";
|
|
3782
|
-
commitment: HexString;
|
|
3874
|
+
commitment: HexString$1;
|
|
3783
3875
|
totalFilledAssets?: TokenInfo[];
|
|
3784
3876
|
remainingAssets?: TokenInfo[];
|
|
3785
3877
|
error: string;
|
|
3786
3878
|
} | {
|
|
3787
3879
|
status: "FAILED";
|
|
3788
|
-
commitment?: HexString;
|
|
3880
|
+
commitment?: HexString$1;
|
|
3789
3881
|
totalFilledAssets?: TokenInfo[];
|
|
3790
3882
|
remainingAssets?: TokenInfo[];
|
|
3791
3883
|
error: string;
|
|
@@ -3793,10 +3885,10 @@ type IntentOrderStatusUpdate = {
|
|
|
3793
3885
|
/** Result of selecting a bid and submitting to the bundler */
|
|
3794
3886
|
interface SelectBidResult {
|
|
3795
3887
|
userOp: PackedUserOperation;
|
|
3796
|
-
userOpHash: HexString;
|
|
3797
|
-
solverAddress: HexString;
|
|
3798
|
-
commitment: HexString;
|
|
3799
|
-
txnHash?: HexString;
|
|
3888
|
+
userOpHash: HexString$1;
|
|
3889
|
+
solverAddress: HexString$1;
|
|
3890
|
+
commitment: HexString$1;
|
|
3891
|
+
txnHash?: HexString$1;
|
|
3800
3892
|
fillStatus?: "full" | "partial";
|
|
3801
3893
|
/** Assets filled in this user operation (best-effort, based on on-chain PartialFill logs) */
|
|
3802
3894
|
filledAssets?: TokenInfo[];
|
|
@@ -3804,7 +3896,7 @@ interface SelectBidResult {
|
|
|
3804
3896
|
/** Options for executing an intent order */
|
|
3805
3897
|
interface ExecuteIntentOrderOptions {
|
|
3806
3898
|
order: Order;
|
|
3807
|
-
sessionPrivateKey?: HexString;
|
|
3899
|
+
sessionPrivateKey?: HexString$1;
|
|
3808
3900
|
/** Duration in ms to collect bids before selecting the best one. */
|
|
3809
3901
|
auctionTimeMs: number;
|
|
3810
3902
|
pollIntervalMs?: number;
|
|
@@ -3814,19 +3906,19 @@ interface ExecuteIntentOrderOptions {
|
|
|
3814
3906
|
*/
|
|
3815
3907
|
solver?: {
|
|
3816
3908
|
/** Only bids from this address (matched against userOp.sender) will be considered */
|
|
3817
|
-
address: HexString;
|
|
3909
|
+
address: HexString$1;
|
|
3818
3910
|
/** After this many ms without a matching bid, execution falls back to any solver */
|
|
3819
3911
|
timeoutMs: number;
|
|
3820
3912
|
};
|
|
3821
3913
|
}
|
|
3822
3914
|
/** Options for resuming execution of a previously placed intent order */
|
|
3823
3915
|
interface ResumeIntentOrderOptions {
|
|
3824
|
-
sessionPrivateKey?: HexString;
|
|
3916
|
+
sessionPrivateKey?: HexString$1;
|
|
3825
3917
|
/** Duration in ms to collect bids before selecting the best one. */
|
|
3826
3918
|
auctionTimeMs: number;
|
|
3827
3919
|
pollIntervalMs?: number;
|
|
3828
3920
|
solver?: {
|
|
3829
|
-
address: HexString;
|
|
3921
|
+
address: HexString$1;
|
|
3830
3922
|
timeoutMs: number;
|
|
3831
3923
|
};
|
|
3832
3924
|
}
|
|
@@ -3872,11 +3964,11 @@ declare class Queries {
|
|
|
3872
3964
|
/**
|
|
3873
3965
|
* Queries a POST request by commitment hash.
|
|
3874
3966
|
*/
|
|
3875
|
-
queryPostRequest(commitmentHash: HexString): Promise<PostRequestWithStatus | undefined>;
|
|
3967
|
+
queryPostRequest(commitmentHash: HexString$1): Promise<PostRequestWithStatus | undefined>;
|
|
3876
3968
|
/**
|
|
3877
3969
|
* Queries a GET request by any of its associated hashes.
|
|
3878
3970
|
*/
|
|
3879
|
-
queryGetRequest(hash: HexString): Promise<GetRequestWithStatus | undefined>;
|
|
3971
|
+
queryGetRequest(hash: HexString$1): Promise<GetRequestWithStatus | undefined>;
|
|
3880
3972
|
/**
|
|
3881
3973
|
* Queries the response associated with a specific request ID and returns its commitment.
|
|
3882
3974
|
*/
|
|
@@ -3901,12 +3993,12 @@ declare class GetRequestClient {
|
|
|
3901
3993
|
/**
|
|
3902
3994
|
* Snapshot query with all inferred finality events sorted.
|
|
3903
3995
|
*/
|
|
3904
|
-
queryGetRequestWithStatus(hash: HexString): Promise<GetRequestWithStatus | undefined>;
|
|
3996
|
+
queryGetRequestWithStatus(hash: HexString$1): Promise<GetRequestWithStatus | undefined>;
|
|
3905
3997
|
/**
|
|
3906
3998
|
* Streaming status updates for a GET request. Ends when the request reaches
|
|
3907
3999
|
* the destination or a timeout becomes pending.
|
|
3908
4000
|
*/
|
|
3909
|
-
getRequestStatusStream(hash: HexString): AsyncGenerator<RequestStatusWithMetadata, void>;
|
|
4001
|
+
getRequestStatusStream(hash: HexString$1): AsyncGenerator<RequestStatusWithMetadata, void>;
|
|
3910
4002
|
private streamInternal;
|
|
3911
4003
|
/**
|
|
3912
4004
|
* Self-delivers a GET request to Hyperbridge — the request→Hyperbridge hop that would
|
|
@@ -3959,12 +4051,12 @@ declare class PostRequestClient {
|
|
|
3959
4051
|
/**
|
|
3960
4052
|
* Snapshot query: request + all inferred finality/timeout events, sorted.
|
|
3961
4053
|
*/
|
|
3962
|
-
queryRequestWithStatus(hash: HexString): Promise<PostRequestWithStatus | undefined>;
|
|
4054
|
+
queryRequestWithStatus(hash: HexString$1): Promise<PostRequestWithStatus | undefined>;
|
|
3963
4055
|
/**
|
|
3964
4056
|
* Streaming status updates for a post request. Ends when the request reaches
|
|
3965
4057
|
* the destination or a timeout becomes pending.
|
|
3966
4058
|
*/
|
|
3967
|
-
postRequestStatusStream(hash: HexString): AsyncGenerator<RequestStatusWithMetadata, void>;
|
|
4059
|
+
postRequestStatusStream(hash: HexString$1): AsyncGenerator<RequestStatusWithMetadata, void>;
|
|
3968
4060
|
private streamStatusInternal;
|
|
3969
4061
|
/**
|
|
3970
4062
|
* Populates timeout-related status events (`PENDING_TIMEOUT`,
|
|
@@ -3975,7 +4067,7 @@ declare class PostRequestClient {
|
|
|
3975
4067
|
/**
|
|
3976
4068
|
* Streaming status updates for a timed-out post request.
|
|
3977
4069
|
*/
|
|
3978
|
-
postRequestTimeoutStream(hash: HexString): AsyncGenerator<PostRequestTimeoutStatus, void>;
|
|
4070
|
+
postRequestTimeoutStream(hash: HexString$1): AsyncGenerator<PostRequestTimeoutStatus, void>;
|
|
3979
4071
|
private streamTimeoutInternal;
|
|
3980
4072
|
/**
|
|
3981
4073
|
* Snapshot helper: returns the `HYPERBRIDGE_FINALIZED` event with relayer
|
|
@@ -3999,7 +4091,7 @@ declare class PostRequestClient {
|
|
|
3999
4091
|
* Relay a post-request to Hyperbridge from source-chain state, returning
|
|
4000
4092
|
* the finalized Hyperbridge extrinsic receipt.
|
|
4001
4093
|
*/
|
|
4002
|
-
aggregateTransactionWithCommitment(commitment: HexString): Promise<Awaited<ReturnType<SubstrateChain["submitUnsigned"]>>>;
|
|
4094
|
+
aggregateTransactionWithCommitment(commitment: HexString$1): Promise<Awaited<ReturnType<SubstrateChain["submitUnsigned"]>>>;
|
|
4003
4095
|
}
|
|
4004
4096
|
|
|
4005
4097
|
/**
|
|
@@ -4107,12 +4199,12 @@ declare class IsmpClient {
|
|
|
4107
4199
|
* source/destination/hyperbridge tx hash, or timeout tx hash). Returns the
|
|
4108
4200
|
* raw indexed record without derived finality events.
|
|
4109
4201
|
*/
|
|
4110
|
-
queryPostRequest(commitmentHash: HexString): Promise<PostRequestWithStatus | undefined>;
|
|
4202
|
+
queryPostRequest(commitmentHash: HexString$1): Promise<PostRequestWithStatus | undefined>;
|
|
4111
4203
|
/**
|
|
4112
4204
|
* Queries a GET request by any of its associated hashes. Returns the raw
|
|
4113
4205
|
* indexed record without derived finality events.
|
|
4114
4206
|
*/
|
|
4115
|
-
queryGetRequest(hash: HexString): Promise<GetRequestWithStatus | undefined>;
|
|
4207
|
+
queryGetRequest(hash: HexString$1): Promise<GetRequestWithStatus | undefined>;
|
|
4116
4208
|
/**
|
|
4117
4209
|
* Queries the response a GET request's values come from, by the request's id.
|
|
4118
4210
|
* Returns the response commitment plus the indexed storage values.
|
|
@@ -4126,7 +4218,7 @@ declare class IsmpClient {
|
|
|
4126
4218
|
* Unlike {@link postRequestStatusStream} this does not poll; each call
|
|
4127
4219
|
* returns a fresh snapshot based on the indexer's current state.
|
|
4128
4220
|
*/
|
|
4129
|
-
queryRequestWithStatus(hash: HexString): Promise<PostRequestWithStatus | undefined>;
|
|
4221
|
+
queryRequestWithStatus(hash: HexString$1): Promise<PostRequestWithStatus | undefined>;
|
|
4130
4222
|
/**
|
|
4131
4223
|
* Streams status updates for a POST request as it progresses through the
|
|
4132
4224
|
* source → Hyperbridge → destination lifecycle. Ends when the request
|
|
@@ -4137,7 +4229,7 @@ declare class IsmpClient {
|
|
|
4137
4229
|
* deliver the request (bundled `handleConsensus` + `handlePostRequests` via
|
|
4138
4230
|
* `batchCall`).
|
|
4139
4231
|
*/
|
|
4140
|
-
postRequestStatusStream(hash: HexString): AsyncGenerator<RequestStatusWithMetadata, void>;
|
|
4232
|
+
postRequestStatusStream(hash: HexString$1): AsyncGenerator<RequestStatusWithMetadata, void>;
|
|
4141
4233
|
/**
|
|
4142
4234
|
* Streams timeout status updates for a POST request past its
|
|
4143
4235
|
* `timeoutTimestamp`. Drives the `PENDING_TIMEOUT →
|
|
@@ -4145,20 +4237,20 @@ declare class IsmpClient {
|
|
|
4145
4237
|
* progression, submitting unsigned extrinsics to Hyperbridge where required
|
|
4146
4238
|
* and yielding source-chain timeout calldata at the final step.
|
|
4147
4239
|
*/
|
|
4148
|
-
postRequestTimeoutStream(hash: HexString): AsyncGenerator<PostRequestTimeoutStatus, void>;
|
|
4240
|
+
postRequestTimeoutStream(hash: HexString$1): AsyncGenerator<PostRequestTimeoutStatus, void>;
|
|
4149
4241
|
/**
|
|
4150
4242
|
* Relays a POST request to Hyperbridge from source-chain state (when the
|
|
4151
4243
|
* request wasn't aggregated there yet) and returns the finalized Hyperbridge
|
|
4152
4244
|
* extrinsic receipt. Used to bootstrap status tracking for requests that
|
|
4153
4245
|
* Hyperbridge hasn't seen.
|
|
4154
4246
|
*/
|
|
4155
|
-
aggregateTransactionWithCommitment(commitment: HexString): Promise<Awaited<ReturnType<SubstrateChain["submitUnsigned"]>>>;
|
|
4247
|
+
aggregateTransactionWithCommitment(commitment: HexString$1): Promise<Awaited<ReturnType<SubstrateChain["submitUnsigned"]>>>;
|
|
4156
4248
|
/**
|
|
4157
4249
|
* Snapshot query for a GET request: returns the indexed record with all
|
|
4158
4250
|
* inferred finality events (`SOURCE_FINALIZED`, `HYPERBRIDGE_FINALIZED`)
|
|
4159
4251
|
* sorted by progress weight.
|
|
4160
4252
|
*/
|
|
4161
|
-
queryGetRequestWithStatus(hash: HexString): Promise<GetRequestWithStatus | undefined>;
|
|
4253
|
+
queryGetRequestWithStatus(hash: HexString$1): Promise<GetRequestWithStatus | undefined>;
|
|
4162
4254
|
/**
|
|
4163
4255
|
* Streams status updates for a GET request. Ends when the response is
|
|
4164
4256
|
* delivered back to the source chain or the request's timeout elapses.
|
|
@@ -4166,7 +4258,7 @@ declare class IsmpClient {
|
|
|
4166
4258
|
* submitting the response (bundled `handleConsensus` + `handleGetResponses`
|
|
4167
4259
|
* via `batchCall`).
|
|
4168
4260
|
*/
|
|
4169
|
-
getRequestStatusStream(hash: HexString): AsyncGenerator<RequestStatusWithMetadata, void>;
|
|
4261
|
+
getRequestStatusStream(hash: HexString$1): AsyncGenerator<RequestStatusWithMetadata, void>;
|
|
4170
4262
|
/**
|
|
4171
4263
|
* Low-level watcher that yields a single `PENDING_TIMEOUT` event once
|
|
4172
4264
|
* `chain.timestamp()` passes `timeoutTimestamp`. Used internally by the
|
|
@@ -4204,7 +4296,7 @@ declare function queryPostRequest(params: {
|
|
|
4204
4296
|
* @returns The asset teleported event if found, undefined otherwise
|
|
4205
4297
|
*/
|
|
4206
4298
|
declare function queryAssetTeleported(params: {
|
|
4207
|
-
id: HexString;
|
|
4299
|
+
id: HexString$1;
|
|
4208
4300
|
queryClient: IndexerQueryClient;
|
|
4209
4301
|
}): Promise<AssetTeleported | undefined>;
|
|
4210
4302
|
/**
|
|
@@ -4231,7 +4323,7 @@ type UniswapTradeType = "EXACT_INPUT" | "EXACT_OUTPUT";
|
|
|
4231
4323
|
*/
|
|
4232
4324
|
interface UniswapQuoteToken {
|
|
4233
4325
|
/** Token contract address. Use ADDRESS_ZERO for the native asset. */
|
|
4234
|
-
address: HexString;
|
|
4326
|
+
address: HexString$1;
|
|
4235
4327
|
/** Token decimals used by the integrating app when formatting quote amounts. */
|
|
4236
4328
|
decimals: number;
|
|
4237
4329
|
/** Optional display symbol, returned unchanged in quote responses. */
|
|
@@ -4263,7 +4355,7 @@ interface QuoteUniswapParams {
|
|
|
4263
4355
|
/** Slippage tolerance in basis points, only used when `recipient` is provided. */
|
|
4264
4356
|
slippageBps?: number;
|
|
4265
4357
|
/** Optional recipient. When set, executable transaction calldata is included. */
|
|
4266
|
-
recipient?: HexString;
|
|
4358
|
+
recipient?: HexString$1;
|
|
4267
4359
|
}
|
|
4268
4360
|
/**
|
|
4269
4361
|
* Normalized quote returned by every Uniswap protocol adapter.
|
|
@@ -4287,7 +4379,7 @@ interface UniswapQuote {
|
|
|
4287
4379
|
fee?: number;
|
|
4288
4380
|
/** Token path used by the quote. */
|
|
4289
4381
|
route: {
|
|
4290
|
-
tokens: HexString[];
|
|
4382
|
+
tokens: HexString$1[];
|
|
4291
4383
|
};
|
|
4292
4384
|
/** Executable transactions, included only when `recipient` is supplied. */
|
|
4293
4385
|
transactions?: Transaction[];
|
|
@@ -4310,36 +4402,36 @@ declare class Swap {
|
|
|
4310
4402
|
/**
|
|
4311
4403
|
* Gets V2 quote for exact output swap.
|
|
4312
4404
|
*/
|
|
4313
|
-
getV2QuoteWithAmountOut(client: PublicClient, tokenIn: HexString, tokenOut: HexString, amountOut: bigint, evmChainID: string): Promise<bigint>;
|
|
4405
|
+
getV2QuoteWithAmountOut(client: PublicClient, tokenIn: HexString$1, tokenOut: HexString$1, amountOut: bigint, evmChainID: string): Promise<bigint>;
|
|
4314
4406
|
/**
|
|
4315
4407
|
* Gets V2 quote for exact input swap.
|
|
4316
4408
|
*/
|
|
4317
|
-
getV2QuoteWithAmountIn(client: PublicClient, tokenIn: HexString, tokenOut: HexString, amountIn: bigint, evmChainID: string): Promise<bigint>;
|
|
4409
|
+
getV2QuoteWithAmountIn(client: PublicClient, tokenIn: HexString$1, tokenOut: HexString$1, amountIn: bigint, evmChainID: string): Promise<bigint>;
|
|
4318
4410
|
/**
|
|
4319
4411
|
* Gets V3 quote for exact output swap.
|
|
4320
4412
|
*/
|
|
4321
|
-
getV3QuoteWithAmountOut(client: PublicClient, tokenIn: HexString, tokenOut: HexString, amountOut: bigint, evmChainID: string): Promise<{
|
|
4413
|
+
getV3QuoteWithAmountOut(client: PublicClient, tokenIn: HexString$1, tokenOut: HexString$1, amountOut: bigint, evmChainID: string): Promise<{
|
|
4322
4414
|
amountIn: bigint;
|
|
4323
4415
|
fee: number;
|
|
4324
4416
|
}>;
|
|
4325
4417
|
/**
|
|
4326
4418
|
* Gets V3 quote for exact input swap.
|
|
4327
4419
|
*/
|
|
4328
|
-
getV3QuoteWithAmountIn(client: PublicClient, tokenIn: HexString, tokenOut: HexString, amountIn: bigint, evmChainID: string): Promise<{
|
|
4420
|
+
getV3QuoteWithAmountIn(client: PublicClient, tokenIn: HexString$1, tokenOut: HexString$1, amountIn: bigint, evmChainID: string): Promise<{
|
|
4329
4421
|
amountOut: bigint;
|
|
4330
4422
|
fee: number;
|
|
4331
4423
|
}>;
|
|
4332
4424
|
/**
|
|
4333
4425
|
* Gets V4 quote for exact output swap.
|
|
4334
4426
|
*/
|
|
4335
|
-
getV4QuoteWithAmountOut(client: PublicClient, tokenIn: HexString, tokenOut: HexString, amountOut: bigint, evmChainID: string): Promise<{
|
|
4427
|
+
getV4QuoteWithAmountOut(client: PublicClient, tokenIn: HexString$1, tokenOut: HexString$1, amountOut: bigint, evmChainID: string): Promise<{
|
|
4336
4428
|
amountIn: bigint;
|
|
4337
4429
|
fee: number;
|
|
4338
4430
|
}>;
|
|
4339
4431
|
/**
|
|
4340
4432
|
* Gets V4 quote for exact input swap.
|
|
4341
4433
|
*/
|
|
4342
|
-
getV4QuoteWithAmountIn(client: PublicClient, tokenIn: HexString, tokenOut: HexString, amountIn: bigint, evmChainID: string): Promise<{
|
|
4434
|
+
getV4QuoteWithAmountIn(client: PublicClient, tokenIn: HexString$1, tokenOut: HexString$1, amountIn: bigint, evmChainID: string): Promise<{
|
|
4343
4435
|
amountOut: bigint;
|
|
4344
4436
|
fee: number;
|
|
4345
4437
|
}>;
|
|
@@ -4347,30 +4439,30 @@ declare class Swap {
|
|
|
4347
4439
|
* Creates transaction structure for V2 exact input swap, including ERC20 transfer if needed.
|
|
4348
4440
|
* Supports both single-hop and multi-hop swaps.
|
|
4349
4441
|
*/
|
|
4350
|
-
createV2SwapCalldataExactIn(path: HexString[], amountIn: bigint, amountOutMinimum: bigint, recipient: HexString, evmChainID: string): Transaction[];
|
|
4442
|
+
createV2SwapCalldataExactIn(path: HexString$1[], amountIn: bigint, amountOutMinimum: bigint, recipient: HexString$1, evmChainID: string): Transaction[];
|
|
4351
4443
|
/**
|
|
4352
4444
|
* Creates transaction structure for V2 exact output swap, including ERC20 transfer if needed.
|
|
4353
4445
|
* Supports both single-hop and multi-hop swaps.
|
|
4354
4446
|
*/
|
|
4355
|
-
createV2SwapCalldataExactOut(path: HexString[], amountOut: bigint, amountInMax: bigint, recipient: HexString, evmChainID: string): Transaction[];
|
|
4447
|
+
createV2SwapCalldataExactOut(path: HexString$1[], amountOut: bigint, amountInMax: bigint, recipient: HexString$1, evmChainID: string): Transaction[];
|
|
4356
4448
|
/**
|
|
4357
4449
|
* Creates transaction structure for V3 exact input swap, including ERC20 transfer if needed.
|
|
4358
4450
|
* Supports both single-hop and multi-hop swaps.
|
|
4359
4451
|
*/
|
|
4360
|
-
createV3SwapCalldataExactIn(path: HexString[], amountIn: bigint, amountOutMinimum: bigint, fees: number[], recipient: HexString, evmChainID: string): Transaction[];
|
|
4452
|
+
createV3SwapCalldataExactIn(path: HexString$1[], amountIn: bigint, amountOutMinimum: bigint, fees: number[], recipient: HexString$1, evmChainID: string): Transaction[];
|
|
4361
4453
|
/**
|
|
4362
4454
|
* Creates transaction structure for V3 exact output swap, including ERC20 transfer if needed.
|
|
4363
4455
|
* Supports both single-hop and multi-hop swaps.
|
|
4364
4456
|
*/
|
|
4365
|
-
createV3SwapCalldataExactOut(path: HexString[], amountOut: bigint, amountInMax: bigint, fees: number[], recipient: HexString, evmChainID: string): Transaction[];
|
|
4457
|
+
createV3SwapCalldataExactOut(path: HexString$1[], amountOut: bigint, amountInMax: bigint, fees: number[], recipient: HexString$1, evmChainID: string): Transaction[];
|
|
4366
4458
|
/**
|
|
4367
4459
|
* Creates transaction structure for V4 exact input swap, including Permit2 approvals for ERC20 tokens.
|
|
4368
4460
|
*/
|
|
4369
|
-
createV4SwapCalldataExactIn(sourceTokenAddress: HexString, targetTokenAddress: HexString, amountIn: bigint, amountOutMinimum: bigint, fee: number, evmChainID: string): Transaction[];
|
|
4461
|
+
createV4SwapCalldataExactIn(sourceTokenAddress: HexString$1, targetTokenAddress: HexString$1, amountIn: bigint, amountOutMinimum: bigint, fee: number, evmChainID: string): Transaction[];
|
|
4370
4462
|
/**
|
|
4371
4463
|
* Creates transaction structure for V4 exact output swap, including Permit2 approvals for ERC20 tokens.
|
|
4372
4464
|
*/
|
|
4373
|
-
createV4SwapCalldataExactOut(sourceTokenAddress: HexString, targetTokenAddress: HexString, amountOut: bigint, amountInMax: bigint, fee: number, evmChainID: string): Transaction[];
|
|
4465
|
+
createV4SwapCalldataExactOut(sourceTokenAddress: HexString$1, targetTokenAddress: HexString$1, amountOut: bigint, amountInMax: bigint, fee: number, evmChainID: string): Transaction[];
|
|
4374
4466
|
/**
|
|
4375
4467
|
* Finds the best Uniswap protocol (V2, V3, or V4) for swapping tokens given a desired output amount.
|
|
4376
4468
|
* Compares liquidity and pricing across different protocols and fee tiers.
|
|
@@ -4381,10 +4473,10 @@ declare class Swap {
|
|
|
4381
4473
|
* @param amountOut - The desired output amount
|
|
4382
4474
|
* @returns Object containing the best protocol, required input amount, fee tier (for V3/V4), and transaction structure
|
|
4383
4475
|
*/
|
|
4384
|
-
findBestProtocolWithAmountOut(client: PublicClient, tokenIn: HexString, tokenOut: HexString, amountOut: bigint, evmChainID: string, options?: {
|
|
4476
|
+
findBestProtocolWithAmountOut(client: PublicClient, tokenIn: HexString$1, tokenOut: HexString$1, amountOut: bigint, evmChainID: string, options?: {
|
|
4385
4477
|
selectedProtocol?: "v2" | "v3" | "v4";
|
|
4386
4478
|
generateCalldata?: boolean;
|
|
4387
|
-
recipient?: HexString;
|
|
4479
|
+
recipient?: HexString$1;
|
|
4388
4480
|
}): Promise<{
|
|
4389
4481
|
protocol: "v2" | "v3" | "v4" | null;
|
|
4390
4482
|
amountIn: bigint;
|
|
@@ -4403,10 +4495,10 @@ declare class Swap {
|
|
|
4403
4495
|
* @param selectedProtocol - Optional specific protocol to use ("v2", "v3", or "v4")
|
|
4404
4496
|
* @returns Object containing the best protocol, expected output amount, fee tier (for V3/V4), and transaction structure
|
|
4405
4497
|
*/
|
|
4406
|
-
findBestProtocolWithAmountIn(client: PublicClient, tokenIn: HexString, tokenOut: HexString, amountIn: bigint, evmChainID: string, options?: {
|
|
4498
|
+
findBestProtocolWithAmountIn(client: PublicClient, tokenIn: HexString$1, tokenOut: HexString$1, amountIn: bigint, evmChainID: string, options?: {
|
|
4407
4499
|
selectedProtocol?: "v2" | "v3" | "v4";
|
|
4408
4500
|
generateCalldata?: boolean;
|
|
4409
|
-
recipient?: HexString;
|
|
4501
|
+
recipient?: HexString$1;
|
|
4410
4502
|
}): Promise<{
|
|
4411
4503
|
protocol: "v2" | "v3" | "v4" | null;
|
|
4412
4504
|
amountOut: bigint;
|
|
@@ -4417,9 +4509,9 @@ declare class Swap {
|
|
|
4417
4509
|
* Finds the best pair for multi-hop swaps based on popular tokens and liquidity.
|
|
4418
4510
|
* Prefers pairs with tokenIn as intermediate token, then returns the pair with highest liquidity.
|
|
4419
4511
|
*/
|
|
4420
|
-
findPair(client: PublicClient, tokenIn: HexString, tokenOut: HexString, evmChainID: string, protocol?: "v2" | "v3"): Promise<{
|
|
4421
|
-
pairAddress: HexString;
|
|
4422
|
-
intermediateToken: HexString;
|
|
4512
|
+
findPair(client: PublicClient, tokenIn: HexString$1, tokenOut: HexString$1, evmChainID: string, protocol?: "v2" | "v3"): Promise<{
|
|
4513
|
+
pairAddress: HexString$1;
|
|
4514
|
+
intermediateToken: HexString$1;
|
|
4423
4515
|
}>;
|
|
4424
4516
|
/**
|
|
4425
4517
|
* Gets pair address for V2 or V3 based on protocol parameter
|
|
@@ -4430,7 +4522,7 @@ declare class Swap {
|
|
|
4430
4522
|
* Gets the best V3 pool based on liquidity across different fee tiers
|
|
4431
4523
|
*/
|
|
4432
4524
|
private getBestV3Pool;
|
|
4433
|
-
createMultiHopSwapThroughPair(client: PublicClient, tokenIn: HexString, tokenOut: HexString, amountIn: bigint, evmChainID: string, recipient: HexString, protocol: "v2" | "v3" | undefined, slippagePercentage: bigint, dexPairAddress?: HexString): Promise<{
|
|
4525
|
+
createMultiHopSwapThroughPair(client: PublicClient, tokenIn: HexString$1, tokenOut: HexString$1, amountIn: bigint, evmChainID: string, recipient: HexString$1, protocol: "v2" | "v3" | undefined, slippagePercentage: bigint, dexPairAddress?: HexString$1): Promise<{
|
|
4434
4526
|
finalAmountOut: bigint;
|
|
4435
4527
|
calldata: Transaction[];
|
|
4436
4528
|
}>;
|
|
@@ -4574,17 +4666,17 @@ interface SessionKeyData {
|
|
|
4574
4666
|
/**
|
|
4575
4667
|
* The private key as a hex string
|
|
4576
4668
|
*/
|
|
4577
|
-
privateKey: HexString;
|
|
4669
|
+
privateKey: HexString$1;
|
|
4578
4670
|
/**
|
|
4579
4671
|
* The derived public address
|
|
4580
4672
|
*/
|
|
4581
|
-
address: HexString;
|
|
4673
|
+
address: HexString$1;
|
|
4582
4674
|
/**
|
|
4583
4675
|
* The order commitment this session key is associated with.
|
|
4584
4676
|
* This may be undefined for session keys that were created
|
|
4585
4677
|
* but whose corresponding order has not been finalized yet.
|
|
4586
4678
|
*/
|
|
4587
|
-
commitment?: HexString;
|
|
4679
|
+
commitment?: HexString$1;
|
|
4588
4680
|
/**
|
|
4589
4681
|
* Timestamp when the session key was created
|
|
4590
4682
|
*/
|
|
@@ -4599,12 +4691,12 @@ interface SessionKeyData {
|
|
|
4599
4691
|
* @returns A storage instance with methods to get, set, and remove session keys
|
|
4600
4692
|
*/
|
|
4601
4693
|
declare function createSessionKeyStorage(options?: SessionKeyStorageOptions): Readonly<{
|
|
4602
|
-
getSessionKey: (commitment: HexString) => Promise<SessionKeyData | null>;
|
|
4603
|
-
getSessionKeyByAddress: (address: HexString) => Promise<SessionKeyData | null>;
|
|
4604
|
-
setSessionKey: (commitment: HexString, data: SessionKeyData) => Promise<void>;
|
|
4605
|
-
setSessionKeyByAddress: (address: HexString, data: SessionKeyData) => Promise<void>;
|
|
4606
|
-
removeSessionKey: (commitment: HexString) => Promise<void>;
|
|
4607
|
-
removeSessionKeyByAddress: (address: HexString) => Promise<void>;
|
|
4694
|
+
getSessionKey: (commitment: HexString$1) => Promise<SessionKeyData | null>;
|
|
4695
|
+
getSessionKeyByAddress: (address: HexString$1) => Promise<SessionKeyData | null>;
|
|
4696
|
+
setSessionKey: (commitment: HexString$1, data: SessionKeyData) => Promise<void>;
|
|
4697
|
+
setSessionKeyByAddress: (address: HexString$1, data: SessionKeyData) => Promise<void>;
|
|
4698
|
+
removeSessionKey: (commitment: HexString$1) => Promise<void>;
|
|
4699
|
+
removeSessionKeyByAddress: (address: HexString$1) => Promise<void>;
|
|
4608
4700
|
listSessionKeys: () => Promise<SessionKeyData[]>;
|
|
4609
4701
|
}>;
|
|
4610
4702
|
|
|
@@ -4624,7 +4716,7 @@ declare const ORDER_V2_PARAM_TYPE = "(bytes32,bytes,bytes,uint256,uint256,uint25
|
|
|
4624
4716
|
* The first byte `0x01` indicates batch mode; all remaining bytes are
|
|
4625
4717
|
* reserved and set to zero.
|
|
4626
4718
|
*/
|
|
4627
|
-
declare const ERC7821_BATCH_MODE: HexString;
|
|
4719
|
+
declare const ERC7821_BATCH_MODE: HexString$1;
|
|
4628
4720
|
/**
|
|
4629
4721
|
* Bundler RPC method names for ERC-4337 operations.
|
|
4630
4722
|
*
|
|
@@ -4653,15 +4745,15 @@ type BundlerMethod = (typeof BundlerMethod)[keyof typeof BundlerMethod];
|
|
|
4653
4745
|
*/
|
|
4654
4746
|
interface BundlerGasEstimate {
|
|
4655
4747
|
/** Gas required for pre-verification processing (hex). */
|
|
4656
|
-
preVerificationGas: HexString;
|
|
4748
|
+
preVerificationGas: HexString$1;
|
|
4657
4749
|
/** Gas limit for the account verification step (hex). */
|
|
4658
|
-
verificationGasLimit: HexString;
|
|
4750
|
+
verificationGasLimit: HexString$1;
|
|
4659
4751
|
/** Gas limit for the main execution call (hex). */
|
|
4660
|
-
callGasLimit: HexString;
|
|
4752
|
+
callGasLimit: HexString$1;
|
|
4661
4753
|
/** Gas limit for paymaster verification, if a paymaster is used (hex). */
|
|
4662
|
-
paymasterVerificationGasLimit?: HexString;
|
|
4754
|
+
paymasterVerificationGasLimit?: HexString$1;
|
|
4663
4755
|
/** Gas limit for paymaster post-operation hook, if a paymaster is used (hex). */
|
|
4664
|
-
paymasterPostOpGasLimit?: HexString;
|
|
4756
|
+
paymasterPostOpGasLimit?: HexString$1;
|
|
4665
4757
|
}
|
|
4666
4758
|
/**
|
|
4667
4759
|
* Tagged union of all status updates that can be yielded by the cancel-order
|
|
@@ -4683,8 +4775,8 @@ type CancelEvent = {
|
|
|
4683
4775
|
proof: IProof;
|
|
4684
4776
|
} | {
|
|
4685
4777
|
status: "AWAITING_CANCEL_TRANSACTION";
|
|
4686
|
-
data: HexString;
|
|
4687
|
-
to: HexString;
|
|
4778
|
+
data: HexString$1;
|
|
4779
|
+
to: HexString$1;
|
|
4688
4780
|
value: bigint;
|
|
4689
4781
|
} | {
|
|
4690
4782
|
status: "CANCEL_STARTED";
|
|
@@ -4707,7 +4799,7 @@ type CancelEvent = {
|
|
|
4707
4799
|
} | {
|
|
4708
4800
|
status: "CANCELLATION_COMPLETE";
|
|
4709
4801
|
blockNumber: number;
|
|
4710
|
-
transactionHash: HexString;
|
|
4802
|
+
transactionHash: HexString$1;
|
|
4711
4803
|
};
|
|
4712
4804
|
|
|
4713
4805
|
/**
|
|
@@ -4731,7 +4823,7 @@ interface IntentGatewayContext {
|
|
|
4731
4823
|
* Stores fee-token address, decimals, and the timestamp of the last fetch.
|
|
4732
4824
|
*/
|
|
4733
4825
|
feeTokenCache: Map<string, {
|
|
4734
|
-
address: HexString;
|
|
4826
|
+
address: HexString$1;
|
|
4735
4827
|
decimals: number;
|
|
4736
4828
|
cachedAt: number;
|
|
4737
4829
|
}>;
|
|
@@ -4756,23 +4848,23 @@ type IntentQuoteTradeType = "EXACT_INPUT" | "EXACT_OUTPUT";
|
|
|
4756
4848
|
* Full Uniswap V4 PoolKey. V4 pools cannot be discovered from a token pair alone.
|
|
4757
4849
|
*/
|
|
4758
4850
|
interface UniswapV4PoolKey {
|
|
4759
|
-
currency0: HexString;
|
|
4760
|
-
currency1: HexString;
|
|
4851
|
+
currency0: HexString$1;
|
|
4852
|
+
currency1: HexString$1;
|
|
4761
4853
|
fee: number;
|
|
4762
4854
|
tickSpacing: number;
|
|
4763
|
-
hooks: HexString;
|
|
4855
|
+
hooks: HexString$1;
|
|
4764
4856
|
}
|
|
4765
4857
|
interface UniswapV4IntentQuoteOptions {
|
|
4766
4858
|
/** Explicit pool override for pairs not yet present in SDK chain config. */
|
|
4767
4859
|
poolKey?: UniswapV4PoolKey & {
|
|
4768
|
-
quoterAddress?: HexString;
|
|
4860
|
+
quoterAddress?: HexString$1;
|
|
4769
4861
|
/**
|
|
4770
4862
|
* Destination-side address of the input currency. Defaults to
|
|
4771
4863
|
* `tokenIn`, which only works for same-chain quotes; pass this
|
|
4772
4864
|
* explicitly when source and destination chains differ. Must equal
|
|
4773
4865
|
* `currency0` or `currency1`.
|
|
4774
4866
|
*/
|
|
4775
|
-
currencyIn?: HexString;
|
|
4867
|
+
currencyIn?: HexString$1;
|
|
4776
4868
|
};
|
|
4777
4869
|
}
|
|
4778
4870
|
/**
|
|
@@ -4787,9 +4879,9 @@ interface UniswapV4IntentQuoteOptions {
|
|
|
4787
4879
|
interface QuoteIntentParams {
|
|
4788
4880
|
strategy?: IntentQuoteStrategy;
|
|
4789
4881
|
/** Token address on the source chain. */
|
|
4790
|
-
tokenIn: HexString;
|
|
4882
|
+
tokenIn: HexString$1;
|
|
4791
4883
|
/** Token address on the destination chain. */
|
|
4792
|
-
tokenOut: HexString;
|
|
4884
|
+
tokenOut: HexString$1;
|
|
4793
4885
|
amountIn?: bigint;
|
|
4794
4886
|
amountOut?: bigint;
|
|
4795
4887
|
uniswapV4?: UniswapV4IntentQuoteOptions;
|
|
@@ -4798,7 +4890,7 @@ interface UniswapV4IntentQuoteMetadata {
|
|
|
4798
4890
|
/** Chain whose Uniswap pool and quoter were used for the quote. */
|
|
4799
4891
|
quoteChain: string;
|
|
4800
4892
|
poolKey: UniswapV4PoolKey;
|
|
4801
|
-
quoterAddress: HexString;
|
|
4893
|
+
quoterAddress: HexString$1;
|
|
4802
4894
|
/**
|
|
4803
4895
|
* IntentGateway protocol fee on the source chain, already applied to the
|
|
4804
4896
|
* returned amounts. Exposed so callers can reconstruct the swap-side
|
|
@@ -4810,9 +4902,9 @@ interface PhantomSnapshotIntentQuoteMetadata {
|
|
|
4810
4902
|
/** Canonical chain whose directional Phantom pair addresses identify the feed. */
|
|
4811
4903
|
quoteChain: string;
|
|
4812
4904
|
/** Phantom order whose bids produced this snapshot. */
|
|
4813
|
-
commitment: HexString;
|
|
4814
|
-
tokenA: HexString;
|
|
4815
|
-
tokenB: HexString;
|
|
4905
|
+
commitment: HexString$1;
|
|
4906
|
+
tokenA: HexString$1;
|
|
4907
|
+
tokenB: HexString$1;
|
|
4816
4908
|
/** Benchmark input and liquidity-weighted median output, both in raw token units. */
|
|
4817
4909
|
standardAmount: bigint;
|
|
4818
4910
|
medianPrice: bigint;
|
|
@@ -4853,16 +4945,16 @@ declare class UnsupportedIntentQuotePairError extends Error {
|
|
|
4853
4945
|
constructor(params: {
|
|
4854
4946
|
source: string;
|
|
4855
4947
|
destination: string;
|
|
4856
|
-
tokenIn: HexString;
|
|
4857
|
-
tokenOut: HexString;
|
|
4948
|
+
tokenIn: HexString$1;
|
|
4949
|
+
tokenOut: HexString$1;
|
|
4858
4950
|
quoteSource?: string;
|
|
4859
4951
|
});
|
|
4860
4952
|
}
|
|
4861
4953
|
declare class PhantomSnapshotUnavailableError extends Error {
|
|
4862
|
-
constructor(tokenA: HexString, tokenB: HexString);
|
|
4954
|
+
constructor(tokenA: HexString$1, tokenB: HexString$1);
|
|
4863
4955
|
}
|
|
4864
4956
|
declare class InvalidPhantomSnapshotError extends Error {
|
|
4865
|
-
constructor(commitment: HexString, reason: string);
|
|
4957
|
+
constructor(commitment: HexString$1, reason: string);
|
|
4866
4958
|
}
|
|
4867
4959
|
|
|
4868
4960
|
/**
|
|
@@ -4988,14 +5080,22 @@ declare class IntentGateway {
|
|
|
4988
5080
|
* placement, fee estimation, bid collection, and execution.
|
|
4989
5081
|
*
|
|
4990
5082
|
* **Yield/receive protocol:**
|
|
4991
|
-
* 1. If `order.fees` is unset or zero,
|
|
4992
|
-
*
|
|
4993
|
-
*
|
|
4994
|
-
*
|
|
4995
|
-
* the whole sum — strictly above the solver's
|
|
4996
|
-
*
|
|
4997
|
-
*
|
|
4998
|
-
*
|
|
5083
|
+
* 1. If `order.fees` is unset or zero, prices the fee on an internal copy
|
|
5084
|
+
* via {@link quoteOrderFees}: same-chain fees are twice the fill-gas
|
|
5085
|
+
* estimate without a gas-price bump; cross-chain gas is priced 10% above
|
|
5086
|
+
* the live price before attaching (fill gas + the settlement relayer fee)
|
|
5087
|
+
* with a further 5% buffer over the whole sum — strictly above the solver's
|
|
5088
|
+
* unpadded requirement. Direct solver estimates remain unbumped. The wei
|
|
5089
|
+
* cost used for the `value` field receives a 2% buffer.
|
|
5090
|
+
* 2. Yields `AWAITING_PLACE_ORDER` with `{ to, data, value, nativeFee,
|
|
5091
|
+
* feeTokenAmount, feeTokenAddress, sessionPrivateKey }`. `value` carries
|
|
5092
|
+
* only the order's native-token input amounts; `nativeFee` is the native
|
|
5093
|
+
* amount that funds `order.fees` (`0n` when the caller set `order.fees`);
|
|
5094
|
+
* `feeTokenAmount`/`feeTokenAddress` are the exact fee encoded in `data`
|
|
5095
|
+
* and the source-chain token it is charged in. To pay the fee in native
|
|
5096
|
+
* token, sign the transaction with `value + nativeFee`; with a fee-token
|
|
5097
|
+
* allowance, `value` alone. Pass the signed transaction back via
|
|
5098
|
+
* `gen.next(signedTx)`.
|
|
4999
5099
|
* 3. Yields `ORDER_PLACED` with the finalised order and transaction hash once
|
|
5000
5100
|
* the `OrderPlaced` event is confirmed.
|
|
5001
5101
|
* 4. Delegates to {@link OrderExecutor.executeOrder} and forwards all
|
|
@@ -5014,16 +5114,16 @@ declare class IntentGateway {
|
|
|
5014
5114
|
* @throws If the `placeOrder` generator behaves unexpectedly, or if gas
|
|
5015
5115
|
* estimation returns zero.
|
|
5016
5116
|
*/
|
|
5017
|
-
execute(order: Order, graffiti: HexString | undefined, options: {
|
|
5117
|
+
execute(order: Order, graffiti: HexString$1 | undefined, options: {
|
|
5018
5118
|
auctionTimeMs: number;
|
|
5019
5119
|
maxPriorityFeePerGasBumpPercent?: number;
|
|
5020
5120
|
maxFeePerGasBumpPercent?: number;
|
|
5021
5121
|
pollIntervalMs?: number;
|
|
5022
5122
|
solver?: {
|
|
5023
|
-
address: HexString;
|
|
5123
|
+
address: HexString$1;
|
|
5024
5124
|
timeoutMs: number;
|
|
5025
5125
|
};
|
|
5026
|
-
}): AsyncGenerator<IntentOrderStatusUpdate, void, HexString | SelectBidResult | undefined>;
|
|
5126
|
+
}): AsyncGenerator<IntentOrderStatusUpdate, void, HexString$1 | SelectBidResult | undefined>;
|
|
5027
5127
|
/**
|
|
5028
5128
|
* Forwards updates from the executor's bidirectional generator to the caller,
|
|
5029
5129
|
* threading the {@link SelectBidResult} the caller feeds back after a
|
|
@@ -5076,16 +5176,16 @@ declare class IntentGateway {
|
|
|
5076
5176
|
* @param options - Same tuning parameters as {@link execute}.
|
|
5077
5177
|
* @yields {@link IntentOrderStatusUpdate} at each lifecycle stage.
|
|
5078
5178
|
*/
|
|
5079
|
-
executeBest(order: Order, graffiti: HexString | undefined, options: {
|
|
5179
|
+
executeBest(order: Order, graffiti: HexString$1 | undefined, options: {
|
|
5080
5180
|
auctionTimeMs: number;
|
|
5081
5181
|
maxPriorityFeePerGasBumpPercent?: number;
|
|
5082
5182
|
maxFeePerGasBumpPercent?: number;
|
|
5083
5183
|
pollIntervalMs?: number;
|
|
5084
5184
|
solver?: {
|
|
5085
|
-
address: HexString;
|
|
5185
|
+
address: HexString$1;
|
|
5086
5186
|
timeoutMs: number;
|
|
5087
5187
|
};
|
|
5088
|
-
}): AsyncGenerator<IntentOrderStatusUpdate, void, HexString>;
|
|
5188
|
+
}): AsyncGenerator<IntentOrderStatusUpdate, void, HexString$1>;
|
|
5089
5189
|
/**
|
|
5090
5190
|
* Batteries-included variant of {@link resume}: auto-selects the best bid each
|
|
5091
5191
|
* round via {@link selectAndExecuteBest}, with no bid-selection input from the
|
|
@@ -5159,7 +5259,7 @@ declare class IntentGateway {
|
|
|
5159
5259
|
* storage by `order.session` if omitted.
|
|
5160
5260
|
* @returns Array of executable {@link Bid} objects.
|
|
5161
5261
|
*/
|
|
5162
|
-
buildBids(order: Order, bids: FillerBid[], sessionPrivateKey?: HexString): Bid[];
|
|
5262
|
+
buildBids(order: Order, bids: FillerBid[], sessionPrivateKey?: HexString$1): Bid[];
|
|
5163
5263
|
/**
|
|
5164
5264
|
* Sorts bids by output value using the same strategy the autopilot uses.
|
|
5165
5265
|
*
|
|
@@ -5196,7 +5296,7 @@ declare class IntentGateway {
|
|
|
5196
5296
|
* @returns A {@link SelectBidResult} with the submitted UserOperation, hashes,
|
|
5197
5297
|
* and fill status.
|
|
5198
5298
|
*/
|
|
5199
|
-
selectBid(order: Order, bids: FillerBid[], sessionPrivateKey?: HexString): Promise<SelectBidResult>;
|
|
5299
|
+
selectBid(order: Order, bids: FillerBid[], sessionPrivateKey?: HexString$1): Promise<SelectBidResult>;
|
|
5200
5300
|
/**
|
|
5201
5301
|
* Estimates the gas cost for filling the given order, returning individual
|
|
5202
5302
|
* gas components and fee-token-denominated totals.
|
|
@@ -5208,6 +5308,30 @@ declare class IntentGateway {
|
|
|
5208
5308
|
* @returns A {@link FillOrderEstimate} with all gas components.
|
|
5209
5309
|
*/
|
|
5210
5310
|
estimateFillOrder(params: EstimateFillOrderParams): Promise<FillOrderEstimate>;
|
|
5311
|
+
/**
|
|
5312
|
+
* Quotes the solver fee for an order using the same policy {@link execute} /
|
|
5313
|
+
* {@link executeBest} apply when `order.fees` is `0n`.
|
|
5314
|
+
*
|
|
5315
|
+
* Use this before placing to display the fee, or to check what the user can
|
|
5316
|
+
* afford: pay `fees` in the source-chain fee token (check balance and
|
|
5317
|
+
* allowance, then set `order.fees` and submit with `value: 0`), or leave
|
|
5318
|
+
* `order.fees` at `0n` and let the SDK attach `nativeValue` to the placement
|
|
5319
|
+
* transaction (check the native balance).
|
|
5320
|
+
*
|
|
5321
|
+
* @param order - The order to quote. `order.fees` is ignored and not mutated.
|
|
5322
|
+
* Gas prices used to derive cross-chain `fees` receive 10% SDK-only headroom.
|
|
5323
|
+
* Same-chain quotes and direct calls to {@link estimateFillOrder}, including
|
|
5324
|
+
* Simplex solver estimates, remain unbumped.
|
|
5325
|
+
*
|
|
5326
|
+
* @param options - Optional transaction gas-price bump percentages, as in {@link execute}.
|
|
5327
|
+
* @returns An {@link OrderFeesQuote} with the fee-token amount, the native
|
|
5328
|
+
* value for the native rail, and the underlying estimate.
|
|
5329
|
+
* @throws If gas estimation returns zero.
|
|
5330
|
+
*/
|
|
5331
|
+
quoteOrderFees(order: Order, options?: {
|
|
5332
|
+
maxPriorityFeePerGasBumpPercent?: number;
|
|
5333
|
+
maxFeePerGasBumpPercent?: number;
|
|
5334
|
+
}): Promise<OrderFeesQuote>;
|
|
5211
5335
|
/**
|
|
5212
5336
|
* Encodes a list of calls into ERC-7821 `execute` calldata using
|
|
5213
5337
|
* single-batch mode.
|
|
@@ -5217,7 +5341,7 @@ declare class IntentGateway {
|
|
|
5217
5341
|
* @param calls - Ordered list of calls to batch.
|
|
5218
5342
|
* @returns ABI-encoded calldata for the ERC-7821 `execute` function.
|
|
5219
5343
|
*/
|
|
5220
|
-
encodeERC7821Execute(calls: ERC7821Call[]): HexString;
|
|
5344
|
+
encodeERC7821Execute(calls: ERC7821Call[]): HexString$1;
|
|
5221
5345
|
/**
|
|
5222
5346
|
* Decodes ERC-7821 `execute` calldata back into its constituent calls.
|
|
5223
5347
|
*
|
|
@@ -5226,7 +5350,7 @@ declare class IntentGateway {
|
|
|
5226
5350
|
* @param callData - Hex-encoded calldata to decode.
|
|
5227
5351
|
* @returns Array of decoded {@link ERC7821Call} objects, or `null` on failure.
|
|
5228
5352
|
*/
|
|
5229
|
-
decodeERC7821Execute(callData: HexString): ERC7821Call[] | null;
|
|
5353
|
+
decodeERC7821Execute(callData: HexString$1): ERC7821Call[] | null;
|
|
5230
5354
|
/**
|
|
5231
5355
|
* Checks whether an order has been filled on the destination chain.
|
|
5232
5356
|
*
|
|
@@ -5275,14 +5399,14 @@ declare class IntentGateway {
|
|
|
5275
5399
|
*
|
|
5276
5400
|
* Requires a prior call to {@link withQueryClient}.
|
|
5277
5401
|
*/
|
|
5278
|
-
queryOrder(commitment: HexString): Promise<OrderWithStatus | undefined>;
|
|
5402
|
+
queryOrder(commitment: HexString$1): Promise<OrderWithStatus | undefined>;
|
|
5279
5403
|
/**
|
|
5280
5404
|
* Streams status updates for an order until it reaches a terminal state
|
|
5281
5405
|
* (FILLED, REDEEMED, or REFUNDED).
|
|
5282
5406
|
*
|
|
5283
5407
|
* Requires a prior call to {@link withQueryClient}.
|
|
5284
5408
|
*/
|
|
5285
|
-
orderStatusStream(commitment: HexString): AsyncGenerator<{
|
|
5409
|
+
orderStatusStream(commitment: HexString$1): AsyncGenerator<{
|
|
5286
5410
|
status: OrderStatus;
|
|
5287
5411
|
metadata: {
|
|
5288
5412
|
blockHash: string;
|
|
@@ -5331,12 +5455,12 @@ declare class OrderStatusChecker {
|
|
|
5331
5455
|
isOrderRefunded(order: Order): Promise<boolean>;
|
|
5332
5456
|
}
|
|
5333
5457
|
|
|
5334
|
-
declare function encodeERC7821ExecuteBatch(calls: ERC7821Call[]): HexString;
|
|
5335
|
-
declare function decodeERC7821ExecuteBatch(callData: HexString): ERC7821Call[] | null;
|
|
5458
|
+
declare function encodeERC7821ExecuteBatch(calls: ERC7821Call[]): HexString$1;
|
|
5459
|
+
declare function decodeERC7821ExecuteBatch(callData: HexString$1): ERC7821Call[] | null;
|
|
5336
5460
|
|
|
5337
5461
|
type ContractOrder = Omit<Order, "id" | "source" | "destination"> & {
|
|
5338
|
-
source: HexString;
|
|
5339
|
-
destination: HexString;
|
|
5462
|
+
source: HexString$1;
|
|
5463
|
+
destination: HexString$1;
|
|
5340
5464
|
};
|
|
5341
5465
|
/**
|
|
5342
5466
|
* Fetches a Merkle/state proof for the given ISMP request commitment on the
|
|
@@ -5354,7 +5478,7 @@ type ContractOrder = Omit<Order, "id" | "source" | "destination"> & {
|
|
|
5354
5478
|
* @returns Resolves with an {@link IProof} ready to be submitted to Hyperbridge.
|
|
5355
5479
|
* @internal
|
|
5356
5480
|
*/
|
|
5357
|
-
declare function fetchSourceProof(commitment: HexString, source: IEvmChain, sourceStateMachine: string, sourceConsensusStateId: string, sourceHeight: bigint): Promise<IProof>;
|
|
5481
|
+
declare function fetchSourceProof(commitment: HexString$1, source: IEvmChain, sourceStateMachine: string, sourceConsensusStateId: string, sourceHeight: bigint): Promise<IProof>;
|
|
5358
5482
|
/**
|
|
5359
5483
|
* Strips SDK-only fields from an {@link Order} and normalises all fields to
|
|
5360
5484
|
* the encoding the IntentGatewayV2 contract ABI expects:
|
|
@@ -5382,7 +5506,7 @@ declare function transformOrderForContract(order: Order): ContractOrder;
|
|
|
5382
5506
|
* @param order - The SDK-level order to hash.
|
|
5383
5507
|
* @returns The keccak256 commitment hash.
|
|
5384
5508
|
*/
|
|
5385
|
-
declare function orderCommitment(order: Order): HexString;
|
|
5509
|
+
declare function orderCommitment(order: Order): HexString$1;
|
|
5386
5510
|
|
|
5387
5511
|
/**
|
|
5388
5512
|
* EIP-712 type hash for the `SelectSolver` struct.
|
|
@@ -5433,7 +5557,7 @@ declare class CryptoUtils {
|
|
|
5433
5557
|
* @param contractAddress - Address of the verifying contract.
|
|
5434
5558
|
* @returns The 32-byte domain separator as a hex string.
|
|
5435
5559
|
*/
|
|
5436
|
-
static getDomainSeparator(contractName: string, version: string, chainId: bigint, contractAddress: HexString): HexString;
|
|
5560
|
+
static getDomainSeparator(contractName: string, version: string, chainId: bigint, contractAddress: HexString$1): HexString$1;
|
|
5437
5561
|
/**
|
|
5438
5562
|
* Signs a `SelectSolver` EIP-712 message with a session key.
|
|
5439
5563
|
*
|
|
@@ -5447,7 +5571,7 @@ declare class CryptoUtils {
|
|
|
5447
5571
|
* @param privateKey - Hex-encoded private key of the session key that signs the message.
|
|
5448
5572
|
* @returns The ECDSA signature as a hex string, or `null` if signing fails.
|
|
5449
5573
|
*/
|
|
5450
|
-
static signSolverSelection(commitment: HexString, solverAddress: HexString, domainSeparator: HexString, privateKey: HexString): Promise<HexString | null>;
|
|
5574
|
+
static signSolverSelection(commitment: HexString$1, solverAddress: HexString$1, domainSeparator: HexString$1, privateKey: HexString$1): Promise<HexString$1 | null>;
|
|
5451
5575
|
/**
|
|
5452
5576
|
* Computes the EIP-712 hash of a `PackedUserOperation` as defined by
|
|
5453
5577
|
* ERC-4337 EntryPoint v0.8.
|
|
@@ -5470,7 +5594,7 @@ declare class CryptoUtils {
|
|
|
5470
5594
|
* @param sessionKey - The order's session key address (`order.session`).
|
|
5471
5595
|
* @returns The 192-bit nonce key as a bigint (pass to `EntryPoint.getNonce`).
|
|
5472
5596
|
*/
|
|
5473
|
-
static bidNonceKey(commitment: HexString, sessionKey: HexString): bigint;
|
|
5597
|
+
static bidNonceKey(commitment: HexString$1, sessionKey: HexString$1): bigint;
|
|
5474
5598
|
/**
|
|
5475
5599
|
* Builds the EIP-712 typed-data payload whose digest is the EntryPoint v0.8
|
|
5476
5600
|
* `userOpHash` (i.e. `hashTypedData(packedUserOpTypedData(...)) ===
|
|
@@ -5518,7 +5642,7 @@ declare class CryptoUtils {
|
|
|
5518
5642
|
* @param userOp - The packed UserOperation to hash.
|
|
5519
5643
|
* @returns The struct hash as a 32-byte hex string.
|
|
5520
5644
|
*/
|
|
5521
|
-
static getPackedUserStructHash(userOp: PackedUserOperation): HexString;
|
|
5645
|
+
static getPackedUserStructHash(userOp: PackedUserOperation): HexString$1;
|
|
5522
5646
|
/**
|
|
5523
5647
|
* Packs `verificationGasLimit` and `callGasLimit` into the ERC-4337
|
|
5524
5648
|
* `accountGasLimits` bytes32 field.
|
|
@@ -5530,7 +5654,7 @@ declare class CryptoUtils {
|
|
|
5530
5654
|
* @param callGasLimit - Gas limit for the main execution call.
|
|
5531
5655
|
* @returns A 32-byte hex string with both limits packed.
|
|
5532
5656
|
*/
|
|
5533
|
-
static packGasLimits(verificationGasLimit: bigint, callGasLimit: bigint): HexString;
|
|
5657
|
+
static packGasLimits(verificationGasLimit: bigint, callGasLimit: bigint): HexString$1;
|
|
5534
5658
|
/**
|
|
5535
5659
|
* Packs `maxPriorityFeePerGas` and `maxFeePerGas` into the ERC-4337
|
|
5536
5660
|
* `gasFees` bytes32 field.
|
|
@@ -5542,7 +5666,7 @@ declare class CryptoUtils {
|
|
|
5542
5666
|
* @param maxFeePerGas - Maximum total fee per gas (EIP-1559).
|
|
5543
5667
|
* @returns A 32-byte hex string with both fee values packed.
|
|
5544
5668
|
*/
|
|
5545
|
-
static packGasFees(maxPriorityFeePerGas: bigint, maxFeePerGas: bigint): HexString;
|
|
5669
|
+
static packGasFees(maxPriorityFeePerGas: bigint, maxFeePerGas: bigint): HexString$1;
|
|
5546
5670
|
/**
|
|
5547
5671
|
* Unpacks the `accountGasLimits` bytes32 field back into its constituent
|
|
5548
5672
|
* gas limits.
|
|
@@ -5550,7 +5674,7 @@ declare class CryptoUtils {
|
|
|
5550
5674
|
* @param accountGasLimits - The packed 32-byte gas limits field from a `PackedUserOperation`.
|
|
5551
5675
|
* @returns Object with `verificationGasLimit` and `callGasLimit` as bigints.
|
|
5552
5676
|
*/
|
|
5553
|
-
static unpackGasLimits(accountGasLimits: HexString): {
|
|
5677
|
+
static unpackGasLimits(accountGasLimits: HexString$1): {
|
|
5554
5678
|
verificationGasLimit: bigint;
|
|
5555
5679
|
callGasLimit: bigint;
|
|
5556
5680
|
};
|
|
@@ -5560,7 +5684,7 @@ declare class CryptoUtils {
|
|
|
5560
5684
|
* @param gasFees - The packed 32-byte gas fees field from a `PackedUserOperation`.
|
|
5561
5685
|
* @returns Object with `maxPriorityFeePerGas` and `maxFeePerGas` as bigints.
|
|
5562
5686
|
*/
|
|
5563
|
-
static unpackGasFees(gasFees: HexString): {
|
|
5687
|
+
static unpackGasFees(gasFees: HexString$1): {
|
|
5564
5688
|
maxPriorityFeePerGas: bigint;
|
|
5565
5689
|
maxFeePerGas: bigint;
|
|
5566
5690
|
};
|
|
@@ -5605,7 +5729,7 @@ declare class CryptoUtils {
|
|
|
5605
5729
|
* address, ETH `value`, and `data`.
|
|
5606
5730
|
* @returns ABI-encoded calldata for the ERC-7821 `execute(bytes32,bytes)` function.
|
|
5607
5731
|
*/
|
|
5608
|
-
encodeERC7821Execute(calls: ERC7821Call[]): HexString;
|
|
5732
|
+
encodeERC7821Execute(calls: ERC7821Call[]): HexString$1;
|
|
5609
5733
|
/**
|
|
5610
5734
|
* Decodes ERC-7821 `execute` calldata back into its constituent calls.
|
|
5611
5735
|
*
|
|
@@ -5616,9 +5740,22 @@ declare class CryptoUtils {
|
|
|
5616
5740
|
* {@link encodeERC7821Execute} or an equivalent encoder.
|
|
5617
5741
|
* @returns Array of decoded {@link ERC7821Call} objects, or `null` on failure.
|
|
5618
5742
|
*/
|
|
5619
|
-
decodeERC7821Execute(callData: HexString): ERC7821Call[] | null;
|
|
5743
|
+
decodeERC7821Execute(callData: HexString$1): ERC7821Call[] | null;
|
|
5620
5744
|
}
|
|
5621
5745
|
|
|
5746
|
+
type HexString = `0x${string}`;
|
|
5747
|
+
/**
|
|
5748
|
+
* Encodes the accepted source chains (state machine ids, e.g. "EVM-8453") into the
|
|
5749
|
+
* paymasterAndData declaration blob.
|
|
5750
|
+
*/
|
|
5751
|
+
declare function encodeAcceptedSourceChains(chains: string[]): HexString;
|
|
5752
|
+
/**
|
|
5753
|
+
* Decodes a phantom bid's paymasterAndData into its declared source chains. Returns null for an
|
|
5754
|
+
* absent, unversioned or malformed blob — the legacy default — and an empty array only for an
|
|
5755
|
+
* explicit zero-entry declaration. Callers must preserve that distinction.
|
|
5756
|
+
*/
|
|
5757
|
+
declare function decodeAcceptedSourceChains(paymasterAndData: string | undefined | null): string[] | null;
|
|
5758
|
+
|
|
5622
5759
|
declare const ABI$1: readonly [{
|
|
5623
5760
|
readonly type: "constructor";
|
|
5624
5761
|
readonly inputs: readonly [{
|
|
@@ -6809,6 +6946,21 @@ declare const ABI$1: readonly [{
|
|
|
6809
6946
|
readonly type: "uint256";
|
|
6810
6947
|
readonly internalType: "uint256";
|
|
6811
6948
|
}];
|
|
6949
|
+
}, {
|
|
6950
|
+
readonly name: "predispatchCall";
|
|
6951
|
+
readonly type: "bytes";
|
|
6952
|
+
readonly indexed: false;
|
|
6953
|
+
readonly internalType: "bytes";
|
|
6954
|
+
}, {
|
|
6955
|
+
readonly name: "outputCall";
|
|
6956
|
+
readonly type: "bytes";
|
|
6957
|
+
readonly indexed: false;
|
|
6958
|
+
readonly internalType: "bytes";
|
|
6959
|
+
}, {
|
|
6960
|
+
readonly name: "graffiti";
|
|
6961
|
+
readonly type: "bytes32";
|
|
6962
|
+
readonly indexed: false;
|
|
6963
|
+
readonly internalType: "bytes32";
|
|
6812
6964
|
}];
|
|
6813
6965
|
readonly anonymous: false;
|
|
6814
6966
|
}, {
|
|
@@ -8384,17 +8536,17 @@ interface TeleportParams {
|
|
|
8384
8536
|
/** Amount to be sent */
|
|
8385
8537
|
amount: bigint;
|
|
8386
8538
|
/** The token identifier to send */
|
|
8387
|
-
assetId: HexString;
|
|
8539
|
+
assetId: HexString$1;
|
|
8388
8540
|
/** Redeem ERC20 on the destination? */
|
|
8389
8541
|
redeem: boolean;
|
|
8390
8542
|
/** Recipient address. For EVM destinations, plain 20-byte addresses are accepted and padded internally. */
|
|
8391
|
-
to: HexString;
|
|
8543
|
+
to: HexString$1;
|
|
8392
8544
|
/** Recipient state machine */
|
|
8393
8545
|
dest: string | Uint8Array;
|
|
8394
8546
|
/** Request timeout in seconds */
|
|
8395
8547
|
timeout: bigint;
|
|
8396
8548
|
/** Destination contract call data */
|
|
8397
|
-
data?: HexString | Uint8Array;
|
|
8549
|
+
data?: HexString$1 | Uint8Array;
|
|
8398
8550
|
}
|
|
8399
8551
|
/**
|
|
8400
8552
|
* TokenGateway class for managing cross-chain token transfers via Hyperbridge
|
|
@@ -8503,14 +8655,14 @@ declare class TokenGateway {
|
|
|
8503
8655
|
*
|
|
8504
8656
|
* Requires a prior call to {@link withQueryClient}.
|
|
8505
8657
|
*/
|
|
8506
|
-
queryAssetTeleported(commitment: HexString): Promise<TokenGatewayAssetTeleportedWithStatus | undefined>;
|
|
8658
|
+
queryAssetTeleported(commitment: HexString$1): Promise<TokenGatewayAssetTeleportedWithStatus | undefined>;
|
|
8507
8659
|
/**
|
|
8508
8660
|
* Streams status updates for an asset-teleported event until a terminal
|
|
8509
8661
|
* state (`RECEIVED` or `REFUNDED`).
|
|
8510
8662
|
*
|
|
8511
8663
|
* Requires a prior call to {@link withQueryClient}.
|
|
8512
8664
|
*/
|
|
8513
|
-
assetTeleportedStatusStream(commitment: HexString): AsyncGenerator<{
|
|
8665
|
+
assetTeleportedStatusStream(commitment: HexString$1): AsyncGenerator<{
|
|
8514
8666
|
status: TeleportStatus;
|
|
8515
8667
|
metadata: {
|
|
8516
8668
|
blockHash: string;
|
|
@@ -8530,7 +8682,7 @@ interface BridgeParams {
|
|
|
8530
8682
|
/** The sender's address (needed for allowance checks and fee quoting) */
|
|
8531
8683
|
from: Address;
|
|
8532
8684
|
/** Recipient on the destination chain (20 bytes for EVM, 32 bytes for substrate) */
|
|
8533
|
-
to: HexString | Uint8Array;
|
|
8685
|
+
to: HexString$1 | Uint8Array;
|
|
8534
8686
|
/** Amount of tokens to send (in token decimals) */
|
|
8535
8687
|
amount: bigint;
|
|
8536
8688
|
/** Destination state machine ID (e.g. "EVM-97") */
|
|
@@ -8538,7 +8690,7 @@ interface BridgeParams {
|
|
|
8538
8690
|
/** Request timeout in seconds (default: 3600) */
|
|
8539
8691
|
timeout?: bigint;
|
|
8540
8692
|
/** Optional calldata to execute on the destination chain */
|
|
8541
|
-
data?: HexString;
|
|
8693
|
+
data?: HexString$1;
|
|
8542
8694
|
/** Pay fees in the host's feeToken instead of native. Default: false (pay native) */
|
|
8543
8695
|
payInFeeToken?: boolean;
|
|
8544
8696
|
/** Relayer fee override in feeToken units. If not set, automatically estimated from destination gas cost. Set to 0n for self-relay. */
|
|
@@ -8562,18 +8714,18 @@ type BridgeStep = {
|
|
|
8562
8714
|
type: "approve";
|
|
8563
8715
|
tx: {
|
|
8564
8716
|
to: Address;
|
|
8565
|
-
data: HexString;
|
|
8717
|
+
data: HexString$1;
|
|
8566
8718
|
};
|
|
8567
8719
|
} | {
|
|
8568
8720
|
type: "send";
|
|
8569
8721
|
tx: {
|
|
8570
8722
|
to: Address;
|
|
8571
|
-
data: HexString;
|
|
8723
|
+
data: HexString$1;
|
|
8572
8724
|
value: bigint;
|
|
8573
8725
|
};
|
|
8574
8726
|
} | {
|
|
8575
8727
|
type: "submitted";
|
|
8576
|
-
commitment: HexString;
|
|
8728
|
+
commitment: HexString$1;
|
|
8577
8729
|
} | ({
|
|
8578
8730
|
type: "status";
|
|
8579
8731
|
} & RequestStatusWithMetadata);
|
|
@@ -8639,7 +8791,7 @@ declare class HyperFungibleToken {
|
|
|
8639
8791
|
*
|
|
8640
8792
|
* Resume the generator with the tx hash after submitting each tx.
|
|
8641
8793
|
*/
|
|
8642
|
-
bridge(params: BridgeParams): AsyncGenerator<BridgeStep, void, HexString | undefined>;
|
|
8794
|
+
bridge(params: BridgeParams): AsyncGenerator<BridgeStep, void, HexString$1 | undefined>;
|
|
8643
8795
|
/**
|
|
8644
8796
|
* Encodes a state machine ID string to hex bytes.
|
|
8645
8797
|
*/
|
|
@@ -10302,7 +10454,7 @@ declare function getOrderPlacedFromTx(client: {
|
|
|
10302
10454
|
}) => Promise<{
|
|
10303
10455
|
logs: any[];
|
|
10304
10456
|
}>;
|
|
10305
|
-
}, txHash: HexString): Promise<DecodedOrderPlacedLog | undefined>;
|
|
10457
|
+
}, txHash: HexString$1): Promise<DecodedOrderPlacedLog | undefined>;
|
|
10306
10458
|
/**
|
|
10307
10459
|
* Extracts the EvmHost PostRequestEvent from a transaction hash.
|
|
10308
10460
|
* @param client - A viem PublicClient-compatible instance
|
|
@@ -10315,7 +10467,7 @@ declare function getPostRequestEventFromTx(client: {
|
|
|
10315
10467
|
}) => Promise<{
|
|
10316
10468
|
logs: any[];
|
|
10317
10469
|
}>;
|
|
10318
|
-
}, txHash: HexString): Promise<DecodedPostRequestEvent | undefined>;
|
|
10470
|
+
}, txHash: HexString$1): Promise<DecodedPostRequestEvent | undefined>;
|
|
10319
10471
|
/**
|
|
10320
10472
|
* Extracts the EvmHost PostResponseEvent from a transaction hash.
|
|
10321
10473
|
* @param client - A viem PublicClient-compatible instance
|
|
@@ -10328,24 +10480,24 @@ declare function getPostResponseEventFromTx(client: {
|
|
|
10328
10480
|
}) => Promise<{
|
|
10329
10481
|
logs: any[];
|
|
10330
10482
|
}>;
|
|
10331
|
-
}, txHash: HexString): Promise<DecodedPostResponseEvent | undefined>;
|
|
10483
|
+
}, txHash: HexString$1): Promise<DecodedPostResponseEvent | undefined>;
|
|
10332
10484
|
|
|
10333
10485
|
type HyperbridgeTxEvents = {
|
|
10334
10486
|
kind: "Ready";
|
|
10335
|
-
transaction_hash: HexString;
|
|
10336
|
-
message_id?: HexString;
|
|
10487
|
+
transaction_hash: HexString$1;
|
|
10488
|
+
message_id?: HexString$1;
|
|
10337
10489
|
} | {
|
|
10338
10490
|
kind: "Dispatched";
|
|
10339
|
-
transaction_hash: HexString;
|
|
10491
|
+
transaction_hash: HexString$1;
|
|
10340
10492
|
block_number: bigint;
|
|
10341
|
-
message_id?: HexString;
|
|
10342
|
-
commitment: HexString;
|
|
10493
|
+
message_id?: HexString$1;
|
|
10494
|
+
commitment: HexString$1;
|
|
10343
10495
|
} | {
|
|
10344
10496
|
kind: "Finalized";
|
|
10345
|
-
transaction_hash: HexString;
|
|
10346
|
-
message_id?: HexString;
|
|
10497
|
+
transaction_hash: HexString$1;
|
|
10498
|
+
message_id?: HexString$1;
|
|
10347
10499
|
block_number?: bigint;
|
|
10348
|
-
commitment?: HexString;
|
|
10500
|
+
commitment?: HexString$1;
|
|
10349
10501
|
} | {
|
|
10350
10502
|
kind: "Error";
|
|
10351
10503
|
error: unknown;
|
|
@@ -10363,7 +10515,7 @@ type XcmGatewayParams = {
|
|
|
10363
10515
|
* The recipient address on the destination chain (in hex format)
|
|
10364
10516
|
* This is the EVM address that will receive the teleported assets
|
|
10365
10517
|
*/
|
|
10366
|
-
recipient: HexString;
|
|
10518
|
+
recipient: HexString$1;
|
|
10367
10519
|
/**
|
|
10368
10520
|
* Amount of DOT to teleport
|
|
10369
10521
|
* This will be converted to the appropriate format internally
|
|
@@ -10423,7 +10575,7 @@ type Params = {
|
|
|
10423
10575
|
* Recipient address in hexadecimal format where the assets will be sent
|
|
10424
10576
|
* on the destination chain
|
|
10425
10577
|
*/
|
|
10426
|
-
recipient: HexString;
|
|
10578
|
+
recipient: HexString$1;
|
|
10427
10579
|
/**
|
|
10428
10580
|
* Amount of tokens to teleport, represented as a bigint to handle
|
|
10429
10581
|
* large numeric values precisely
|
|
@@ -10487,4 +10639,4 @@ declare function teleport(teleport_param: {
|
|
|
10487
10639
|
extrinsics?: Array<SubmittableExtrinsic<"promise", ISubmittableResult>>;
|
|
10488
10640
|
}): Promise<ReadableStream<HyperbridgeTxEvents>>;
|
|
10489
10641
|
|
|
10490
|
-
export { ADDRESS_ZERO, type AllStatusKey, type AssetTeleported, type AssetTeleportedResponse, type AvailableLiquidityByChain, type AvailableLiquiditySnapshot, type Bid, type BidStorageEntry, type BidSubmissionResult, type BlockMetadata, type BridgeParams, type BridgeStep, type BundlerGasEstimate, BundlerMethod, type BytesLikeHex, type CancelEvent, type CancelOptions, type CancelOrderOptions, type CancelQuote, type ChainConfig, type ChainConfigData, ChainConfigService, Chains, type ClientConfig, type ConfiguredAssetSymbol, CryptoUtils, DEFAULT_ADDRESS, DEFAULT_GRAFFITI, DOMAIN_TYPEHASH, DUMMY_PRIVATE_KEY, type DecodedOrderPlacedLog, type DecodedPostRequestEvent, type DecodedPostResponseEvent, type Deployment, type DispatchGet, type DispatchInfo, type DispatchPost, ERC20Method, type ERC7821Call, ERC7821_BATCH_MODE, type EstimateFillOrderParams, type EstimateGasCallData, EvmChain, type EvmChainParams, ABI as EvmHostABI, EvmLanguage, type ExecuteIntentOrderOptions, type ExecutionResult, type FillOptions, type FillOrderEstimate, type FillerBid, type FillerConfig, type GetRequestResponse, type GetRequestWithStatus, type GetResponseByRequestIdResponse, type GetResponseStorageValues, type HexString, type HostParams, HyperClientStatus, HyperFungibleToken, HyperFungibleTokenABI, type HyperbridgeTxEvents, type IBatchConsensusAndGetResponseMessage, type IBatchConsensusAndPostRequestMessage, type IChain, type IConfig, type IConsensusMessage, type IEvmChain, type IEvmConfig, type IGetRequest, type IGetRequestMessage, type IGetResponse, type IGetResponseMessage, type IHyperbridgeConfig, type IIsmpMessage, type IMessage, type IPharosConfig, type IPolkadotHubConfig, type IPostRequest, type IPostResponse, type IProof, type IRequestMessage, type ISubstrateConfig, type ITimeoutPostRequestMessage, type IndexerQueryClient, IntentGateway, ABI$1 as IntentGatewayABI, type IntentGatewayContext, type IntentGatewayParams, IntentOrderStatus, type IntentOrderStatusKey, type IntentOrderStatusUpdate, type IntentQuoteStrategy, type IntentQuoteTradeType, IntentsCoprocessor, InvalidPhantomSnapshotError, IsmpClient, type IsmpRequest, MOCK_ADDRESS, ORDER_V2_PARAM_TYPE, type Order, type OrderResponse, OrderStatus, OrderStatusChecker, type OrderStatusMetadata, type OrderWithStatus, PACKED_USEROP_TYPEHASH, PLACE_ORDER_SELECTOR, type PackedUserOperation, type Params, type PaymentInfo, type PhantomOrderEvent, type PhantomOrderPriceSnapshot, type PhantomOrderPriceSnapshotsResponse, type PhantomSnapshotIntentQuoteMetadata, type PhantomSnapshotQuoteIntentResult, PhantomSnapshotUnavailableError, PharosChain, type PharosChainParams, PolkadotHubChain, type PolkadotHubChainParams, type PollPhantomOrdersOptions, type PostRequestStatus, type PostRequestTimeoutStatus, type PostRequestWithStatus, type QuoteIntentParams, type QuoteIntentResult, type QuoteNativeResult, type QuoteResult, type QuoteUniswapParams, type QuoteUniswapResult, REQUEST_COMMITMENTS_SLOT, REQUEST_RECEIPTS_SLOT, RESPONSE_COMMITMENTS_SLOT, RESPONSE_RECEIPTS_SLOT, type RequestBody, type RequestCommitment, RequestKind, type RequestResponse, RequestStatus, type RequestStatusKey, type RequestStatusWithMetadata, type ResponseCommitmentWithValues, type ResumeIntentOrderOptions, type RetryConfig, SELECT_SOLVER_TYPEHASH, STATE_COMMITMENTS_SLOT, type SelectBidResult, type SelectOptions, type SigningAccount, type StateMachineHeight, type StateMachineId, type StateMachineIdParams, type StateMachineResponse, type StateMachineUpdate, type StorageFacade, type SubmitBidOptions, SubstrateChain, Swap, TESTNET_CHAINS, type TeleportParams, TeleportStatus, TimeoutStatus, type TimeoutStatusKey, TokenGateway, type TokenGatewayAssetTeleportedResponse, type TokenGatewayAssetTeleportedWithStatus, type TokenInfo, type TokenPrice, type TokenPricesResponse, type Transaction, TronChain, type TronChainParams, USE_ETHERSCAN_CHAINS, type UniswapProtocol, type UniswapQuote, type UniswapQuoteToken, type UniswapTradeType, type UniswapV4IntentQuoteMetadata, type UniswapV4IntentQuoteOptions, type UniswapV4PoolConfigData, type UniswapV4PoolKey, type UniswapV4QuoteIntentResult, UnsupportedIntentQuotePairError, UnsupportedIntentQuoteStrategyError, WrappedHyperFungibleTokenABI, type XcmGatewayParams, __test, adjustDecimals, bytes20ToBytes32, bytes32ToBytes20, calculateAllowanceMappingLocation, calculateBalanceMappingLocation, chainConfigs, constructRedeemEscrowRequestBody, constructRefundEscrowRequestBody, convertCodecToIGetRequest, convertCodecToIProof, convertIGetRequestToCodec, convertIProofToCodec, convertStateIdToStateMachineId, convertStateMachineEnumToString, convertStateMachineIdToEnum, createEvmChain, createQueryClient, decodeERC7821ExecuteBatch, decodeUserOpScale, encodeERC7821ExecuteBatch, encodeISMPMessage, encodeStateMachineId, encodeUserOpScale, encodeWithdrawalRequest, estimateGasForPost, fetchPrice, fetchSourceProof, generateRootWithProof, getChainId, getConfigByStateMachineId, getContractCallInput, getContractCallInputs, getGasPriceFromEtherscan, getOrFetchStorageSlot, getOrderPlacedFromTx, getPostRequestEventFromTx, getPostResponseEventFromTx, getRequestCommitment, getStateCommitmentFieldSlot, getStateCommitmentSlot, getStorageSlot, getViemChain, hexToString, hyperbridgeAddress, maxBigInt, normalizeAddressForEvmBytes32, normalizeAddressForStateMachine, normalizeEvmAddress, normalizeEvmChainId, normalizeStateMachineId, orderCommitment, parseStateMachineId, pharosAtlantic, pharosMainnet, polkadotAssetHubPaseo, polkadotHubMainnet, postRequestCommitment, queryAssetTeleported, queryGetRequest, queryPostRequest, quoteUniswap, requestCommitmentKey, responseCommitmentKey, retryPromise, teleport, teleportDot, transformOrderForContract, tronChainIds, tronNile };
|
|
10642
|
+
export { ADDRESS_ZERO, type AllStatusKey, type AssetTeleported, type AssetTeleportedResponse, type AvailableLiquidityByChain, type AvailableLiquiditySnapshot, type Bid, type BidStorageEntry, type BidSubmissionResult, type BlockMetadata, type BridgeParams, type BridgeStep, type BundlerGasEstimate, BundlerMethod, type BytesLikeHex, type CancelEvent, type CancelOptions, type CancelOrderOptions, type CancelQuote, type ChainConfig, type ChainConfigData, ChainConfigService, Chains, type ClientConfig, type ConfiguredAssetSymbol, CryptoUtils, DEFAULT_ADDRESS, DEFAULT_GRAFFITI, DOMAIN_TYPEHASH, DUMMY_PRIVATE_KEY, type DecodedOrderPlacedLog, type DecodedPostRequestEvent, type DecodedPostResponseEvent, type Deployment, type DispatchGet, type DispatchInfo, type DispatchPost, ERC20Method, type ERC7821Call, ERC7821_BATCH_MODE, type Erc4626VaultConfigData, type EstimateFillOrderParams, type EstimateGasCallData, EvmChain, type EvmChainParams, ABI as EvmHostABI, EvmLanguage, type ExecuteIntentOrderOptions, type ExecutionResult, type FillOptions, type FillOrderEstimate, type FillerBid, type FillerConfig, type GetRequestResponse, type GetRequestWithStatus, type GetResponseByRequestIdResponse, type GetResponseStorageValues, type HexString$1 as HexString, type HostParams, HyperClientStatus, HyperFungibleToken, HyperFungibleTokenABI, type HyperbridgeTxEvents, type IBatchConsensusAndGetResponseMessage, type IBatchConsensusAndPostRequestMessage, type IChain, type IConfig, type IConsensusMessage, type IEvmChain, type IEvmConfig, type IGetRequest, type IGetRequestMessage, type IGetResponse, type IGetResponseMessage, type IHyperbridgeConfig, type IIsmpMessage, type IMessage, type IPharosConfig, type IPolkadotHubConfig, type IPostRequest, type IPostResponse, type IProof, type IRequestMessage, type ISubstrateConfig, type ITimeoutPostRequestMessage, type IndexerQueryClient, IntentGateway, ABI$1 as IntentGatewayABI, type IntentGatewayContext, type IntentGatewayParams, IntentOrderStatus, type IntentOrderStatusKey, type IntentOrderStatusUpdate, type IntentQuoteStrategy, type IntentQuoteTradeType, IntentsCoprocessor, InvalidPhantomSnapshotError, IsmpClient, type IsmpRequest, MOCK_ADDRESS, ORDER_V2_PARAM_TYPE, type Order, type OrderFeesQuote, type OrderResponse, OrderStatus, OrderStatusChecker, type OrderStatusMetadata, type OrderWithStatus, PACKED_USEROP_TYPEHASH, PLACE_ORDER_SELECTOR, type PackedUserOperation, type Params, type PaymentInfo, type PhantomOrderEvent, type PhantomOrderLeg, type PhantomOrderPriceSnapshot, type PhantomOrderPriceSnapshotsResponse, type PhantomSnapshotIntentQuoteMetadata, type PhantomSnapshotQuoteIntentResult, PhantomSnapshotUnavailableError, PharosChain, type PharosChainParams, PolkadotHubChain, type PolkadotHubChainParams, type PollPhantomOrdersOptions, type PostRequestStatus, type PostRequestTimeoutStatus, type PostRequestWithStatus, type QuoteIntentParams, type QuoteIntentResult, type QuoteNativeResult, type QuoteResult, type QuoteUniswapParams, type QuoteUniswapResult, REQUEST_COMMITMENTS_SLOT, REQUEST_RECEIPTS_SLOT, RESPONSE_COMMITMENTS_SLOT, RESPONSE_RECEIPTS_SLOT, type RequestBody, type RequestCommitment, RequestKind, type RequestResponse, RequestStatus, type RequestStatusKey, type RequestStatusWithMetadata, type ResponseCommitmentWithValues, type ResumeIntentOrderOptions, type RetryConfig, SELECT_SOLVER_TYPEHASH, STATE_COMMITMENTS_SLOT, type SelectBidResult, type SelectOptions, type SigningAccount, type StateMachineHeight, type StateMachineId, type StateMachineIdParams, type StateMachineResponse, type StateMachineUpdate, type StorageFacade, type SubmitBidOptions, SubstrateChain, Swap, TESTNET_CHAINS, type TeleportParams, TeleportStatus, TimeoutStatus, type TimeoutStatusKey, TokenGateway, type TokenGatewayAssetTeleportedResponse, type TokenGatewayAssetTeleportedWithStatus, type TokenInfo, type TokenPrice, type TokenPricesResponse, type Transaction, TronChain, type TronChainParams, USE_ETHERSCAN_CHAINS, type UniswapProtocol, type UniswapQuote, type UniswapQuoteToken, type UniswapTradeType, type UniswapV4IntentQuoteMetadata, type UniswapV4IntentQuoteOptions, type UniswapV4PoolConfigData, type UniswapV4PoolKey, type UniswapV4QuoteIntentResult, UnsupportedIntentQuotePairError, UnsupportedIntentQuoteStrategyError, WrappedHyperFungibleTokenABI, type XcmGatewayParams, __test, adjustDecimals, bytes20ToBytes32, bytes32ToBytes20, calculateAllowanceMappingLocation, calculateBalanceMappingLocation, chainConfigs, constructRedeemEscrowRequestBody, constructRefundEscrowRequestBody, convertCodecToIGetRequest, convertCodecToIProof, convertIGetRequestToCodec, convertIProofToCodec, convertStateIdToStateMachineId, convertStateMachineEnumToString, convertStateMachineIdToEnum, createEvmChain, createQueryClient, decodeAcceptedSourceChains, decodeERC7821ExecuteBatch, decodeUserOpScale, encodeAcceptedSourceChains, encodeERC7821ExecuteBatch, encodeISMPMessage, encodeStateMachineId, encodeUserOpScale, encodeWithdrawalRequest, estimateGasForPost, fetchPrice, fetchSourceProof, generateRootWithProof, getChainId, getConfigByStateMachineId, getContractCallInput, getContractCallInputs, getGasPriceFromEtherscan, getOrFetchStorageSlot, getOrderPlacedFromTx, getPostRequestEventFromTx, getPostResponseEventFromTx, getRequestCommitment, getStateCommitmentFieldSlot, getStateCommitmentSlot, getStorageSlot, getViemChain, hexToString, hyperbridgeAddress, maxBigInt, normalizeAddressForEvmBytes32, normalizeAddressForStateMachine, normalizeEvmAddress, normalizeEvmChainId, normalizeStateMachineId, orderCommitment, parseStateMachineId, pharosAtlantic, pharosMainnet, polkadotAssetHubPaseo, polkadotHubMainnet, postRequestCommitment, queryAssetTeleported, queryGetRequest, queryPostRequest, quoteUniswap, requestCommitmentKey, responseCommitmentKey, retryPromise, teleport, teleportDot, transformOrderForContract, tronChainIds, tronNile };
|