{"id":33084941,"url":"https://github.com/yezz123/rain-rust-sdk","last_synced_at":"2026-04-13T21:31:49.421Z","repository":{"id":324139799,"uuid":"1095108079","full_name":"yezz123/rain-rust-sdk","owner":"yezz123","description":"A modern, type-safe Rust SDK for Rain xyz API","archived":false,"fork":false,"pushed_at":"2025-11-24T11:54:34.000Z","size":319,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-28T01:18:34.122Z","etag":null,"topics":["crypto","ethereum","fintech","hyperliquid","payments","rain"],"latest_commit_sha":null,"homepage":"https://docs.rs/rain-sdk","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yezz123.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"yezz123","polar":"yezz123"}},"created_at":"2025-11-12T15:48:44.000Z","updated_at":"2025-11-24T11:54:35.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/yezz123/rain-rust-sdk","commit_stats":null,"previous_names":["yezz123/rain-rust-sdk"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/yezz123/rain-rust-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yezz123%2Frain-rust-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yezz123%2Frain-rust-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yezz123%2Frain-rust-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yezz123%2Frain-rust-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yezz123","download_url":"https://codeload.github.com/yezz123/rain-rust-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yezz123%2Frain-rust-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31771813,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T20:17:16.280Z","status":"ssl_error","status_checked_at":"2026-04-13T20:17:08.216Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crypto","ethereum","fintech","hyperliquid","payments","rain"],"created_at":"2025-11-14T14:00:27.422Z","updated_at":"2026-04-13T21:31:49.412Z","avatar_url":"https://github.com/yezz123.png","language":"Rust","funding_links":["https://github.com/sponsors/yezz123","https://polar.sh/yezz123"],"categories":[],"sub_categories":[],"readme":"# Rain SDK\n\n![Rain SDK](https://app.ashbyhq.com/api/images/org-theme-wordmark/dc58a004-9283-4567-8b9e-641f9135d176/f93d4997-00f5-421f-9ba6-5979c6300ded/1cc77dcf-1f1e-4813-bc12-1db61148263d.png)\n\n[![Documentation](https://docs.rs/rain-sdk/badge.svg)](https://docs.rs/rain-sdk)\n[![Crates.io](https://img.shields.io/crates/v/rain-sdk.svg)](https://crates.io/crates/rain-sdk)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![Rust](https://img.shields.io/badge/rust-1.60+-black.svg)](https://www.rust-lang.org)\n[![Documentation](https://img.shields.io/badge/docs-latest-blue.svg)](https://docs.rs/rain-sdk)\n[![CI](https://github.com/yezz123/rain-rust-sdk/actions/workflows/ci.yaml/badge.svg)](https://github.com/yezz123/rain-rust-sdk/actions/workflows/ci.yaml)\n[![dependency status](https://deps.rs/repo/github/yezz123/rain-rust-sdk/status.svg)](https://deps.rs/repo/github/yezz123/rain-rust-sdk)\n\n---\n\nA modern, type-safe Rust SDK for the [Rain Cards API](https://raincards.xyz).\n\n## Features\n\n- ✅ **100% API Coverage**: All 71 non-deprecated endpoints fully implemented\n- ✅ **OpenAPI Aligned**: Fully aligned with the official OpenAPI specification\n- ✅ **Async and Sync Support**: Use async/await or blocking operations via feature flags\n- ✅ **Type Safety**: Strongly typed models for all API endpoints with proper serialization\n- ✅ **API Key Authentication**: Simple API key-based authentication\n- ✅ **Comprehensive Error Handling**: Detailed error types with HTTP status codes and context\n- ✅ **Production Ready**: Well-tested, documented, and validated\n\n## Installation\n\nAdd this to your `Cargo.toml`:\n\n```toml\n[dependencies]\nrain-sdk = { version = \"0.1.0\", features = [\"async\"] }\n```\n\nFor blocking/sync operations:\n\n```toml\n[dependencies]\nrain-sdk = { version = \"0.1.0\", features = [\"sync\"] }\n```\n\n## Quick Start\n\n### Async Example\n\n```rust\nuse rain_sdk::{RainClient, Config, Environment, AuthConfig};\nuse rain_sdk::models::applications::InitiateUserApplicationRequest;\nuse uuid::Uuid;\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    // Create configuration for dev environment\n    let config = Config::new(Environment::Dev);\n\n    // Create authentication config with API key\n    let auth = AuthConfig::with_api_key(\"your-api-key\".to_string());\n\n    // Create the client\n    let client = RainClient::new(config, auth)?;\n\n    // Initiate a user application\n    let request = InitiateUserApplicationRequest {\n        first_name: \"John\".to_string(),\n        last_name: \"Doe\".to_string(),\n        email: \"john@example.com\".to_string(),\n        wallet_address: None,\n    };\n\n    let application = client.initiate_user_application(\u0026request).await?;\n    println!(\"Application ID: {}\", application.id);\n\n    Ok(())\n}\n```\n\n### Sync Example\n\n```rust\nuse rain_sdk::{RainClient, Config, Environment, AuthConfig};\nuse rain_sdk::models::applications::InitiateUserApplicationRequest;\n\nfn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    let config = Config::new(Environment::Dev);\n    let auth = AuthConfig::with_api_key(\"your-api-key\".to_string());\n    let client = RainClient::new(config, auth)?;\n\n    let request = InitiateUserApplicationRequest {\n        first_name: \"John\".to_string(),\n        last_name: \"Doe\".to_string(),\n        email: \"john@example.com\".to_string(),\n        wallet_address: None,\n    };\n\n    let application = client.initiate_user_application_blocking(\u0026request)?;\n    println!(\"Application ID: {}\", application.id);\n\n    Ok(())\n}\n```\n\n## Authentication\n\nThe SDK supports API key authentication:\n\n```rust\nlet auth = AuthConfig::with_api_key(\"your-api-key\".to_string());\n```\n\n## Examples\n\nSee the [examples](examples/) directory for usage examples:\n\n- **[Basic Client](./examples/basic_client.rs)** - Initialize a client and make simple API calls\n- **[Initiate User Application](./examples/initiate_user_application.rs)** - Initiate a user application\n- **[Consumer Signup](./examples/signup_consumer.rs)** - Complete consumer signup workflow\n- **[Corporate Signup](./examples/signup_corporate.rs)** - Complete corporate signup workflow\n- **[Manage Corporate Users](./examples/manage_corporate_users.rs)** - Manage users in corporate programs (add, deactivate, delete)\n\nRun an example:\n\n```bash\ncargo run --example signup_consumer --features async\n```\n\n## API Coverage\n\nThe SDK provides **100% coverage** of the Rain Issuing API, with all 71 non-deprecated endpoints fully implemented and aligned with the OpenAPI specification.\n\n## Error Handling\n\nThe SDK uses a comprehensive error type system with detailed HTTP status codes:\n\n```rust\nuse rain_sdk::error::RainError;\n\nmatch client.get_user_application(\u0026user_id).await {\n    Ok(application) =\u003e println!(\"Success: {:?}\", application),\n    Err(RainError::ApiError { status, response }) =\u003e {\n        println!(\"API error (status {}): {}\", status, response);\n        // Common status codes:\n        // - 400: Invalid request\n        // - 401: Invalid authorization\n        // - 403: Forbidden\n        // - 404: Not found\n        // - 409: Conflict\n        // - 423: Locked\n        // - 500: Internal server error\n    },\n    Err(RainError::HttpError(err)) =\u003e println!(\"HTTP error: {}\", err),\n    Err(RainError::AuthError(msg)) =\u003e println!(\"Auth error: {}\", msg),\n    Err(e) =\u003e println!(\"Other error: {}\", e),\n}\n```\n\n## Configuration\n\n### Environment Selection\n\n```rust\n// Dev (default)\nlet config = Config::new(Environment::Dev);\n\n// Production\nlet config = Config::new(Environment::Production);\n\n// Custom URL\nlet config = Config::new(Environment::Custom(\n    url::Url::parse(\"https://api.custom.com/v1\")?\n));\n```\n\n### Custom Configuration\n\n```rust\nlet config = Config::new(Environment::Dev)\n    .with_timeout(60)  // 60 second timeout\n    .with_user_agent(\"my-app/1.0\".to_string())\n    .with_logging(true);\n```\n\n## Features\n\n- `default`: Enables async support with rustls-tls\n- `async`: Async/await support (requires tokio)\n- `sync`: Blocking/synchronous operations\n- `rustls-tls`: Use rustls for TLS (default)\n- `native-tls`: Use native TLS implementation\n- `gzip`: Enable gzip compression\n- `json`: JSON serialization support (enabled by default)\n\n## Documentation\n\n- **[Signup Guide](./docs/signup.md)** - Complete guide for signing up customers (Consumer and Corporate programs)\n- **[Managing Users Guide](./docs/managing_users.md)** - Guide for managing users in corporate programs (add, deactivate, delete)\n- **[Managing Cards Guide](./docs/managing_cards.md)** - Guide for issuing and managing cards (virtual, physical, bulk shipping, encrypted details)\n\n## License\n\nLicensed under the MIT license ([LICENSE](LICENSE)).\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyezz123%2Frain-rust-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyezz123%2Frain-rust-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyezz123%2Frain-rust-sdk/lists"}