@rail402.dev/bazaar
v0.1.0
Published
Stellar-native Bazaar: catalog, automatic cataloging, and natural-language discovery.
Readme
@rail402.dev/bazaar
The Stellar-native x402 discovery catalog: settlement-gated automatic cataloging and in-process natural-language search. It ships as a library and is co-deployed inside the Rail402 facilitator.
Install
npm install @rail402.dev/bazaarUsage
Most users get the Bazaar by running
@rail402.dev/facilitator, which owns the
catalog and serves discovery at its own base URL. Use this package directly to embed the catalog in
your own service:
import { CatalogStore, createBazaarApp } from "@rail402.dev/bazaar";
const store = new CatalogStore();
const app = createBazaarApp({ store, startedAt: Date.now() });
// `app` is a Hono app serving GET /discovery/resources and GET /discovery/search./discovery/resources supports the seven spec filters (type, payTo, scheme, network,
extensions, limit, offset). /discovery/search takes a natural-language query and runs
in-process with a vendored static-embedding model, so there is no external search engine to run.
Exports: CatalogStore, createBazaarApp, ingest, Bm25Retriever, and the hybrid retriever.
Part of Rail402. Apache-2.0.
