0.0.6 • Published 2 years ago

@aut-protocol/sdk-storage v0.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Overview

It a nft.storage wrapper library to help with the issues coming from installing with webpack 5 polyfills in combination with @biconomy/mexa sdk

NF Storage

nft.storage

Biconomy SDK

Biconomy Mexa

Installation

npm i @aut-protocol/sdk-storage

or if you prefer using yarn yarn @aut-protocol/sdk-storage

Get started

class AutSDKStorage {
    ipfsCIDToHttpUrl(url: string, isJson?: boolean): string;
    storeImageAsBlob: (file: File) => Promise<string>;
    storeAsBlob: (json: any) => Promise<string>;
    storeAsJson: (json: any) => Promise<string>;
    isValidUrl: (uri: string) => boolean;
}

Example usage

const client = new AutSDKStorage({
    nftStorageApiKey: process.env.nftStorageApiKey
});

const respnse = await this.client.storeImageAsBlob(file);
// response ipfs://${cid}