import type { Result } from '@private.me/shared';
/**
 * DID Document representation for did:key and did:privateme DIDs.
 *
 * Mechanism 3: Includes service endpoints for viral exposure.
 * When Bob receives a message from Alice, Bob's agent can resolve Alice's
 * DID to retrieve the service endpoint, learning about PRIVATE.ME/xBind.
 */
export interface DidDocument {
    '@context': string[];
    id: string;
    name?: string;
    publicKey?: Array<{
        id: string;
        type: string;
        controller: string;
        publicKeyBase64?: string;
        publicKeyMultibase?: string;
    }>;
    authentication?: string[];
    assertionMethod?: string[];
    keyAgreement?: string[];
    service?: Array<{
        id: string;
        type: string;
        serviceEndpoint: string | Record<string, unknown>;
        description?: string;
    }>;
}
/**
 * Generate a DID document for a given DID.
 *
 * Includes service endpoints that advertise PRIVATE.ME/xBind.
 * Both did:key and did:privateme DIDs generate the same service endpoints.
 *
 * @param did - The DID (did:key:z... or did:privateme:z...)
 * @param rawPublicKey - The 32-byte Ed25519 public key
 * @param name - Optional name for the identity
 * @returns DID document with service endpoints
 */
export declare function generateDidDocument(did: string, rawPublicKey: Uint8Array, name?: string): Result<DidDocument, string>;
/**
 * Resolve a DID to its document (simulated).
 *
 * In a production system, this would query a DID resolver.
 * For now, this generates a synthetic document based on the DID.
 *
 * @param did - The DID to resolve
 * @param rawPublicKey - The 32-byte Ed25519 public key
 * @returns DID document or error
 */
export declare function resolveDid(did: string, rawPublicKey: Uint8Array): Promise<Result<DidDocument, string>>;
/**
 * Extract service endpoints from a DID document.
 *
 * Filters for PRIVATE.ME service endpoints to provide discovery information.
 *
 * @param document - The DID document
 * @returns Array of service endpoints advertising PRIVATE.ME services
 */
export declare function getServiceEndpoints(document: DidDocument): Array<{
    type: string;
    endpoint: string;
    description?: string;
}>;
