Immaculate is a simple blockchain implementation written in Rust, focused on learning and practicing concepts of cryptography and decentralized networks. This mini blockchain uses the secp256k1
library for public/private key generation, message signing, and block mining through Proof-of-Work (PoW).
- Wallet Generation: Create a digital wallet with private key, public key, and address.
- Message Signing: Allows signing messages using the private key of the wallet.
- Block Mining: The blockchain mines blocks using Proof-of-Work.
- Block Structure: Each block contains information such as index, timestamp, data, previous hash, block hash, and nonce.
Before running the project, you need to have the following installed:
- Rust (recommended to install the latest version)
If you don't have Rust installed yet, follow the official guide:
https://www.rust-lang.org/tools/install
-
Clone the repository:
git clone https://github.com/your-username/immaculate.git cd immaculate
-
Build the project:
- If it's your first time compiling the project, run the following command to compile the dependencies:
cargo build --release
- Run the application:
- To run the project, simply execute:
cargo run
This will generate a wallet with a private key, public key, and address, sign a message, and mine some blocks.
src/wallet.rs
: Implementation of wallet generation and message signing.src/chain.rs
: Blockchain implementation, with block miners and data structure.src/blocks.rs
: Definition of the block model and block data structure.src/main.rs
: The entry point for running the application, generating the wallet, signing a message, and mining blocks.
This project is licensed under the MIT License. See the LICENSE file for details.