BaseIpfsStorage
@bosonprotocol/ipfs-storage / Exports / BaseIpfsStorage
Class: BaseIpfsStorage
Base IPFS storage class that wraps an instance of IPFSHTTPClient.
Hierarchy
BaseIpfsStorage
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new BaseIpfsStorage(opts)
Parameters
| Name | Type |
|---|---|
opts | Options |
Defined in
Properties
ipfsClient
• ipfsClient: IPFSHTTPClient
Defined in
Methods
add
▸ add(value): Promise<string>
Parameters
| Name | Type |
|---|---|
value | ImportCandidate |
Returns
Promise<string>
Defined in
get
▸ get<T>(uriOrHash, asJson?): Promise<string | T>
Type parameters
| Name |
|---|
T |
Parameters
| Name | Type | Default value |
|---|---|---|
uriOrHash | string | undefined |
asJson | boolean | true |
Returns
Promise<string | T>
Defined in
getByCID
▸ getByCID<T>(cid, asJson?): Promise<string | T>
Type parameters
| Name |
|---|
T |
Parameters
| Name | Type | Default value |
|---|---|---|
cid | string | undefined |
asJson | boolean | true |
Returns
Promise<string | T>
Defined in
getByURL
▸ getByURL<T>(url, asJson?): Promise<string | T>
Type parameters
| Name |
|---|
T |
Parameters
| Name | Type | Default value |
|---|---|---|
url | string | undefined |
asJson | boolean | true |
Returns
Promise<string | T>