import { type Address, type Hash, type TransactionReceipt } from 'viem'; import { type ChainProvider, type ChainProviderType, EvmProvider, type GetChainProviderType, SwapOrder } from '../entities/index.js'; import { type ChainConfig, type ChainName, type CreateIntentOrderPayload, type GetChainConfigType, type IntentErrorResponse, type IntentExecutionResponse, type IntentQuoteRequest, type IntentQuoteResponse, type IntentServiceConfig, type IntentStatusRequest, type IntentStatusResponse, type Result } from '../types.js'; export declare class IntentService { private readonly config; constructor(config: IntentServiceConfig); /** * Get current best quote for token amount * @example * // request * { * "token_src": "0x82af49447d8a07e3bd95bd0d56f35241523fbab1", * "token_src_blockchain_id": "0xa4b1.arbitrum", * "token_dst": "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI", * "token_dst_blockchain_id": "sui", * "src_amount": 10000n * } * * // response * { * "ok": true, * "value": { * "output": { * "expected_output":"981301300", * "uuid":"e2795d2c-14a5-4d18-9be6-a257d7c9d274" * } * } * } */ getQuote(payload: IntentQuoteRequest): Promise>; /** * Check whether intent contract is allowed to move the given payload amount * @param payload -Intent payload * @param provider - ChainProviderType * @return Boolean - valid = true, invalid = false */ isAllowanceValid(payload: CreateIntentOrderPayload, provider: GetChainProviderType): Promise>; /** * Approve ERC20 amount spending * @param token - ERC20 token address * @param amount - Amount to approve * @param address - Address to approve spending for * @param provider - EVM Provider */ approve(token: Address, amount: bigint, address: Address, provider: EvmProvider): Promise>; /** * Execute intent order * @example * // request * { * "quote_uuid": "a0dd7652-b360-4123-ab2d-78cfbcd20c6b", * "fromAddress": "0x601020c5797Cdd34f64476b9bf887a353150Cb9a", * "toAddress": "0x81600ec58a2efd97f41380370cddf25b7a416d03ee081552becfa9710ea30878", * "fromChain": "0xa4b1.arbitrum", * "toChain": "sui", * "token": "0x82af49447d8a07e3bd95bd0d56f35241523fbab1", * "amount": "10000", * "toToken": "0x2::sui::SUI", * "toAmount": "9813013000", * } * * // response * { * "ok": true, * "value": { * "output": { * "answer":"OK", * "task_id":"a0dd7652-b360-4123-ab2d-78cfbcd20c6b" * } * } * } */ executeIntentOrder(payload: CreateIntentOrderPayload, provider: GetChainProviderType): Promise>; createIntentOrder(payload: T, provider: GetChainProviderType): Promise>; /** * Cancel active Intent Order * @param orderId - Intent Order ID (retrievable by getOrder) * @param chain - Chain on which Order was created on * @param provider - EVM or SUI provider * @return string - Transaction Hash */ cancelIntentOrder(orderId: bigint, chain: ChainName, provider: ChainProviderType): Promise>; /** * Retrieve Intent order * @param txHash - Transaction hash * @param chain - chain name (sui or arb) * @param provider - provider (EVM or SUI) */ getOrder(txHash: string, chain: ChainName, provider: ChainProvider): Promise>; /** * Get current intent status * @example * // request * { * "task_id": "a0dd7652-b360-4123-ab2d-78cfbcd20c6b" * } * * // response * { * "ok": true, * "value": { * "output": { * "status":3, * "tx_hash":"0xabcdefasdasdsafssadasdsadsadasdsadasdsadsa" * } * } * } */ getStatus(intentStatusRequest: IntentStatusRequest): Promise>; /** * Get all available chains supporting intents */ getSupportedChains(): ChainName[]; /** * Get config of a specific chain */ getChainConfig(chain: T): GetChainConfigType; } //# sourceMappingURL=IntentService.d.ts.map