{"id":13712594,"url":"https://github.com/bernardassan/recblock","last_synced_at":"2026-04-21T05:38:49.548Z","repository":{"id":117955420,"uuid":"471827224","full_name":"bernardassan/recblock","owner":"bernardassan","description":"Blockchain for a record management and money transfer system","archived":false,"fork":false,"pushed_at":"2025-04-05T13:10:20.000Z","size":302,"stargazers_count":9,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-04T22:37:47.122Z","etag":null,"topics":["blockchain","blockchain-from-scratch","crypto","cryptography","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bernardassan.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-03-19T22:34:41.000Z","updated_at":"2025-04-15T13:34:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"1d4f097e-ec2b-4332-8bfe-b1a7e3205269","html_url":"https://github.com/bernardassan/recblock","commit_stats":null,"previous_names":["bernardassan/recblock"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernardassan%2Frecblock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernardassan%2Frecblock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernardassan%2Frecblock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernardassan%2Frecblock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bernardassan","download_url":"https://codeload.github.com/bernardassan/recblock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252779043,"owners_count":21802868,"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":["blockchain","blockchain-from-scratch","crypto","cryptography","zig"],"created_at":"2024-08-02T23:01:20.131Z","updated_at":"2026-04-21T05:38:49.535Z","avatar_url":"https://github.com/bernardassan.png","language":"Zig","funding_links":[],"categories":["Web3 Framework"],"sub_categories":["Zigged Project"],"readme":"# recblock\nBlockchain for a record management and money transfer system\n\n## Build package native\n```zsh\n$ zig build\n```\n\n## Build for windows on linux\n```zsh\n$ zig build -Dtarget=-Dtarget=x86_64-windows-gnu\n```\n\n## Build for linux static\n```zsh\n$ zig build -Dtarget=x86_64-linux-musl\n```\n\n## Build in release mode\n```zsh\n$ zig build -Drelease-fast\n```\n\n## HOW TO USE PROGRAM\n\n\n### create a wallet\n\n```zsh\n$ zig build run -- createwallet\n\n#.eg. to create two new wallets\n# Assan's wallet\n$ zig-dev build run -- createwallet\nYour new address is 'AY0IZ21T7XFFEPwoiVxAbnYMxuZNshdRzg'\n\n# Gaddy's wallet\n$ zig-dev build run -- createwallet\nYour new address is 'AZqc8JTbSu1xMQQD2TcVRZnj5oji5oIOLQ'\n```\n### create a chain\n\n```zsh\n# create a blockchain at Gaddy's wallet\n$ zig-dev build run -- createchain AZqc8JTbSu1xMQQD2TcVRZnj5oji5oIOLQ\n\n#.eg output\n$ zig-dev build run -- createchain AZqc8JTbSu1xMQQD2TcVRZnj5oji5oIOLQ\ninfo: new blockchain is create with address 'AZqc8JTbSu1xMQQD2TcVRZnj5oji5oIOLQ'\nhash of the created blockchain is '0031D180D286BD75D0BD543AD391E071A36A32157C2D11D9629B9B7EA5B5349C'\ninfo: You get a reward of RBC 10 for mining the coinbase transaction\n```\n\n### get balance\n\n```zsh\n$ zig-dev build run -- getbalance AZqc8JTbSu1xMQQD2TcVRZnj5oji5oIOLQ\n\n# get Gaddy's balance\n$ zig-dev build run -- getbalance AZqc8JTbSu1xMQQD2TcVRZnj5oji5oIOLQ\n'AZqc8JTbSu1xMQQD2TcVRZnj5oji5oIOLQ' has a balance of RBC 10\n\n# get Assan's balance\n$ zig-dev build run -- getbalance AY0IZ21T7XFFEPwoiVxAbnYMxuZNshdRzg\n'AY0IZ21T7XFFEPwoiVxAbnYMxuZNshdRzg' has a balance of RBC 0\n```\n\n### send RBC to another Address\n\n```zsh\n$ zig-dev build run -- send --amount 7 --from AZqc8JTbSu1xMQQD2TcVRZnj5oji5oIOLQ --to AY0IZ21T7XFFEPwoiVxAbnYMxuZNshdRzg\n\n# send RBC 7 from Gaddy's wallet to Assan's wallet\n$ zig-dev build run -- send --amount 7 --from AZqc8JTbSu1xMQQD2TcVRZnj5oji5oIOLQ --to AY0IZ21T7XFFEPwoiVxAbnYMxuZNshdRzg\ninfo: new transaction is '000AFBA4B03A90EDDF3B4534176714E39981F86AD8CAF5C773D48DE520F164B8'\ndone sending RBC 7 from 'AZqc8JTbSu1xMQQD2TcVRZnj5oji5oIOLQ' to 'AY0IZ21T7XFFEPwoiVxAbnYMxuZNshdRzg'\n'AZqc8JTbSu1xMQQD2TcVRZnj5oji5oIOLQ' now has a balance of 3 and 'AY0IZ21T7XFFEPwoiVxAbnYMxuZNshdRzg' a balance of 7\n```\n\n### print the blockchain ledger after performing some transactions\n\n```zsh\n$ zig build run -- printchain\n\n# eg\n$ zig build run -- printchain\ninfo: starting blockchain iteration\n\ninfo: previous hash is '00DAEC993931264A1125D31C7350DD8CEB5324AD66395BC3275B37AB11890623'\ninfo: hash of current block is '00F37D69BA313642C046202009326F3B6C7DC264A14349642A227CFB542908D3'\ninfo: nonce is 42\ninfo: POW: true\n\n\ninfo: previous hash is '005DD84136F0389689A89700347D0385396B7DED10A52178F2A932FE68CAC2FE'\ninfo: hash of current block is '00DAEC993931264A1125D31C7350DD8CEB5324AD66395BC3275B37AB11890623'\ninfo: nonce is 660\ninfo: POW: true\n\n\ninfo: previous hash is '000AFBA4B03A90EDDF3B4534176714E39981F86AD8CAF5C773D48DE520F164B8'\ninfo: hash of current block is '005DD84136F0389689A89700347D0385396B7DED10A52178F2A932FE68CAC2FE'\ninfo: nonce is 539\ninfo: POW: true\n\n\ninfo: previous hash is '0031D180D286BD75D0BD543AD391E071A36A32157C2D11D9629B9B7EA5B5349C'\ninfo: hash of current block is '000AFBA4B03A90EDDF3B4534176714E39981F86AD8CAF5C773D48DE520F164B8'\ninfo: nonce is 29\ninfo: POW: true\n\n\ninfo: previous hash is '0000000000000000000000000000000000000000000000000000000000000000'\ninfo: hash of current block is '0031D180D286BD75D0BD543AD391E071A36A32157C2D11D9629B9B7EA5B5349C'\ninfo: nonce is 387\ninfo: POW: true\n\n\ninfo: done\n```\n\n### print the list of valid addresses for transactions\n\n```zsh\n$ zig build run -- listaddress\n\ninfo: address 0\nAcj4k6QpclfGwTB625MOUnS_0ob7B6xumg\n\ninfo: address 1\nATM0mGFtqU0lsUafDFKgBSWARA6bBrPClA\n\ninfo: address 2\nAT_YZ3gWStL1bVZtFVbd4pkxjcqul9gX3g\n```\n\n## 👏 Credit\n\n**A lot of inspiration and learning came from _[jeiwan.net/](https://jeiwan.net/)_**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbernardassan%2Frecblock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbernardassan%2Frecblock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbernardassan%2Frecblock/lists"}