Have ideas to improve npm?Join in the discussion! »

    nft.storage
    TypeScript icon, indicating that this package has built-in type declarations

    0.4.1 • Public • Published

    nft.storage

    ci package styled with prettier size deps codecov

    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.

    Keywords

    none

    Install

    npm i nft.storage

    DownloadsWeekly Downloads

    91

    Version

    0.4.1

    License

    (Apache-2.0 AND MIT)

    Unpacked Size

    257 kB

    Total Files

    59

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar