Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dao-xyz/ipfs-pinning-adapter

Framework for unifying different IPFS pinning services
https://github.com/dao-xyz/ipfs-pinning-adapter

Last synced: 3 days ago
JSON representation

Framework for unifying different IPFS pinning services

Awesome Lists containing this project

README

        

# IPFS pinning services adapter
[![Project license](https://img.shields.io/badge/license-Apache2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Project license](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![NPM version](https://img.shields.io/npm/v/@dao-xyz/ipfs-pinning-adapter.svg?style=flat-square)](https://npmjs.com/@dao-xyz/ipfs-pinning-adapter)
[![Size on NPM](https://img.shields.io/bundlephobia/minzip/@dao-xyz/ipfs-pinning-adapter.svg?style=flat-square)](https://npmjs.com/@dao-xyz/ipfs-pinning-adapter)

A library for a common interface towards different IPFS pinning services.
Currently supports:
* pinata.cloud
* nft.storage

The goal is to make a Buffer friendly interface towards different services.
##
```typescript
import { PinataAdapter } from "../adapters/pinata";
import { NftStorageAdapter } from "../adapters/nftstorage";

import { KeySecretConfig, SimpleConfig } from "../config";

const pinata = new PinataAdapter({... CONFIG ...})
const nftStorage = new NftStorageAdapter({... CONFIG ...})

const buffer = Buffer.from ( ... Some UIntArray ...)
const cid1 = await pinata.pin(buffer)
const cid2 = await nftStorage.pin(buffer)
```

Please see [integration tests](src/__tests__/index.integration.test.ts) for working examples.

## Suggestions, problems?
Please create a ticket