import type { Address as SolanaAddress } from "@solana/kit"; import type { Chain, Hex, RpcErrorType, Transport } from "viem"; import type { SmartAccount } from "viem/account-abstraction"; import type { BaseIntentClient, CombinedIntentRpcSchema } from "../client/intentClient.js"; import type { INTENT_VERSION_TYPE } from "../types/intent.js"; export type GetIntentParameters = { sender: Hex; recipient: Hex | SolanaAddress; callData: Hex; instructionData: Hex; inputTokens: Array<{ address: Hex; amount?: bigint; chainId: number; }>; outputTokens: Array<{ address: Hex | SolanaAddress; amount: bigint; chainId: number; }>; initData?: Hex | undefined; gasToken?: "SPONSORED" | "NATIVE"; chainId?: number; }; export type GaslessCrossChainOrder = { originSettler: Hex; user: Hex; nonce: bigint; originChainId: bigint; openDeadline: number; fillDeadline: number; orderDataType: Hex; orderData: Hex; }; export type GetIntentReturnType = { orders: Array; executionTransaction?: Hex | GaslessCrossChainOrder; }; export type GetIntentErrorType = RpcErrorType; /** * Gets the intent for a cross-chain transaction. * * @param client - Client to use * @param parameters - {@link GetIntentParameters} * @returns The intent. {@link GetIntentReturnType} * * @example * import { createIntentClient, http } from '@zerodev/intent' * import { mainnet } from 'viem/chains' * * const client = createIntentClient({ * chain: mainnet, * transport: http(), * }) * * const intent = await client.getIntent({ * recipient: '0x...', * callData: '0x...', * inputTokens: [{ * address: '0x...', * amount: 1000000n, * chainId: 1n * }], * outputTokens: [{ * address: '0x...', * amount: 900000n, * chainId: 10n * }] * }) */ export declare function getIntent(client: BaseIntentClient, parameters: GetIntentParameters, version: INTENT_VERSION_TYPE): Promise; //# sourceMappingURL=getIntent.d.ts.map