Latest Supply Chain Attack:Mini Shai-Hulud Hits @antv npm Packages, 639 Versions Compromised.Learn More
Sign In

nestjs-ipfs-http

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nestjs-ipfs-http

IPFS HTTP-API Module

latest
npmnpm
Version
0.3.1
Version published
Maintainers
1
Created
Source

IPFS HTTP module for Nest framework (NestJS)

This package provides a IPFS client as a NestJS Module.

Because the previous IPFS HTTP module has been depreciated, and the replacement kubo-rpc-client is utter madness to work with in CommonJS (kubo-rpc-client is a ESM library, which relies on ipfs-utils which is a CommonJS library), I decided to manually implement the important endpoints.

Here's what's supported:

  • add
  • get
  • cat
  • stats/dht

Installation

  • v0.2.0 is using NestJS 9 for legacy reasons.
pnpm install nestjs-ipfs-http

Usage

This module expects a running IPFS daemon.

ipfs daemon

Import

@Module({
    imports: [
        IpfsHttpModule.registerAsync({
            useFactory: () => {
                return {
                    client: {
                        host: '127.0.0.1',
                        port: 5001,
                    },
                }
            },
        }),
    ],
})
export class AppModule {}

Use

const isOnline = await ipfsHttpService.client.isOnline()
console.log(isOnline) // true

Refer to test/e2e/ipfs.spec.ts for more examples.

Test

pnpm run test

FAQs

Package last updated on 24 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts