import type { IdentityDocument } from '../types/identity.js';
export type DelegationRef = {
    type: 'raw_key';
    publicKey: string;
} | {
    type: 'did';
    did: string;
    identityDocument?: IdentityDocument;
};
export interface ReanchoredDelegation {
    delegationId: string;
    delegatorRef: DelegationRef;
    delegateRef: DelegationRef;
    scope: string[];
    spendLimit?: number;
    originalDelegatorKey?: string;
    originalDelegateKey?: string;
    reanchoredAt: string;
}
export declare function createDelegationRef(opts: {
    publicKey: string;
} | {
    did: string;
    identityDocument?: IdentityDocument;
}): DelegationRef;
export declare function resolvePublicKey(ref: DelegationRef): string | null;
export declare function reanchorDelegation(opts: {
    delegationId: string;
    delegatorKey: string;
    delegateKey: string;
    scope: string[];
    spendLimit?: number;
    delegatorDid: string;
    delegateDid: string;
    delegatorIdentity?: IdentityDocument;
    delegateIdentity?: IdentityDocument;
}): ReanchoredDelegation;
export declare function verifyReanchoredDelegation(delegation: ReanchoredDelegation): {
    valid: boolean;
    errors: string[];
};
export declare function verifyWithRef(message: string, signature: string, ref: DelegationRef): {
    verified: boolean;
    resolvedKey: string | null;
};
export declare function didCoversKey(ref: DelegationRef, publicKey: string): boolean;
//# sourceMappingURL=reanchor.d.ts.map