Skip to content

dao-xyz/ipfs-pinning-adapter

Repository files navigation

IPFS pinning services adapter

Project license Project license NPM version Size on NPM

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.

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 for working examples.

Suggestions, problems?

Please create a ticket