{"id":14483695,"url":"https://github.com/fission-codes/get-ipfs","last_synced_at":"2025-08-30T04:31:44.714Z","repository":{"id":35529941,"uuid":"203655215","full_name":"fission-codes/get-ipfs","owner":"fission-codes","description":"Utility to get a contextual js-ipfs instance, with graceful web fallbacks","archived":true,"fork":false,"pushed_at":"2022-06-10T00:41:50.000Z","size":402,"stargazers_count":23,"open_issues_count":6,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-29T10:55:02.976Z","etag":null,"topics":["ipfs","ipfs-web","utility"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/fission-codes.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-21T19:56:47.000Z","updated_at":"2025-07-25T07:55:52.000Z","dependencies_parsed_at":"2022-09-08T15:23:22.199Z","dependency_job_id":null,"html_url":"https://github.com/fission-codes/get-ipfs","commit_stats":null,"previous_names":["fission-suite/get-ipfs"],"tags_count":1,"template":false,"template_full_name":"fission-codes/project-template","purl":"pkg:github/fission-codes/get-ipfs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fission-codes%2Fget-ipfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fission-codes%2Fget-ipfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fission-codes%2Fget-ipfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fission-codes%2Fget-ipfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fission-codes","download_url":"https://codeload.github.com/fission-codes/get-ipfs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fission-codes%2Fget-ipfs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272805349,"owners_count":24995909,"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","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"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":["ipfs","ipfs-web","utility"],"created_at":"2024-09-03T00:02:00.033Z","updated_at":"2025-08-30T04:31:44.337Z","avatar_url":"https://github.com/fission-codes.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"![](https://github.com/fission-suite/get-ipfs/raw/master/assets/logo.png?sanitize=true)\n\n# Get IPFS\n\n[![NPM](https://img.shields.io/npm/v/get-ipfs)](https://www.npmjs.com/package/get-ipfs)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/fission-suite/blob/master/LICENSE)\n[![Build Status](https://travis-ci.org/fission-suite/get-ipfs.svg?branch=master)](https://travis-ci.org/fission-suite/get-ipfs)\n[![Maintainability](https://api.codeclimate.com/v1/badges/8de358f51066211e246c/maintainability)](https://codeclimate.com/github/fission-suite/get-ipfs/maintainability)\n[![Built by FISSION](https://img.shields.io/badge/⌘-Built_by_FISSION-purple.svg)](https://fission.codes)\n[![Discord](https://img.shields.io/discord/478735028319158273.svg)](https://discord.gg/zAQBDEq)\n[![Discourse](https://img.shields.io/discourse/https/talk.fission.codes/topics)](https://talk.fission.codes)\n\nA one-stop shop for loading an ipfs instance into a webpage.\n\nAttempts to load ipfs in the following order and returns the result in a Promise:\n1. `window.ipfs.enable`: the current `window.ipfs` api. Available if the user is using Opera or has the ipfs-companion extension installed.\n2. `window.ipfs`: the old `window.ipfs` api. Does not include enabling permissions all at once.\n3. `js-ipfs`: an in-browser ipfs node that communicates via WebRTC/Websockets. The `js-ipfs` code is only loaded if required. Can be configured using the `jsIpfs` setting.\n\n\n\n## Usage\n\n```js\nimport getIpfs from 'get-ipfs'\n\nconst ipfs = await getIpfs(config)\n```\n\n\n### Config\n\n```js\n{\n  // `permissions` are enabled if the browser is ipfs-capable (Opera or extension)\n  // passed to `window.ipfs.enable` if available\n  // prevents a permission dialog from appearing for every action\n  permissions: ['id', 'version', 'add', 'cat', 'dag', 'swarm'],\n\n  // `peers` is a list of peer multiaddrs to connect to on load\n  // to work with the `js-ipfs` fallback, these must have available websocket ports\n  peers: [],\n\n  // `browserPeers` is a list of peer multiaddrs to connect to only on fallback to an in-browser js-ipfs daemon\n  // note: these must be secure websocket or WebRTC addresses\n  browserPeers: [],\n\n  // `localPeers` is a list of peer multiaddrs to connect to if using a local ipfs daemon (through ipfs companion for instance)\n  localPeers: [],\n\n  // (optional) Configure how to load js-ipfs. By default this'll be an unpkg url that points to the latest minified distribution.\n  jsIpfs: \"https://unpkg.com/ipfs@latest/dist/index.min.js\",\n  jsIpfs: async () =\u003e await import(\"ipfs\"),\n  jsIpfs: () =\u003e Promise.resolve(Ipfs)\n}\n```\n\n\n\n## Testing\n\n### Tests coming soon!!\n\n- Run `npm i`\n- Run tests with: `npm run test`\n- Continuously watch with `npm run test:watch`\n\n\n\n## Notes\n\nThis repo currently makes use of types from [typestub-ipfs](https://github.com/beenotung/typestub-ipfs).\n\nGive your support [here](https://github.com/ipfs/js-ipfs/issues/1166) for types to be merged into `js-ipfs` or `DefinitelyTyped`.\n\nThis repo is similar to [ipfs-provider](https://github.com/ipfs-shipyard/ipfs-provider). One big difference is that `ipfs-provider` doesn't use ES6 syntax so it can't be used without a module bundler.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffission-codes%2Fget-ipfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffission-codes%2Fget-ipfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffission-codes%2Fget-ipfs/lists"}