import type * as t from '../types.d.ts'; /** JWE decryption and JWT Claims Set validation options. */ export interface JWTDecryptOptions extends t.DecryptOptions, t.JWTClaimVerificationOptions { } /** * Resolves a JWT decryption key. No token components have been authenticated when this function is * called. */ export interface JWTDecryptGetKey extends t.GetKeyFunction { } export declare function jwtDecrypt(jwt: string | Uint8Array, key: KeyType, options?: JWTDecryptOptions): Promise, InferredPayloadType & ([PayloadType] extends [object] ? unknown : unknown extends PayloadType ? unknown : never)>>; export declare function jwtDecrypt(jwt: string | Uint8Array, getKey: JWTDecryptGetKey, options?: JWTDecryptOptions): Promise, InferredPayloadType & ([PayloadType] extends [object] ? unknown : unknown extends PayloadType ? unknown : never)> & t.ResolvedKey>; export declare function jwtDecrypt(jwt: string | Uint8Array, key: KeyType, options?: JWTDecryptOptions): Promise, InferredPayloadType & ([PayloadType] extends [object] ? unknown : unknown extends PayloadType ? unknown : never)> & Partial>; /** * Authenticates and decrypts a JWT in JWE Compact Serialization and validates its JWT Claims Set. * * @param key Private key or shared secret to authenticate and decrypt the JWT with. See * {@link https://github.com/panva/jose/issues/210#jwe-alg Algorithm Key Requirements}. */ export declare function jwtDecrypt(jwt: string | Uint8Array, key: t.KeyInput, options?: JWTDecryptOptions): Promise>; /** * Decrypts a JWT and validates its claims, returning the dynamically * {@link t.ResolvedKey.key resolved key}. * * @param getKey Function resolving a private key or shared secret to authenticate and decrypt the * JWT with. See * {@link https://github.com/panva/jose/issues/210#jwe-alg Algorithm Key Requirements}. */ export declare function jwtDecrypt(jwt: string | Uint8Array, getKey: JWTDecryptGetKey, options?: JWTDecryptOptions): Promise & t.ResolvedKey>; /** * Accepts a key or key resolver. Use this overload when forwarding either form; the result includes * `key` only when a resolver was used. * * @param key Private key or shared secret, or a function resolving one, to authenticate and decrypt * the JWT with. See * {@link https://github.com/panva/jose/issues/210#jwe-alg Algorithm Key Requirements}. */ export declare function jwtDecrypt(jwt: string | Uint8Array, key: t.KeyInput | JWTDecryptGetKey, options?: JWTDecryptOptions): Promise & Partial>;