import { Universe } from "@arcana/ca-common"; import Decimal from "decimal.js"; import Long from "long"; import { ChainList } from "../../chains"; import { Intent, IRequestHandler, onAllowanceHookSource, RequestHandlerInput, SetAllowanceInput, SimulateReturnType, Step, StepInfo, TokenInfo, UserAssets } from "../../typings"; import { FeeStore, getAllowances } from "../../utils"; declare abstract class BaseRequest implements IRequestHandler { readonly input: RequestHandlerInput; abstract destinationUniverse: Universe; protected chainList: ChainList; protected steps: Step[]; constructor(input: RequestHandlerInput); buildIntent: () => Promise<{ intent: Intent; token: { contractAddress: `0x${string}`; decimals: number; name: string; symbol: string; }; } | undefined>; getUnallowedSources(intent: Intent, allowances: Awaited>): onAllowanceHookSource[]; abstract parseSimulation(input: { assets: UserAssets; simulation: SimulateReturnType; }): { amount: Decimal; gas: Decimal; isIntentRequired: boolean; }; process: () => Promise; processIntent(intent: Intent): Promise; processRFF(intent: Intent): Promise<{ id: Long; requestHash: `0x${string}`; waitForDoubleCheckTx: () => Promise; }>; setAllowances(input: Array): Promise; abstract simulateTx(): Promise; abstract waitForFill(requestHash: `0x${string}`, intentID: Long, waitForDoubleCheckTx: () => Promise): Promise; waitForOnAllowanceHook(sources: onAllowanceHookSource[]): Promise; protected createExpectedSteps(intent: Intent, unallowedSources?: onAllowanceHookSource[]): void; protected createIntent(input: { amount: Decimal; assets: UserAssets; feeStore: FeeStore; gas: Decimal; gasInToken: Decimal; token: TokenInfo; }): Intent; protected markStepDone: (step: StepInfo, data?: { [k: string]: unknown; }) => void; } export default BaseRequest;