import { LookupAnswer, VerifiableCertificate, LookupResolver, DiscoverCertificatesResult, IdentityCertificate, IdentityCertifier, Base64String, ChainTracker, TransactionEvidenceLimits } from '@bsv/sdk'; import { TrustSettings } from '../WalletSettingsManager'; import { OverlayOutputEvidence } from './verifyOverlayOutput'; export interface ExtendedVerifiableCertificate extends IdentityCertificate { certifierInfo: IdentityCertifier; publiclyRevealedKeyring: Record; } /** Re-bind authenticated certificates to the identity lookup they answered. */ export declare function filterCertificatesByIdentityKey(certificates: VerifiableCertificate[], identityKey: string): VerifiableCertificate[]; /** Re-bind authenticated certificates to the attribute lookup they answered. */ export declare function filterCertificatesByAttributes(certificates: VerifiableCertificate[], attributes: Record): VerifiableCertificate[]; /** * Transforms an array of VerifiableCertificate instances according to the trust settings. * Only certificates whose grouped total trust meets the threshold are returned, * and each certificate is augmented with a certifierInfo property. * * @param trustSettings - the user's trust settings including trustLevel and trusted certifiers. * @param certificates - an array of VerifiableCertificate objects. * @returns a DiscoverCertificatesResult with totalCertificates and ordered certificates. */ export declare const transformVerifiableCertificatesWithTrust: (trustSettings: TrustSettings, certificates: VerifiableCertificate[]) => DiscoverCertificatesResult; /** * Performs an identity overlay service lookup query and returns the parsed results. * Requires an independently maintained ChainTracker; missing context returns no identities. * * Identity paths benefit from a larger grace window (more hosts contribute outputs before the * query resolves) — 300 ms is well under the "instant" perception threshold and catches the long * tail of healthy-but-slightly-slow hosts. */ export declare const queryOverlay: (query: unknown, resolver: LookupResolver, chainTracker?: ChainTracker) => Promise; /** Configurable identity intake bounds; share byte limits with IdentityEvidenceVerifier. */ export interface IdentityEvidenceIntakeLimits { candidateBytes?: number; retainedBytes?: number; outputs?: number; } /** * Fetch an owned snapshot of UNTRUSTED evidence, suitable only for revalidation. * A limit rejects the lookup because this legacy result cannot represent partial completion. */ export declare const queryOverlayEvidence: (query: unknown, resolver: LookupResolver, limits?: IdentityEvidenceIntakeLimits) => Promise; /** * Wallet/session-owned identity validation. Chain evidence is checked on every * use; bounded certificate crypto results are independent of mutable trust ratings. */ export declare class IdentityEvidenceVerifier { readonly chainTracker: ChainTracker; readonly chainNamespace: string; private disposed; private readonly coordinator; private readonly certificates; private expiryTimer?; constructor(chainTracker: ChainTracker, chainNamespace?: string, limits?: Partial); private clone; parse(output: OverlayOutputEvidence): Promise<{ outpoint: string; certificate: VerifiableCertificate; } | null>; private prune; private scheduleExpiry; dispose(): void; } /** * Parse the returned UTXOs, decrypting and verifying each certificate. * An omitted ChainTracker fails closed. Each call revalidates transaction evidence; * returned certificates carry no reusable chain-verdict or unspentness guarantee. * * On UI runtimes (browser / React Native), yields between iterations so the JS thread does not * own the frame for the full duration. On Node, runs straight through. */ export declare const parseResults: (lookupResult: LookupAnswer, chainTracker?: ChainTracker, verifier?: IdentityEvidenceVerifier) => Promise; /** * Iterable variant of {@link parseResults}: emits each successfully parsed certificate as soon as * it's ready, so callers can render progressively instead of waiting for the full set. */ export declare function parseResults$(lookupResult: LookupAnswer, chainTracker?: ChainTracker, verifier?: IdentityEvidenceVerifier): AsyncIterable; //# sourceMappingURL=identityUtils.d.ts.map