Skip to main content
Deno 2 is finally here πŸŽ‰οΈ
Learn more

Deno HTTP client LITE logo

A lightweight Deno HTTP client library for IPFS.

A fork of js-ipfs-http-client-lite for using with Deno

Lead Maintainer (of the fork)

v1rtl.

Examples

Read files

import { IPFS } from 'https://deno.land/x/ipfs/mod.ts'

const ipfs = new IPFS({})

const res = await ipfs.cat('QmZ4tDuvesekSs4qM5ZBKpXiZGun7S2CYtEZRB3DYXkjGx')

console.log(await res.text()) // hello worlds

File upload

import { IPFS } from 'https://deno.land/x/ipfs/mod.ts'

const ipfs = new IPFS({})

const body = new FormData()

const file = await Deno.readFile('README.md')

body.append('file', new Blob([file], { type: 'text/plain' }), 'README.md')

const json = await ipfs.add(body)

console.log(json)

License

Dual-licensed under Apache 2.0 and MIT terms: