{"id":28545629,"url":"https://github.com/fluencelabs/ipfs-effector","last_synced_at":"2025-07-07T05:31:23.281Z","repository":{"id":228755596,"uuid":"774470819","full_name":"fluencelabs/ipfs-effector","owner":"fluencelabs","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-22T15:54:43.000Z","size":25,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-09T23:08:36.435Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fluencelabs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2024-03-19T15:53:33.000Z","updated_at":"2024-05-10T12:17:57.000Z","dependencies_parsed_at":"2024-03-20T10:42:45.011Z","dependency_job_id":null,"html_url":"https://github.com/fluencelabs/ipfs-effector","commit_stats":null,"previous_names":["fluencelabs/ipfs-effector"],"tags_count":0,"template":false,"template_full_name":"fluencelabs/effector-template","purl":"pkg:github/fluencelabs/ipfs-effector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluencelabs%2Fipfs-effector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluencelabs%2Fipfs-effector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluencelabs%2Fipfs-effector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluencelabs%2Fipfs-effector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fluencelabs","download_url":"https://codeload.github.com/fluencelabs/ipfs-effector/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluencelabs%2Fipfs-effector/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264019072,"owners_count":23545056,"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-06-09T23:08:15.452Z","updated_at":"2025-07-07T05:31:23.269Z","avatar_url":"https://github.com/fluencelabs.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fluence IPFS Effector \n\nIn this project, we provide an effector for [IPFS CLI](https://docs.ipfs.tech/install/command-line/#system-requirements).\n\n### Project Structure\n\nThis project consists of 4 crates:\n- `effector` is the effector module itself. To obtain the correct WASM module, it must be built with marine build `--release`;\n- `cid` is a rust crate for exporting the [CID](https://docs.ipfs.tech/concepts/content-addressing/#version-1-v1) of the effector module. This crate is optional and only provides means to embed CIDs of selected effectors into your rust project, for example, [Nox](https://github.com/fluencelabs/nox);\n- `types` is a rust crate with the type definitions used in the API functions of the effector module (the one with the `#[marine]` tag). This crate helps to interact with the effector module's API in non-effector modules. However, this crate isn't supposed to be used on its own outside of the effector crate scope; it's re-exported by the imports crate below;\n- `imports` is a rust crate providing the type definitions (via the types crate) as well as effector module's [import definition](https://fluence.dev/docs/marine-book/marine-rust-sdk/developing/import-functions). This crate is aimed to help import the effector modules without copy-pasting the definitions manually.\n\n### How to build\n\nTo build the project, you need:\n- [Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html) to build the rust project\n- [IPFS CLI](https://docs.ipfs.tech/install/command-line/#system-requirements) to build the cid crate\n- [Fluence CLI](https://fluence.dev/docs/build/setting-up/installing_cli) to build the effector\n\nThe build.sh bash script located in the repository's root contains the commands to build the effector module and the cid crate.\nThe test.sh bash script located in the repository's root contains the commands to run tests in the effector module.\n\n### Interface\n\nThe `ipfs-effector-imports` provides the following interface:\n```rust\n#[marine]\n#[derive(Clone, Debug)]\npub struct IpfsResult {\n    /// True when the operation is successful\n    pub success: bool,\n    /// Contains an error message when `success` is false\n    pub error: String,\n}\n\n#[marine]\n#[derive(Clone, Debug)]\npub struct IpfsAddResult {\n    /// True when the operation is successful\n    pub success: bool,\n    /// Contains an error message when `success` is false\n    pub error: String,\n    /// CIDv1 of the uploaded file\n    pub hash: String,\n}\n\n\n// Upload a file `input_vault_path` to IPFS node with the `api_multiaddr` multiaddress\npub fn add(api_multiaddr: String, input_vault_path: String) -\u003e IpfsAddResult;\n\n// Downloads a file by `cid` to the `output_vault_path` file from IPFS node with the `api_multiaddr` multiaddress\npub fn get(api_multiaddr: String, cid: String, output_vault_path: \u0026str) -\u003e IpfsResult;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluencelabs%2Fipfs-effector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffluencelabs%2Fipfs-effector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluencelabs%2Fipfs-effector/lists"}