import type { Address, Hex } from 'viem'; import type { ProtocolType } from '@hyperlane-xyz/provider-sdk'; /** Command types matching QuotedCalls.sol constants */ export declare enum QuotedCallsCommand { SUBMIT_QUOTE = 0, PERMIT2_PERMIT = 1, PERMIT2_TRANSFER_FROM = 2, TRANSFER_FROM = 3, TRANSFER_REMOTE = 4, TRANSFER_REMOTE_TO = 5, CALL_REMOTE_WITH_OVERRIDES = 6, CALL_REMOTE_COMMIT_REVEAL = 7, SWEEP = 8 } /** Mirrors IOffchainQuoter.SignedQuote struct */ export interface SignedQuoteData { context: Hex; data: Hex; issuedAt: number; expiry: number; salt: Hex; submitter: Address; } /** SUBMIT_QUOTE command parameters — matches fee-quoting service response */ export interface SubmitQuoteCommand { quoter: Address; quote: SignedQuoteData; signature: Hex; } /** How tokens are pulled into QuotedCalls contract */ export declare enum TokenPullMode { /** Standard ERC20 transferFrom — requires prior approval to QuotedCalls */ TransferFrom = "transferFrom", /** Permit2 allowance transfer — uses signed permit, no prior approval needed */ Permit2 = "permit2" } /** Permit2 PermitSingle + signature for PERMIT2_PERMIT command */ export interface Permit2Data { permitSingle: { details: { token: Address; amount: bigint; expiration: number; nonce: number; }; spender: Address; sigDeadline: number; }; signature: Hex; } /** * Fee-paying commands in QuotedCalls that require offchain quotes. * String values correspond to the fee-quoting service API routes. */ export declare enum FeeQuotingCommand { TransferRemote = "transferRemote", TransferRemoteTo = "transferRemoteTo", CallRemoteWithOverrides = "callRemoteWithOverrides", CallRemoteCommitReveal = "callRemoteCommitReveal" } /** Commands that require a warp fee quote (in addition to IGP) */ export declare const WARP_FEE_COMMANDS: Set; export interface FeeQuotingQuoteResponse { quotes: SubmitQuoteCommand[]; } /** * Protocol-agnostic envelope for an offchain quote returned by the v2 API. * * - `protocol` discriminates the `details` payload. * - `quoter` is the on-chain account whose identity participates in * signed-quote verification: * - EVM: verifying contract address (`OffchainQuotedIGP` / * `OffchainQuotedLinearFee`). * - SVM: fee/IGP program account pubkey (`fee_account` / `igp_account` * — the first non-domain-tag input to `build_message_hash`). * This is NOT the on-chain storage PDA. SVM transient-quote PDA derivation * involves the actual submitter (payer) at on-chain submit time, which the * offchain server has no role in — the client computes that PDA themselves. * - `issuedAt` / `expiry` are unix seconds, decoded from each protocol's * native representation (e.g. SVM's u48 BE bytes are decoded to JS numbers * here). */ export interface QuoteV2Entry

{ protocol: P; quoter: string; issuedAt: number; expiry: number; details: D; } /** EVM signed-quote payload (EIP-712 typed data + secp256k1 signature). */ export interface EthereumQuoteDetails { quote: SignedQuoteData; signature: Hex; } /** * SVM signed-quote payload (Borsh `SvmSignedQuote` + secp256k1 signature over * a raw `keccak256` digest). `domainId` is the origin chain's Hyperlane * domain id; it appears in the message hash and is needed to reconstruct it. */ export interface SealevelQuoteDetails { domainId: number; signedQuote: SealevelSignedQuote; } /** * Wire shape of the on-chain `SvmSignedQuote` struct, with each byte field * exposed as `0x`-prefixed hex for transport. Mirrors the Rust * `quote-verifier::SvmSignedQuote`. */ export interface SealevelSignedQuote { /** Protocol-native context bytes (44B non-CC | 76B CC). */ context: Hex; /** Borsh-encoded `FeeDataStrategy` (Linear / Regressive / Progressive). */ data: Hex; /** 6 bytes (u48 BE). */ issuedAt: Hex; /** 6 bytes (u48 BE). `expiry === issuedAt` ⇒ transient. */ expiry: Hex; /** 32 bytes — client-provided salt for PDA derivation + replay prevention. */ clientSalt: Hex; /** 65 bytes (r:32, s:32, v:1). */ signature: Hex; } export type EthereumQuoteV2Entry = QuoteV2Entry; export type SealevelQuoteV2Entry = QuoteV2Entry; /** * Discriminated union of every known v2 quote variant. Add a new VM by * introducing a new `*QuoteV2Entry` alias and adding it here. */ export type AnyQuoteV2Entry = EthereumQuoteV2Entry | SealevelQuoteV2Entry; /** v2 success response: at most one quote per request (404 when unavailable). */ export interface QuoteV2Response { quote: AnyQuoteV2Entry; } /** * Path segments under the v2 quote API. Shared between client + server so * that route names stay in lockstep. */ export declare const QuoteV2Endpoint: { readonly Warp: 'warp'; readonly Igp: 'igp'; }; export type QuoteV2Endpoint = (typeof QuoteV2Endpoint)[keyof typeof QuoteV2Endpoint]; /** URL prefix every v2 quote endpoint lives under. */ export declare const QUOTE_V2_BASE_PATH = "/v2/quote"; /** Reasons the server may refuse to produce a quote (404 response). */ export declare const NoQuoteAvailableReason: { readonly NotAuthorized: 'not_authorized'; readonly NotUpgraded: 'not_upgraded'; readonly NotConfigured: 'not_configured'; }; export type NoQuoteAvailableReason = (typeof NoQuoteAvailableReason)[keyof typeof NoQuoteAvailableReason]; /** The `error` discriminator for `NoQuoteAvailableError` 404 bodies. */ export declare const NO_QUOTE_AVAILABLE_ERROR = "no_quote_available"; /** * v2 404 response body shape — emitted when the server cannot produce a quote * for the requested route/quoter. NOT a JS `Error` class; this is the JSON body. */ export interface NoQuoteAvailableError { error: typeof NO_QUOTE_AVAILABLE_ERROR; reason: NoQuoteAvailableReason; detail: string; } /** Parameters for building a QuotedCalls transfer via WarpCore */ export interface QuotedCallsParams { /** QuotedCalls contract address */ address: Address; /** Signed quotes from fee-quoting service */ quotes: SubmitQuoteCommand[]; /** Client salt (pre-scope — QuotedCalls applies keccak256(msg.sender, clientSalt)) */ clientSalt: Hex; /** Token pull strategy */ tokenPullMode: TokenPullMode; /** Required when tokenPullMode === Permit2 */ permit2Data?: Permit2Data; } //# sourceMappingURL=types.d.ts.map