{"id":16275273,"url":"https://github.com/arthurkushman/turbochain","last_synced_at":"2025-08-09T00:12:01.417Z","repository":{"id":57606961,"uuid":"266196280","full_name":"arthurkushman/turbochain","owner":"arthurkushman","description":"TurboChain - lightweight up and running blockchain server application","archived":false,"fork":false,"pushed_at":"2021-04-24T11:21:22.000Z","size":12,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-14T12:54:35.226Z","etag":null,"topics":["api","api-server","blockchain","blockchain-technology","go","golang","storage","storage-api","storage-service"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arthurkushman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-22T19:56:52.000Z","updated_at":"2021-12-28T13:48:20.000Z","dependencies_parsed_at":"2022-08-30T00:00:53.735Z","dependency_job_id":null,"html_url":"https://github.com/arthurkushman/turbochain","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthurkushman%2Fturbochain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthurkushman%2Fturbochain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthurkushman%2Fturbochain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthurkushman%2Fturbochain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arthurkushman","download_url":"https://codeload.github.com/arthurkushman/turbochain/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247880105,"owners_count":21011591,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","api-server","blockchain","blockchain-technology","go","golang","storage","storage-api","storage-service"],"created_at":"2024-10-10T18:32:42.118Z","updated_at":"2025-04-08T16:26:15.011Z","avatar_url":"https://github.com/arthurkushman.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## TurboChain \nIts primary goal to be able to get up and running blockchain server with thin API layer and local storage, \nto provide data consistency + an ability to restore all data if needed by just running server again\n \n[![Go Report Card](https://goreportcard.com/badge/github.com/arthurkushman/turbochain)](https://goreportcard.com/report/github.com/arthurkushman/turbochain)\n[![codecov](https://codecov.io/gh/arthurkushman/turbochain/branch/master/graph/badge.svg)](https://codecov.io/gh/arthurkushman/turbochain)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![GoDoc](https://github.com/golang/gddo/blob/c782c79e0a3c3282dacdaaebeff9e6fd99cb2919/gddo-server/assets/status.svg)](https://godoc.org/github.com/arthurkushman/turbochain)\n\n#### Configuration\nTo configure port and storage file names edit .env file\n```\n# set any port for block-chain server\nADDR=8080\n# set any db file name for block-chain storage\nBLOCK_CHAIN_DB=turbochain\n```\nmake sure go environment set up correctly and run: \n```\ngo build -o turbochain \n\n./turbochain\n```\nor \n```\ngo run server.go\n```\n#### Using API to get/put blocks from/to chain\nTo put a new block to a chain:\n```http request\ncurl --data '{\"bpm\":82, \"title\": \"abc\", \"description\": \"abc abc abc\"}' http://localhost:8080/\n```\n\n```\n{\n  \"index\": 1,\n  \"timestamp\": \"2020-05-24 10:41:52.429649 +0300 MSK m=+26.655275710\",\n  \"hash\": \"8f3e317922b6accb60f7d51bb58aa1a1b12fd87af082e26021736a38881c5fb1\",\n  \"prev_hash\": \"d4a1a47f15d55e81304e22fc52db6090dd5cae5e8d544911393737d38d193de4\",\n  \"message\": {\n    \"bpm\": 82,\n    \"title\": \"abc\",\n    \"description\": \"abc abc abc\"\n  }\n}\n```\nGetting blocks by an index and hash:\n```http request\ncurl http://localhost:8080/one\\?index\\=5\\\u0026hash\\=32ddce756b09c74cfcd24a4a3c7b7cb3aea2cd131f7a11f29d8043ae12ed424a\n```\n\n```\n{\n  \"index\": 5,\n  \"timestamp\": \"2020-05-24 10:43:57.869286 +0300 MSK m=+152.093356109\",\n  \"hash\": \"32ddce756b09c74cfcd24a4a3c7b7cb3aea2cd131f7a11f29d8043ae12ed424a\",\n  \"prev_hash\": \"f7740abe30fe1540d23ed288fc945d4ccc172c09bdc3de732d86441e36a37074\",\n  \"message\": {\n    \"bpm\": 23,\n    \"title\": \"abc 5\",\n    \"description\": \"abc abc abc\"\n  }\n}\n```\nTo get last N blocks:\n```http request\ncurl http://localhost:8080/last?limit=3\n```\nRestrictions: 0 \u003c= limit \u003c= 1000 (default is 1000)\n```\n[\n  {\n    \"index\": 5,\n    \"timestamp\": \"2020-05-24 10:43:57.869286 +0300 MSK m=+152.093356109\",\n    \"hash\": \"32ddce756b09c74cfcd24a4a3c7b7cb3aea2cd131f7a11f29d8043ae12ed424a\",\n    \"prev_hash\": \"f7740abe30fe1540d23ed288fc945d4ccc172c09bdc3de732d86441e36a37074\",\n    \"message\": {\n      \"bpm\": 23,\n      \"title\": \"abc 5\",\n      \"description\": \"abc abc abc\"\n    }\n  },\n  {\n    \"index\": 4,\n    \"timestamp\": \"2020-05-24 10:43:44.147761 +0300 MSK m=+138.372001638\",\n    \"hash\": \"f7740abe30fe1540d23ed288fc945d4ccc172c09bdc3de732d86441e36a37074\",\n    \"prev_hash\": \"5de3b32b6b52a3f73be63e6955e4471d884123e099b80484eb310ba517292717\",\n    \"message\": {\n      \"bpm\": 13,\n      \"title\": \"abc 4\",\n      \"description\": \"abc abc abc\"\n    }\n  },\n  {\n    \"index\": 3,\n    \"timestamp\": \"2020-05-24 10:42:24.800961 +0300 MSK m=+59.026186210\",\n    \"hash\": \"5de3b32b6b52a3f73be63e6955e4471d884123e099b80484eb310ba517292717\",\n    \"prev_hash\": \"a227a5950287495d1f9952ef72ba8ab640bc7a1240a199043ec488f9c03c154f\",\n    \"message\": {\n      \"bpm\": 31,\n      \"title\": \"abc 3\",\n      \"description\": \"abc abc abc\"\n    }\n  }\n]\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farthurkushman%2Fturbochain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farthurkushman%2Fturbochain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farthurkushman%2Fturbochain/lists"}