Repository
Current version released
3 years ago
Dependencies
esm.sh
Forked from js-ipfs-http-client-lite
Features
- Written in TypeScript
- Built on browser standards
- Zero dependencies
Lead Maintainer (of the fork)
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:
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)