@aut-protocol/sdk-storage
v0.0.6
Published
It a nft.storage wrapper library to help with the issues coming from installing with webpack 5 polyfills in combination with @biconomy/mexa sdk
Downloads
24
Readme
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
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}