Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ShdwDrive

Implements

  • ShadowDrive

Index

Constructors

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

    • connection: Connection

      connection - initialized web3 connection object

    • wallet: any

      Web3 wallet

    Returns ShdwDrive

Properties

addStorage: (key: PublicKey, size: string, version: ShadowDriveVersion) => 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: ShadowDriveVersion

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

Type declaration

claimStake: (key: PublicKey, version: ShadowDriveVersion) => Promise<ShadowDriveResponse> = claimStake

Type declaration

createStorageAccount: (name: string, size: string, version: ShadowDriveVersion, 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: ShadowDriveVersion

        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: ShadowDriveVersion) => Promise<ShadowDriveResponse> = deleteFile

Type declaration

deleteStorageAccount: (key: PublicKey, version: ShadowDriveVersion) => Promise<ShadowDriveResponse> = deleteStorageAccount

Type declaration

editFile: (key: PublicKey, url: string, data: File | ShadowFile, version: ShadowDriveVersion) => Promise<ShadowUploadResponse> = editFile

Type declaration

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: ShadowDriveVersion) => Promise<StorageAccountResponse[]> = getStorageAccs

Type declaration

listObjects: (storageAccount: PublicKey) => Promise<ListObjectsResponse> = listObjects

Type declaration

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

Type declaration

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: ShadowDriveVersion) => 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: ShadowDriveVersion

        ShadowDrive version (v1 or v2)

      Returns Promise<ShadowDriveResponse>

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

Type declaration

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

Type declaration

userInfo: PublicKey

Methods

Generated using TypeDoc