import { web3 } from "@project-serum/anchor"; import { createStorageAccount, addStorage, claimStake, deleteFile, deleteStorageAccount, editFile, getStorageAcc, getStorageAccs, makeStorageImmutable, reduceStorage, cancelDeleteFile, cancelDeleteStorageAccount, uploadFile, uploadMultipleFiles, listObjects, listObjectsAndSizes, redeemRent, migrate } from "./methods"; import { ShadowDriveVersion, CreateStorageResponse, ShadowBatchUploadResponse, ShadowDriveResponse, ShadowFile, ShadowUploadResponse, ShadowEditResponse, StorageAccount, StorageAccountResponse, ListObjectsResponse, ListObjectsAndSizesResponse, StorageAccountInfo } from "./types"; interface ShadowDrive { createStorageAccount(name: string, size: string, version: ShadowDriveVersion, owner2: web3.PublicKey): Promise; addStorage(key: web3.PublicKey, size: string, version: ShadowDriveVersion): Promise; claimStake(key: web3.PublicKey, version: ShadowDriveVersion): Promise; deleteFile(key: web3.PublicKey, url: string, version: ShadowDriveVersion): Promise; editFile(key: web3.PublicKey, url: string, data: File | ShadowFile, version: ShadowDriveVersion): Promise; getStorageAcc?(key: web3.PublicKey): Promise; getStorageAccs?(): Promise; listObjects(key: web3.PublicKey): Promise; listObjectsAndSizes(key: web3.PublicKey): Promise; makeStorageImmutable(key: web3.PublicKey, version: ShadowDriveVersion): Promise; getStorageAccount(key: web3.PublicKey): Promise; getStorageAccounts(version: ShadowDriveVersion): Promise; reduceStorage(key: web3.PublicKey, size: string, version: ShadowDriveVersion): Promise; cancelDeleteFile(key: web3.PublicKey, url: string): Promise; cancelDeleteStorageAccount(key: web3.PublicKey, version: ShadowDriveVersion): Promise; uploadFile(key: web3.PublicKey, data: File | ShadowFile, version: ShadowDriveVersion): Promise; uploadMultipleFiles(key: web3.PublicKey, data: FileList | ShadowFile[], concurrent?: number, callback?: Function): Promise; deleteStorageAccount(key: web3.PublicKey, version: ShadowDriveVersion): Promise; redeemRent(key: web3.PublicKey, fileAccount: web3.PublicKey): Promise; migrate(key: web3.PublicKey): Promise; } /** * * Todo - Typescript does not currently support splitting up class definition into multiple files. These methods * are therefore added as properties to the ShdwDrive class. Can move all method definitions into this file to resolve. * */ export declare class ShdwDrive implements ShadowDrive { private connection; private wallet; private program; storageConfigPDA: web3.PublicKey; userInfo: web3.PublicKey; createStorageAccount: typeof createStorageAccount; addStorage: typeof addStorage; claimStake: typeof claimStake; deleteFile: typeof deleteFile; deleteStorageAccount: typeof deleteStorageAccount; editFile: typeof editFile; getStorageAccount: typeof getStorageAcc; getStorageAccounts: typeof getStorageAccs; listObjects: typeof listObjects; listObjectsAndSizes: typeof listObjectsAndSizes; makeStorageImmutable: typeof makeStorageImmutable; reduceStorage: typeof reduceStorage; /** * @deprecated The method should not be used as of Shadow Drive v1.5 */ cancelDeleteFile: typeof cancelDeleteFile; cancelDeleteStorageAccount: typeof cancelDeleteStorageAccount; uploadFile: typeof uploadFile; uploadMultipleFiles: typeof uploadMultipleFiles; redeemRent: typeof redeemRent; migrate: typeof migrate; /** * * @param connection {web3.Connection} connection - initialized web3 connection object * @param wallet - Web3 wallet */ constructor(connection: web3.Connection, wallet: any); init(): Promise; } export { ShadowDriveVersion, CreateStorageResponse, ShadowDriveResponse, ShadowUploadResponse, ShadowEditResponse, ShadowFile, StorageAccount, StorageAccountResponse, ShadowBatchUploadResponse, ListObjectsResponse, StorageAccountInfo, }; //# sourceMappingURL=index.d.ts.map