{"id":15455762,"url":"https://github.com/stradivario/gapi-ipfs","last_synced_at":"2026-04-28T22:33:23.936Z","repository":{"id":93607802,"uuid":"136731009","full_name":"Stradivario/gapi-ipfs","owner":"Stradivario","description":"@Gapi Ipfs InterPlanetary File System Module","archived":false,"fork":false,"pushed_at":"2020-01-31T18:32:34.000Z","size":390,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-18T18:21:52.401Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Stradivario.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-09T14:36:40.000Z","updated_at":"2020-01-31T18:32:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"a3184850-7d75-478c-b26e-383b2f20f6bd","html_url":"https://github.com/Stradivario/gapi-ipfs","commit_stats":{"total_commits":443,"total_committers":1,"mean_commits":443.0,"dds":0.0,"last_synced_commit":"c96f380062533aa08bdb657e2da07f68525daf26"},"previous_names":[],"tags_count":318,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stradivario%2Fgapi-ipfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stradivario%2Fgapi-ipfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stradivario%2Fgapi-ipfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stradivario%2Fgapi-ipfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Stradivario","download_url":"https://codeload.github.com/Stradivario/gapi-ipfs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246009078,"owners_count":20708881,"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":"2024-10-01T22:20:42.309Z","updated_at":"2026-04-28T22:33:23.738Z","avatar_url":"https://github.com/Stradivario.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @Gapi Ipfs InterPlanetary File System Module (Beta)\n\n##### More information about IPFS system can be find here [IPFS-WIKI](https://en.wikipedia.org/wiki/InterPlanetary_File_System)\n##### For questions/issues you can write ticket [here](http://gitlab.youvolio.com/gapi/gapi-ipfs/issues)\n##### This module is intended to be used with [GAPI](https://github.com/Stradivario/gapi)\n\n@gapi/ipfs hello world ipfs address:\n\nhttps://ipfs.io/ipfs/QmPhYdx4dB6TwBU1KEbYmyET7HQJoLpyERvRD4kMWv3B3a\n\n\n@Gapi was re-written with low level dependency injection with rxjs 6 more [details](https://github.com/rxdi/core)\n\n## Installation and basic examples:\n##### To install this Gapi module, run:\n\n```bash\n$ npm install @gapi/ipfs --save\n```\n\n## Consuming @gapi/ipfs\n\nWithout configuration\n\n##### Import inside AppModule or CoreModule\n```typescript\n\nimport { Module } from '@rxdi/core';\nimport { IpfsModule } from '@gapi/ipfs';\n\n@Module({\n    imports: [\n        IpfsModule.forRoot({\n            repo: '/home/user/Desktop/ipfs-test',\n            init: true,\n            start: true,\n            logging: true,\n            config: {\n                Addresses: {\n                    API: '/ip4/127.0.0.1/tcp/5001',\n                    Announce: [],\n                    Gateway: '/ip4/127.0.0.1/tcp/8080',\n                    NoAnnounce: [],\n                    Swarm: [\n                        '/ip4/0.0.0.0/tcp/4001',\n                        '/ip6/::/tcp/4001'\n                    ]\n                },\n            }\n        }),\n    ]\n})\nexport class CoreModule { }\n\n```\n\nInteract with Ipfs\n\nnote: keep in mind that this is beta testing contribution is appreciated\n\n```typescript\nimport { Inject, Service } from '@rxdi/core';\nimport { IPFS } from '@gapi/ipfs';\nimport { Readable } from 'stream';\nimport { Observable } from 'rxjs/Observable';\nimport { Subject } from 'rxjs/Subject';\n\n@Service()\nexport class IpfsTestService {\n\n    constructor(\n        @Inject(IPFS) private ipfs: IPFS\n    ) {}\n\n    async ipfsTest() {\n        const content = new Readable();\n        content.push('Hello world from @gapi/ipfs module');\n        content.push(null);\n\n        const file = await this.ipfs.files.add([\n            { path: '/gapi-test-file.txt', content }\n        ]);\n\n        const catContentInsideIpfsNode = (await this.ipfs.files.cat(file[0].hash)).toString();\n        // Cat content of file\n        console.log(catContentInsideIpfsNode);\n\n        // Will print 'Hello world from @gapi/ipfs module'\n\n        // Get file based on hash\n        // file[0].hash 'QmPhYdx4dB6TwBU1KEbYmyET7HQJoLpyERvRD4kMWv3B3a'\n        const fileInsideIpfsNode = await this.ipfs.files.get(file[0].hash);\n\n        // Print content of file\n        console.log(fileInsideIpfsNode[0].content.toString());\n\n        // will print 'Hello world from @gapi/ipfs module'\n\n        return await Promise.resolve();\n    }\n\n}\n\n```\n\nTODO: Better documentation...\n\nEnjoy ! :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstradivario%2Fgapi-ipfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstradivario%2Fgapi-ipfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstradivario%2Fgapi-ipfs/lists"}