Package Exports
- nft.storage
- nft.storage/src/platform.js
Readme
nft.storage
A client library for the https://nft.storage/ service. It provides a convenient interface for working with the Raw HTTP API from a web browser or Node.js and comes bundled with TS for out-of-the box type inference and better IntelliSense.
Install
Install the package using npm
npm install nft.storage
Or yarn
yarn add nft.storage
Usage
First, obtain an API token from https://nft.storage and use it in place of API_TOKEN
below:
import { NFTStorage } from 'nft.storage'
const client = new NFTStorage({ token: API_TOKEN })
const cid = await client.storeBlob(new Blob(['hello world']))
For more examples please see the API documentation.