New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@toolkit-p2p/graph

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@toolkit-p2p/graph

Property graph database with CRDT synchronization for toolkit-p2p

latest
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

@toolkit-p2p/graph

Property graph database with CRDT synchronization for distributed P2P applications

Part of toolkit-p2p - Build serverless P2P web apps.

Features

  • Property Graph Model - Nodes and edges with arbitrary properties
  • CRDT Synchronization - Conflict-free distributed updates using LWW-Map
  • IndexedDB Persistence - Browser-native storage with TTL expiration
  • Query API - Find nodes/edges, traverse graphs, calculate trust scores
  • Signature Verification - Ed25519 signatures for security

Installation

pnpm add @toolkit-p2p/graph

Quick Start

import { GraphCore } from '@toolkit-p2p/graph';

// Create graph instance
const graph = new GraphCore('peer-id-123');

// Add nodes
const alice = await graph.addNode({
  type: 'Person',
  props: { handle: 'alice', emoji: '🎧' }
}, { ttlSec: 172800 }); // 48 hours

const bob = await graph.addNode({
  type: 'Person',
  props: { handle: 'bob', emoji: '🏀' }
}, { ttlSec: 172800 });

// Add edge
await graph.addEdge({
  from: alice.id,
  to: bob.id,
  type: 'trusts',
  props: { score: 0.9, context: 'brought the speaker' }
}, { ttlSec: 86400 }); // 24 hours

// Query
const people = await graph.findNodes('Person');
const trusted = await graph.findEdges(undefined, bob.id, 'trusts');
const trustScore = await graph.getTrustScore(alice.id, bob.id);

console.log(`Trust score from Alice to Bob: ${trustScore}`);

Status

Version: 0.1.0 Phase: Phase 3 (Week 2-3) of Constellation v0.5 implementation

This package is under active development as part of the Constellation v0.5 specification (TASK-023 to TASK-032).

License

MIT

Keywords

p2p

FAQs

Package last updated on 27 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts