Package Exports
- @aut-protocol/sdk-storage
- @aut-protocol/sdk-storage/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@aut-protocol/sdk-storage) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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}