JSPM

@economicagents/graph

0.2.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 19
  • Score
    100M100P100Q71015F
  • License Apache-2.0

Economic graph for AEP - transaction graph, payments, credit events, credit scoring, recommendations

Package Exports

  • @economicagents/graph

Readme

@economicagents/graph

Economic graph for AEP: sync on-chain payments and credit events into SQLite (graph.db), compute credit scores, and provider recommendations.

Install

pnpm add @economicagents/graph

From a local clone of economicagents/AEP: cd packages/graph && pnpm run build.

Usage

# Standalone binary when installed
aep-graph sync

# Via CLI meta-package
aep graph sync
aep analytics <address>
aep credit-score <address>
aep recommendations <address>
import { computeCreditScore, getRecommendations } from "@economicagents/graph";

const score = computeCreditScore(graphPath, accountAddress);
const recs = getRecommendations(graphPath, providers, accountAddress, capability, limit);

The resolver uses graphPath + accountAddress for recommendation boost.

Configuration

  • Graph path: default ~/.aep/graph.db; override graphPath in ~/.aep/config.json
  • RPC: RPC_URL or config rpcUrl for graph sync

Dependencies

Optional native better-sqlite3 (v12+); tests fall back to sql.js when bindings are unavailable.

Build & test

pnpm run build
pnpm run test

Documentation