npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@origintrail-official/dkg-hello-world

v0.1.0

Published

Hello World for DKG v10. The minimal reference integration — writes a greeting to Working Memory and reads it back via the node's public HTTP API, in about 150 lines. Fork as a starting point.

Downloads

242

Readme

DKG Hello World

The minimal reference integration for the OriginTrail Decentralized Knowledge Graph v10.

This is the simplest possible integration that actually exercises a DKG node's memory model: it writes a greeting to Working Memory and reads it back, using nothing but the node's public HTTP API and Node.js's built-in fetch. Zero external dependencies, ~150 lines of code, one file.

Use it as a starting template for your own integration. Clone the repo, rename the package, replace the greeting logic with whatever you're actually building.


Install

# Via the DKG integration registry (recommended)
dkg integration install dkg-hello-world

# Or directly from npm
npm install -g @origintrail-official/dkg-hello-world

You need a running DKG v10 node (dkg start). The integration picks up its auth token from ~/.dkg/auth.token automatically, or from DKG_AUTH_TOKEN if you set it.

Use

dkg-hello-world greet "first post from DKG Hello World"
# → ok · greeting "first post..." written to WM/dkg-hello-world/greetings
#      https://origintrail.io/dkg-hello-world/greeting/1714000000000-abcd1234

dkg-hello-world greet "the DKG is up"
dkg-hello-world greet "agent integrations live here"

dkg-hello-world list
# 1. "first post from DKG Hello World"
#    by did:dkg:agent:0x… at 2026-04-24T13:37:00.000Z
#    https://origintrail.io/dkg-hello-world/greeting/…
# 2. "the DKG is up"
# 3. "agent integrations live here"

dkg-hello-world whoami
# → { "agentAddress": "0x…", "agentDid": "did:dkg:agent:0x…", … }

What it does, step by step

  1. Loads the auth token. From DKG_AUTH_TOKEN or ~/.dkg/auth.token. No third-party credentials.
  2. Ensures a context graph named dkg-hello-world exists. Calls POST /api/context-graph/create; treats 409 Conflict as "already there" so re-running is idempotent.
  3. Ensures a Working Memory assertion named greetings exists in that context graph.
  4. Writes four RDF triples per greeting to that WM assertion via POST /api/assertion/greetings/write:
    • the greeting's rdf:typedkg-hello-world:Greeting
    • schema:description → the message text
    • dcterms:created → the current timestamp
    • dcterms:creator → the DID of the calling agent (from GET /api/agent/identity)
  5. On list, reads those triples back via POST /api/assertion/greetings/query and groups them by subject for display.

That's the whole integration. No SWM promotion, no VM publishing, no Curator-authority operations — just WM write + read, as a template.

Extend it

To turn this into a real integration:

  1. Replace the greeting domain with whatever you're modeling (Slack messages, GitHub issues, research notes, sensor readings).
  2. Promote matured assertions to Shared Memory by adding a POST /api/assertion/greetings/promote call, so peers can see what you've written.
  3. Add a publish path for assertions that should end up in Verified Memory, when your domain warrants it.
  4. Ship the integration's registry entry to OriginTrail/dkg-integrations.

See DESIGN.md for the full design brief.

License

Apache-2.0. See LICENSE.