{"id":24488532,"url":"https://github.com/codx-dev/drand","last_synced_at":"2025-03-15T00:15:11.242Z","repository":{"id":57750135,"uuid":"525314667","full_name":"codx-dev/drand","owner":"codx-dev","description":null,"archived":false,"fork":false,"pushed_at":"2022-11-28T18:48:26.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T08:45:47.038Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codx-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-16T09:35:17.000Z","updated_at":"2022-11-15T19:10:51.000Z","dependencies_parsed_at":"2023-01-23T15:46:27.385Z","dependency_job_id":null,"html_url":"https://github.com/codx-dev/drand","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codx-dev%2Fdrand","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codx-dev%2Fdrand/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codx-dev%2Fdrand/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codx-dev%2Fdrand/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codx-dev","download_url":"https://codeload.github.com/codx-dev/drand/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243663576,"owners_count":20327306,"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":"2025-01-21T16:19:56.866Z","updated_at":"2025-03-15T00:15:11.213Z","avatar_url":"https://github.com/codx-dev.png","language":"Rust","readme":"# Drand Client\n\nThis is a drand client made for rust. It uses reqwest for sending HTTP requests and gets randomness data from the Drand API. It allows performing verification using\nthe [drand-verify](https://github.com/noislabs/drand-verify) crate. \n\nTo access an available chain from the API (https://drand.cloudflare.com/chains)\n```rust\nuse drand::Drand;\n\n#[tokio::main]\nasync fn main() {\n    let mut drand = Drand::available_chains()\n        .await\n        .expect(\"Cannot find available chains\");\n\n    let chain = drand.chains.remove(0); // drand.chains is a Vec\u003cChains\u003e to interact with chains \n\n    let latest = chain.latest().await.expect(\"Failed to retrieve info\").unwrap(); // get the latest round of verified randmoness from the chain\n}\n\n```\n\n`chain.latest()` will give you `Result\u003cOptionVerifiedRandomness\u003e\u003e` which is verified autoamtically, unverified randomnesses are not supported. If there's an error in verification then the error the propogated using the `drand::DrandError` enum.\n\n## LICENSE\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodx-dev%2Fdrand","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodx-dev%2Fdrand","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodx-dev%2Fdrand/lists"}