JS API Reference

Interface: StorageProvider

storage/provider.StorageProvider

Implemented by

Table of contents

Methods

Methods

init

init(): Promise<void>

Initialize storage provider.

Returns

Promise<void>

Defined in

src/storage/provider.ts:7


close

close(): Promise<void>

Close storage provider and release all resources.

Returns

Promise<void>

Defined in

src/storage/provider.ts:12


receiveFile

receiveFile(destPath): Promise<string>

Return allocated resource URL from Yagna of a file to be downloaded.

Parameters

NameType
destPathstring

Returns

Promise<string>

Defined in

src/storage/provider.ts:17


receiveData

receiveData(callback): Promise<string>

Return allocated resource URL from Yagna of a file to be downloaded.

Parameters

NameType
callbackStorageProviderDataCallback

Returns

Promise<string>

Defined in

src/storage/provider.ts:22


publishFile

publishFile(srcPath): Promise<string>

Return allocated resource URL from Yagna of a file to be uploaded.

Parameters

NameType
srcPathstring

Returns

Promise<string>

Defined in

src/storage/provider.ts:28


publishData

publishData(data): Promise<string>

Return allocated resource URL from Yagna of data to be uploaded.

Parameters

NameType
dataUint8Array

Returns

Promise<string>

Defined in

src/storage/provider.ts:34


release

release(urls): Promise<void>

Release previously allocated resource URL from Yagna.

Parameters

NameType
urlsstring[]

Returns

Promise<void>

Defined in

src/storage/provider.ts:40

Was this helpful?