BlockFlow.Core 1.0.3

dotnet add package BlockFlow.Core --version 1.0.3
                    
NuGet\Install-Package BlockFlow.Core -Version 1.0.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BlockFlow.Core" Version="1.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BlockFlow.Core" Version="1.0.3" />
                    
Directory.Packages.props
<PackageReference Include="BlockFlow.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BlockFlow.Core --version 1.0.3
                    
#r "nuget: BlockFlow.Core, 1.0.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package BlockFlow.Core@1.0.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BlockFlow.Core&version=1.0.3
                    
Install as a Cake Addin
#tool nuget:?package=BlockFlow.Core&version=1.0.3
                    
Install as a Cake Tool

🧱 BlockFlow.Core

Blockchain-Style Data Framework for .NET

BlockFlow.Core is a lightweight, blockchain-inspired library for .NET designed to provide developers with a secure, tamper-evident, and extensible framework for managing data as immutable and auditable blocks. It combines traditional object-oriented programming patterns with blockchain principles, offering encryption, hash-based verification, and a history-aware data model while maintaining the flexibility of a standard CRUD API.


⚠️ Notice

  • Free on NuGet.org until March 01, 2026
  • After March 01, 2026, usage will require a commercial license

🌟 Overview

BlockFlow.Core defines your data as blocks, stored immutably in the database.
When a record changes, the library automatically:

  • Creates a new encrypted block.
  • Preserves the previous version in a _history table.
  • Links them cryptographically through SHA-256 hashing.

This allows you to achieve data immutability, chain verification, and audit trail consistency seamlessly in your .NET apps.


🔑 Key Concepts

  • Immutable Blocks — Once created, data cannot be directly modified (Configurable).
  • Automatic History Tracking — Each update produces a historical record.
  • Chain Verification — Every block links to the previous one via hash chaining.
  • Object Mapper Integration — Encrypted data is automatically mapped to POCO classes during CRUD operations.
  • Database Agnostic — Supports both PostgreSQL and SQL Server, including automatic schema and trigger setup.

💡 Use Cases

1. Financial Transactions

  • Track and verify blockchain-style transactions in fintech apps
  • Ensure immutability and traceability of payment logs

2. Supply Chain Management

  • Record events across multiple parties in a supply chain
  • Maintain a secure, auditable history of goods movement

3. Data Audit & Compliance

  • Keep a tamper-proof log of sensitive data changes
  • Ideal for compliance with regulations like GDPR or PCI DSS

4. Decentralized Applications (DApps)

  • Integrate blockchain database features in .NET applications
  • Prototype decentralized apps without full blockchain setup

5. Hybrid Database Scenarios

  • Use PostgreSQL as primary storage with blockchain-style ledger
  • Optional beta SQL Server support for enterprise environments

6. Cryptocurrency / Token Management

  • Manage transactions, wallets, and token balances securely
  • Maintain a tamper-proof ledger for crypto-based applications
  • Useful for small-scale blockchain prototypes or educational platforms

🧩 Core Operations

Method Description
Dictionary<Type, string> GetRegisteredBlocks() Returns a dictionary of all registered block types with their associated database table names.
Task<T?> FindAsync<T>(long blockId, int commandTimeout = 30) Retrieves a mapped block of type T by its unique identifier.
Task<T?> GetBlockAsync<T>(long blockId, int commandTimeout = 30) Retrieves a block of type T by its unique identifier.
Task<IEnumerable<T>?> FindHistoryAsync<T>(long blockId, int commandTimeout = 60) Retrieves all mapped historical versions of a block for auditing.
Task<IEnumerable<T>?> GetBlockHistoryAsync<T>(long blockId, int commandTimeout = 60) Retrieves all historical versions of a block for auditing.
Task<IEnumerable<T>> GetElementsBetweenDatesAsync<T>(DateTime dateFrom, DateTime dateTo, int commandTimeout = 60) Returns all mapped blocks of type T created within the specified date range.
Task<IEnumerable<T>> GetBlocksAsync<T>(DateTime dateFrom, DateTime dateTo, int commandTimeout = 60) Returns all blocks of type T created within the specified date range.
Task<bool> AddAsync<T>(T entity, int commandTimeout = 30) Adds a new block to the chain, computing the initial hash and optionally linking it to a previous block.
Task<bool> UpdateAsync<T>(T entity, int commandTimeout = 30) Updates an existing block by creating a new version.
Task<int> DeleteAsync<T>(long blockId, bool hardDelete = false, int commandTimeout = 30) Soft or hard deletes a block.
Task<int> DeleteAllAsync<T>(bool hardDelete = false, int commandTimeout = 30) Deletes all blocks for a given entity type.
Task<bool> VerifyBlockAsync<T>(long blockId, int commandTimeout = 30) Verifies data integrity for a specific block.
Task<bool> VerifyChainAsync<T>(long blockId, int commandTimeout = 60) Verifies the integrity of the entire block chain.

🧠 Example Usage

You can find a complete example of how to use BlockFlow.Core in the following GitHub repository:

👉 BlockFlow.Core Example Repository

💬 Support

For questions, feedback, or inquiries, please contact us at:

📧 support@alkatek.ca

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.3 286 11/11/2025

- Initial release of BlockFlow.Core v1.0.3
     - Full PostgreSQL integration support
     - Beta support for SQL Server (experimental)
     - Check Readme for more details