Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/dao-xyz/ipfs-pinning-adapter
- Owner: dao-xyz
- License: apache-2.0
- Created: 2022-01-31T21:33:30.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-04-20T22:03:12.000Z (over 2 years ago)
- Last Synced: 2024-09-16T12:56:49.042Z (about 2 months ago)
- Language: TypeScript
- Size: 379 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.storageThe 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