Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/omarespejel/minibitcoin
Minimalistic implementation of Bitcoin
https://github.com/omarespejel/minibitcoin
Last synced: about 2 months ago
JSON representation
Minimalistic implementation of Bitcoin
- Host: GitHub
- URL: https://github.com/omarespejel/minibitcoin
- Owner: omarespejel
- Created: 2023-10-24T09:05:44.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-27T21:00:17.000Z (about 1 year ago)
- Last Synced: 2024-03-27T22:37:22.153Z (10 months ago)
- Language: C++
- Size: 6.37 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MiniBitcoin
## Simplified Bitcoin Implementation
This documentation outlines `miniBitcoin`, a streamlined version of Bitcoin's core technology: the blockchain.
### Block Structure
A block, forming the backbone of the blockchain, includes:
- `index`: The sequential number indicating the block's position.
- `previousHash`: The unique identifier of the preceding block.
- `blockHash`: The block's own unique identifier.
- `nonce`: A one-time-use number, often randomly generated, critical for blockchain security.
- `data`: Content held by the block, such as transactions.### Block Functionalities
The blockchain provides these essential methods for interaction:
- `getIndex()`: Retrieves the index of the block.
- `getPreviousHash()`: Fetches the hash of the preceding block.
- `getHash()`: Obtains the block's hash.
- `getData()`: Accesses the block's stored data.
- `toString()`: Displays the block attributes for review.Next step is to create the Blockchain class, which will hold the blocks and provide the following methods:
- `getLatestBlock()`: Retrieves the latest block in the chain.