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: 5 months 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 (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-04-20T22:03:12.000Z (about 3 years ago)
- Last Synced: 2025-01-08T07:41:56.508Z (6 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
[](https://opensource.org/licenses/Apache-2.0)
[](https://opensource.org/licenses/MIT)
[](https://npmjs.com/@dao-xyz/ipfs-pinning-adapter)
[](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