A SwiftUI iOS application that serves as a client interface for the Swift-Blockchain server implementation.
This iOS application provides a user-friendly interface to interact with a blockchain server built with Swift and the Vapor framework. The app allows users to:
- View the current state of the blockchain
- Mine new blocks
- Create and submit new transactions
- Manage blockchain nodes
- Visualize the blockchain data
- iOS 15.0+ / macOS 12.0+
- Xcode 13.0+
- Swift 5.5+
- A running instance of the Swift-Blockchain server
- Clone this repository and the Swift-Blockchain repository
- Start the Swift-Blockchain server instance
- Open
Blockchain_demo.xcodeprojin Xcode - Configure the server URL in the app (default is
http://localhost:8080) - Build and run the app on your device or simulator
The main view displays the current state of the blockchain, showing blocks, their hashes, and included transactions.
Allows users to mine new blocks and see the mining process in real-time.
Interface for creating new transactions by specifying:
- Sender address
- Recipient address
- Amount
Manage consensus between different blockchain nodes:
- Register new nodes
- Resolve consensus issues by synchronizing with the longest valid chain
This app connects to the Swift-Blockchain backend server, which implements:
- Proof of Work algorithm
- Transaction validation
- Consensus mechanism for distributed nodes
- RESTful API for interaction
The app communicates with the server using the following endpoints:
GET /chain- View the blockchainGET /mine- Mine a new blockPOST /transactions/new- Create a new transactionPOST /nodes/register- Register new nodesGET /nodes/resolve- Resolve consensus issues
Author: Bo-Hsun Hsu
Email: bohsunhsu@gmail.com
This project is available under the MIT License.



