Noah SDK

A modern, type-safe Rust SDK for the Noah Business API.
Features
- ✅ Async and Sync Support: Use async/await or blocking operations via feature flags
- ✅ Type Safety: Strongly typed models generated from OpenAPI schema
- ✅ Dual Authentication: Support for both JWT signing (
Api-Signature) and API key (X-Api-Key) authentication - ✅ Comprehensive Error Handling: Detailed error types with context
- ✅ Production Ready: Well-tested and documented
Installation
Add this to your Cargo.toml:
[]
= { = "0.1.0", = ["async"] }
For blocking/sync operations:
[]
= { = "0.1.0", = ["sync"] }
Quick Start
Async Example
use ;
async
Sync Example
use ;
Authentication
The SDK supports two authentication methods:
API Key Authentication
let auth = with_api_key;
JWT Signature Authentication
let auth = with_secret_key;
Both Methods
let auth = with_both;
Examples
See the examples directory for more detailed examples:
Run an example:
API Coverage
The SDK provides typed methods for all major Noah API endpoints:
- Balances: Get account balances
- Channels: List and get channel information
- Customers: Create, update, and retrieve customers
- Transactions: Prepare and execute sell transactions
- Checkout: Create payin and payout checkout sessions
- Onboarding: Create onboarding sessions and prefill customer data
- Payment Methods: List customer payment methods
- Workflows: Create automated workflows
Error Handling
The SDK uses a comprehensive error type system:
use NoahError;
match client.get_balances.await
Configuration
Environment Selection
// Sandbox (default)
let config = new;
// Production
let config = new;
// Custom URL
let config = new;
Custom Configuration
let config = new
.with_timeout // 60 second timeout
.with_user_agent
.with_logging;
Features
default: Enables async support with rustls-tlsasync: Async/await support (requires tokio)sync: Blocking/synchronous operationsrustls-tls: Use rustls for TLS (default)native-tls: Use native TLS implementationjson: JSON serialization support (enabled by default)
Documentation
License
Licensed under the MIT license (LICENSE).
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.