ipfs

Source ipfs

The ipfs library handles the ipfs.test.evan.network connection settings and provides functions to handle restIpfs calls.


ipfsConfig

{
  host: 'ipfs.test.evan.network',
  port: '443',
  protocol: 'https',
  ipfsCache: null
}

Ipfs connection configuration.


restIpfs

restIpfs.api_url(arguments);

The latest latest restIpfs configuration and sets the current ipfsConfig to it.


getRestIpfs

ipfs.getRestIpfs();

Configures rest ipfs and returns the latest instance (used to get restIpfs).

Returns

latest restIpfs: rest ipfs instance


ipfsCatPromise

ipfs.ipfsCatPromise(ipfsHash);

runs the restIpfs function and wraps it into a promise call

Parameters

  1. ipfsHash - string: ipfsHash to load

Returns

Promise returns string: content of the ipfs hash

Example

ipfs.ipfsCatPromise('Qmb...')