β οΈ Project Status: In Development
This project is currently in the planning and specification phase. We are seeking contributors to help build this SDK. No implementation has been completed yet.
A comprehensive, type-safe, and async-first Rust SDK for integrating with Pi Network APIs. This SDK will enable server-side applications to manage payments, authenticate users, and interact with the Stellar blockchain that powers Pi Network.
- User Authentication - Validate access tokens and retrieve user profiles
- Payment Management - Create, approve, cancel, and complete payments with full lifecycle support
- Stellar Integration - Send native Pi assets and query account balances across networks
- Async/Await Support - Built on tokio for high-performance concurrent operations
- Type Safety - Strongly-typed APIs with comprehensive error handling using
thiserror - Well Tested - Extensive unit and integration test coverage with mock servers
- Rich Documentation - Comprehensive rustdoc with examples and guides
- Performance Optimized - Connection pooling, retry logic, and efficient serialization
- Configurable - Flexible configuration with builder patterns and sensible defaults
This SDK aims to provide a comprehensive Rust interface for Pi Network APIs, based on the existing official C# SDK developed by the Pi Network team. The goal is to bring the same functionality to the Rust ecosystem with idiomatic Rust patterns and modern async/await support.
- Requirements Document - Detailed requirements and acceptance criteria
- Design Document - Architecture and technical design
- Implementation Tasks - Detailed task breakdown for contributors
- Pi Network C# SDK - Official reference implementation
- Pi Platform APIs Documentation - Official API documentation
- API Base URL:
https://api.minepi.com/v2 - Supported Endpoints:
GET /me- Get user information (requires Bearer token)GET /payments/{payment_id}- Get payment details (requires API key)POST /payments/{payment_id}/approve- Approve payment (requires API key)POST /payments/{payment_id}/complete- Complete payment (requires API key)
The SDK will be built using modern Rust practices and will include:
- Async-first design using tokio for non-blocking I/O operations
- Type-safe APIs leveraging Rust's type system to prevent runtime errors
- Comprehensive error handling using
thiserrorfor clear error propagation - Modular architecture with clean separation between authentication, payments, and Stellar operations
- Extensive testing including unit tests, integration tests, and benchmarks
- Rich documentation with rustdoc comments and practical examples
The SDK will support multiple Pi Network and Stellar networks:
- Pi Mainnet - Production Pi Network
- Pi Testnet - Pi Network testing environment
- Stellar Testnet - Stellar testing network for development
We need your help! This project is in the early stages and we're looking for contributors to help build this SDK.
-
Review the specifications:
- Read the Requirements Document
- Study the Design Document
- Check the Implementation Tasks
-
Set up your development environment:
- Install Rust (1.70 or later)
- Install required tools:
rustup component add clippy rustfmt - Fork and clone this repository
-
Pick a task:
- Browse the task list
- Look for issues labeled with different skill levels
- Start with foundational tasks like project setup or data models
We need help with:
-
Project Setup - Initial Cargo.toml, module structure, and CI/CD
-
Data Models - Implementing the Pi Network API data structures
-
HTTP Client - Building the core client with proper error handling
-
Authentication - User profile and token validation
-
Payment Operations - Full payment lifecycle impleme We have issues labeled for different skill levels:
-
π’ good first issue - Perfect for newcomers to Rust or the project
-
π‘ help wanted - Features and improvements we'd love help with
-
π΄ advanced - Complex features requiring deep Rust knowledge
See our Contributing Guide for detailed information.
This project is actively developed and maintained. Current status:
- π§ Core API Implementation - Payment and auth operations
- π§ Stellar Integration - Basic blockchain operations
- π§ Comprehensive Testing - Unit and integration tests
- π§ Documentation - API docs and guides
- π§ Advanced Features - Caching, connection pooling
- π§ Performance Optimization - Benchmarking and optimization
- π Planned - WebSocket support, advanced retry strategies
Security is a top priority. We:
- β
Run automated security audits with
cargo audit - β Follow Rust security best practices
- β Regularly update dependencies
- β Provide secure examples and documentation
To report security vulnerabilities, please email security@example.com.
The SDK is designed for high performance:
- Async/await throughout - Non-blocking I/O operations
- Connection pooling - Efficient HTTP connection reuse
- Configurable timeouts - Prevent hanging requests
- Retry logic - Automatic retry with exponential backoff
- Efficient serialization - Optimized JSON processing
Benchmark results are available in the benchmarks directory.
- π§ Core payment operations
- π§ User authentication
- π§ Basic Stellar integration
- π§ Comprehensive error handling
- π§ WebSocket support for real-time updates
- π§ Advanced caching mechanisms
- π§ Enhanced retry strategies
- π§ Performance optimizations
- π Multi-signature transaction support
- π Advanced Stellar operations
- π Plugin system for extensions
- π GraphQL API support
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
- Pi Network Team - For creating the Pi Network and providing the C# SDK reference
- Stellar Development Foundation - For the Stellar blockchain infrastructure
- Rust Community - For the amazing ecosystem and tools
- Contributors - Everyone who helps make this project better
- π Documentation: docs.rs/pi-rust
- π Bug Reports: GitHub Issues
- π¬ Discussions: GitHub Discussions
- π§ Email: support@example.com
Documentation β’ Examples β’ Contributing β’ Changelog
Made with β€οΈ by the Pi Network Rust community