import { Effect } from "effect"; import type { TxError } from "#src/errors/index.js"; type GasLimitOverflow = { blockGasLimit: bigint; effectiveLimit: bigint; estimatedGas: bigint; reason: "exceeded" | "tx-cap"; }; type TxMachineContext = { error: TxError | null; errorMessage: string | null; gasLimit: bigint | undefined; gasLimitOverflow: GasLimitOverflow | null; hash: string | null; payload: TPayload | null; preprocess: TPreprocess | null; signResult: TSignResult | null; result: TResult | null; }; type TxMachineEvents = { type: "SUBMIT"; payload: TPayload; } | { type: "RESET"; }; type GasCheckResult = { gasLimit: bigint | undefined; } | { overflow: GasLimitOverflow; }; type TxMachineServices = { onValidate: (payload: TPayload) => Effect.Effect; onGasCheck?: (input: { payload: TPayload; preprocess: TPreprocess; }) => Effect.Effect; onSimulate?: (input: { payload: TPayload; preprocess: TPreprocess; }) => Effect.Effect; onSign: (input: { payload: TPayload; preprocess: TPreprocess; gasLimit?: bigint; }) => Effect.Effect; onConfirm: (input: { payload: TPayload; signResult: TSignResult; }) => Effect.Effect; }; type TxMachineConfig = { id: string; services: TxMachineServices; getWalletType: (payload: TPayload) => "safe" | "eoa"; isUserRejectedError?: (error: unknown) => boolean; isGasLimitOverflowError?: (error: unknown) => GasLimitOverflow | undefined; }; declare function createTxMachine({ id, services, getWalletType, isUserRejectedError, isGasLimitOverflowError, }: TxMachineConfig): import("xstate").StateMachine, { type: "RESET"; } | { type: "SUBMIT"; payload: TPayload; }, { [x: string]: import("xstate").ActorRefFromLogic> | import("xstate").ActorRefFromLogic> | import("xstate").ActorRefFromLogic> | import("xstate").ActorRefFromLogic> | import("xstate").ActorRefFromLogic> | undefined; }, { src: "doValidate"; logic: import("xstate").PromiseActorLogic; id: string | undefined; } | { src: "doConfirm"; logic: import("xstate").PromiseActorLogic; id: string | undefined; } | { src: "doGasCheck"; logic: import("xstate").PromiseActorLogic; id: string | undefined; } | { src: "doSign"; logic: import("xstate").PromiseActorLogic; id: string | undefined; } | { src: "doSimulate"; logic: import("xstate").PromiseActorLogic<{ overflow: GasLimitOverflow; } | undefined, { payload: TPayload; preprocess: TPreprocess; }, import("xstate").EventObject>; id: string | undefined; }, { type: "doCache"; params: import("xstate").NonReducibleUnknown; } | { type: "doError"; params: import("xstate").NonReducibleUnknown; } | { type: "doPreprocess"; params: import("xstate").NonReducibleUnknown; } | { type: "doReset"; params: import("xstate").NonReducibleUnknown; } | { type: "doResult"; params: import("xstate").NonReducibleUnknown; } | { type: "doGasLimit"; params: import("xstate").NonReducibleUnknown; } | { type: "doGasLimitOverflow"; params: import("xstate").NonReducibleUnknown; } | { type: "doGasLimitOverflowFromError"; params: import("xstate").NonReducibleUnknown; } | { type: "doSignResult"; params: import("xstate").NonReducibleUnknown; }, { type: "isUserRejectedError"; params: unknown; } | { type: "isGasLimitOverflowError"; params: unknown; } | { type: "hasGasLimitOverflow"; params: unknown; } | { type: "isEoaWallet"; params: unknown; } | { type: "isSafeWallet"; params: unknown; }, never, {}, string, import("xstate").NonReducibleUnknown, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, { id?: string | undefined | undefined; states?: {} | undefined; }>; export { createTxMachine }; export type { GasLimitOverflow, TxMachineConfig, TxMachineContext, TxMachineEvents, TxMachineServices, }; //# sourceMappingURL=tx.d.ts.map