Some checks failed
Test / test (push) Has been cancelled
Cross-platform vectors / TypeScript vectors (bun) (push) Has been cancelled
Cross-platform vectors / Kotlin vectors (gradle) (push) Has been cancelled
Docker build and publish / docker (push) Has been cancelled
Publish / publish (push) Has been cancelled
V3.1 → V3.12 consolidated and tagged for the first GA release. Wire format unchanged from 0.4.x — 4.0 peers interoperate with 0.4.x peers byte-for-byte. The version bump is semantic: audit-cycle complete, opt-in surface fully exposed, threat model refreshed for every new surface. Highlights: - All 24 @shade/* packages bumped to 4.0.0 in lockstep. - CHANGELOG 4.0.0 section is the canonical manifest of what landed. - THREAT-MODEL extended (§10 fingerprint gates, §11 WebRTC P2P, §12 Web-Worker boundary) + residual-risks table refreshed. - OpenAPI now covers all 27 routes: prekey, transfer, KT, inbox, bridge, observer, /metrics, /healthz, /ready. - MIGRATION 0.3.x → 4.0 documented + smoke-tested against shade migrate-storage on a real SQLite DB. - docs/audit/REVIEW-BUNDLE.md + SCOPE.md ready for external reviewer. - scripts/soak.ts harness for the GA-stable 2-week soak window. - All V*.md plans archived under docs/archive/ with Status: Done. - Voice/Video carved out into V5.0; 4.0 audit focuses on the frozen non-realtime stack. Tests: TS 1000/1000 + Kotlin 11/11 cross-platform vectors green. Docker: gt.zyon.no/stian/shade-prekey:4.0.0 builds and reports version 4.0.0 on /health. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
78 lines
2.1 KiB
TypeScript
78 lines
2.1 KiB
TypeScript
/**
|
|
* `@shade/recovery` — social key recovery for Shade (V3.10).
|
|
*
|
|
* Public surface:
|
|
* - {@link setupRecovery}: distribute Shamir shares to guardians.
|
|
* - {@link attachGuardian}: wire a guardian-side receiver.
|
|
* - {@link requestRecovery}: rebuild a lost identity from threshold guardians.
|
|
* - {@link splitSecret} / {@link combineShares}: low-level Shamir primitives
|
|
* (exported for advanced callers and test harnesses).
|
|
* - Errors, store interface, and protocol envelope types.
|
|
*/
|
|
|
|
// Core flows
|
|
export { setupRecovery } from './setup.js';
|
|
export type {
|
|
SetupRecoveryOptions,
|
|
SetupRecoveryResult,
|
|
GuardianDelivery,
|
|
RecoveryDeliver,
|
|
} from './setup.js';
|
|
|
|
export { attachGuardian } from './guardian.js';
|
|
export type {
|
|
AttachGuardianOptions,
|
|
AttachedGuardian,
|
|
GuardianApproveContext,
|
|
GuardianApproveHandler,
|
|
} from './guardian.js';
|
|
|
|
export { requestRecovery } from './request.js';
|
|
export type {
|
|
RequestRecoveryOptions,
|
|
RecoveryProgress,
|
|
RecoveryResult,
|
|
} from './request.js';
|
|
|
|
// Storage
|
|
export { MemoryRecoveryStore } from './store.js';
|
|
export type { GuardianShareEntry, RecoveryStore } from './store.js';
|
|
|
|
// Errors
|
|
export {
|
|
RecoveryError,
|
|
RecoveryDeclinedError,
|
|
RecoveryGuardianRejectedError,
|
|
RecoveryProtocolError,
|
|
RecoveryReconstructionError,
|
|
RecoveryTimeoutError,
|
|
} from './errors.js';
|
|
|
|
// Protocol — exported for apps that need to inspect or relay envelopes.
|
|
export {
|
|
encodeRecoveryEnvelope,
|
|
tryParseRecoveryEnvelope,
|
|
RECOVERY_DISCRIMINATOR,
|
|
RECOVERY_PROTOCOL_VERSION,
|
|
} from './protocol.js';
|
|
export type {
|
|
RecoveryEnvelope,
|
|
RecoveryMessageType,
|
|
RecoveryRequestEnvelope,
|
|
ShareDeclineEnvelope,
|
|
ShareDepositEnvelope,
|
|
ShareGrantEnvelope,
|
|
} from './protocol.js';
|
|
|
|
// Shamir primitives — exported for tests and advanced callers (e.g.
|
|
// hardware-token integrations that want to split a different secret).
|
|
export { splitSecret, combineShares, encodeShare, decodeShare } from './shamir.js';
|
|
export type { ShamirShare } from './shamir.js';
|
|
|
|
// Encoding helpers — used by widget-layer code and integration tests.
|
|
export {
|
|
bytesToBase64Url,
|
|
base64UrlToBytes,
|
|
recoveryKeyToBackupPassphrase,
|
|
} from './encoding.js';
|