import type { EventData } from '@ariestools/sdk';
import type { CreatableProviderEventData, CreatableProviderParams } from '../../protocol-sdk/index-node.js';
import { AbstractCreatableProvider } from '../../protocol-sdk/index-node.js';
import type { RpcTransport } from '../transport/index.js';
import type { RpcSchemaMap } from '../types/index.js';
/**
 * Transport wiring shared by every JsonRpc provider.
 *
 * A provider always owns its `schemas()` — callers must never supply schemas.
 * To point a provider at a specific endpoint, inject `rpcUrl` (the provider
 * still wires its own schemas), not a pre-built `transport`. Injecting a
 * fully-formed transport is supported for advanced/test scenarios, in which
 * case the caller owns that transport's schemas.
 */
export interface RpcTransportParams<TSchemas extends RpcSchemaMap = RpcSchemaMap> {
    /** Explicit RPC endpoint URL. The provider supplies its own schemas. */
    rpcUrl?: string;
    /** A fully-constructed transport. Takes precedence over `rpcUrl` and connection discovery. */
    transport?: RpcTransport<TSchemas>;
}
/** Parameters shared by all JsonRpc providers (viewers and runners). */
export interface JsonRpcProviderParams<TSchemas extends RpcSchemaMap = RpcSchemaMap> extends CreatableProviderParams, RpcTransportParams<TSchemas> {
}
/**
 * Abstract base for JsonRpc providers (viewers and runners).
 *
 * Owns the transport lifecycle so the two surfaces cannot drift. `schemas()`
 * always comes from the provider itself, so neither an injected `rpcUrl` nor a
 * discovered connection can strip a method's schema — the cause of "missing
 * schema" failures (and silently skipped result decoding) when a schema-less
 * transport was injected by a layer that knew only the endpoint.
 *
 * Precedence: an explicitly injected `transport` › `rpcUrl` › the provider's own
 * connection binding (`providerBindings.<moniker>.connection`) › connection discovery
 * (`default-rpc`, then the first declared rpc connection).
 */
export declare abstract class AbstractJsonRpcProvider<TSchemas extends RpcSchemaMap, TParams extends JsonRpcProviderParams<TSchemas> = JsonRpcProviderParams<TSchemas>, TEventData extends EventData = CreatableProviderEventData> extends AbstractCreatableProvider<TParams, TEventData> {
    protected get transport(): RpcTransport<TSchemas>;
    /** Creates the provider instance after its dependencies and configuration have resolved. */
    createHandler(): Promise<void>;
    protected createTransport(): RpcTransport<TSchemas>;
    protected abstract schemas(): TSchemas;
}
//# sourceMappingURL=JsonRpcProvider.d.ts.map