Skip to content

codepr/rackchain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Rackchain

Trivial implementation of a blockchain POC, just to play a bit with Racket.

Quickstart

$ racket rackchain.rkt
Creating new blockchain
Listening on 127.0.0.1:6090

Use a simple HTTP client or a browser (jq just for pretty print JSON response)

$ curl -X GET http://localhost:6090/blockchain | jq
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100    88    0    88    0     0   6285      0 --:--:-- --:--:-- --:--:--  6285
{
  "blocks": [
    {
      "data": "Genesis block",
      "timestamp": 1571064218,
      "valid": true,
      "nonce": 511087
    }
  ]
}

Add a block

$ curl -X POST -d "Send 2 BTC to Raiden" http://localhost:6090/blockchain

Releases

No releases published

Packages

No packages published

Languages