import { type BlobPlaintext, type BrowserIdentity, type StoredIdentity } from "@aithos/protocol-client"; import type { StoredOwnerKeys } from "../key-store.js"; import { type Signer } from "./signer.js"; /** * The four signing capabilities of an authenticated owner. * * The `did`, `handle`, `displayName` fields are public metadata. * The four signers expose only `publicKey` + `sign` — never the * underlying seed bytes. */ export declare class OwnerSigners { #private; readonly did: string; readonly handle: string; readonly displayName: string; readonly root: Signer; readonly public: Signer; readonly circle: Signer; readonly self: Signer; /** Optional dedicated #data sphere signer (absent on legacy owners). */ readonly data?: Signer; constructor(args: { did: string; handle: string; displayName: string; root: Signer; public: Signer; circle: Signer; self: Signer; data?: Signer; }); /** * Build from a {@link BrowserIdentity}. The seeds inside `identity` * are defensively copied into fresh signers — mutating the * BrowserIdentity afterwards does not affect the signers, and the * caller may zeroize the original identity immediately. */ static fromBrowserIdentity(identity: BrowserIdentity): OwnerSigners; /** * Build from a {@link StoredIdentity} — the persisted shape used by * extension-kit's IndexedDbKeystore (hex-encoded seeds). * * Internally calls `browserIdentityFromStored` to derive * `publicKey`s, then wraps. The caller may discard the StoredIdentity * afterwards. */ static fromStoredIdentity(stored: StoredIdentity): OwnerSigners; /** * Build from the SDK's own {@link StoredOwnerKeys} shape — what the * KeyStore round-trips for owner-side resume. */ static fromStoredOwnerKeys(stored: StoredOwnerKeys): OwnerSigners; /** * Build from a {@link BlobPlaintext} — the parsed payload of the * password-decrypted vault blob returned by `loginVerify`. Hex * seeds are turned into KeyPairs eagerly; the plaintext input is * not retained. */ static fromBlobPlaintext(plaintext: BlobPlaintext): OwnerSigners; /** * Resolve a sphere name to its signer. Convenience for callers that * have the sphere as a string ("public" | "circle" | "self") rather * than a typed accessor. */ signerForSphere(sphere: "root" | "public" | "circle" | "self" | "data"): Signer; /** * Internal — project to a {@link StoredIdentity} for protocol-client * interop. Reads seed bytes via {@link RawSeedSigner._unsafeKeyPair} * on each signer and hex-encodes them. Throws if any signer is not * a RawSeedSigner (which can happen post-migration to SubtleSigner; * at that point protocol-client must accept Signer-shaped objects * directly and this method goes away). * * @internal */ _unsafeStoredIdentity(): StoredIdentity; /** Zeroize all private seeds. Idempotent. */ destroy(): void; get destroyed(): boolean; } //# sourceMappingURL=owner-signers.d.ts.map