import type { JWK } from 'jose'; import { Algorithms } from '../headers.js'; import { TypedMap } from '../typed-map.js'; import { Curve } from './curve.js'; import type { KeyOps } from './key-ops.js'; import type { KeyType } from './kty.js'; import { COSEKeyParam } from './params.js'; export declare const JWKFromCOSEValue: Map string>; export declare const JWKToCOSEValue: Map KeyType | Uint8Array | Algorithms | KeyOps[]>; export declare class COSEKey extends TypedMap<[COSEKeyParam.KeyType, KeyType] | [COSEKeyParam.KeyID, Uint8Array] | [COSEKeyParam.Algorithm, Algorithms] | [COSEKeyParam.KeyOps, KeyOps[]] | [COSEKeyParam.BaseIV, Uint8Array] | [COSEKeyParam.Curve, Curve] | [COSEKeyParam.x, Uint8Array] | [COSEKeyParam.y, Uint8Array] | [COSEKeyParam.d, Uint8Array] | [COSEKeyParam.k, Uint8Array]> { /** * Import a COSEKey either decoded as Map or as an encoded CBOR. * * @param data {Uint8Array | Map} * @returns */ static import(data: Uint8Array | Map): COSEKey; /** * * Create a COSEKey from a JWK. * * @param jwk {JWK} - A JWK. * @returns */ static fromJWK(jwk: JWK): COSEKey; /** * * Returns a JWK representation of the COSEKey. * * @returns {JWK} - The JWK representation of the COSEKey. */ toJWK(): JWK; /** * * Encode the COSEKey as a CBOR buffer. * * @returns {Uint8Array} - The encoded COSEKey. */ encode(): Uint8Array; } /** * Exports the COSE Key as a raw key. * * It's effectively the same than: * * crypto.subtle.exportKey('raw', importedJWK) * * Note: This only works for KTY = EC. * * @param {Map} key - The COSE Key * @returns {Uint8Array} - The raw key */ export declare const COSEKeyToRAW: (key: Map | Uint8Array) => Uint8Array; //# sourceMappingURL=cose-key.d.ts.map