import * as Context from "effect/Context";
import * as Effect from "effect/Effect";
import * as Layer from "effect/Layer";
import * as Stream from "effect/Stream";
import * as Viem from "viem";
declare const EvmRpc_base: Context.TagClass<EvmRpc, "Amp/EvmRpc", {
    /**
     * The URL of the RPC server.
     */
    readonly url: string;
    /**
     * Get a block by number.
     *
     * @param number - The number of the block to get.
     * @returns The block.
     */
    readonly getBlockByNumber: (number: bigint) => Effect.Effect<Viem.Block<bigint, false, "latest">, EvmRpcError>;
    /**
     * Get the latest block number.
     */
    readonly getLatestBlockNumber: Effect.Effect<bigint, EvmRpcError>;
    /**
     * Stream blocks monotonically increasing in block number.
     *
     * In case of a reorg, the stream will be reset to the latest block number.
     */
    readonly streamBlocks: Stream.Stream<bigint, EvmRpcError>;
}>;
/**
 * Service definition for the evm rpc service.
 */
export declare class EvmRpc extends EvmRpc_base {
}
declare const EvmRpcError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & {
    readonly _tag: "EvmRpcError";
} & Readonly<A>;
export declare class EvmRpcError extends EvmRpcError_base<{
    readonly cause?: unknown;
    readonly message?: string;
}> {
}
/**
 * Creates a layer for the evm rpc service.
 *
 * @param url - The url of the rpc server.
 * @returns A layer for the evm rpc service.
 */
export declare const layer: (url: string) => Layer.Layer<EvmRpc, never, never>;
export {};
//# sourceMappingURL=EvmRpc.d.ts.map