You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+54-5Lines changed: 54 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,17 @@ so that you can publish verifiable context on the OriginTrail DKG.
12
12
13
13
Project status: actively maintained.
14
14
15
+
## Architecture
16
+
17
+
GWALN is built on three key layers, leveraging the OriginTrail Decentralized Knowledge Graph (DKG):
18
+
19
+
1.**🤖 Agent Layer**: The **MCP Server** exposes all CLI capabilities (fetch, analyze, publish) to AI agents (like Claude or Cursor) via the Model Context Protocol. This allows agents to autonomously verify information and interact with the DKG.
20
+
2.**🧠 Knowledge Layer**: The tool normalizes unstructured data (Wikipedia/Grokipedia) into **Structured Knowledge Assets** (JSON-LD). These assets are analyzed for discrepancies and formatted as standardized ClaimReviews.
21
+
3.**🔗 Trust Layer**:
22
+
***OriginTrail DKG**: Verifiable publication of Knowledge Assets on the DKG Edge Node.
23
+
***NeuroWeb/Polkadot**: Blockchain consensus for DKG operations.
24
+
***x402**: Implements the [x402](https://x402.gitbook.io/x402) payment standard for incentivized access to premium MCP tools.
25
+
15
26
### Basic functionality
16
27
17
28
GWALN CLI is intended for analysts and contributors who review
@@ -42,11 +53,11 @@ Before using this tool, you should be familiar with:
42
53
43
54
You should have:
44
55
45
-
* Node.js 20.18.1 or later on macOS, Linux, or Windows
46
-
* Network access to a DKG edge node and sufficient blockchain funds if
47
-
you plan to publish.
48
-
* Optional: a Google Gemini API key if you use automated bias
49
-
verification.
56
+
*Node.js 20.18.1 or later on macOS, Linux, or Windows
57
+
*Network access to a DKG edge node (NeuroWeb) and sufficient $TRAC tokens if
58
+
you plan to publish.
59
+
*Optional: a Google Gemini API key if you use automated bias
60
+
verification.
50
61
51
62
## How to use GWALN CLI
52
63
@@ -197,6 +208,35 @@ catalog or discover new ones using the lookup command.
197
208
198
209
2. Inspect the output in `~/.gwaln/notes/moon.json` and `~/.gwaln/notes/index.json`.
3. Publish to OriginTrail (ensure your config has live signing keys):
201
241
202
242
```bash
@@ -265,6 +305,15 @@ using the Model Context Protocol’s session headers and reuses it for the
265
305
subsequent `tools/list`, `tools/call`, etc. There are no extra discovery
266
306
routes—just point your MCP client at that one URL.
267
307
308
+
### x402 Monetization
309
+
310
+
The MCP server implements the **x402** payment standard (via `src/lib/x402.ts`) to monetize premium tools like `query`, `publish`, and `lookup` on the NeuroWeb testnet.
When an AI agent attempts to use a paywalled tool without payment, the server returns a `402 Payment Required` error with payment details. The agent can then facilitate the payment on-chain and retry the request with the payment proof.
316
+
268
317
### Query a published Knowledge Asset
269
318
270
319
Retrieve previously published Community Notes from the DKG by topic title:
0 commit comments