import type { Logger } from '@ariestools/sdk';
import { AbstractCreatable } from '@ariestools/sdk';
import type { AccountInstance } from '@xyo-network/sdk';
import type { Provider, ProviderMoniker } from '@xyo-network/xl1-protocol/protocol-lib';
import type { ConnectionBinding, ConnectionBindingFields } from '../config/connectionBindings.js';
import type { ConnectionHandleCache } from '../model/ConnectionHandleCache.js';
import type { CreatableProvider, CreatableProviderEventData, CreatableProviderInstance, CreatableProviderParams, ProviderMap } from './CreatableProvider.js';
import { ProviderFactory } from './ProviderFactory.js';
/** Abstract base class for CreatableProvider implementations. */
export declare abstract class AbstractCreatableProvider<TParams extends CreatableProviderParams = CreatableProviderParams, TEventData extends CreatableProviderEventData = CreatableProviderEventData> extends AbstractCreatable<TParams, TEventData> implements Omit<CreatableProviderInstance, 'moniker'> {
    dependencies: ProviderMap;
    protected _contextCache: TParams['context'] | undefined;
    protected _logger: Logger | undefined | null;
    abstract readonly moniker: ProviderMoniker;
    get logger(): Logger | undefined;
    get meter(): import("@opentelemetry/api").Meter | undefined;
    get tracer(): import("@opentelemetry/api").Tracer | undefined;
    /** This provider's bound connection from config, when one is declared. */
    protected get boundConnection(): ConnectionBinding | undefined;
    protected get config(): {
        chain: {
            id?: import("@ariestools/sdk").BrandedHex | undefined;
            genesisRewardAddress?: (Lowercase<string> & {
                readonly __hex: true;
            } & {
                readonly __address: true;
            }) | import("@xyo-network/sdk").XyoQuantAddress | undefined;
            deploymentBlock?: number | undefined;
        };
        log: {
            logLevel: "info" | "error" | "warn" | "log" | "debug" | "trace";
            silent: boolean;
        };
        connections: Record<string, {
            root: string;
            type: "lmdb";
            access?: "read" | "write" | undefined;
            store?: string | undefined;
        } | {
            type: "mongo";
            connectionString?: string | undefined;
            database?: string | undefined;
            domain?: string | undefined;
            password?: string | undefined;
            username?: string | undefined;
            collection?: string | undefined;
        } | {
            type: "rpc";
            protocol: string;
            url?: string | undefined;
            networkId?: string | undefined;
            sessionId?: string | undefined;
        } | {
            type: "rest";
            baseUrl: string;
        } | {
            type: "s3";
            bucket?: string | undefined;
            endpoint?: string | undefined;
            prefix?: string | undefined;
            readUrl?: string | undefined;
            accessKeyId?: string | undefined;
            accountId?: string | undefined;
            secretAccessKey?: string | undefined;
        } | {
            type: "evm-rpc";
            url: string;
            chainId?: string | undefined;
            eventQueryBlockChunkSize?: number | undefined;
        } | {
            type: "memory";
        }>;
        providerBindings: Record<string, {
            connection?: string | undefined;
            provider?: string | undefined;
        }>;
        providers: {
            [x: string]: unknown;
            moniker: string;
            labels?: string[] | undefined;
        }[];
        telemetry: {
            metrics?: {
                scrape: {
                    path: string;
                    port?: number | undefined;
                };
            } | undefined;
            otel?: {
                otlpEndpoint?: string | undefined;
            } | undefined;
        };
        validation: {
            signerAuthorizations: ({
                type: "completedStepReward";
                signers: (import("@xyo-network/sdk").XyoQuantAddress | (Lowercase<string> & {
                    readonly __hex: true;
                } & {
                    readonly __address: true;
                }))[];
            } | {
                type: "derivedReceive";
                scope: string;
                signers: (import("@xyo-network/sdk").XyoQuantAddress | (Lowercase<string> & {
                    readonly __hex: true;
                } & {
                    readonly __address: true;
                }))[];
            })[];
            minCandidates: number;
            backoffMs: number;
        };
    };
    /**
     * Shared runtime connection handles for this context — lazily attached so all providers
     * on the same context share one handle per connection name.
     */
    protected get connectionHandles(): ConnectionHandleCache;
    protected get context(): import('../model/CreatableProviderContext.zod.js').CreatableProviderContextType;
    /** Signing account for this provider: keyed by moniker, falling back to `DefaultSignerKey`. */
    protected get contextSigner(): AccountInstance | undefined;
    protected get locator(): import('./ProviderFactoryLocatorInstance.js').ProviderFactoryLocatorInstance<import('../model/CreatableProviderContext.zod.js').CreatableProviderContextType>;
    static factory<TInstance extends CreatableProviderInstance, TDependencies extends ProviderMoniker[] = ProviderMoniker[]>(this: CreatableProvider<TInstance>, dependencies: TDependencies, params?: Partial<Omit<TInstance['params'], 'context'>>): ProviderFactory<TInstance, TDependencies>;
    static paramsHandler<T extends CreatableProviderInstance>(params?: Partial<T['params']>): Promise<T["params"]>;
    /**
     * Resolve this provider class's bound connection from config or throw, enforcing the
     * class's `connectionTypes`. For static `paramsHandler` overrides — config-driven
     * self-resolution instead of params injection.
     */
    static requireBoundConnection(config: ConnectionBindingFields): ConnectionBinding;
    /**
     * Resolve a connection in a static `paramsHandler`: an explicitly injected
     * `params.connection` wins (deprecated path), otherwise the class's bound connection
     * from `params.context.config`.
     */
    static resolveConnection(params?: {
        connection?: ConnectionBinding;
        context?: {
            config?: ConnectionBindingFields;
        };
    }): ConnectionBinding | undefined;
    /**
     * Resolve this provider class's bound connection from config, checking each of the
     * class's monikers in order; undefined when no moniker is bound.
     */
    static tryBoundConnection(config: ConnectionBindingFields): ConnectionBinding | undefined;
    createHandler(): Promise<void>;
    locateAndCreate<TProvider extends Provider<ProviderMoniker>>(moniker: TProvider['moniker']): Promise<CreatableProviderInstance<TProvider>>;
    tryLocateAndCreate<TProvider extends Provider<ProviderMoniker>>(moniker: TProvider['moniker']): Promise<CreatableProviderInstance<TProvider> | undefined>;
}
//# sourceMappingURL=AbstractCreatableProvider.d.ts.map