Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ShdwDrive

Implements

  • ShadowDrive

Index

Constructors

  • new ShdwDrive(connection: Connection, wallet: any): ShdwDrive

Properties

addStorage: (key: PublicKey, size: string, version: string) => Promise<ShadowDriveResponse> = addStorage

Type declaration

    • Parameters

      • key: PublicKey

        Public Key of the existing storage to increase size on

      • size: string

        Amount of storage you are requesting to add to your storage account. Should be in a string like '1KB', '1MB', '1GB'. Only KB, MB, and GB storage delineations are supported currently.

      • version: string

        ShadowDrive version (v1 or v2)

      Returns Promise<ShadowDriveResponse>

      Confirmed transaction ID

cancelDeleteFile: (key: PublicKey, url: string) => Promise<ShadowDriveResponse> = cancelDeleteFile

Type declaration

    • Parameters

      • key: PublicKey

        Publickey of Storage Account

      • url: string

        Shadow Drive URL of the file you are requesting to undelete.

      Returns Promise<ShadowDriveResponse>

      • Confirmed transaction ID
cancelDeleteStorageAccount: (key: PublicKey, version: string) => Promise<ShadowDriveResponse> = cancelDeleteStorageAccount

Type declaration

    • Parameters

      • key: PublicKey

        Publickey of a Storage Account

      • version: string

        ShadowDrive version (v1 or v2)

      Returns Promise<ShadowDriveResponse>

      • Confirmed transaction ID
claimStake: (key: PublicKey, version: string) => Promise<ShadowDriveResponse> = claimStake

Type declaration

    • Parameters

      • key: PublicKey

        PublicKey of a Storage Account

      • version: string

        ShadowDrive version (v1 or v2)

      Returns Promise<ShadowDriveResponse>

      • Confirmed transaction ID
createStorageAccount: (name: string, size: string, version: string, owner2?: PublicKey) => Promise<CreateStorageResponse> = createStorageAccount

Type declaration

    • 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.

      Parameters

      • name: string

        What you want your storage account to be named. (Does not have to be unique)

      • size: string

        Amount of storage you are requesting to create. Should be in a string like '1KB', '1MB', '1GB'. Only KB, MB, and GB storage delineations are supported currently.

      • version: string

        ShadowDrive version(v1 or v2)

      • Optional owner2: PublicKey

        Optional secondary owner for the storage account.

      Returns Promise<CreateStorageResponse>

      Created bucket and transaction signature

deleteFile: (key: PublicKey, url: string, version: string) => Promise<ShadowDriveResponse> = deleteFile

Type declaration

    • Parameters

      • key: PublicKey

        Publickey of Storage Account

      • url: string

        Shadow Drive URL of the file you are requesting to delete.

      • version: string

        ShadowDrive version (v1 or v2)

      Returns Promise<ShadowDriveResponse>

      • Confirmed transaction ID
deleteStorageAccount: (key: PublicKey, version: string) => Promise<ShadowDriveResponse> = deleteStorageAccount

Type declaration

    • Parameters

      • key: PublicKey

        PublicKey of a StorageAccount

      • version: string

        ShadowDrive (v1 or v2)

      Returns Promise<ShadowDriveResponse>

      • Confirmed transaction ID
editFile: (key: PublicKey, url: string, data: File | ShadowFile, version: string) => Promise<ShadowUploadResponse> = editFile

Type declaration

    • Parameters

      • key: PublicKey

        Publickey of Storage Account

      • url: string

        URL of existing file

      • data: File | ShadowFile

        File or ShadowFile object, file extensions should be included in the name property of ShadowFiles.

      • version: string

        ShadowDrive version (v1 or v2)

      Returns Promise<ShadowUploadResponse>

      • File location and transaction signature
getStorageAccount: (key: PublicKey) => Promise<StorageAccountInfo> = getStorageAcc

Type declaration

    • Get storage account details

      Parameters

      • key: PublicKey

        Publickey of a Storage Account

      Returns Promise<StorageAccountInfo>

      Storage Account

getStorageAccounts: (version: string) => Promise<StorageAccountResponse[]> = getStorageAccs

Type declaration

    • Get all storage accounts for the current user

      Parameters

      • version: string

        ShadowDrive version (v1 or v2)

      Returns Promise<StorageAccountResponse[]>

      • List of storage accounts
listObjects: (storageAccount: PublicKey) => Promise<ListObjectsResponse> = listObjects

Type declaration

makeStorageImmutable: (key: PublicKey, version: string) => Promise<ShadowDriveResponse> = makeStorageImmutable

Type declaration

    • Parameters

      • key: PublicKey

        Publickey of a Storage Account

      • version: string

        ShadowDrive version (v1 or v2)

      Returns Promise<ShadowDriveResponse>

      • Confirmed transaction ID
migrate: (key: PublicKey) => Promise<ShadowDriveResponse> = migrate

Type declaration

redeemRent: (key: PublicKey, fileAccount: PublicKey) => Promise<ShadowDriveResponse> = redeemRent

Type declaration

    • Parameters

      • key: PublicKey

        PublicKey of a Storage Account

      • fileAccount: PublicKey

        PublicKey of the file account to close

      Returns Promise<ShadowDriveResponse>

      • Confirmed transaction ID
reduceStorage: (key: PublicKey, size: string, version: string) => Promise<ShadowDriveResponse> = reduceStorage

Type declaration

    • Parameters

      • key: PublicKey

        Publickey of a Storage Account

      • size: string

        Amount of storage you are requesting to reduce from your storage account. Should be in a string like '1KB', '1MB', '1GB'. Only KB, MB, and GB storage delineations are supported currently.

      • version: string

        ShadowDrive version (v1 or v2)

      Returns Promise<ShadowDriveResponse>

      • Confirmed transaction ID
uploadFile: (key: PublicKey, data: File | ShadowFile, version: string) => Promise<ShadowUploadResponse> = uploadFile

Type declaration

    • Parameters

      • key: PublicKey

        Publickey of Storage Account.

      • data: File | ShadowFile

        File or ShadowFile object, file extensions should be included in the name property of ShadowFiles.

      • version: string

        ShadowDrive version (v1 or v2)

      Returns Promise<ShadowUploadResponse>

      File location and transaction signature.

uploadMultipleFiles: (key: PublicKey, data: FileList | ShadowFile[]) => Promise<ShadowBatchUploadResponse[]> = uploadMultipleFiles

Type declaration

Methods

Generated using TypeDoc