{"id":30741107,"url":"https://github.com/pwh-pwh/walrus_rs","last_synced_at":"2026-06-29T02:31:09.786Z","repository":{"id":312070953,"uuid":"1046173904","full_name":"pwh-pwh/walrus_rs","owner":"pwh-pwh","description":"walrus_rs is a Rust client library for interacting with the Walrus API. ","archived":false,"fork":false,"pushed_at":"2025-09-18T14:30:06.000Z","size":54,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-18T16:56:35.125Z","etag":null,"topics":["sui","walrus"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pwh-pwh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2025-08-28T09:50:22.000Z","updated_at":"2025-09-18T14:30:10.000Z","dependencies_parsed_at":"2025-08-28T17:30:02.985Z","dependency_job_id":"2dbcc1a6-66d5-4628-a4a5-3946c8c24b25","html_url":"https://github.com/pwh-pwh/walrus_rs","commit_stats":null,"previous_names":["pwh-pwh/walrus_rs"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/pwh-pwh/walrus_rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pwh-pwh%2Fwalrus_rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pwh-pwh%2Fwalrus_rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pwh-pwh%2Fwalrus_rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pwh-pwh%2Fwalrus_rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pwh-pwh","download_url":"https://codeload.github.com/pwh-pwh/walrus_rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pwh-pwh%2Fwalrus_rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34911134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-29T02:00:05.398Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["sui","walrus"],"created_at":"2025-09-04T00:22:14.108Z","updated_at":"2026-06-29T02:31:09.776Z","avatar_url":"https://github.com/pwh-pwh.png","language":"Rust","funding_links":[],"categories":["SDKs"],"sub_categories":[],"readme":"# walrus_rs\n\n`walrus_rs` is a Rust client library for interacting with the Walrus API. It provides convenient interfaces for storing and reading blob and quilt data.\n\n## Installation\n\nAdd the following dependency to your `Cargo.toml` file:\n\n```toml\n[dependencies]\nwalrus_rs = \"0.1.4\" # Replace with the latest version\nreqwest = { version = \"0.12\", features = [\"json\", \"multipart\"] }\ntokio = { version = \"1\", features = [\"full\"] }\nserde = { version = \"1\", features = [\"derive\"] }\nserde_json = \"1\"\nurl = \"2\"\nthiserror = \"1\"\nasync-trait = \"0.1\"\n```\n\n## Async Example\n\nHere's a simple example demonstrating how to use the async `WalrusClient` to store and read blob and quilt data:\n\n```rust\nuse walrus_rs::{WalrusClient, WalrusError};\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c(), WalrusError\u003e {\n    let aggregator_url = std::env::var(\"AGGREGATOR\")\n        .unwrap_or_else(|_| \"https://aggregator.testnet.walrus.atalma.io\".to_string());\n    let publisher_url = std::env::var(\"PUBLISHER\")\n        .unwrap_or_else(|_| \"https://publisher.walrus-01.tududes.com\".to_string());\n\n    let client = WalrusClient::new(\u0026aggregator_url, \u0026publisher_url)?;\n\n    // Example: Store a blob\n    println!(\"Storing a blob...\");\n    let data = \"some string from Rust SDK\".as_bytes().to_vec();\n    let store_result = client.store_blob(data, Some(1), None, None, None).await?;\n    println!(\"Blob store result: {:?}\", store_result);\n\n    if let Some(newly_created) = store_result.newly_created {\n        let blob_id = newly_created.blob_object.blob_id;\n        println!(\"Newly created blob ID: {}\", blob_id);\n\n        // Example: Read a blob by ID\n        println!(\"Reading blob by ID: {}\", blob_id);\n        let read_data = client.read_blob_by_id(\u0026blob_id).await?;\n        println!(\"Read blob data: {}\", String::from_utf8_lossy(\u0026read_data));\n    }\n\n    // Example: Store a quilt\n    println!(\"\\nStoring a quilt...\");\n    let file1_data = \"content of file 1\".as_bytes().to_vec();\n    let file2_data = \"content of file 2\".as_bytes().to_vec();\n    let files = vec![\n        (\"file1.txt\", file1_data),\n        (\"file2.txt\", file2_data),\n    ];\n    let quilt_store_result = client.store_quilt(files, None, Some(1), None, None, None).await?;\n    println!(\"Quilt store result: {:?}\", quilt_store_result);\n\n    if let Some(newly_created) = quilt_store_result.blob_store_result.newly_created {\n        let quilt_id = newly_created.blob_object.blob_id;\n        println!(\"Newly created quilt ID: {}\", quilt_id);\n\n        if let Some(stored_quilt_blob) = quilt_store_result.stored_quilt_blobs.get(0) {\n            let quilt_patch_id = \u0026stored_quilt_blob.quilt_patch_id;\n            println!(\"First quilt patch ID: {}\", quilt_patch_id);\n\n            // Example: Read a quilt blob by patch ID\n            println!(\"Reading quilt blob by patch ID: {}\", quilt_patch_id);\n            let read_quilt_data = client.read_quilt_blob_by_patch_id(quilt_patch_id).await?;\n            println!(\"Read quilt blob data: {}\", String::from_utf8_lossy(\u0026read_quilt_data));\n        }\n    }\n\n    Ok(())\n}\n```\n\n## Blocking (Sync) Example\n\nFor environments where you can't use async, `walrus_rs` also provides a blocking client.\n\n```rust\nuse walrus_rs::{BlockingWalrusClient, WalrusError};\n\nfn main() -\u003e Result\u003c(), WalrusError\u003e {\n    let aggregator_url = std::env::var(\"AGGREGATOR\")\n        .unwrap_or_else(|_| \"https://aggregator.testnet.walrus.atalma.io\".to_string());\n    let publisher_url = std::env::var(\"PUBLISHER\")\n        .unwrap_or_else(|_| \"https://publisher.walrus-01.tududes.com\".to_string());\n\n    let client = BlockingWalrusClient::new(\u0026aggregator_url, \u0026publisher_url)?;\n\n    // Example: Store a blob\n    println!(\"Storing a blob...\");\n    let data = \"some string from Rust SDK (blocking)\".as_bytes().to_vec();\n    let store_result = client.store_blob(data, Some(1), None, None, None)?;\n    println!(\"Blob store result: {:?}\", store_result);\n\n    if let Some(newly_created) = store_result.newly_created {\n        let blob_id = newly_created.blob_object.blob_id;\n        println!(\"Newly created blob ID: {}\", blob_id);\n\n        // Example: Read a blob by ID\n        println!(\"Reading blob by ID: {}\", blob_id);\n        let read_data = client.read_blob_by_id(\u0026blob_id)?;\n        println!(\"Read blob data: {}\", String::from_utf8_lossy(\u0026read_data));\n    }\n    Ok(())\n}\n```\n\n## Running the Examples\n\nTo run the examples, ensure you have the `AGGREGATOR` and `PUBLISHER` environment variables set, or provide default values in the code.\n\nTo run the async example:\n```bash\ncargo run --example simple_usage\n```\n\nTo run the blocking example:\n```bash\ncargo run --example blocking_usage\n```\n\n## License\n\nThis project is licensed under the MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpwh-pwh%2Fwalrus_rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpwh-pwh%2Fwalrus_rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpwh-pwh%2Fwalrus_rs/lists"}