import { type AuthProvider } from './auth/auth.js'; export declare class RewrapRequest { signedRequestToken: string; } export declare class RewrapResponse { entityWrappedKey: string; sessionPublicKey: string; } /** * Get a rewrapped access key to the document, if possible * @param url Key access server rewrap endpoint * @param requestBody a signed request with an encrypted document key * @param authProvider Authorization middleware * @param clientVersion */ export declare function fetchWrappedKey(url: string, requestBody: RewrapRequest, authProvider: AuthProvider, clientVersion: string): Promise; export type KasPublicKeyAlgorithm = 'ec:secp256r1' | 'rsa:2048'; /** * Information about one of a KAS's published public keys. * A KAS may publish multiple keys with a given algorithm type. */ export type KasPublicKeyInfo = { /** The locator to the given KAS associated with this key */ url: string; /** The encryption algorithm the key is to be used with. */ algorithm: KasPublicKeyAlgorithm; /** If present, an identifier which is tied to this specific key. */ kid?: string; /** The key value, encoded within a PEM envelope */ publicKey: string; /** A subtle crypto version of the key. * This can be used for wrapping key data for key access objects (with RSA) * or to derive key data (with EC keys). */ key: Promise; }; /** * If we have KAS url but not public key we can fetch it from KAS, fetching * the value from `${kas}/kas_public_key`. */ export declare function fetchECKasPubKey(kasEndpoint: string): Promise; export declare class OriginAllowList { origins: string[]; allowAll: boolean; constructor(urls: string[], allowAll?: boolean); allows(url: string): boolean; } //# sourceMappingURL=access.d.ts.map