import { Cigar } from "./cigar.js"; import { Matter, type MatterInit } from "./matter.js"; import { Siger } from "./siger.js"; import { Verfer } from "./verfer.js"; /** Construction options for one executable signer seed. */ export interface SignerInit extends MatterInit { transferable?: boolean; } /** Explicit factory options for `Signer.random(...)`. */ export interface SignerRandomOptions { code?: string; transferable?: boolean; } /** Signature-shape options for `Signer.sign(...)`. */ export interface SignerSignOptions { index?: number; only?: boolean; ondex?: number | null; } /** * Signing-seed primitive. * * KERIpy substance: Signer wraps private seed material, derives the associated * verifier, and owns suite-driven signature creation. * * TypeScript difference: * - seed derivation codes do not themselves encode transferability, so * `Signer` carries an explicit transferability choice rather than inheriting * `Matter.transferable` */ export declare class Signer extends Matter { private readonly _transferable; private readonly _signRaw; /** Public verifier derived from this seed and the explicit transferability choice. */ readonly verfer: Verfer; constructor(init: Matter | SignerInit); /** * Explicit signer transferability override. * * Seed codes do not encode transferability, so `Signer` intentionally does * not inherit the generic `Matter.transferable` rule. */ get transferable(): boolean; /** Raw seed bytes for signer key-derivation/instantiation. */ get seed(): Uint8Array; /** Return the raw seed size implied by one signer-suite code. */ static seedSizeForCode(code: string): number; /** * Project one verifier code back to the signer seed code for the same suite. * * Keeper-style derivation flows use this without reopening a free helper seam. */ static seedCodeForVerferCode(verferCode: string): string; /** Create one explicit random signer seed for creator-style flows. */ static random({ code, transferable }?: SignerRandomOptions): Signer; private static assertSupportedSeedCode; private static assertSupportedVerferCode; /** Resolve the verifier code implied by one signer seed code and transferability choice. */ private static verferCodeForSeedCode; /** Derive one raw public verification key from signer seed bytes and suite code. */ private static publicKeyForSeedCode; /** Bind one KERIpy-style signer suite at construction time. */ private static bindSuite; /** Resolve the detached-signature code emitted by this signer suite. */ private detachedSignatureCode; /** Resolve the indexed-signature family emitted by this signer suite. */ private indexedSignatureFamily; /** * Resolve the indexed-signature code emitted by this signer and signature shape. * * KERIpy correspondence: * - `only=true` selects the current-list-only family * - otherwise `ondex` defaults to `index` * - the small `both` family is valid only when `index === ondex <= 63` */ private indexedSignatureCode; /** * Sign one message and return either a detached `Cigar` or indexed `Siger`. * * KERIpy correspondence: * - `index === undefined` returns a detached non-indexed signature * - otherwise the seed suite decides the emitted indexed signature code family * - `only=true` selects the current-list-only family and ignores any caller * `ondex` override * - otherwise `ondex` defaults to `index`, preserving KERIpy's implicit * same-index rule for ordinary indexed signatures */ sign(ser: Uint8Array, { index, only, ondex }?: SignerSignOptions): Cigar | Siger; } //# sourceMappingURL=signer.d.ts.map