Skip to main content

BaseIpfsStorage

@bosonprotocol/ipfs-storage / Exports / BaseIpfsStorage

Class: BaseIpfsStorage

Base IPFS storage class that wraps an instance of IPFSHTTPClient.

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new BaseIpfsStorage(opts)

Parameters

NameType
optsOptions

Defined in

src/ipfs/base.ts:12

Properties

ipfsClient

ipfsClient: IPFSHTTPClient

Defined in

src/ipfs/base.ts:10

Methods

add

add(value): Promise<string>

Parameters

NameType
valueImportCandidate

Returns

Promise<string>

Defined in

src/ipfs/base.ts:16


get

get<T>(uriOrHash, asJson?): Promise<string | T>

Type parameters

Name
T

Parameters

NameTypeDefault value
uriOrHashstringundefined
asJsonbooleantrue

Returns

Promise<string | T>

Defined in

src/ipfs/base.ts:24


getByCID

getByCID<T>(cid, asJson?): Promise<string | T>

Type parameters

Name
T

Parameters

NameTypeDefault value
cidstringundefined
asJsonbooleantrue

Returns

Promise<string | T>

Defined in

src/ipfs/base.ts:42


getByURL

getByURL<T>(url, asJson?): Promise<string | T>

Type parameters

Name
T

Parameters

NameTypeDefault value
urlstringundefined
asJsonbooleantrue

Returns

Promise<string | T>

Defined in

src/ipfs/base.ts:55