Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Implements

  • ShadowDrive

Index

Constructors

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

    • connection: Connection
    • wallet: Wallet | AnchorWallet

    Returns default

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

    • 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: FormData) => Promise<ShadowUploadResponse> = editFile

Type declaration

    • Parameters

      • key: PublicKey

        Publickey of Storage Account

      • url: string

        URL of existing file

      • data: FormData

        File data

      Returns Promise<ShadowUploadResponse>

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

Type declaration

    • (key: PublicKey): Promise<StorageAccount>
    • Get one storage account for the current user

      Parameters

      • key: PublicKey

        Publickey of a Storage Account

      Returns Promise<StorageAccount>

      Storage Account

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

Type declaration

    • (): Promise<StorageAccount[]>
    • Get all storage accounts for the current user

      Returns Promise<StorageAccount[]>

      • List of storage accounts
makeStorageImmutable: (key: PublicKey) => Promise<ShadowDriveResponse> = makeStorageImmutable

Type declaration

program: Program<ShadowDriveUserStaking>
provider: default
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
storageConfigPDA: PublicKey
uploadFile: (key: PublicKey, data: FormData) => Promise<ShadowUploadResponse> = uploadFile

Type declaration

    • Parameters

      • key: PublicKey

        Publickey of Storage Account

      • data: FormData

        FormData for the file to upload

      Returns Promise<ShadowUploadResponse>

      • File location and transaction signature
userInfo: PublicKey

Methods

  • Returns Promise<default>

Generated using TypeDoc