import type { OpaqueDataHeader } from './index.ts'; import type { PeerId, PrivateKey, PublicKey } from '@libp2p/interface'; export interface OpaqueUnwrapped { challengeClient: string; clientPublicKey?: string; hostname: string; creationTime: number; } export declare const MAX_AUTH_HEADER_SIZE = 2048; export declare function generateChallenge(): string; export declare function encodeAuthParams(params: Record): string; export declare function sign(key: PrivateKey, prefix: string, partsToSign: Array<[string, string | Uint8Array]>): Promise; export declare function verify(key: PublicKey, prefix: string, partsToSign: Array<[string, string | Uint8Array]>, sig: Uint8Array): Promise; export declare function decodeAuthorizationHeader(header: string): unknown; export declare function genOpaque(privateKey: PrivateKey, unwrapped: OpaqueUnwrapped): Promise; export declare function unwrapOpaque(publicKey: PublicKey, data: OpaqueDataHeader): Promise; export declare function signBox(key: PrivateKey, data: unknown): Promise; export declare function verifyBox(key: PublicKey, data: string): Promise; export declare function genBearerToken(serverKey: PrivateKey, clientPeerId: PeerId, hostname: string): Promise; //# sourceMappingURL=utils.d.ts.map