Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ShdwDrive

Implements

  • ShadowDrive

Index

Constructors

  • new ShdwDrive(connection: Connection, wallet: Wallet | AnchorWallet): ShdwDrive
  • Parameters

    • connection: Connection
    • wallet: Wallet | AnchorWallet

    Returns ShdwDrive

Properties

addStorage: (key: PublicKey, size: 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.

      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) => Promise<ShadowDriveResponse> = cancelDeleteStorageAccount

Type declaration

claimStake: (key: PublicKey) => Promise<ShadowDriveResponse> = claimStake

Type declaration

createStorageAccount: (name: string, size: string) => 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.

      Returns Promise<CreateStorageResponse>

      • Created bucket and transaction signature
deleteFile: (key: PublicKey, url: 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.

      Returns Promise<ShadowDriveResponse>

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

Type declaration

editFile: (key: PublicKey, url: string, data: File | ShadowFile) => 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.

      Returns Promise<ShadowUploadResponse>

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

Type declaration

    • Get one storage account for the current user

      Parameters

      • key: PublicKey

        Publickey of a Storage Account

      Returns Promise<StorageAccount>

      Storage Account

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

Type declaration

makeStorageImmutable: (key: PublicKey) => Promise<ShadowDriveResponse> = makeStorageImmutable

Type declaration

reduceStorage: (key: PublicKey, size: 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.

      Returns Promise<ShadowDriveResponse>

      • Confirmed transaction ID
uploadFile: (key: PublicKey, data: File | ShadowFile) => 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.

      Returns Promise<ShadowUploadResponse>

      • File location and transaction signature.
uploadMultipleFiles: (key: PublicKey, data: FileList | ShadowFile[]) => Promise<ShadowBatchUploadResponse[]> = uploadMultipleFiles

Type declaration

Methods

Generated using TypeDoc