import { type Hash, type Promisable } from '@ariestools/sdk';
import type { Payload, WithHashMeta } from '@xyo-network/sdk';
import type { BlockViewer, ChainId, HydratedBlockWithHashMeta, SignedHydratedBlockWithHashMeta, WindowedBlockViewer, XL1BlockNumber } from '@xyo-network/xl1-protocol/protocol-lib';
import { AbstractCreatableProvider, type CreatableProviderParams } from '../../CreatableProvider/index.js';
/** Parameters for SimpleWindowedBlockViewer. */
export interface SimpleWindowedBlockViewerParams extends CreatableProviderParams {
    /** block Viewer configuration or state exposed by this contract. */
    blockViewer?: BlockViewer;
    /** max Window Size configuration or state exposed by this contract. */
    maxWindowSize: number;
    /** sync Interval configuration or state exposed by this contract. */
    syncInterval: number;
}
/** SimpleWindowedBlockViewer implementation. */
export declare class SimpleWindowedBlockViewer extends AbstractCreatableProvider<SimpleWindowedBlockViewerParams> implements WindowedBlockViewer {
    /** Connection kinds supported by this provider. */
    static readonly connectionTypes: readonly ["lmdb", "mongo", "memory", "rpc"];
    /** Primary moniker used to resolve this provider. */
    static readonly defaultMoniker: "WindowedBlockViewer";
    /** Provider monikers that must resolve before this provider can be created. */
    static readonly dependencies: "BlockViewer"[];
    /** Provider monikers implemented by this provider class. */
    static readonly monikers: "WindowedBlockViewer"[];
    /** Read, write, or mixed capability surface exposed by the provider. */
    static readonly surface: "node";
    /** Moniker implemented by this provider instance. */
    moniker: "WindowedBlockViewer";
    private _blockHashMap;
    private _blockNumberMap;
    private _blockViewer;
    private _chain;
    private _syncMutex;
    private _timerId;
    private _transactionHashMap;
    protected get maxWindowSize(): number;
    protected get syncInterval(): number;
    /** Returns the params handler result exposed by this provider. */
    static paramsHandler(params?: Partial<SimpleWindowedBlockViewerParams>): Promise<SimpleWindowedBlockViewerParams>;
    /** Returns the block by hash result exposed by this provider. */
    blockByHash(hash: Hash): [{
        schema: "network.xyo.boundwitness" & {
            readonly __schema: true;
        };
        addresses: (import("@xyo-network/sdk").XyoQuantAddress | (Lowercase<string> & {
            readonly __hex: true;
        } & {
            readonly __address: true;
        }))[];
        payload_hashes: import("@ariestools/sdk").BrandedHash[];
        payload_schemas: import("@xyo-network/sdk").BrandedSchema<string>[];
        previous_hashes: (import("@ariestools/sdk").BrandedHash | null)[];
        $signatures: import("@ariestools/sdk").BrandedHex[];
        block: XL1BlockNumber;
        chain: import("@ariestools/sdk").BrandedHex;
        previous: import("@ariestools/sdk").BrandedHash | null;
        $epoch: number;
        _hash: import("@ariestools/sdk").BrandedHash;
        _dataHash: import("@ariestools/sdk").BrandedHash;
        $destination?: import("@xyo-network/sdk").XyoQuantAddress | (Lowercase<string> & {
            readonly __hex: true;
        } & {
            readonly __address: true;
        }) | undefined;
        $sourceQuery?: import("@ariestools/sdk").BrandedHash | undefined;
        protocol?: number | undefined;
        step_hashes?: import("@ariestools/sdk").BrandedHash[] | undefined;
    }, {
        [x: string]: unknown;
        schema: import("@xyo-network/sdk").BrandedSchema<string>;
        _hash: import("@ariestools/sdk").BrandedHash;
        _dataHash: import("@ariestools/sdk").BrandedHash;
    }[]] | null;
    /** Returns the block by number result exposed by this provider. */
    blockByNumber(blockNumber: XL1BlockNumber): [{
        schema: "network.xyo.boundwitness" & {
            readonly __schema: true;
        };
        addresses: (import("@xyo-network/sdk").XyoQuantAddress | (Lowercase<string> & {
            readonly __hex: true;
        } & {
            readonly __address: true;
        }))[];
        payload_hashes: import("@ariestools/sdk").BrandedHash[];
        payload_schemas: import("@xyo-network/sdk").BrandedSchema<string>[];
        previous_hashes: (import("@ariestools/sdk").BrandedHash | null)[];
        $signatures: import("@ariestools/sdk").BrandedHex[];
        block: XL1BlockNumber;
        chain: import("@ariestools/sdk").BrandedHex;
        previous: import("@ariestools/sdk").BrandedHash | null;
        $epoch: number;
        _hash: import("@ariestools/sdk").BrandedHash;
        _dataHash: import("@ariestools/sdk").BrandedHash;
        $destination?: import("@xyo-network/sdk").XyoQuantAddress | (Lowercase<string> & {
            readonly __hex: true;
        } & {
            readonly __address: true;
        }) | undefined;
        $sourceQuery?: import("@ariestools/sdk").BrandedHash | undefined;
        protocol?: number | undefined;
        step_hashes?: import("@ariestools/sdk").BrandedHash[] | undefined;
    }, {
        [x: string]: unknown;
        schema: import("@xyo-network/sdk").BrandedSchema<string>;
        _hash: import("@ariestools/sdk").BrandedHash;
        _dataHash: import("@ariestools/sdk").BrandedHash;
    }[]] | null;
    /** Returns the block by transaction hash result exposed by this provider. */
    blockByTransactionHash(hash: Hash): Promise<[{
        $epoch: number;
        block: XL1BlockNumber;
        chain: import("@ariestools/sdk").BrandedHex;
        previous: import("@ariestools/sdk").BrandedHash | null;
        schema: "network.xyo.boundwitness" & {
            readonly __schema: true;
        };
        addresses: (import("@xyo-network/sdk").XyoQuantAddress | (Lowercase<string> & {
            readonly __hex: true;
        } & {
            readonly __address: true;
        }))[];
        payload_hashes: import("@ariestools/sdk").BrandedHash[];
        payload_schemas: import("@xyo-network/sdk").BrandedSchema<string>[];
        previous_hashes: (import("@ariestools/sdk").BrandedHash | null)[];
        $signatures: (import("@ariestools/sdk").BrandedHex | null)[];
        _hash: import("@ariestools/sdk").BrandedHash;
        _dataHash: import("@ariestools/sdk").BrandedHash;
        protocol?: number | undefined;
        step_hashes?: import("@ariestools/sdk").BrandedHash[] | undefined;
        $destination?: import("@xyo-network/sdk").XyoQuantAddress | (Lowercase<string> & {
            readonly __hex: true;
        } & {
            readonly __address: true;
        }) | undefined;
        $sourceQuery?: import("@ariestools/sdk").BrandedHash | undefined;
    }, {
        [x: string]: unknown;
        schema: import("@xyo-network/sdk").BrandedSchema<string>;
        _hash: import("@ariestools/sdk").BrandedHash;
        _dataHash: import("@ariestools/sdk").BrandedHash;
    }[]] | null>;
    /** Returns the blocks by hash result exposed by this provider. */
    blocksByHash(hash: Hash, limit?: number): [{
        schema: "network.xyo.boundwitness" & {
            readonly __schema: true;
        };
        addresses: (import("@xyo-network/sdk").XyoQuantAddress | (Lowercase<string> & {
            readonly __hex: true;
        } & {
            readonly __address: true;
        }))[];
        payload_hashes: import("@ariestools/sdk").BrandedHash[];
        payload_schemas: import("@xyo-network/sdk").BrandedSchema<string>[];
        previous_hashes: (import("@ariestools/sdk").BrandedHash | null)[];
        $signatures: import("@ariestools/sdk").BrandedHex[];
        block: XL1BlockNumber;
        chain: import("@ariestools/sdk").BrandedHex;
        previous: import("@ariestools/sdk").BrandedHash | null;
        $epoch: number;
        _hash: import("@ariestools/sdk").BrandedHash;
        _dataHash: import("@ariestools/sdk").BrandedHash;
        $destination?: import("@xyo-network/sdk").XyoQuantAddress | (Lowercase<string> & {
            readonly __hex: true;
        } & {
            readonly __address: true;
        }) | undefined;
        $sourceQuery?: import("@ariestools/sdk").BrandedHash | undefined;
        protocol?: number | undefined;
        step_hashes?: import("@ariestools/sdk").BrandedHash[] | undefined;
    }, {
        [x: string]: unknown;
        schema: import("@xyo-network/sdk").BrandedSchema<string>;
        _hash: import("@ariestools/sdk").BrandedHash;
        _dataHash: import("@ariestools/sdk").BrandedHash;
    }[]][];
    /** Returns the blocks by number result exposed by this provider. */
    blocksByNumber(blockNumber: XL1BlockNumber, limit?: number): [{
        schema: "network.xyo.boundwitness" & {
            readonly __schema: true;
        };
        addresses: (import("@xyo-network/sdk").XyoQuantAddress | (Lowercase<string> & {
            readonly __hex: true;
        } & {
            readonly __address: true;
        }))[];
        payload_hashes: import("@ariestools/sdk").BrandedHash[];
        payload_schemas: import("@xyo-network/sdk").BrandedSchema<string>[];
        previous_hashes: (import("@ariestools/sdk").BrandedHash | null)[];
        $signatures: import("@ariestools/sdk").BrandedHex[];
        block: XL1BlockNumber;
        chain: import("@ariestools/sdk").BrandedHex;
        previous: import("@ariestools/sdk").BrandedHash | null;
        $epoch: number;
        _hash: import("@ariestools/sdk").BrandedHash;
        _dataHash: import("@ariestools/sdk").BrandedHash;
        $destination?: import("@xyo-network/sdk").XyoQuantAddress | (Lowercase<string> & {
            readonly __hex: true;
        } & {
            readonly __address: true;
        }) | undefined;
        $sourceQuery?: import("@ariestools/sdk").BrandedHash | undefined;
        protocol?: number | undefined;
        step_hashes?: import("@ariestools/sdk").BrandedHash[] | undefined;
    }, {
        [x: string]: unknown;
        schema: import("@xyo-network/sdk").BrandedSchema<string>;
        _hash: import("@ariestools/sdk").BrandedHash;
        _dataHash: import("@ariestools/sdk").BrandedHash;
    }[]][];
    /** Returns the blocks by step result exposed by this provider. */
    blocksByStep(stepLevel: number, stepIndex: number): [{
        schema: "network.xyo.boundwitness" & {
            readonly __schema: true;
        };
        addresses: (import("@xyo-network/sdk").XyoQuantAddress | (Lowercase<string> & {
            readonly __hex: true;
        } & {
            readonly __address: true;
        }))[];
        payload_hashes: import("@ariestools/sdk").BrandedHash[];
        payload_schemas: import("@xyo-network/sdk").BrandedSchema<string>[];
        previous_hashes: (import("@ariestools/sdk").BrandedHash | null)[];
        $signatures: import("@ariestools/sdk").BrandedHex[];
        block: XL1BlockNumber;
        chain: import("@ariestools/sdk").BrandedHex;
        previous: import("@ariestools/sdk").BrandedHash | null;
        $epoch: number;
        _hash: import("@ariestools/sdk").BrandedHash;
        _dataHash: import("@ariestools/sdk").BrandedHash;
        $destination?: import("@xyo-network/sdk").XyoQuantAddress | (Lowercase<string> & {
            readonly __hex: true;
        } & {
            readonly __address: true;
        }) | undefined;
        $sourceQuery?: import("@ariestools/sdk").BrandedHash | undefined;
        protocol?: number | undefined;
        step_hashes?: import("@ariestools/sdk").BrandedHash[] | undefined;
    }, {
        [x: string]: unknown;
        schema: import("@xyo-network/sdk").BrandedSchema<string>;
        _hash: import("@ariestools/sdk").BrandedHash;
        _dataHash: import("@ariestools/sdk").BrandedHash;
    }[]][];
    /** Returns the blocks by transaction hashes result exposed by this provider. */
    blocksByTransactionHashes(hashes: Hash[]): Promisable<HydratedBlockWithHashMeta[]>;
    /** Returns the chain id result exposed by this provider. */
    chainId(_blockNumber?: unknown): Promisable<ChainId>;
    /** Creates the provider instance after its dependencies and configuration have resolved. */
    createHandler(): Promise<void>;
    /** Returns block. */
    currentBlock(): Promisable<SignedHydratedBlockWithHashMeta>;
    /** Returns block hash. */
    currentBlockHash(): Promisable<Hash>;
    /** Returns block number. */
    currentBlockNumber(): Promisable<XL1BlockNumber>;
    /** Returns the payload by hash result exposed by this provider. */
    payloadByHash(hash: Hash): Promise<WithHashMeta<Payload> | null>;
    /** Returns the payloads by hash result exposed by this provider. */
    payloadsByHash(_hashes: Hash[]): Promisable<WithHashMeta<Payload>[]>;
    /** Returns the start handler result exposed by this provider. */
    startHandler(): Promise<void>;
    /** Returns the stop handler result exposed by this provider. */
    stopHandler(): Promise<void>;
    private addBlock;
    private startPoll;
    private stopPoll;
    private sync;
}
//# sourceMappingURL=SimpleWindowedBlockViewer.d.ts.map