Skip to main content
Deno HTTP client LITE logo

Lightweight IPFS HTTP client for Deno

nest badge

Forked from js-ipfs-http-client-lite

Features

  • Written in TypeScript
  • Built on browser standards
  • Zero dependencies

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: