import * as Native from './Native.js'; export declare class PublicKey { readonly _nativeHandle: Native.PublicKey; private constructor(); static _fromNativeHandle(handle: Native.PublicKey): PublicKey; static deserialize(buf: Uint8Array): PublicKey; equals(other: PublicKey): boolean; serialize(): Uint8Array; getPublicKeyBytes(): Uint8Array; verify(msg: Uint8Array, sig: Uint8Array): boolean; verifyAlternateIdentity(other: PublicKey, signature: Uint8Array): boolean; /** * Seals a message so only the holder of the private key can decrypt it. * * Uses HPKE ({@link https://www.rfc-editor.org/rfc/rfc9180.html|RFC 9180}). The output will * include a type byte indicating the chosen algorithms and ciphertext layout. The `info` * parameter should typically be a static value describing the purpose of the message, while * `associatedData` can be used to restrict successful decryption beyond holding the private key. * * A string `info` will be encoded as UTF-8. * * @see PrivateKey#open */ seal(msg: Uint8Array, info: string | Uint8Array, associatedData?: Uint8Array): Uint8Array; } export declare class PrivateKey { readonly _nativeHandle: Native.PrivateKey; private constructor(); static _fromNativeHandle(handle: Native.PrivateKey): PrivateKey; static generate(): PrivateKey; static deserialize(buf: Uint8Array): PrivateKey; serialize(): Uint8Array; sign(msg: Uint8Array): Uint8Array; agree(other_key: PublicKey): Uint8Array; getPublicKey(): PublicKey; /** * Opens a ciphertext sealed with {@link PublicKey#seal}. * * Uses HPKE ({@link https://www.rfc-editor.org/rfc/rfc9180.html|RFC 9180}). The input should * include its original type byte indicating the chosen algorithms and ciphertext layout. The * `info` and `associatedData` must match those used during sealing. */ open(ciphertext: Uint8Array, info: string | Uint8Array, associatedData?: Uint8Array): Uint8Array; } export declare class IdentityKeyPair { readonly publicKey: PublicKey; readonly privateKey: PrivateKey; constructor(publicKey: PublicKey, privateKey: PrivateKey); static generate(): IdentityKeyPair; static deserialize(buffer: Uint8Array): IdentityKeyPair; serialize(): Uint8Array; signAlternateIdentity(other: PublicKey): Uint8Array; }