import type { Result } from '@private.me/shared';
/**
 * Mechanism 4: Convert Ed25519 public key to did:privateme DID.
 *
 * Format: did:privateme:z + base58btc(0xed01 || publicKey)
 *
 * This is a new DID method identifier for PRIVATE.ME ACIs.
 * It uses the same base58btc encoding as did:key for compatibility,
 * but signals that the identity is backed by PRIVATE.ME infrastructure.
 *
 * Backward compatible: agents accept both did:key and did:privateme formats.
 *
 * @param rawPublicKey - 32-byte Ed25519 public key
 * @returns DID in format did:privateme:z...
 */
export declare function publicKeyToPrivateMeDid(rawPublicKey: Uint8Array): string;
/**
 * Extract raw 32-byte public key from a did:privateme DID.
 *
 * Format: did:privateme:z + base58btc(0xed01 || publicKey)
 *
 * @param did - DID in format did:privateme:z...
 * @returns 32-byte public key or error
 */
export declare function privateMeDidToPublicKeyBytes(did: string): Result<Uint8Array, string>;
/**
 * Determine if a DID is in the new did:privateme format.
 *
 * @param did - The DID to check
 * @returns true if DID is did:privateme format, false otherwise
 */
export declare function isPrivateMeDid(did: string): boolean;
/**
 * Determine if a DID is in the did:key format.
 *
 * @param did - The DID to check
 * @returns true if DID is did:key format, false otherwise
 */
export declare function isDidKeyFormat(did: string): boolean;
/**
 * Convert between DID formats (did:key ↔ did:privateme).
 *
 * Allows backward compatibility between old did:key and new did:privateme formats.
 * The public key remains the same; only the method identifier changes.
 *
 * @param did - Source DID in either format
 * @returns Converted DID in the other format, or error
 */
export declare function convertDidFormat(did: string): Result<string, string>;
/**
 * Normalize a DID to the canonical format (did:privateme).
 *
 * All DIDs are converted to did:privateme format for consistency.
 * Existing did:key DIDs are automatically upgraded.
 *
 * @param did - Source DID in any supported format
 * @returns Normalized DID in did:privateme format
 */
export declare function normalizeDid(did: string): Result<string, string>;
/**
 * Parse a DID into method, identifier, and fragment.
 *
 * @param did - Full DID string
 * @returns Parsed DID components or error
 */
export declare function parseDid(did: string): Result<{
    method: string;
    identifier: string;
    fragment?: string;
}, string>;
