/** A single share from Shamir's Secret Sharing. */ export interface ShamirShare { /** Share index (1–255). Each share must have a unique index. */ index: number; /** Share data — same length as the original secret. */ data: Buffer; } /** * Split a secret into `totalShares` shares, requiring `threshold` to reconstruct. * * @param secret The secret to split (arbitrary-length Buffer). * @param threshold Minimum shares needed for reconstruction (2 ≤ t ≤ n). * @param totalShares Number of shares to produce (t ≤ n ≤ 255). * @returns Array of shares, each with a unique index and data. */ export declare function split(secret: Buffer, threshold: number, totalShares: number): ShamirShare[]; /** * Reconstruct a secret from shares using Lagrange interpolation at x = 0. * * @param shares At least `threshold` shares with unique indices. * @returns The reconstructed secret. */ export declare function combine(shares: ShamirShare[]): Buffer; /** * Encode a share as a human-readable string. * Format: `aegis_share__` */ export declare function encodeShare(share: ShamirShare): string; /** * Decode a share from its string representation. */ export declare function decodeShare(encoded: string): ShamirShare; //# sourceMappingURL=shamir.d.ts.map