ipfs-no-bs
v0.0.2
Published
A production-ready TypeScript HTTP Client library designed for pinning and retrieving data from IPFS.
Downloads
6
Readme
An IPFS TypeScript HTTP Client built for what matters.
A production-ready TypeScript HTTP Client library designed for pinning and retrieving data from IPFS. This library simplifies the process of sending and receiving large data to and from an IPFS node or gateway, emphasizing core production use cases with a focus on usability.
Features
- IPFS File & Folder Pinning: Efficiently pin files and folders to IPFS with minimal configuration.
AddAll
: Pin multiple files or folders to IPFS at once.Add
: Pin a single file or folder to IPFS.
- Block Operations: Perform operations directly on blocks within IPFS.
GetRefs
: Retrieve references of linked objects.BlockGet
: Get a block from IPFS.BlockPut
: Store a block in IPFS.
- File Verification: Ensure data integrity through CID verification using the UNIX-Importer/Exporter-in-Memory approach.
- Local File Operations: Interact with local files using read streams for efficient data handling.
GetFilesWithReadStreams
: Get folder or file ReadStreams to stream files from the local filesystem to IPFS.
Getting Started
Prerequisites
This library is built using TypeScript, so having TypeScript installed globally or in your project is recommended.
Installation
Install the IPFS TypeScript HTTP Client via npm:
npm install ipfs-no-bs
Architectural Considerations
The ipfs-no-bs library was built with the primary architectural considerations in mind:
Uses the native fetch interface for Browser AND NodeJS
Uses the native FormData interface for Browser AND NodeJS
No external dependencies
Supports very large files of any size via ReadStreams
Should work with any reverse-proxy/caching/cdn infront of IPFS
- No FormaData SSL EPROTO errors with large streaming formdata like in (axios, and other common http libraries).
- Uses keep-alive without having to use dynamic imports for the http(s) agent.
Built with love for IPFS and what works now, we remain committed to practical, real-world applications of distributed storage. Steering clear of the hype-driven and often impractical solutions that pervade the space. We focus on delivering a tool that not only meets the needs of developers today but does so with efficiency, reliability, and a straightforward approach that prioritizes actual use cases over theoretical benefits.
Fully compatible with server frameworks like NextJS (unlike https://github.com/ipfs/js-kubo-rpc-client which is currently broken)