import { KeyEncoding, KFormatType } from '../utils'; import type { CryptoKeyPair, EncodingOptions } from '../utils'; import type { CryptoKey, PublicKeyObject, PrivateKeyObject } from './classes'; export declare const isCryptoKey: (obj: any) => boolean; export declare function exportPublicKeyRaw(pub: PublicKeyObject, pointType: 'compressed' | 'uncompressed' | undefined): ArrayBuffer; export declare function exportPrivateKeyRaw(priv: PrivateKeyObject, format: 'raw-private' | 'raw-seed'): ArrayBuffer; export declare function getCryptoKeyPair(key: CryptoKey | CryptoKeyPair): CryptoKeyPair; /** * Parses the public key encoding based on an object. keyType must be undefined * when this is used to parse an input encoding and must be a valid key type if * used to parse an output encoding. */ export declare function parsePublicKeyEncoding(enc: EncodingOptions, keyType: string | undefined, objName?: string): { format: "raw-private" | "raw-seed" | "raw-public"; type: KeyEncoding | "compressed" | "uncompressed" | undefined; cipher: undefined; passphrase: undefined; } | { format: KFormatType; type: KeyEncoding | "compressed" | "uncompressed" | undefined; cipher: string | undefined; passphrase: ArrayBuffer | undefined; }; /** * Parses the private key encoding based on an object. keyType must be undefined * when this is used to parse an input encoding and must be a valid key type if * used to parse an output encoding. */ export declare function parsePrivateKeyEncoding(enc: EncodingOptions, keyType: string | undefined, objName?: string): { format: "raw-private" | "raw-seed" | "raw-public"; type: KeyEncoding | "compressed" | "uncompressed" | undefined; cipher: undefined; passphrase: undefined; } | { format: KFormatType; type: KeyEncoding | "compressed" | "uncompressed" | undefined; cipher: string | undefined; passphrase: ArrayBuffer | undefined; }; export declare function parseKeyEncoding(enc: EncodingOptions, keyType?: string, isPublic?: boolean, objName?: string): { format: "raw-private" | "raw-seed" | "raw-public"; type: KeyEncoding | "compressed" | "uncompressed" | undefined; cipher: undefined; passphrase: undefined; } | { format: KFormatType; type: KeyEncoding | "compressed" | "uncompressed" | undefined; cipher: string | undefined; passphrase: ArrayBuffer | undefined; }; //# sourceMappingURL=utils.d.ts.map