;; The historical deep-import surface.
;;
;; v1.0.0's tsc output was a file tree (dist/lib/crypto.js, dist/lib/log.js,
;; dist/node/env.js, …), one file per module, and the package shipped it whole.
;; A shadow-cljs :esm build emits one FLAT file per :modules entry instead, so
;; scripts/gen-subpaths.mjs writes the old tree back as thin re-export shims (see
;; its table) — and those shims need every historical name to exist as a named
;; export somewhere.
;;
;; `index`, `chat` and `board` cover the three published subpaths. This namespace
;; covers the rest: the values the old deep files exported that the package root
;; never did. Nothing new is published here; it is the same surface v1.0.0 had,
;; kept reachable — and it is what test/*.test.mjs drives.
(ns ardegazu.rooms.internals
(:require [ardegazu.rooms.lib.access :as access]
[ardegazu.rooms.lib.crypto :as crypto]
[ardegazu.rooms.lib.descriptor :as descriptor]
[ardegazu.rooms.lib.encryption :as encryption]
[ardegazu.rooms.lib.log :as log]
[ardegazu.rooms.lib.net :as net]
[ardegazu.rooms.lib.orbit-identity :as orbit-identity]
[ardegazu.rooms.lib.protocol]
[ardegazu.rooms.lib.turn :as turn]
[ardegazu.rooms.node.env :as env]
[ardegazu.rooms.node.stores :as stores]))
;; lib/crypto
(def random-bytes crypto/random-bytes)
(def to-b64 crypto/to-b64)
(def from-b64 crypto/from-b64)
(def to-b64url crypto/to-b64url)
(def from-b64url crypto/from-b64url)
(def new-peer-id crypto/new-peer-id)
(def Sealer crypto/Sealer)
(def AtRestCipher crypto/AtRestCipher)
(def RoomCrypto crypto/RoomCrypto)
;; lib/encryption, lib/descriptor, lib/turn
(def make-log-encryption encryption/make-log-encryption)
(def resolve-relay-config descriptor/resolve-relay-config)
(def IceConfig turn/IceConfig)
;; lib/access, lib/orbit-identity
(def HardenedIPFSAccessController access/HardenedIPFSAccessController)
(def signer-matches-identity access/signer-matches-identity)
(def SuetaIdentityProvider orbit-identity/SuetaIdentityProvider)
(def register-sueta-provider orbit-identity/register-sueta-provider)
;; lib/log, lib/net
;; v1.0.0's openHelia took store PATHS and built the filesystem stores itself.
;; lib/log's now takes stores that are already open (it is shared with the
;; browser builds and may not name node:fs); node/stores keeps the published
;; signature, so dist/lib/log.js's openHelia is unchanged for consumers.
(def open-helia stores/open-fs-helia)
(def RoomLog log/RoomLog)
(def new-session-key net/new-session-key)
(def Net net/Net)
;; the process-wide sibling registry lives in lib/net (it is pure globalThis and
;; runs in a browser too); dist/node/env.js keeps re-exporting it, as v1.0.0's
;; node/env.ts published it from there.
(def self-peer-ids net/self-peer-ids)
;; node/env
(def install-origin-web-socket env/install-origin-web-socket)
(def install-origin-fetch env/install-origin-fetch)