import type { DataEncodedRecordsWriteMessage } from '../types/records-types.js';
import type { MessageSigner } from '../types/signer.js';
import type { ValidationStateReader } from '../types/validation-state-reader.js';
import type { ProtocolDefinition, ProtocolsConfigureMessage } from '../types/protocols-types.js';
import { AbstractMessage } from '../core/abstract-message.js';
export type ProtocolsConfigureOptions = {
    messageTimestamp?: string;
    definition: ProtocolDefinition;
    signer: MessageSigner;
    /**
     * The delegated grant invoked to sign on behalf of the logical author, which is the grantor of the delegated grant.
     */
    delegatedGrant?: DataEncodedRecordsWriteMessage;
    permissionGrantId?: string;
};
export declare class ProtocolsConfigure extends AbstractMessage<ProtocolsConfigureMessage> {
    static parse(message: ProtocolsConfigureMessage): Promise<ProtocolsConfigure>;
    static create(options: ProtocolsConfigureOptions): Promise<ProtocolsConfigure>;
    /**
     * Authorizes the author-delegate who signed this message.
     * @param validationStateReader Used to check if the grant has been revoked.
     */
    authorizeAuthorDelegate(validationStateReader: ValidationStateReader): Promise<void>;
    /**
     * Performs validation on the given protocol definition that are not easy to do using a JSON schema.
     */
    private static validateProtocolDefinition;
    /**
     * Validates the `uses` map: alias names must match `^[a-zA-Z][a-zA-Z0-9_-]*$`,
     * values must be normalized protocol URLs, and no alias may reference the protocol itself.
     */
    private static validateUses;
    private static validateStructure;
    /**
     * Parses the given rule set hierarchy to get all the role protocol paths.
     * @throws DwnError if the hierarchy depth goes beyond 10 levels.
     */
    private static fetchAllRolePathsRecursively;
    /**
     * Validates the given rule set structure then recursively validates its nested child rule sets.
     */
    private static validateRuleSetRecursively;
    /**
     * Validates that a `$ref` node is a pure attachment point: it must NOT have
     * `$actions`, `$role`, `$size`, `$tags`, or `$keyAgreement`.
     * Also validates that the `$ref` alias exists in the `uses` map.
     */
    private static validateRefNode;
    /**
     * Validates that a cross-protocol reference (in `alias:path` format) has a valid alias
     * that exists in the `uses` map.
     * @param ref - The cross-protocol reference string (e.g., "threads:thread/participant")
     * @param uses - The protocol definition's `uses` map
     * @param ruleSetProtocolPath - The current protocol path (for error messages)
     * @param fieldName - The field name ('role' or 'of') for error messages
     */
    private static validateCrossProtocolAlias;
    private static normalizeDefinition;
}
//# sourceMappingURL=protocols-configure.d.ts.map