import { Jwt, JwtAdditionalOptions, JwtOptions, JwtVerificationResult } from '../jwt'; import { SignatureAndEncryptionAlgorithm } from '../signatureAndEncryptionAlgorithm'; import { MakePropertyRequired, Signer, Verifier } from '../types'; type ReturnKeyBindingWithHeaderAndPayload, P extends Record, T extends KeyBinding> = MakePropertyRequired; export type KeyBindingHeader = Record> = H & { typ: 'kb+jwt'; alg: SignatureAndEncryptionAlgorithm | string; }; export type KeyBindingPayload

= Record> = P & { iat: number; aud: string; nonce: string; }; export type KeyBindingOptions

= Record, Payload extends Record = Record> = JwtOptions, KeyBindingPayload>; export type KeyBindingAdditionalOptions
= Record> = JwtAdditionalOptions>; export type KeyBindingVerificationResult = JwtVerificationResult; export declare class KeyBinding
= Record, Payload extends Record = Record> extends Jwt { signer?: Signer
; constructor(options?: KeyBindingOptions, additionalOptions?: KeyBindingAdditionalOptions
); /** * * Convert a standard `JWT` to an instance of `KeyBinding`. * * @throws when the claims are not valid for key binding * */ static fromJwt
= Record, Payload extends Record = Record>(jwt: Jwt): KeyBinding; /** * * Verify the jwt as a valid `KeyBinding` jwt. * * Invalid when: * - The required claims for key binding are not included * - The signature is invalid * - The optional required additional claims are not included * */ verify(verifySignature: Verifier
, requiredClaims?: Array, publicKeyJwk?: Record): Promise; /** * * Convert a compact `JWT` into an instance of `KeyBinding`. * * @throws when the claims are not valid for key binding * */ static fromCompact
= Record, Payload extends Record = Record>(compact: string): ReturnKeyBindingWithHeaderAndPayload>; /** * * Asserts the required properties for valid key binding. * * @throws when a claim in the header, or payload, is invalid * */ assertValidForKeyBinding(): Promise; } export {};