Crypto Pay API Client for Rust ๐ฆ
A type-safe Rust client for the Crypto Bot API with async support.
Features โจ
- ๐ Complete type safety
- ๐ Async support
- ๐ก Comprehensive error handling
- ๐ Built-in parameter validation
- ๐ฆ Zero configuration
- ๐ Webhook support
- ๐ Full API coverage
- ๐งช Complete test coverage
Quick Start ๐
Add to your Cargo.toml:
[]
= "0.1.1"
Basic Example with tokio
use *;
async
API Coverage ๐
Invoices
- โ
Create invoice (
create_invoice) - โ
Get invoices (
get_invoices) - โ
Delete invoice (
delete_invoice)
Transfers
- โ
Transfer (
transfer) - โ
Get transfers (
get_transfers)
Checks
- โ
Create check (
create_check) - โ
Get checks (
get_checks) - โ
Delete check (
delete_check)
Other Features
- โ
Get balance (
get_balance) - โ
Get exchange rates (
get_exchange_rates) - โ
Get currencies (
get_currencies) - โ
Get app info (
get_me) - โ
Get statistics (
get_stats)
Advanced Usage ๐ง
Webhook Handling
use *;
async
See examples/axum_webhook.rs for an example using axum.
Custom Configuration
let client = builder
.api_token
.base_url
.timeout
.build;
Error Handling โ ๏ธ
The library provides detailed error types:
match client.get_balance.await
Documentation ๐
TODOs ๐งช
- Add more integration tests
Contributing ๐ค
Contributions are welcome! Please check out our Contributing Guide.
License ๐
This project is licensed under the MIT License - see the LICENSE file for details.