@freqhole/reliquary

中文文档
0.3.27发布于 2026/11/10UNLICENSEDTypeScriptES Module构建来源已验证近 30 天下载 2780

freqhole 介质 blob 存储域:内容地址 blobs, transfer, worker, s固态帮助器

中文使用文档
文档目录5 节
  1. 结构
  2. 结构
  3. 生锈:开始
  4. ts: 开始
  5. 开发者快速启动

折叠

所有用于freqhole世界的媒体blob存储应用程序:内容地址为blob商店 (sqlite-native and indexeddb/opfs-browser), roh-blops 包装(fs商店生命周期,gc) 保护、经核实的转移、抢夺引擎(主动的blob复制)、确保 协议( 设置一个对等点来设置 blob) , blob acl gating, 媒体帮助器和共享浏览器 乌提尔斯。 生锈的箱子 reliquary + npm 软件包 @freqhole/reliquary。 。 。 .

结构

blake3是各地唯一的犬科内容地址. iroh p2p是一种运输,而不是 架构 - 储存合同和转移流由运输注入。 这个图书馆 从未拥有 http 服务器: 服务范围保留在耗用应用程序中 .

graph LR
    subgraph app
        A[your app]
    end
    subgraph rust
        B[BlobStore trait<br/>SqliteBlobStore]
        N[StorageNode<br/>iroh-blobs fs store + gc + downloader]
        SN[SnatchEngine<br/>proactive replication]
        EN[ensure protocol<br/>ALPN freqhole/1]
        G[AccessGate<br/>transfer acl seam]
    end
    subgraph browser ts
        TB[./blobs idb records +<br/>opfs/cache bytes]
        TT[./transfer snatch/serve/prefetch]
        TE[./ensure client + responder]
        TW[./worker hashing + opfs io]
    end
    A --> B & N & SN
    SN --> N
    EN --> B
    G -.gates.-> N
    A --> TB & TT & TE
    TT --> TW
    B --- DB[(reliquary.db<br/>own sqlite file)]

结构

rust/               crate: reliquary
  src/
    blobz.rs        BlobStore trait + sqlite impl (blake3 pk, soft delete, derived blobs)
    node.rs         StorageNode: fs store lifecycle, init_local/attach_endpoint, gc protect
    snatch.rs       SnatchEngine over BlobRefSource + PeerProbeTransport traits
    ensure.rs       EnsureBlobHandler + PeerMessage wire types (ALPN "freqhole/1")
    gate.rs         AccessGate seam for the iroh-blobs verified-transfer ALPN
    hash.rs         streaming blake3 helpers
    media/          image resize/webp (feature: media), pdf/video thumbs (feature: thumbnails)
    chunked_import.rs, identity.rs, db.rs
    testing.rs      fixtures (feature: test-utils)
  examples/         runnable walkthroughs (see below)
  migrations/       reliquary.db's own migration set
ts/                 npm: @freqhole/reliquary
  src/{blobs,transfer,ensure,worker,automerge,utils,solid,testing}
docs/               storage-traits.md (the BlobStore contract design)

生锈:开始

use reliquary::{BlobStore, NewBlobMeta};
use reliquary::testing::make_blobz_store;

let (store, _tmp) = make_blobz_store().await;
let record = store.insert(bytes, NewBlobMeta {
    filename: Some("example.txt".into()),
    mime: Some("text/plain".into()),
    ..Default::default()
}).await?;
let bytes_back = store.read_bytes(&record.blake3).await?;

特性( 除 thumbnails编号 :test-utils: blobz, (中文(简体) ), node, (中文(简体) ), snatch, (中文(简体) ), ensure, (中文(简体) ), gate, (中文(简体) ), media, (中文(简体) ), chunked_import, (中文(简体) ), identity。 。 。 .

cargo run --example blob-round-trip --features test-utils       # BlobStore contract, no network
cargo run --example blob-acl-gate --features test-utils         # AccessGate over transfer events
cargo run --example snatch-engine --features test-utils         # replication engine w/ mock transport
cargo run --example two-peer-blob-transfer --features test-utils  # real iroh, two endpoints

ts: 开始

无框架核心子路径; solid-js 编号 : @automerge/automerge-repo 可选对等点 仅由 ./solid 编号 : ./automerge。 。 。 .

子路径什麽
./blobsidb 记录商店 + opfs/ cache- api 字节, blake3 canonical ()createBlobStore(中文(简体) )
./transfersnatchBlob编号 :snatchBlobToDisk (暂停/恢复,每例战略下降), BlobServer, (中文(简体) ), Prefetcher
./ensure保证- blob 客户端 + 任何双流响应器( )DEFAULT_ENSURE_ALPN = "freqhole/1"(中文(简体) )
./workerblob 工人( hashing, opfs io, 块上传) + 客户端外观
./automergeIroh NetworkAdapter + acl 更改取取包装器
./utils图像使用、散列、标记日志
./solid创建 Transfer 进步 创建 BlobUrl 创建 DocStore (可选)
./testing模拟流/节点、wav + 决定字节固定装置、 idb 带
import { createBlobStore } from "@freqhole/reliquary/blobs";
const store = createBlobStore({
  dbName: "myapp-blobs",
  allowCacheFallback: false,
});

热量消费者:由工人组成的中间溶液需要 resolveId 在两个插件 plugins 财务报告和审定财务报表 worker.plugins (见skein/loam) vite.config.ts- 一个平地 resolve.alias 只在运行时默默失败 .

开发者快速启动

# rust (no DATABASE_URL needed - queries are runtime-checked)
cargo test --workspace --all-features
cargo fmt --all --check && cargo clippy --workspace --all-targets

# ts
cd ts && npm i
npm run typecheck && npm test && npm run build

箱子拥有自己的sqlite db(reliquary.db) 运行时间,与任何消耗时间分开 应用的db。 今天的消费者:斯克因(hub daemon + tauri + loam, 完全切口),墓葬/备忘录 (hash;存储接合正在进行),播放列表z(计划转移/blops收养).

见 文件/储存-海峡.md blobStore合同设计 墓葬重建计划位于墓葬/道克/xl-重建地.

版本与发布记录

@freqhole/reliquary 共发布 43 个版本,首次发布于 2026/07/22;过去 12 个月发布了 43 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.3.27latest2026/11/105 天前
0.3.262026/11/078 天前
0.3.252026/11/0510 天前
0.3.242026/11/0510 天前
0.3.232026/11/0312 天前
0.3.222026/10/2818 天前

关于 @freqhole/reliquary 的常见问题

@freqhole/reliquary 是什么?

freqhole 介质 blob 存储域:内容地址 blobs, transfer, worker, s固态帮助器

如何安装 @freqhole/reliquary?

在项目目录运行 npm install @freqhole/reliquary,或使用 pnpm add / yarn add / bun add。

@freqhole/reliquary 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@freqhole/reliquary 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@freqhole/reliquary 可以商用吗?

@freqhole/reliquary 使用 UNLICENSED 许可。作者声明为 UNLICENSED,即不授予公开使用许可(与公共领域的 Unlicense 不同)。使用前需获得作者授权。以上为概括,不构成法律意见,请以许可原文为准。

@freqhole/reliquary 的下载量有多少?

根据 npm 官方下载统计,@freqhole/reliquary 在 2026/10/16 – 2026/11/14 这 30 天内被下载 2,780 次,日均约 93 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@freqhole/reliquary 还在维护吗?

最新版本 0.3.27 发布于 2026/11/10(5 天前);至今共发布 43 个版本,其中过去 12 个月发布了 43 个;首次发布于 2026/07/22。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。