new IPFS(options)
Create an instance of the IPFS service.
Parameters:
Name | Type | Description |
---|---|---|
options |
See CaskSDK "ipfs" configuration. |
Methods
(async) load(cid) → {Promise.<Object>}
Load an IPFS CID using the configured IPFS gateway.
Parameters:
Name | Type | Description |
---|---|---|
cid |
CID to load |
Returns:
- Type
- Promise.<Object>
(async) save(data)
Pin data to IPFS using the configured provider.
Parameters:
Name | Type | Description |
---|---|---|
data |
Object | Data to pin. Will be serialized to JSON. |