{"id":14956273,"url":"https://github.com/cluster-labs/ipfs-mfs-crypto","last_synced_at":"2025-10-01T17:31:12.070Z","repository":{"id":57276573,"uuid":"178691012","full_name":"cluster-labs/ipfs-mfs-crypto","owner":"cluster-labs","description":"JavaScript implementation of the IPFS Mutable File System supporting out of the box crypto operations","archived":false,"fork":false,"pushed_at":"2019-04-06T10:50:50.000Z","size":824,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-14T12:00:30.978Z","etag":null,"topics":["aes","asymmetric-cryptography","clusterlabs","crypto","decryption","ec","encryption","ipfs","ipfs-api","mfs","rsa","symmetric-key-cryptography"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/cluster-labs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-31T13:21:24.000Z","updated_at":"2024-05-30T12:23:59.000Z","dependencies_parsed_at":"2022-09-15T08:43:11.140Z","dependency_job_id":null,"html_url":"https://github.com/cluster-labs/ipfs-mfs-crypto","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/cluster-labs%2Fipfs-mfs-crypto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cluster-labs%2Fipfs-mfs-crypto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cluster-labs%2Fipfs-mfs-crypto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cluster-labs%2Fipfs-mfs-crypto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cluster-labs","download_url":"https://codeload.github.com/cluster-labs/ipfs-mfs-crypto/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234723666,"owners_count":18877086,"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":["aes","asymmetric-cryptography","clusterlabs","crypto","decryption","ec","encryption","ipfs","ipfs-api","mfs","rsa","symmetric-key-cryptography"],"created_at":"2024-09-24T13:12:37.921Z","updated_at":"2025-10-01T17:31:11.718Z","avatar_url":"https://github.com/cluster-labs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MFS(Mutable File System) JavaScript Implementation with Crypto\n\n[![](https://img.shields.io/badge/made%20by-Cluster%20Labs-blue.svg?style=flat-square)](https://clusterlabs.io)\n\n\u003e JavaScript implementation of the IPFS Mutable File System\n\n[The MFS spec can be found inside the ipfs/specs repository](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#mutable-file-system)\n\n## Lead Maintainer\n\n[Vaibhav Saini](https://github.com/vasa-develop)\n\n## Table of Contents\n\n- [Install](#install)\n  - [npm](#npm)\n  - [Use in Node.js](#use-in-nodejs)\n  - [Use in a browser with browserify, webpack or any other bundler](#use-in-a-browser-with-browserify-webpack-or-any-other-bundler)\n  - [Use in a browser using a script tag](#use-in-a-browser-using-a-script-tag)\n  - [A note on concurrency](#a-note-on-concurrency)\n- [Contribute](#contribute)\n- [Changelog](#changelog)\n- [License](#license)\n\n## Install\n\n### npm\n\n```sh\n\u003e npm i ipfs-mfs-crypto\n```\n\n### Use in Node.js\n\n```JavaScript\nconst mfs = require('ipfs-mfs-crypto')\n```\n***See [`encrypt.spec.js`](./test/encrypt.spec.js) and [`decrypt.spec.js`](./test/decrypt.spec.js) for encryption and decryption methods.***\n\n### Use in a browser with browserify, webpack or any other bundler\n\nThe code published to npm that gets loaded on require is an ES5 transpiled version with the right shims added. This means that you can require it and use with your favourite bundler without having to adjust asset management process.\n\n```JavaScript\nconst mfs = require('ipfs-mfs-crypto')\n```\n\n### Use in a browser using a script tag\n\nLoading this module through a script tag will make the `mfs` obj available in the global namespace.\n\n```html\n\u003cscript src=\"https://npmcdn.com/ipfs-mfs-crypto/dist/index.min.js\"\u003e\u003c/script\u003e\n\u003c!-- OR --\u003e\n\u003cscript src=\"https://npmcdn.com/ipfs-mfs-crypto/dist/index.js\"\u003e\u003c/script\u003e\n```\n\n### A note on concurrency\n\nThe mfs works by storing a reference to the root node's CID in LevelDB. LevelDB does not support concurrent access so there are read/write locks around bits of the code that modify the the root node's CID.\n\nA lock is kept on the main thread and any requests to read/write from workers or the main thread itself are queued pending release of the lock by the existing holder.\n\nReads are executed together, writes are executed sequentially and prevent any reads from starting.\n\nIf you are using IPFS in a single process or with the node [cluster](https://nodejs.org/api/cluster.html) module this should be completely transparent.\n\nIf you are using [Web Workers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) there is no way to globally listen to messages sent between workers and the main thread so you will need to also use the [observable-webworkers](https://www.npmjs.com/package/observable-webworkers) module to ensure the right message transports are set up to allow requesting/releasing the locks.\n\n## Contribute\n\nAll are welcome, please join in!\n\n\u003c!-- This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). --\u003e\n\nOpen an [issue](https://github.com/cluster-labs/ipfs-mfs-crypto/issues) or send a [PR](https://github.com/cluster-labs/ipfs-mfs-crypto/pulls) - see [CONTRIBUTING.md](./CONTRIBUTING.md) for how to make sure your branch is ready for PRing.\n\n## Changelog\n\nSee [CHANGELOG.md](./CHANGELOG.md) for details of what has changed between releases.\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcluster-labs%2Fipfs-mfs-crypto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcluster-labs%2Fipfs-mfs-crypto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcluster-labs%2Fipfs-mfs-crypto/lists"}