import { BlockchainProviderConnector, HttpProviderConnector, LimitOrderV4Struct } from '@1inch/fusion-sdk'; import { ResolverCancellationConfig, SvmCrossChainOrder, EvmCrossChainOrder } from '../cross-chain-order/index.js'; import { ApiVersion, CustomPreset, IntegratorFeeRequest, PaginationOutput, PresetEnum } from '../api/index.js'; import { EvmChain, SupportedChain } from '../chains.js'; import { EvmAddress, HashLock, SolanaAddress } from '../domains/index.js'; export type CrossChainSDKConfigParams = { url: string; authKey?: string; blockchainProvider?: BlockchainProviderConnector; httpProvider?: HttpProviderConnector; }; export type QuoteParams = { srcChainId: SrcChain; dstChainId: DstChain; srcTokenAddress: string; dstTokenAddress: string; amount: string; walletAddress: string; enableEstimate?: boolean; permit?: string; integratorFee?: IntegratorFeeRequest; source?: string; isPermit2?: boolean; }; export type QuoteCustomPresetParams = { customPreset: CustomPreset; }; export type OrderParams = { walletAddress: string; hashLock: HashLock; secretHashes: string[]; permit?: string; receiver?: string; preset?: PresetEnum; /** * Unique for `walletAddress` can be serial or random generated * * @see randBigInt */ nonce?: bigint; source?: string; isPermit2?: boolean; customPreset?: CustomPreset; }; export type TakingFeeInfo = { takingFeeBps: number; takingFeeReceiver: string; }; export type OrderInfo = { order: LimitOrderV4Struct; signature: string; quoteId: string; orderHash: string; extension: string; }; export type PreparedOrder = { order: EvmCrossChainOrder | SvmCrossChainOrder; hash: string; quoteId: string; }; export type OrderCancellationData = PaginationOutput | PaginationOutput; export type SvmOrderCancellationData = { orderHash: Buffer; maker: SolanaAddress; token: SolanaAddress; cancellationConfig: ResolverCancellationConfig; isAssetNative: boolean; }; export type EvmOrderCancellationData = { orderHash: string; maker: EvmAddress; srcChainId: SrcChain; dstChainId: DstChain; order: LimitOrderV4Struct; extension: string; remainingMakerAmount: bigint; version: ApiVersion; };