/**
 * did:web resolver — resolves DIDs hosted on developer domains.
 *
 * Implements the W3C did:web method:
 *   did:web:example.com -> https://example.com/.well-known/did.json
 *   did:web:example.com:path:to -> https://example.com/path/to/did.json
 *
 * Enables direct agent-to-agent communication without a centralized registry.
 * Implements TrustRegistry interface for drop-in use with Agent class.
 */
import type { Result } from '@private.me/shared';
import type { TrustRegistry, RegistryEntry, RegistryError } from './trust-registry.js';
/** Options for DidWebResolver. */
export interface DidWebResolverOptions {
    /** Custom fetch implementation (for testing). */
    readonly fetch?: typeof globalThis.fetch;
    /** Cache TTL in ms. Default: 300000 (5 min). */
    readonly cacheTtlMs?: number;
}
/**
 * Resolve did:web DIDs by fetching DID documents from the hosting domain.
 *
 * Implements TrustRegistry interface so it can be used as a drop-in
 * replacement for MemoryTrustRegistry or HttpTrustRegistry.
 */
export declare class DidWebResolver implements TrustRegistry {
    private readonly fetchFn;
    private readonly cacheTtlMs;
    private readonly cache;
    constructor(opts?: DidWebResolverOptions);
    /** Registration not supported for did:web (developers host their own). */
    register(_opts: import('./trust-registry.js').RegistrationOptions): Promise<Result<void, RegistryError>>;
    /**
     * Resolve a did:web DID to its raw public key bytes.
     * @param did - A did:web DID string.
     * @returns Public key bytes or error.
     */
    resolve(did: string): Promise<Result<Uint8Array, RegistryError>>;
    /**
     * Check if a did:web DID has a specific scope.
     * @param did - The DID to check.
     * @param scope - The scope to verify.
     * @returns True if scope is granted.
     */
    hasScope(did: string, scope: string): Promise<boolean>;
    /**
     * Check if a did:web DID has a specific receive scope.
     * @param did - The DID to check.
     * @param scope - The scope to verify.
     * @returns True if receive scope is granted.
     */
    hasReceiveScope(did: string, scope: string): Promise<boolean>;
    /** Revocation not supported for did:web (developer controls their domain). */
    revoke(_did: string): Promise<Result<void, RegistryError>>;
    /**
     * Get the full registry entry for a did:web DID.
     * @param did - The DID to look up.
     * @returns Full entry or error.
     */
    getEntry(did: string): Promise<Result<RegistryEntry, RegistryError>>;
    /** Number of cached entries (for testing). */
    get cacheSize(): number;
    /** Fetch and parse a DID document, with caching. */
    private fetchEntry;
}
/**
 * Convert a did:web DID to its HTTPS URL.
 *   did:web:example.com -> https://example.com/.well-known/did.json
 *   did:web:example.com:path:to -> https://example.com/path/to/did.json
 * @param did - The did:web DID string.
 * @returns HTTPS URL or null if invalid.
 */
export declare function didWebToUrl(did: string): string | null;
