{"id":22799921,"url":"https://github.com/tangle-network/lotus-client-schema-rs","last_synced_at":"2025-03-30T19:17:25.613Z","repository":{"id":260583731,"uuid":"881746537","full_name":"tangle-network/lotus-client-schema-rs","owner":"tangle-network","description":"Lotus Client Schema RPC client implementation for Filecoin","archived":false,"fork":false,"pushed_at":"2024-11-16T13:40:19.000Z","size":12889,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-05T21:53:37.738Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tangle-network.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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}},"created_at":"2024-11-01T06:17:06.000Z","updated_at":"2024-11-21T22:15:16.000Z","dependencies_parsed_at":"2024-12-12T07:10:28.715Z","dependency_job_id":"8cd09947-2bed-46a5-aa56-e0848934feaa","html_url":"https://github.com/tangle-network/lotus-client-schema-rs","commit_stats":null,"previous_names":["tangle-network/lotus-client-schema-rs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Flotus-client-schema-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Flotus-client-schema-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Flotus-client-schema-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Flotus-client-schema-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tangle-network","download_url":"https://codeload.github.com/tangle-network/lotus-client-schema-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246365647,"owners_count":20765549,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-12-12T07:10:25.550Z","updated_at":"2025-03-30T19:17:25.346Z","avatar_url":"https://github.com/tangle-network.png","language":"Rust","readme":"# Lotus Rust Client Schema\n\nA Rust client library for interacting with the [Lotus](https://github.com/filecoin-project/lotus) JSON-RPC API. This library provides a type-safe, async interface for communicating with Lotus nodes.\n\n**This has not been rigorously tested! Contributions and feedback are welcome.**\n\n## Features\n\n- Async/await support using Tokio runtime\n- Type-safe JSON-RPC interactions\n- Comprehensive error handling\n- Support for authentication tokens\n- Generated API bindings for all Lotus APIs:\n  - Full Node API\n  - Storage Miner API\n  - Gateway API\n  - Wallet API\n  - Worker API\n  - Common API\n\n## Installation\n\nAdd this to your `Cargo.toml`:\n```toml\n[dependencies]\nlotus-client = \"0.1.1\"\n```\n\n## Usage\n```rust\nuse lotus_client::LotusClient;\n#[tokio::main]\nasync fn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    // Create a new client\n    let client = LotusClient::new(\n        \"http://127.0.0.1:1234/rpc/v0\",\n        Some(\"YOUR_AUTH_TOKEN\".to_string())\n    ).await?;\n    // Use the client to make API calls\n    let version = client.version(serde_json::Value::Null).await?;\n    println!(\"Lotus version: {:?}\", version\n);\n    Ok(())\n}\n```\n\n## API Coverage\n\nThe client provides comprehensive coverage of the Lotus JSON-RPC API through generated code:\n\n- `CommonApi` - Common methods shared across different APIs\n- `FullNodeApi` - Full node API methods\n- `StorageMinerApi` - Storage miner specific methods\n- `GatewayApi` - Gateway API methods\n- `WalletApi` - Wallet management methods\n- `WorkerApi` - Worker API methods\n\n### Codegen\nThe API bindings are generated from the Lotus JSON-RPC API schema using a custom code generator. To regenerate the bindings:\n\n1. Ensure you have Go installed\n2. Run the schema generator script:\n```bash\nchmod +x ./go-schemagen/generate-schema-for-api.sh\n./go-schemagen/generate-schema-for-api.sh\n```\n\n## Error Handling\n\nThe library uses custom error types for better error handling:\n\n- `ClientError` - Errors from the JSON-RPC client\n- `SerializationError` - JSON serialization/deserialization errors\n- `JsonRpcError` - Errors returned by the Lotus JSON-RPC API\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Acknowledgments\n\n- [js-lotus-client-schema](https://github.com/filecoin-shipyard/js-lotus-client-schema) - The schema generator used to generate Rust API code","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftangle-network%2Flotus-client-schema-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftangle-network%2Flotus-client-schema-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftangle-network%2Flotus-client-schema-rs/lists"}