import { type ByteLike } from "./byte-like.js"; import { Cipher } from "./cipher.js"; import { Matter, type MatterInit } from "./matter.js"; import type { CipherHydratable, CipherHydratableCtor } from "./primitive.js"; /** * Supported constructor inputs for one private-key decrypter. * * Accepted forms mirror KERIpy's two entry points: * - provide already-qualified X25519 private box material directly * - provide an Ed25519 signer seed through `seed` and derive the matching * X25519 private box key during construction */ export interface DecrypterInit extends Omit { raw?: Uint8Array | ArrayBufferView; qb64b?: Uint8Array | ArrayBufferView; qb64?: ByteLike; qb2?: Uint8Array | ArrayBufferView; code?: string; seed?: ByteLike; } /** * Cipher inputs and hydration controls for `Decrypter.decrypt(...)`. * * Precedence mirrors KERIpy: * - explicit `cipher` * - otherwise parse `qb64` * - otherwise parse `qb2` * * `ctor` controls semantic plaintext rehydration; `bare` bypasses that and * returns plaintext bytes directly. */ export interface DecrypterDecryptOptions { cipher?: Cipher; qb64?: ByteLike; qb2?: Uint8Array | ArrayBufferView; ctor?: CipherHydratableCtor; transferable?: boolean; bare?: boolean; } /** * Private-key decryption primitive for asymmetric envelope payloads. * * KERIpy substance: `Decrypter` owns the private X25519 material used to * recover CESR payloads from sealed-box ciphers, optionally deriving it from * an Ed25519 signing seed. */ export declare class Decrypter extends Matter { /** * Construct one X25519 private-key decrypter. * * Default code remains the KERIpy private-box family * `MtrDex.X25519_Private`. */ constructor(init?: Matter | DecrypterInit); /** * Decrypt one cipher and rehydrate the plaintext with the requested * constructor. * * Resolution rules: * - `cipher` wins when supplied * - otherwise `qb64` is parsed before `qb2` * - omitted `ctor` is only inferred for the KERIpy families that already * name their semantic plaintext shape * * Output rules: * - `bare=true` returns plaintext bytes directly * - otherwise `transferable` is forwarded only to qb64-family primitive * constructors such as `Signer`, matching the KERIpy init seam */ decrypt({ cipher, qb64, qb2, ctor, transferable, bare, }?: DecrypterDecryptOptions): T | Uint8Array; } //# sourceMappingURL=decrypter.d.ts.map