@origintrail-official/dkg-storage
v0.0.1-dev.1773614346.8bc4e9c
Published
Triple store abstraction layer for DKG V9. Provides a unified API over multiple RDF storage backends with named graph management and private content storage.
Downloads
536
Readme
@origintrail-official/dkg-storage
Triple store abstraction layer for DKG V9. Provides a unified API over multiple RDF storage backends with named graph management and private content storage.
Features
- Backend adapters — pluggable triple store implementations:
OxigraphStore— embedded WASM/native store, no external dependenciesOxigraphWorkerStore— worker-thread variant for non-blocking operationsBlazegraphStore— connects to a running Blazegraph SPARQL endpointSparqlHttpStore— generic adapter for any SPARQL 1.1 compliant endpoint
- Graph manager — named graph lifecycle (create, drop, list) with paranet-scoped data and metadata graphs
- Private content store — encrypted triple storage for private KA triples, separate from the public graph
- Custom adapters —
registerTripleStoreAdapter()to plug in any storage backend
Usage
import { createTripleStore, GraphManager } from '@origintrail-official/dkg-storage';
const store = createTripleStore({ backend: 'oxigraph', path: './data' });
const graphs = new GraphManager(store);
await store.insert(quads, { graph: 'urn:paranet:example:data' });
const result = await store.query('SELECT * WHERE { ?s ?p ?o } LIMIT 10');Internal Dependencies
@origintrail-official/dkg-core— configuration types, logging, constants
