/**
 * T12 — public barrel for relay-e2e. Re-exports the crypto IMPLEMENTATIONS of the frozen §4.4
 * signatures (P4 owns the impls, relay-contracts owns the shapes; INDEX §2.1). No `ws`/`pg`/DOM
 * runtime, no xterm/ANSI parser — a pure isomorphic crypto core (INV2/INV11).
 */

// Errors
export * from './errors.js'

// T1 crypto provider
export { getWebCrypto, randomBytes, timingSafeEqual } from './crypto-provider.js'

// T2 AEAD
export { nonceLength, tagLength, importAeadKey, aeadSeal, aeadOpen } from './aead.js'

// T3 envelope codec (frozen shape from relay-contracts, re-exported)
export { encodeEnvelope, decodeEnvelope, nonceForSeq, MAX_FRAME_BYTES } from './envelope.js'

// T4 fingerprint / TOFU
export {
  computeEnrollFpr,
  verifyPinnedFingerprint,
  resolvePin,
  type PinOutcome,
  type ResolvePinResult,
} from './fingerprint.js'

// T5 X25519
export { generateEphemeralKeyPair, deriveSharedSecret, type EphemeralKeyPair } from './x25519.js'

// T6 HKDF direction-split
export { deriveSessionKeys, deriveMaster } from './hkdf.js'

// T7 sequence guard
export { SequenceGuard } from './sequence.js'

// T8 handshake
export {
  createClientHandshake,
  createHostHandshake,
  AEAD_PREFERENCE,
  type HandshakePhase,
  type HostSigner,
  type HostVerifier,
  type ClientHandshakeWithPhase,
  type CreateClientHandshakeDeps,
  type HostHandshake,
  type CreateHostHandshakeDeps,
} from './handshake.js'
export { nobleEd25519Verifier, nobleEd25519Signer } from './ed25519.js'
export { buildTranscript, type TranscriptParts } from './transcript.js'

// T9 session (frozen §4.4 sealFrame/openFrame/createE2ESession)
export { sealFrame, openFrame, createE2ESession } from './session.js'

// T10 recoverable replay content-key
export { deriveContentKey, sealReplayFrame, openReplayCiphertext } from './replay-key.js'

// T11 multi-device adapters (buildClientHandshake = frozen §4.4 factory)
export { buildClientHandshake, MemoryDevicePinStore } from './keystore.js'
