import type { CryptographyKey } from './symmetric.js'; export type Keypair = { secretKey: CryptoKey; publicKey: CryptoKey; }; /** * Helper -- uint8 to ArrayBuffer */ export declare function toArrayBuffer(u8: Uint8Array): ArrayBuffer; /** * Concatenate some number of Uint8Array objects * * @param {Uint8Array[]} args * @returns {Uint8Array} */ export declare function concat(...args: Uint8Array[]): Uint8Array; /** * Generate an Ed25519 identity key pair for signing operations. * Since the keys module doesn't directly support Ed25519 key generation, * we'll fall back to using Web Crypto API directly. * * @returns {Promise<{ publicKey: CryptoKey, privateKey: CryptoKey }>} */ export declare function generateEd25519IdentityKeyPair(): Promise<{ publicKey: CryptoKey; privateKey: CryptoKey; }>; /** * Generate an X25519 key pair for key exchange operations. * * @returns {Promise} */ export declare function generateKeyPair(): Promise; /** * Generate a bundle of keypairs. * * @param {number} [preKeyCount=100] * @returns {Promise} */ export declare function generateBundle(preKeyCount?: number): Promise; /** * Signs a bundle using Ed25519. Returns the signature. * * @param {CryptoKey} signingKey Ed25519 private key * @param {CryptoKey[]} publicKeys X25519 public keys * @returns {Promise>} */ export declare function signBundle(signingKey: CryptoKey, publicKeys: CryptoKey[]): Promise>; /** * Verify a bundle signature using Ed25519. * * @param {CryptoKey} verificationKey Ed25519 public key * @param {CryptoKey[]} publicKeys X25519 public keys * @param {Uint8Array} signature */ export declare function verifyBundle(verificationKey: CryptoKey, publicKeys: CryptoKey[], signature: Uint8Array): Promise; /** * Wipe a cryptography key's internal buffer. * Note: This is a no-op for non-extractable keys in WebCrypto * * @param {CryptographyKey} key */ export declare function wipe(key: CryptographyKey): Promise; /** * Convert ArrayBuffer to hex string */ export declare function arrayBufferToHex(buffer: ArrayBuffer | Uint8Array): string; /** * Convert hex string to ArrayBuffer */ export declare function hexToArrayBuffer(hex: string): ArrayBuffer; /** * SHA-256 hash of concatenated public keys for signing * * @param {CryptoKey[]} publicKeys * @returns {Uint8Array} */ export declare function preHashPublicKeysForSigning(publicKeys: CryptoKey[]): Promise>; //# sourceMappingURL=util.d.ts.map