Home

Awesome

GraphChain PoC: GraphChain.js

GraphChain.js is simple implementation of blockchain technology, based on Naivechain.

For now, you can send a RDF graph by the HTTP endpoint and it will be persisted in a repository together with a block's header. There is also a way to verify whole chain.

Quick start

Set up two connected nodes and mine 1 block

npm install
./run.sh &
./run_peer.sh &
curl -v -H "Content-Type: text/turtle" -d @PBLD0EJDB5FWOLXP3B76.ttl 'http://localhost:3001/block/create?graphIri=http://lei.info/PBLD0EJDB5FWOLXP3B76'

HTTP API

Get blockchain

curl http://localhost:3001/block

Get 1st block

curl http://localhost:3001/block/1