An open API service indexing awesome lists of open source software.

https://github.com/javadtorabikh/transferrust

A blazing-fast and secure API built with Rust to create and submit transactions on a blockchain network.
https://github.com/javadtorabikh/transferrust

blockchain blockchain-technology move rust transactions

Last synced: 17 days ago
JSON representation

A blazing-fast and secure API built with Rust to create and submit transactions on a blockchain network.

Awesome Lists containing this project

README

          

# ๐Ÿ”— Rust-Language Blockchain Transaction API

A blazing-fast and secure API built with **Rust** to create and submit transactions on a blockchain network.

> Perfect for powering wallets, dApps, backend services, or blockchain automation tools.

---

## ๐Ÿš€ Features

- ๐Ÿฆ€ Written in **Rust** for performance and safety

- ๐Ÿ” Secure transaction signing and submission

- ๐ŸŒ Connects directly with your blockchain node

- โš™๏ธ Easy to integrate into any Web3 stack

- ๐Ÿ“ก RESTful API interface for simple interaction

---

## ๐Ÿ“ฆ Tech Stack

- **Language:** Rust

- **Web Framework:** [Actix Web](https://actix.rs/)

- **Blockchain Support:** Compatible with networks like **Sui**, custom blockchains, or other Move-based chains

- **Serialization:** JSON (via `serde`)

- **Security:** Optional JWT or API key auth (configurable)

---

## ๐Ÿ› ๏ธ Getting Started

### Prerequisites

- Rust (latest stable version)
Install via [rustup.rs](https://rustup.rs)

- Access to a blockchain node (e.g., a Sui full node or devnet node)

### Clone & Build

```bash
git clone https://github.com/JavadTorabiKh/TransferRust.git
cd apiTransfer
cargo build --release
```

### Run the API
```bash
cargo run
```
The API will be available at:
http://localhost:8000

---

## ๐Ÿ”ง Configuration
You can configure the API via environment variables or a .env file:

```env
BLOCKCHAIN_RPC_URL=https://fullnode.devnet.sui.io
PRIVATE_KEY=your_private_key_here
PORT=8000
```

---

## ๐Ÿ“ฎ Example API Usage
Create Transaction
POST /transaction

Request Body:

```json
{
"recipient": "0xabc123...",
"amount": 1000000,
"token": "SUI"
}
```
Response:

```json
{
"status": "success",
"tx_hash": "0xdeadbeef1234567890"
}
```

---

## ๐Ÿ“ Project Structure

```bash
src/
โ”œโ”€โ”€ main.rs # Application entry point
โ”œโ”€โ”€ handlers.rs # API route handlers
โ”œโ”€โ”€ blockchain.rs # Blockchain interaction logic
โ”œโ”€โ”€ models.rs # Request/response models
โ””โ”€โ”€ config.rs # App configuration
```

---

## ๐Ÿงช Testing

```bash
cargo test
```
You can also use Postman or curl to test endpoints manually.

---

## ๐Ÿค Contributing
Pull requests are welcome! If youโ€™d like to help improve this project, feel free to fork it and submit a PR.

---

## ๐Ÿ“œ License
Licensed under the MIT License.

---

## ๐Ÿ“ฌ Contact
Created by javadtorabi462@gmail.com

Feel free to reach out for questions, suggestions, or collaborations!