import { Effect, SubscriptionRef } from "effect"; import type { AccessList, Hash, TransactionReceipt, TransactionType } from "viem"; import type { ClientNotFoundError, TransactionReplacementReason, WalletNotConnectedError, WrongNetworkError } from "../core/index.js"; import { PublicClientService, TransactionFailedError, WalletClientService } from "../core/index.js"; export type TxRequestMeta = { readonly accessList?: AccessList | undefined; readonly gas?: bigint | undefined; readonly gasPrice?: bigint | undefined; readonly maxFeePerGas?: bigint | undefined; readonly maxPriorityFeePerGas?: bigint | undefined; readonly nonce?: number | bigint | undefined; readonly type?: TransactionType | undefined; }; export type TxState = ({ readonly tx?: TxRequestMeta | undefined; } & { status: "idle"; }) | ({ readonly tx?: TxRequestMeta | undefined; } & { status: "simulating"; }) | ({ readonly tx?: TxRequestMeta | undefined; } & { status: "estimated"; gas: bigint; }) | ({ readonly tx?: TxRequestMeta | undefined; } & { status: "signing"; }) | ({ readonly tx?: TxRequestMeta | undefined; } & { status: "submitted"; hash: Hash; }) | ({ readonly tx?: TxRequestMeta | undefined; } & { status: "pending"; hash: Hash; confirmations: number; }) | ({ readonly tx?: TxRequestMeta | undefined; } & { status: "mined"; hash: Hash; receipt: TransactionReceipt; effectiveGasPrice?: bigint | undefined; }) | ({ readonly tx?: TxRequestMeta | undefined; } & { status: "replaced"; oldHash: Hash; newHash: Hash; reason: TransactionReplacementReason; }) | ({ readonly tx?: TxRequestMeta | undefined; } & { status: "failed"; error: TransactionFailedError; }); export declare const initialTxState: TxState; export declare const makeTxTracker: Effect.Effect<{ changes: import("effect/Stream").Stream; get: Effect.Effect; ref: SubscriptionRef.SubscriptionRef; set: (state: TxState) => Effect.Effect; update: (f: (s: TxState) => TxState) => Effect.Effect; }, never, never>; export declare const speedupTransaction: (chainId: number, hash: Hash, newMaxFeePerGas: bigint, newMaxPriorityFeePerGas?: bigint) => Effect.Effect; export declare const cancelTransaction: (chainId: number, hash: Hash, newMaxFeePerGas: bigint, newMaxPriorityFeePerGas?: bigint) => Effect.Effect; //# sourceMappingURL=tracker.d.ts.map