import type { Logger } from '@ariestools/sdk';
import type { XyoGateway } from '@xyo-network/xl1-protocol/protocol-lib';
import type { S3BucketConfig } from '../protocol-sdk/index-node.js';
/** Config for a REST/S3-backed client gateway. */
export interface RestGatewayConfig {
    /** @deprecated Renamed to `finalized`. */
    blocks?: S3BucketConfig;
    /** A separate chain-state bucket, when the head pointer (and chain-contract manifest) live apart from finalized blocks. Defaults to `finalized`. */
    chainState?: S3BucketConfig;
    dataLakeEndpoint?: string;
    /** Custom fetch override for every REST viewer (custom agents, auth headers, tests). Defaults to the global fetch. */
    fetchFn?: typeof globalThis.fetch;
    /** The finalized blocks bucket — required, unless the deprecated `blocks` alias is set. `readUrl` becomes the base for BlockViewer. */
    finalized?: S3BucketConfig;
    /** A separate index bucket, when step summaries live apart from finalized blocks. Defaults to `finalized`. */
    index?: S3BucketConfig;
    /**
     * Whether `XyoViewer` precomputes network-stake-reward positions across the whole chain at
     * startup. Defaults to `true`, but that precompute issues one REST round trip per
     * position/step, which can be slow or fragile against a large, live chain — set `false` for a
     * lighter-weight client that doesn't need reward data.
     */
    initRewardsCache?: boolean;
    /** Logger shared by every provider created for this gateway. */
    logger?: Logger;
    name?: string;
}
/**
 * Derives the standard `{ finalized, chainState, index }` bucket config from a network's root
 * domain, e.g. `https://sample.mainnet.xyo.space` becomes `https://blocks.sample...`,
 * `https://state.sample...`, `https://indexes.sample...` — the subdomain-per-bucket
 * layout live XL1 networks publish under. The result also carries the deprecated `blocks`
 * alias (same object as `finalized`) for callers not yet migrated.
 */
export declare function restGatewayConfigFromEndpoint(endpoint: string): Pick<RestGatewayConfig, 'blocks' | 'chainState' | 'finalized' | 'index'>;
/**
 * Builds a read-only `XyoGateway` backed by the S3 static REST file layout instead of RPC:
 * `BlockViewer`/`ChainStateViewer`/`FinalizationViewer`/`ChainContractViewer` read directly from
 * the S3 CDN URLs, and every other viewer (account balances, stake, transactions, ...)
 * is computed on top of that data by the `Simple*` providers, caching what they derive in memory.
 * Same consumer-facing shape as `GatewayBuilder.build()` — `gateway.connection.viewer.currentBlock()`,
 * `gateway.connection.viewer.account.balance.accountBalance(...)`, etc.
 *
 * @example
 * // Network root domain — blocks/chainState/index subdomains are derived via
 * // `restGatewayConfigFromEndpoint` (blocks.<domain>, state.<domain>, indexes.<domain>).
 * const gateway = await getRestGateway('https://sample.mainnet.xyo.space')
 *
 * @example
 * // Explicit buckets, for networks that don't follow the standard subpath layout.
 * const gateway = await getRestGateway({
 *   finalized: { readUrl: 'https://cdn.xl1.example/blocks' },
 *   chainState: { readUrl: 'https://cdn.xl1.example/chain-state' },
 * })
 */
export declare function getRestGateway(config: string | RestGatewayConfig): Promise<XyoGateway>;
//# sourceMappingURL=getRestGateway.d.ts.map