import type { DwnInterface } from './types/dwn.js';
import type { PermissionsApi } from './types/permissions.js';
import type { DependencyRef, GenericMessage, ProtocolsConfigureMessage } from '@enbox/dwn-sdk-js';
/**
 * Helpers shared by the push (`sync-messages.ts`) and pull (`sync-admit-closure.ts`)
 * dependency-closure fetch paths. These were previously duplicated verbatim in both
 * modules; keep them here so the two paths cannot drift.
 */
/**
 * Resolves the delegate permission grant ID authorizing a sync fetch request, or
 * `undefined` for owner requests (no delegate configured) and when no matching grant
 * exists. Only the expected "no matching grant" case is swallowed; any other error
 * (store/network failure, revocation-check failure, parse error) surfaces so a real
 * resolution failure is not silently treated as "no grant".
 */
export declare function resolveDelegatePermissionGrantId(deps: {
    did: string;
    delegateDid?: string;
    permissionsApi?: PermissionsApi;
}, messageType: DwnInterface, protocol: string): Promise<string | undefined>;
/** Stable cache/identity key for a dependency reference. */
export declare function dependencyKey(ref: DependencyRef): string;
/** Whether any dependency is known to be unreachable (a terminal closure failure). */
export declare function hasTerminalDependency(refs: DependencyRef[]): boolean;
/** Human-readable detail listing the missing dependencies. */
export declare function missingDependencyDetail(refs: DependencyRef[]): string;
/** Type guard for a `ProtocolsConfigure` message. */
export declare function isProtocolsConfigureMessage(message: GenericMessage): message is ProtocolsConfigureMessage;
/** Predicate matching a tenant's own configuration of a given protocol. */
export declare function isTenantProtocolConfig(tenantDid: string, protocol: string): (message: GenericMessage) => message is ProtocolsConfigureMessage;
/** Returns the newest protocol configuration by message timestamp. */
export declare function newestProtocolConfig(configs: ProtocolsConfigureMessage[]): ProtocolsConfigureMessage | undefined;
//# sourceMappingURL=sync-fetch-helpers.d.ts.map